I’m technically not new to 3d (i used to do autocad work back in the day) but i am new to polygonal modeling 3d for games. I have this question that has been bothering me for a while now and i can’t seem to find any solid answer on this:
-when modeling for a game (and unity specifically), are there any requirements or advantages to having an airtight mesh? i noticed in the FPS tutorial (and i’ve seen shots elsewhere too) where the models have many seperate but overlapping components that are merged together. is there any reason not to do it this way?
obviously doing it the way i have been takes probably 3X as much time, thankfully the scripting has kept me busy and i’ve only gotten around to a few models for my game so far (one pic attached below if anyone is curious).
Two things I’ve observed: 1. Polys that pass through each other in Unity seem to intersect just fine and look fine. 2. I delete unseen backfaces, leaving a non-airtight object, and Unity doesn’t care. The remaining faces, even though one-sided, even behave predictably in the physics engine (such as having a one-sided collider wall around your world).
Two things I can’t answer: 1. Whether there’s a performance penalty or other reason not to intersect polys. 2. Whether deleting backfaces in your modeler has any performance benefit or not. Maybe it’s wasted effort by me (but there must be some RAM/HD savings at least).
(PS, I thought you had to triple your polys–but you can do that in a copy for final use, leaving your original model unharmed.)
There is no performance penalty for using intersecting polygons. However, intersecting polygons can look worse when viewer from large distance (due to limited z-buffer precision), and they can be not as good if used as mesh colliders.
Deleting non-needed faces is always good (at least the video card does not have to transform the vertices for them; and you save space&memory).
does this mean that after a certain distance the components will not draw in the correct order?
i tried an experiment, i inserted a default cube into the FPS demo scaled it to 100 along an axis (so its 100 meters), and did not see any strange behavior with myself the robot (with gun) at opposite ends. so either the distance is very large or the gun is small enough that at a large enough distance you can’t make out that anything is wrong anyway.
either way i’d say this will still make things easier - anything larger than a certain size (that you could still make out detail at distance) should be modeled as one piece to be safe, weapons, which in my case would be the most time consuming to do as an airtight mesh, don’t have to be. no?
I think he means the object will get automatically triangulated on import into Unity leaving your original intact.
There’s something very satisfying about modeling “airtight” geometry, but like you said it takes 3 times as long and usually requires 3 times the polygons. For example look how many polygons it took to cleanly weld the barrel onto your gun instead of just sticking it on there. Sometimes having intersecting geometry can make it trickier to UV map and texture though.
Agreed. Even being a relative novice, i can already see trying to devise elegant and efficient solutions for a mesh definitly appeals to some dark part of my psyche ; )
Is that true? I’ve been tripling (LightWaveSpeak for triangulating) manually. Which is one-click simple, but if I skip that step, will I still get a good FBX that Unity will convert to tris? I’ll have to try that.
(Meanwhile I’ve been saving my tripled model while also retaining a non-tripled copy to work with in any future changes–which is what I was referring to. Some of my faces have dozens of vertices, and I like to leave an untouched version for editing later.)
Good point about complexity and polycount–I should probably worry less than i do about being airtight myself.
yes unity auto-triangulates quads on import. unless i’m mistaken for every quad theres only two tris, so just double your quads for an accurate in game poly count.
edit: oh i see “tripling” is just the name for it, not 1 = 3. confusing ; )
The FBX exporter will automatically triangulate Ngons of any size. But sometimes it’s best to manually break up your faces a little bit to get more predictable results in Unity. Especially for low poly modeling, how the faces are triangulated can affect how the object looks in game in regards to “normal” smoothing.
Blender doesn’t support more than 4 sided polys? Weird.
The classic example of z-buffer issues w.r.t. intersecting meshes occurs when, say, a house is planted on (in) the ground in a large landscape. As you move further away you might see “staircasing” where the polygons of the house intersect with the ground (limited z-buffer precision). The higher end / more modern your graphics card, the deeper its z-buffer is likely to be and the less likely you are to see this. (I used to see it a lot on my GeForce 256 video card back when that was bleeding edge.)
This is also the kind of case where not producing “airtight” meshes is most tempting, since neatly grafting the house onto the landscape would increase the model complexity and make the house not reusable. Luckily today’s hardware makes this pretty much a non-issue.