Hi everyone!
I'm a programmer that has decided that I want to do some modelling as well.
I'm currently modelling a warehouse and was wondering how to optimize it before exporting it for use in the game engine.
A have a few questions:
1. The scene in the modelling app has several meshes, outer walls, pillars, etc. Should these be combined to one mesh before exporting or should I keep them separate? When seperate they show up as one parent with several children (same hierarchy as in the modelling app) in the engine.
2. The pillars for example extend from the flor of the warehouse to the roof. This means that there is two quads (bottom and top) that will never be visible to the player. Should I remove these or not? Will they be removed by the app if I merge the pillars with the warehouse wall/floor-mesh?
3. When doing boolean to carve out windows for example, the original wall (1 quad) is divided into several quads. Should I always merge these quads?
4. I've heard that I should try to keep all polygons as quads instead of triangles, why is this?
What else should I think about?
I've googled to find some information about this but I must be doing something wrong because I'm only getting links to products/plug-ins that can be used to optimize models. If anyone knows any good tutorials I'd appreciate a link!
Any help is appreciated!
Thanks!
Replies
If everything is seperate and you have a single object instanced around in several places, it only goes into memory once. If you have a bunch of the same object welded together as one model, then you have one big fat model in memory instead and even the identical geometry within that model is considered unique in memory.
Also, if everything is seperate and instaced it's generally easier to change/update things since you only have to change one object, and not make identical changes to all of them.
2. You should remove the top/bottom polygons if you plan for players to never be able to see them. 3D applications almost never automatically remove faces like this or try to optimize your meshes in this manner.
3. If you are using boolean operations in your modeling, you should always try to clean up your geometry and keep things as straightforward, clean and easy to edit as possible.
4. "All quads" is not a hard or fast rule for any discipline except meshes that are going to be sub-divided for sculpting (zbrush/mudbox/etc). Some adhere to all quads for character modeling/animation, but this has never been universally accepted as a necessary rule. For low poly environment modeling like a warehouse, it's absolutely unnecessary.
Think about how you can build your stuff modularly. Build a simple chunk with a lot of detail, and re-use it diligently. It's better to do a small amount of focused work and re-use it plenty, then to do a ton of unique work and never be focus on the details.
Think about how to work in the most convincing details that can help 'sell' your space as believable. Thirding immediately comes to mind in a warehouse setting as a useful technique.
That helps a lot!
I also liked the tip about thirding. Does anyone know any good websites where tips like that (and for modelling in general) can be found? I don't mean tutorials as such, but more tips for increasing productivity and the end result.
With individual models you also have several smaller pieces that can be culled when not within the line of sight, if you have one giant mesh, you have to wait until the whole thing is hidden before it can be dropped. Or more common the mesh disapears because the pivot point is obscured from view but because the mesh is so big its still visible on the screen.
Another good idea is to design your pieces so they can be rotated easily to feature unique details on each side. I'm specifically thinking of pillars, if you have a room full of pillars it can be good to break your single pillar mesh into 3 parts (base, pillar and crown) That way you can rotate each piece to create new unique looking pillars from the same 3 meshes. Make sure the pivot for each is in the same spot so they can be snapped and aligned easily.
There are cases where you need to cap geometry to create accurate shadows or if your collision mesh is derived from your actual mesh automatically by an engine that isn't smart enough to work with open geometry.
It's not too much of a big deal to cap something off. The verts are already there it won't matter too much if triangles are drawn between the verts or not. It might clutter up the UV layout a bit if you have a dead piece that isn't doing much but taking up space. BUT you can either scale it so it fits in a single unused pixel or leave it attached to the top of the UV island so there are less seams and less overall verts created. A UV seam doubles verts so this might be the best option, if you're super anal about it.
I'm not so sure cman2k is right on the money with the memory/instancing theories. I think its a bigger boon to artists and their time management than to system resources. I've heard horror stories about too many instances slowing things down, granted I'm not a programmer and every engine is different but the core of what he says normally rings true, modularity is a smart way to work and if it helps the game run better double bonus.
My last bit, stick to the grid. Whatever engine your using is probably going to have a grid. Sync your modeling programs grid to your editor and keep the bounds of your objects snapped to that grid and make sure the pivot point is snapped to the grid also. It's important with things like wall tiles so they flow seamlessly together.
As far as tutorials and what not, the polycount wiki (link in my sig) is a good place to go looking. You'll also get some good feedback by posting your work in progress in P&P as you go.