This content has been marked as final. Show 6 replies
When giving an model a shader with an alpha channel, it affects the way that it is sorted against other models. Could it be there's another model with an alpha texture very close to your sphere which it is now being sorted behind?
Maybe you could upload a sample .dir file that demonstrates the problem?
good thinking Ben, but i was looking at it from the transparent side. Doh
but i have another question now how do i make a plane map from both sides, because when i give it a texture now it only one side is textured.
a plane is one object right is not like a box.
Check out the 'visibility' property of models. You can set it to #both to render both sides of each face. Note that the backside won't be detected by modelsUnderRay calls, even though it's visible.
thanks i used #both on my sphere it shows up but i dont see the image only black the other side.
i used it on my plane and the texture is gone.
planeR = p3d.newModelResource("plane01", #plane)
planeO = p3d.newModel("planeO", planeR)
planeO.transform.position = vector (0,0,0)
p3d.model("planeO").visibility = #both
planeO.shader = p3d.newShader("pShdr", #standard)
txPlaneO = p3d.newTexture("txPlaneO", #fromcastmember, member("Asphalt10"))
planeO.shader.textureList = txPlaneO
planeR.width = 5000.0
planeR.length = 5000.0
planeO.rotate (90, 90, 0)
Below is the behavior I used on an empty shockwave3D member. Notice that I use...
planeO.shaderList = p3D.newShader(...)
... rather than .shaderList
This rather bizarre syntax applies the shader to all meshes at once.
thanks guys all good now