Hey.
Im currently building collision support into my game and i noticed the
absense of a NULL material.
Ok, let me explain:
In certain games it's very common that you build solid collision primitives,
these are only part of collision detection/handling and shouldn't be rendered.
This is to keep the player from entering sections of maps which are
only there for visual aspects and also to not let the player fall.
Setting these polygons to fully transparent will still cause them to be rendered.
Another solution would be splitting the level into 2 meshes.
Both used for collision, but only one used for rendering.
Though easiest(and cheapest) would be to introduce a NULL materialtype,
which won't render anything as long as it's set.
Even if it might not be a large amount of tris it's still data that doesn't
have to be thrown at the GPU.
This is mostlikely the solution i'll make for myself.
Support for "NULL" materials
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
No, we're talking about selective polygons, not nodes.RapchikProgrammer wrote:I think this shud work????Code: Select all
node->isVisible(false);
That is polygons with a certain material are culled in the rendering cycle.
But yeah, splitting the mesh would work, mostlikely not in realtime :/
Im doing a seamless design where the entire world is broken up into
virtual sectors. When the player is getting near a new sector, objects from it
will be preloaded if within a certain radius from the player.
So loading has to be cheap.
Have to sit down and do some more design tomorrow.
In my experience that data may exist in the mesh, but it would usually be stripped out before any rendering would happen. You would load the entire mesh from disk, build your collision mesh, then delete the collision only polygons.In certain games it's very common that you build solid collision primitives, these are only part of collision detection/handling and shouldn't be rendered.
That isn't something that you could easily do with Irrlicht. You could more easily load the visual mesh from one file and then load a collision mesh from another. As long as you don't use Irrlicht for collisions then that would work out well.
Travis