Mesh question

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
Cardinal4
Posts: 97
Joined: Sun Jun 11, 2006 1:20 am
Location: SG
Contact:

Mesh question

Post by Cardinal4 »

I just read over at Blender forums, where someone mentioned that
the limitations of Z-Buffer accuracy. If you make models from parts that overlap you'll end up having nasty flickering at certain distances. And then there's the thing that some modern engines no longer think of things as triangles, but use polygon strips instead(and that requires continuous surface to work).
Irrlicht doesn't have that problem, does it? Because currently I'm making in Blender some overlapping meshes to reduce that increase in polycount you get when you join your meshes. Does anyone know whether overlapping meshes cause a problem? Irrlicht uses triangles so it should be safe from that polygon strips thingy problem? Thanks in advance
Sketches of a rambling mind
Still a long way on learning Irrlicht...
SwitchCase
Posts: 170
Joined: Sun Jul 01, 2007 11:41 pm
Location: Manchester, UK

Post by SwitchCase »

Overlapping triangles is never good in my opinion. You may well see problems when redering in Irrlicht but of course it depends on how exactly the triangles are positioned and also the models material and lighting.

To avoid any problems, I would advice that you simply join triangles, not overlap them and remove any doubles. Surely any increase in polycount wouldn't be dramatic, would it?

I hope I understood you question correctly.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Irrlicht doesn't have that problem, does it?
Yes, z-fighting is a problem with all rendering engines that use the z-buffer. The problem is that floating point numbers lose precision as they get further from 0. You may not see z-fighting when a mesh is nearby, but you will see it if the mesh is far away and you zoom in on it.
Because currently I'm making in Blender some overlapping meshes to reduce that increase in polycount you get when you join your meshes.
It may or may not be a problem for you, it really depends on what you're doing with the models. You've been warned.
Does anyone know whether overlapping meshes cause a problem?
The closer the meshes are to each other, the worse the problem will be. If you render two triangles that use the same vertices, or vertices at the same positions, and different textures or colors, you will see the problem.
Irrlicht uses triangles so it should be safe from that polygon strips thingy problem?

Irrlicht can render triangle lists, triangle strips and triangle fans. I believe the OpenGL driver can render polygons. All of the mesh loaders use triangle lists, but it is more efficient to use triangle strips or fans where possible.

I don't see how using triangle strips would be a bad thing.

Travis
Cardinal4
Posts: 97
Joined: Sun Jun 11, 2006 1:20 am
Location: SG
Contact:

Post by Cardinal4 »

@switchcase
perhaps it might have been a better phrased question if I'd used the term "intersecting" instead of "overlapping". :oops:

Image
vitek wrote:The closer the meshes are to each other, the worse the problem will be.
The current parts I have overlapping have the vertices quite spaced out. Plus, some parts i really needed to have the meshes overlap, like for the eyeball swivel rotations.

But I guess i better start joining the meshes for the non-critical areas to avoid render artefacts.
Sketches of a rambling mind
Still a long way on learning Irrlicht...
SwitchCase
Posts: 170
Joined: Sun Jul 01, 2007 11:41 pm
Location: Manchester, UK

Post by SwitchCase »

I see what you mean now.

Another problem with this way of modeling is that when you load your model into an application or engine other than the one you created it in, it is very common to have large area of space between different meshes.

The best way to overcome this problem would invovle remodeling. My advice is to subdivide your main mesh and extrude vertices or faces to create other parts (arms, legs, etc.) and then subdivide those parts as nessesary. it will require a little touch up but you final product will be one large mesh.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

yea i faced the same problem before. i solved the problem by welding the whole thing into a single model.
Post Reply