Transparency
Transparency
Hi guys!
I'm new to Irrlicht (actually I'm using Irrlicht.Net) and I came across a problem with making a model transparent. I add 3ds textured model, a camera and one or several lights to the scene: everything renders fine. But when I change material type for that model to TRANSPARENT_VERTEX_ALPHA the model is rendered incorrectly: far faces are sometimes rendered on top of nearer ones. It looks like no alpa-sorting is performed.
What shall I do to get a single model rendered correctly with transparency?
I'm new to Irrlicht (actually I'm using Irrlicht.Net) and I came across a problem with making a model transparent. I add 3ds textured model, a camera and one or several lights to the scene: everything renders fine. But when I change material type for that model to TRANSPARENT_VERTEX_ALPHA the model is rendered incorrectly: far faces are sometimes rendered on top of nearer ones. It looks like no alpa-sorting is performed.
What shall I do to get a single model rendered correctly with transparency?
May by you can't setting correct flags for material,
try put true on these material flags:
ZwriteEnable
ZBuffer
BackFaceCulling
that makes zorder work, but another thing is needed to use TransparentVertexAlpha:
when you create mesh you have to set the alpha value of vertex color less than 1.0 to get some transparency
try put true on these material flags:
ZwriteEnable
ZBuffer
BackFaceCulling
that makes zorder work, but another thing is needed to use TransparentVertexAlpha:
when you create mesh you have to set the alpha value of vertex color less than 1.0 to get some transparency
Thanks for advice, but it didn't work.
TRANSPARENT_VERTEX_ALPHA doesn't work properly with any combination of material flags (zbuffer, zwritesenabled, backfaceculling, lighting, and all others). I spent two days playing with all these options and material colors with no result.
I've managed to get transparent model by using TRANSPARENT_ADD_COLOR material type. It works fine but this option mixes material color with texture color and I need pure texture color. I guess, TRANSPARENT_VERTEX_ALPHA should do this but it doesn't work for me. So the question is still open: how can I render model with alpha but without material color blended to texture?
(I use Irrlicht 0.12 with DX9 driver on DirectX 9.0c from Aug 2005 DX SDK update.)
TRANSPARENT_VERTEX_ALPHA doesn't work properly with any combination of material flags (zbuffer, zwritesenabled, backfaceculling, lighting, and all others). I spent two days playing with all these options and material colors with no result.
I've managed to get transparent model by using TRANSPARENT_ADD_COLOR material type. It works fine but this option mixes material color with texture color and I need pure texture color. I guess, TRANSPARENT_VERTEX_ALPHA should do this but it doesn't work for me. So the question is still open: how can I render model with alpha but without material color blended to texture?
(I use Irrlicht 0.12 with DX9 driver on DirectX 9.0c from Aug 2005 DX SDK update.)
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation