🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Topology in game models (question)

Started by
3 comments, last by Scouting Ninja 6 years, 3 months ago

Hello, I'm a bit confused on something regarding topology in game models. Topology is obviously better when you have loops, but I see many people making models that don't even connect. For example, the person in this video makes a bench but doesn't even connect the sides. Another example would be modeling a square building, but modelling the windows separately and just placing them on the face of the building. Is this acceptable for game models or should all topology be connected and looped? Thanks.

Advertisement
1 hour ago, MS Finale said:

I see many people making models that don't even connect

There's no requirement that models be comprised of a single mesh. In the case of the park bench, the wooden slats are likely going to need a completely different material to the metal sides, so it makes sense to model those as separate sub-meshes.

1 hour ago, MS Finale said:

modeling a square building, but modelling the windows separately and just placing them on the face of the building. Is this acceptable for game models

Will someone playing the game be able to see that it's multiple sub-meshes? If not, it's probably not worth taking the time to model it all as one mesh.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

It depends also on the graphics engine. Almost for sure you can use multiple meshes for simplicity and faster results, but those bad things affecting performance could happen:

 

Overlapping areas waste texture space (very likely)

Multiple meshes cause multiple draw calls (very unlikely)

Overlapping areas cause wasted lighting calculations if done in texture space (extremely unlikely, but this may change in the future)

 

However, if those problems would become real issues, likely we would develop automated tools to fix this without a need for the artist to care about it.

 

3 hours ago, MS Finale said:

Topology is obviously better when you have loops, but I see many people making models that don't even connect.

Correct, good topology and loops often lead to good game models. However it doesn't mean a good game model Must have good topology.

The simple fact is in the end having a Manifold mesh (1 piece mesh) does not improve performance, it consumes more time and makes your cages a nightmare to smooth.

Lets take for example a door:

DoorExample.jpg.e60141daf5907fb7c2aa2570560133ec.jpg

On the left the door handle "clips" into the door, this model is 616 tri. The other models is manifold, at 1716 tri. Both look the same and the lower poly one renders faster.

 

Now for the big reveal! Almost no model imported into a game is a manifold mesh and they are almost always triangulated so avoiding triangles is also pointless. Also when baking it's better to break the model into triangles yourself.

The game engine importer will often triangulate the model and split vertices at UV seams, sharp edges, marked edges and smooth groups. That's right a UV map splits the model in the game engine, you are free to test this by checking the vertices count in the 3D software and then in the game engine.

 

@JoeJ points are valid I just want to clear a few things up.

57 minutes ago, JoeJ said:

Overlapping areas waste texture space (very likely)

Often this isn't much of a pain. The parts that get clipped should be less than 40% of the model, if it's bigger then clip only when it doesn't overlap.

But it does happen that sometimes you have to choose over texel(pixel) density or polygon density.

The loss in texels is often countered and then some by the reduce in over-draw. Less triangles means less over-draw.

1 hour ago, JoeJ said:

Multiple meshes cause multiple draw calls (very unlikely)

Will happen if a mesh uses more than one material, unless the material is a instance. In other words it's very likely with multi-materials, that is why texture maps exist.

1 hour ago, JoeJ said:

Overlapping areas cause wasted lighting calculations if done in texture space (extremely unlikely, but this may change in the future)

Happens but the same effect also means there is more info for the shader to play with. For example because the handle isn't in direct contact some shaders will draw bright edges around it, highlighting it for the player.

 

I advice don't waste time trying to keep meshes as one solid piece. Working with parts is easier and often produces much better results. Baking textures is also easier with mesh pieces. You can just "Explode" a mesh to get to the hard to reach places.

Good topology is just a tool for you to achieve a good game model, it does not result in a good game model by it'self.

This topic is closed to new replies.

Advertisement