How expensive in terms of performance are Irrlicht's stencil shadows? Is cost per-polygon, per-light or what?
Does Irrlicht have dynamic mesh LOD generation?
I'm making a game which involves large numbers of models at far distance but very few at close distance. I'd like them to be shadowed in either case, detailed up close and very low polygon/texture detail far away (to increase performance).
Shadow cost and LOD
The stencil shadows in Irrlicht are very expensive, and increase in expensiveness with the number of polygons. I recommend that you check out BlindSide's XEffects project which implements shadow mapping.
No, Irrlicht doesn't currently have dynamic LOD mesh generation. I can recommend edge elimination as something you should look into for LOD mesh generation though. It works pretty well, and is very simple to implement.
Basically, for edge elimination, you do dot products on the triangle normals. You then compare the dot product against a tolerance value. If it is lower than the value, you reduce the two triangles, but if it is above, then you keep the triangles.
So edge elimination can be used to reduce polygons, while still preserving the general likeness, or it can be used (with a high tolerance value) for an aggressive LOD approach for when the mesh is a little bit further from the camera.
I hope that helps.
No, Irrlicht doesn't currently have dynamic LOD mesh generation. I can recommend edge elimination as something you should look into for LOD mesh generation though. It works pretty well, and is very simple to implement.
Basically, for edge elimination, you do dot products on the triangle normals. You then compare the dot product against a tolerance value. If it is lower than the value, you reduce the two triangles, but if it is above, then you keep the triangles.
So edge elimination can be used to reduce polygons, while still preserving the general likeness, or it can be used (with a high tolerance value) for an aggressive LOD approach for when the mesh is a little bit further from the camera.
I hope that helps.
TheQuestion = 2B || !2B
-
BobTheFish
- Posts: 10
- Joined: Mon Oct 13, 2008 6:21 am
You collapse the edge, by taking the first endpoint to the second or vice versa.BobTheFish wrote:How? I'm not sure what this means.Halifax wrote:you reduce the two triangles
To be honest, I don't know why I haven't taken a stab at edge collapsing for Irrlicht. I think I'll give it a try.
TheQuestion = 2B || !2B