blending between 2 textures

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

  1. #1

    Default blending between 2 textures

    I have a model that has been exported from max with 1 uv set, no sub
    materials, pretty basic. Now I've duplicated it about 100 times, I need to
    have 2 texures and be able to blend between them independently on each
    model. Can I set up 1 shader and have it blend differently for each model?
    and if so what is the lingo for this? The "Lingo Dictionary" wasn't much
    help.

    Any help would be apreciated,
    Mike


    michael voeller Guest

  2. Similar Questions and Discussions

    1. blending on meshes
      I'm using 8.5 to script a game & have created hexagonal columns using newMesh. What I can't seem to do is make them semitransparent, by applying a...
    2. Alpha blending
      This bit me last night; don't let it bite you. When preparing images for compositing, pre-multiply r, g, and b with alpha. There are two means...
    3. Blending 2 exposures
      I need a filter or a proven technique to blend two different exposures in the same image. My company edits and builds virtual tours for realestate....
    4. blending? Fading?
      Hi, is it possible to blend or fade one side of an image or object into...nothing? I would like to do this so if you were to put any color behind...
    5. model blending?
      I am trying to create a routine that sets the alpha blend of an object if it comes between the camera and the main character of the game (classic...
  3. #2

    Default Re: blending between 2 textures

    Assign your new texture to the second texture layer and set the blend function
    to blend:

    shader.textureList[2] = newTexture
    shader.blendFunctionList[2] = #BLEND

    Then to blend between the two textures, just set the blend constant of the
    second layer:

    shader.blendConstantList[2] = b

    where b varies from 0 (=100% original texture) to 100 (=100% new texture)



    nick kang Guest

  4. #3

    Default Re: blending between 2 textures

    Thanks for the help.
    I got the script working but it doesn't blend them independently. Is it
    possible to blend them independently using only 1 shader or will I have to
    create a new shader for each model I want to blend independently?

    "nick kang" <webforumsuser@macromedia.com> wrote in message
    news:ca16hk$r1h$1@forums.macromedia.com...
    > Assign your new texture to the second texture layer and set the blend
    function
    > to blend:
    >
    > shader.textureList[2] = newTexture
    > shader.blendFunctionList[2] = #BLEND
    >
    > Then to blend between the two textures, just set the blend constant of
    the
    > second layer:
    >
    > shader.blendConstantList[2] = b
    >
    > where b varies from 0 (=100% original texture) to 100 (=100% new texture)
    >
    >
    >

    michael voeller Guest

  5. #4

    Default Re: blending between 2 textures

    Yes, you'll need a different shader for each model that you want different
    shader properties. SW3D doesn't have a cloneShader() function, but Alex De
    Franca has written one (look here: [url]www.farbflash.de[/url]).

    nick kang 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