Professional Web Applications Themes

Semi transparent models, using a greyscale image - Macromedia Director 3D

Hi, Ive done a few searches on the forum for this. But couldnt find a specific answer. With regards to textures with alpha channels, and im not sure if im aiming in the right direction. I want to have a semi transparent model, of a hair model actually. I have a grayscale image, which is the alpha channel information, and i have a number of textures of various hair colours that work with this greyscale alpha jpg. I'd like to assign the alpha channel jpg to textureList[1], to ahieve transparency according to the greyscale image. then apply the specific hair ...

  1. #1

    Default Semi transparent models, using a greyscale image

    Hi,

    Ive done a few searches on the forum for this. But couldnt find a specific
    answer. With regards to textures with alpha channels, and im not sure if im
    aiming in the right direction.

    I want to have a semi transparent model, of a hair model actually. I have a
    grayscale image, which is the alpha channel information, and i have a number of
    textures of various hair colours that work with this greyscale alpha jpg.

    I'd like to assign the alpha channel jpg to textureList[1], to ahieve
    transparency according to the greyscale image. then apply the specific hair
    colour jpg to textureList[2].

    Ive played around with blend, blendSource and blendConstant, and I can get a
    bit of an effect(streaks in the girls hair), but not the alpha channel
    effecting the visibility of the model effect i'm after.

    Is it possible to affect the visibility of a models polys, through a greyscale
    texture/jpg being used for alpha channel information? Is there another way,
    that ive missed?

    Thanks in advance,
    Glenno

    GlennoUK Guest

  2. #2

    Default Re: Semi transparent models, using a greyscale image

    The easiest way is to use PNG with 32bit alpha channel. When you use these textures in your shader, then it will be transparent by default.

    Make also sure you use the correct textureRenderFormat.
    hondo3000 Guest

  3. #3

    Default Re: Semi transparent models, using a greyscale image

    You could even animate the alpha of the image using imaging lingo. To set it on
    a single #fromImageObject texture you will need to create two images, a 32 bit
    "host" image and an 8 bit grayscale image. You can then use setAlpha() to apply
    the alpha information to your host image and then create the texture using the
    32 bit imageobject (with the correct texturerenderformat). If either the host
    imageobject is not 32 bit or the grayscale image not 8 bit the setAlpha()
    operation will fail silently.

    _eyesonly Guest

  4. #4

    Default Re: Semi transparent models, using a greyscale image

    > If either the host 

    Adding to this, if the dimensions aren't the same the setAlpha() command
    will fail; and I wouldn't say "silently" as the command returns a
    boolean indicating success or not:
    bSuccess = imageObject.setAlpha(alphaImageObject)
    Sean Guest

  5. #5

    Default Re: Semi transparent models, using a greyscale image

    Thanks very much for the replies. Unfortunately theres a lot of textures, with
    the vast majority already been made, and where an alpha was needed, its been
    supplied seperately as a seperate greyscale jpg. Next step is to try your
    suggestion of using the greyscale image as the alpha for an image object. And
    if not, get the required alpha textures remade as PNGs.

    Thanks again,
    Glenno

    GlennoUK Guest

Similar Threads

  1. Semi-Transparent Overlay?
    By schooloffish in forum Macromedia Freehand
    Replies: 2
    Last Post: May 5th, 03:55 PM
  2. Semi-Transparent Sliding Menu?
    By fourthtower in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: November 27th, 08:27 PM
  3. Pop up menus semi-transparent menu background
    By anji2222 webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 4
    Last Post: October 1st, 11:59 PM
  4. semi transparent background to dropdown menus?
    By the-creator in forum Macromedia Fireworks
    Replies: 0
    Last Post: July 29th, 02:35 PM
  5. Cocoa and semi-transparent rounded windows
    By Ronny Salomonsen in forum Mac Programming
    Replies: 3
    Last Post: July 16th, 01:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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