Professional Web Applications Themes

blending between 2 textures - Macromedia Director 3D

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...

  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. #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

  3. #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" <webforumsusermacromedia.com> wrote in message
    news:ca16hk$r1h$1forums.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

  4. #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

Similar Threads

  1. ADDITIVE BLENDING
    By DANGH_b in forum Macromedia Director 3D
    Replies: 4
    Last Post: March 7th, 01:31 PM
  2. blending on meshes
    By HomeBrewer in forum Macromedia Director 3D
    Replies: 2
    Last Post: July 27th, 02:55 PM
  3. Alpha blending
    By Eric Pepke in forum Mac Programming
    Replies: 7
    Last Post: November 2nd, 02:52 PM
  4. Blending 2 exposures
    By dan brady in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 1
    Last Post: August 22nd, 09:28 PM
  5. model blending?
    By sonicani webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: July 9th, 07:11 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