Multiple Copies of Meshes & Multitexture Blending proble

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Handle
Posts: 19
Joined: Tue Jul 13, 2004 2:00 pm

Multiple Copies of Meshes & Multitexture Blending proble

Post by Handle »

I have a desk model and I need to have several desks scattered around the room.

Sometimes an individual desk needs to be covered in a 'slime' that can be of various levels of transparancy as the slime fades in and out.

To do this I applied the slime as a second texture layer. The transparency of the layer is based on the mesh's vertex alpha values so I alter this value to change the transparency of the slime.

Everything was working fine with my one test model so I put a couple of desks in a room.

I swore.

Both meshes had exactly the same transparency levels for the slim as each other even, though they were meant to be different.

After a brief think I realised that the scene manager only stores one copy of the mesh (despite me loading the model twice and having two pointers to the mesh; one in each desk class) and hence whenever either desk changed the vertex alpha value all the desks changed.

Anybody have any idea how I can get round this problem or how I can disable the scene manager being sensible and not creating new meshes when the same file is loaded in?

Any help or ideas greatly appreciated,

Cheers,

Handle
Post Reply