Flash as interactive texture with alpha channel viacopyPixels

Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default Flash as interactive texture with alpha channel viacopyPixels

    I want to use Flash member as interactive 3D texture.
    When I copy Flash sprite image to texture (via copyPixels) a lose the alpha
    channel of Flash movie.

    theMember = member(1, 1)
    pImage = image(380,600,32)
    pImage.copyPixels((the stage).image, pImage.rect, sprite(flashsprite).rect)
    theTexture2 = theMember.newTexture("flash2",#fromImageObject,pIm age)
    theShader = member(1, 1).shader("flash_mat")
    theShader.texture = theTexture2
    theShader.useDiffuseWithTexture = 0
    Help please how to prevent this (losing of flash transparency)?

    eone Guest

  2. Similar Questions and Discussions

    1. texture blend whit alpha channel
      HI, can anyone solve this topic? I want to blend a texture in to another using a gradient alpha channel inside a given shader. If I try wiht...
    2. Alpha Channel from B&W layer
      I know how to create an alpha channel and paint in your mask using black and white. My question is this: How can you take an already black and white...
    3. What's the scrypt to make IE show the alpha channel as transparent for flash objects?
      What's the scrypt to make IE show the alpha channel as transparent for flash objects? Thanks, CB
    4. DTS, multi-texture & alpha channel
      I must use a multi-layer textur with an alpha channel in, but if the DTS is disabled the transparency is not correct. I cannot enable DTS cause I...
    5. Alpha Channel and CopyPixels
      it looks like you are copying into the alpha channel of the destination image. Try creating a temp image to composeand then copy to the destination...
  3. #2

    Default Re: Flash as interactive texture with alpha channel viacopyPixels

    You need to set the #renderFormat property of your texture to a value which
    takes into account the alpha channel. You will get the best quality display
    with #rgba8888. This comes at the price of greater memory usage and slower
    performance:

    -- <snipped code>
    theTexture2 = theMember.newTexture("flash2",#fromImageObject,pIm age)
    theTexture2.renderFormat = #rgba8888
    -- <more snipped code>

    Other values which activate the alpha channel are:

    #rgba5551 -- alpha is opaque or transparent
    #rgba4444 -- limited range of colors and transparency


    openspark Guest

  4. #3

    Default Re: Flash as interactive texture with alpha channel viacopyPixels

    That didn't work for me. If the Flash Sprite ink is set to background
    transparent, the final image will include the part of the stage beneath the
    flash sprite.

    Should I place the Flash Sprite above a specific place of the stage? or place
    something underneath it?

    I wish I could use the flash cast member instead of the sprite, but, then the
    texture wouldn't be updated, right?

    foq Guest

  5. #4

    Default Re: Flash as interactive texture with alpha channel viacopyPixels

    Originally posted by: eone
    I want to use Flash member as interactive 3D texture.
    When I copy Flash sprite image to texture (via copyPixels) a lose the alpha
    channel of Flash movie.
    This is not a good idea because the frame rate is going down too much ("SWF +
    copyPixels" = a method hungry for resources).
    Export each SWF keyframe as bitmap (if not too many ...) and include them in
    the W3D file.
    cheers



    necromanthus Guest

  6. #5

    Default Re: Flash as interactive texture with alpha channel viacopyPixels

    Thank you for replying.

    The problem is that the flash is interactive... so it's impossible to export every keyframe, as the images change according to the user's interaction.
    foq Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139