Multiple texture layers

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

  1. #1

    Default Multiple texture layers

    I've been using Director for years, but am new to 3D.

    I have a plane, that the user dynamically swaps textures on using:
    -- member("Scene2").deleteTexture("planeTexture")
    -- member("Scene2").newTexture("planeTexture", #fromCastmember,
    member("3D_texture"))
    -- member("Scene2").shader("planeShader").texture =
    MEMBER("SCENE2").texture("planeTexture")
    (I load the chosen texture from a file into cast member "3D_texture")

    The above shows the users "driveway" I am now trying to add another texture
    layer, which will be a bitmap of a patterned circle: a square png with a
    circular alpha channel) so the user can move it around to see where on their
    driveway they'd like it

    see photoshop mockup:

    "http://trgs.net/client/pic_for_help.jpg"

    the outcome will show my base texture (from the lines of code above) and a
    circle on top of that texture that the user can move, so the perspective will
    automatically adjust as they move it around the plane.

    But I can't get the second texture to work, I've tried things like:

    -- member("Scene2").newTexture("Circle2texture",#from Castmember,
    member("circle2"))
    -- member("Scene2").model("plane").addModifier(#meshD eform)
    --
    member("Scene2").model("plane").meshdeform.mesh[2].texturelayer.add("Circle2text
    ure")

    but the whole object just goes pink!

    am i trying to do something that can't be done?

    all help greatfully recieved (the client wants it on tuesday!)

    Cheers
    Jez.

    Jez C Guest

  2. Similar Questions and Discussions

    1. Multiple texture coordinates??
      Hi, I am aware that the .w3d exporter from 3DS MAX only exports the texture co ordinates for the first UV map. I need to use two different texture...
    2. blend texture layers relative to camera distance
      I have some terrain models with high-res satellite images in texture layer 1. They look great from a distance, but when the camera is close to the...
    3. Help regarding multiple texture layers
      Hi all. I'm was busy implementing a lightmapping solution for use within director when I came up against this problem ...
    4. Blending texture layers
      In my lingo generated shader for a terrain model, I have two textures, a detail texture and a more overall texture for the terrain. For some reason...
    5. Assigning UV coordinates to a texture in shader layers
      I have made a model with various textures applied to it. Each texture has its own UV coordinate. But I have also made a UV map that covers all the...
  3. #2

    Default Re: Multiple texture layers

    The easiest thing might be to just create another plane with another texture on
    top. Otherwise, just use the shader's texturelist[ ] property to do the work
    and disregard #meshDeform.

    Set the texturelist[1] of your shader to the driveway bricks, then shader's
    texturelist[2] to your texture with the alpha. Then set shader's
    blendFunctionList[2] to #blend, and blendsourceList[2] to #alpha.

    Your alpha texture will then be a "decal" on top of the bricks texture. You
    can then move the decal texture around using textureTransfromList[2].position.
    But make sure your alpha has enough "whitespace" on the edges, else you'll get
    streaking.

    ** Important to note that the renderer will affect how this looks. I think the
    above description is good with directX but if using openGL you may need to use
    blendsourceList[2] = #constant and blendConstantList[2] = 100.

    tedalde2 Guest

  4. #3

    Default Re: Multiple texture layers

    tedalde2 you're a star

    it works like a dream, (except for the transformList[2].position command, which makes the circle disappear - see my post this morning)

    any ideas?
    Jez C 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