Intersecting triangles impact on rendering ?

Community Forums/General Help/Intersecting triangles impact on rendering ?

RemiD(Posted 2016) [#1]
Hello,

Do you know if having some triangles of a surface intersecting with others triangles of the same surface (or the same mesh) is a problem and can increase rendering time significantly ?
(for example an ear or a lock of hair which intersects with the head or a cloth part which intersects with the body or another cloth part ?)

I think that no if there are not too many triangles, but i remember having seen important slowdowns because of many meshes which intersected, but it may have been because they were slightly transparent.


Matty(Posted 2016) [#2]
Over draw and fill rate are the main thing. If the overlap are is small on the screen you wont notice anything.


Bobysait(Posted 2016) [#3]
What can reduice the performance on drawing surface is the vertex count.
If your triangles are not "welded" there are many more vertices (like 3*counttriangle).
Else, as Matty mentioned, the smaller the overlaping, the better the performance. And to be consistent, any triangle that is overlapped gives an area that is never rendered (like the part of the ear inside the head) but needs a useless z-test. So, obviously, those kind of areas should be removed anytime it's possible.

BTW, overlapped section is a source of glitches on far view range. When precision is lost, the overlapping can be drawn on top of a front triangle.
Because of the Z-test that fail at high range.


RemiD(Posted 2016) [#4]
@Matty>>
As i understand it, (please correct if i'm wrong) :
->overdraw is the recalculation of the color of a pixel of the screen because several triangles/texels overlap (and even more when some triangles/texels have a partial transparency)
->fillrate is how many pixels can be rendered each second by a graphics card

So in this case, overdraw could be an issue, and consequently this would "waste" some of the fillrate. Correct ?


@Bobysait>>yes i am aware that i need to limit the vertices count, but a few more will probably not kill the fps.


An alternative that i could do is to put the vertices (where the connection should be) of the separate part really near the other part so that it is not noticeable...
The idea is to be able to create different characters with different bodies, heads/faces, hairs, clothes, armors) so i need to have separate parts.


Bobysait(Posted 2016) [#5]

->fillrate is how many pixels can be rendered each second by a graphics card



the fill rate is more about the optimisation you can add to not render useless stuff. (the less you draw, the less you fill, the more the fill rate)

ie : culled areas rendered ... = over draw = lower fill rate.


Matty(Posted 2016) [#6]
Yes you are right on both counts. Basically overdraw is the graphics card drawing the same pixel more than once.

An aside. To optimise my space game for low spec hardware the simplest and most efficient way was to hide my second skybox for the nebula since there is always full screen overdraw when i use both
..higher spec machines can handle it....simply checking available gpu memory is a simple test that handles it well to determine it.


RemiD(Posted 2016) [#7]
@Matty>>The worst situation seems to be with partially transparent triangles/texels, when the color of the pixel has to be recalculated again and again depending of what is behind\ahead, which is noticeable with partially transparent particles !

Now the thing i wonder is if a triangle/texel has an alpha of 0 (totally invisible), is it as fast to render than a triangle/texel which has an alpha of 1.0 (totally visible) ?


Matty(Posted 2016) [#8]
You know you could test that quite easily....


RemiD(Posted 2016) [#9]
https://www.youtube.com/watch?v=R16wgQLmqxE :D