  | | | 2nd texture layer woes | 2nd texture layer woes 2003-11-18 - By Agustín María Rodríguez
Back Hi all! I�ve run into a strange issue (bug? I remember Barry complaining about textureCoordinates some time ago). I�m adding a second layer to some meshes for putting textures with alpha channel. The problem is that the textures doesn�t show at all unless I set its mode to #wrapPlanar and then back to #none, so I use the first layer�s coordinates.
Here�s a little demo with some lines of the code I�m using www.onwine.com.ar/temp/pocket-2 (See http://ket-2.ora-code.com)nd_layer_messed.zip (256kb)
on addSeams scene --loop through the 3 models repeat with modelNum = 1 to scene.model.count
modelRef= scene.model[modelNum]
modelRef.addModifier(#meshDeform) --#meshDeform updateStage modelRef.meshDeform.mesh[1].textureLayer.add() --add a 2nd layer
seamTexture = createSeamTexture(scene,modelRef) seamShader = modelRef.shader seamShader.transparent = FALSE --I need it off cuz Z-fighting
--Remove this line and it won�t work! seamShader.textureModeList[2] = #wrapPlanar --use planar mapping
seamShader.textureList[2] = seamTexture updateStage
seamShader.textureList[2].renderFormat = #rgba8888 seamShader.blendFunctionList[2] = #blend seamShader.blendSourceList[2] = #alpha
--Remove this line and it won�t work! seamShader.textureModeList[2] = #none --back 2 orig coords
updateStage end repeat end
That workaround I�ve found works fine on authoring mode for all the models I have in the complete scene but it fails in one when running as a projector. I�ve tried to track down this one but I couldn�t find which difference may be between running the same movie as projector or author.
So the question is: how could I avoid using my textureModeList workaround? There is another one? Am I doing something wrong? I�ve also tried using PNG and TIF; setting the 2nd layer coordinates equal as the 1st channel ones and some other thingies.
Thanks for your help. -- Agust�n Mar�a Rodr�guez | agustin@(protected) | www.OnWine.com.ar
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|
 |