Ask a Question related to Macromedia Director 3D, Design and Development.
-
Jez C #1
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
-
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... -
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... -
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 ... -
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... -
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... -
tedalde2 #2
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
-
Jez C #3
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



Reply With Quote

