Multiple material types bug

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Morrog
Posts: 58
Joined: Mon Dec 13, 2004 5:13 am

Multiple material types bug

Post by Morrog »

If a scene node has multiple material types, and at least one of those is transparent, then things don't get rendered correctly.

The SceneManager divides transparent nodes from non-transparent ones so the transparent nodes are drawn last. Note that this is done on the node level. Therefore it does not support having transparent materials and non-transparent materials together in one Mesh/Node.


The solution is a bit complicated because of the way Irrlicht is designed. The SceneManager isn't supposed to know about the MeshBuffers of a node, because a node may not contain a meshbuffer. The best solution I can think of right now is to have a way for scenenodes to register a MeshBuffer with the scenemanager as "transparent" in the function that is called before rendering. The scene nodes can then pick out the transparent meshbuffers themselves and tell the scenemanager about them.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Hey, did you read some posts below prior to post here a new message?
:roll:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=4804
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

I'm going to assume Morrog read that thread.

:D
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yep, a simple solution would be that scene nodes register themselfes twice for a transparent and a solid pass. I'll put that on my list.
Post Reply