Is there anything wrong with this
over this
To me, the first example looks better for performance beacause it uses less polygons - yet everywhere I look, I see the second method used.
The first method disconnects the plane and the box, so two have no shared vertices.
Is there any reason I should’nt use the first method?
There’s two potential issues with the first method–lighting and depth rendering
For lighting, it will render shadow on the surface underneath and it’s likely to bleed onto visible areas which might not look good, this is due to the object not lining up with the lightmap pixels which isn’t something you can do anything about. You also have to use more lightmap space since those parts are not connected.
For depth rendering, the issue is that as you get further away it’s possible that the surfaces can end up at the same depth level which causes Z-fighting as if they were occupying the same space. The issue will become bigger the closer the surfaces are to each other.
For the second method the issue is how long it takes to model an object that way, and also that it usually means a higher polygon count.
Theoretically, when placing the mesh very very far away from the Center (0,0,0), the Vertices positions can’t hold the float precision anymore and may drive away from their intended Position, causing far more Separation between the meshes.
When using animated World Position Offset in the material of the mesh, the mesh doesn’t move uniformly, but the separate meshes move independently.
There’s also a Problem with lighting and texturing in General, since they don’t share Vertices and cause separations/bleeding in the texturing.
First method cause more overdraw. This might have bigger cost than saving few vertices, depending on mesh size, rendering path and platform.
It’s strange I have never heard about this in any tutorials/documentation.
So to summarise: Weigh-up whether its aceptable depending on polygon, overdraw and lightmap res budget. Also consider the likelyhood of Zfighting. Avoid unless there are significant advantages.
Thanks for your awnswers.
Honestly neither is triangulated so it’s hard to say.
Are they both the same model, one just has edges added to corners? Or is the top one a separate plane on the bottom.
If it’s a separate plane (floated geo) you are only saving a few polys (which the engine can handle) but you are wasting a lot of uv space. So you need bigger texture for same resolution.
If they are the same, the ‘polys’ may be fewer but the ‘tris’ are the same. Polys are just a group of tris. All engines render TRIS. It’s always best to triangulate before export. That way you know exactly what you have, plus you can control which way the edges are turned (so you don’t get concave if you want convex shapes, etc…)
I sometimes ‘float’ geometry if it will save a bunch of tris and I have a tight budget. If that was a 10 sided cylinder rather than a box it would take quite a few more tris to make it a solid hull instead of floating.