How to not to Model a Table

Look at this table! Seems good right? …Right?……RIGHT?

I can promise you this is not good, you see when you make 3d models you can’t just “Make” the models. You need to plan and thing it through, the big things are:
1.) Keep the model as many simple shapes as possible
2.) Avoid complex faces that are not quads (i.e. 4 sided 4 vertex where it’s possible to rotate the face to be a flat rectangle
3.) Don’t repeat work (aka if you’re making a table make the leg once and copy+paste it…)

Now let me show you how I violated ALL of these checks

Above is the model view but I’m showing you the faces and vertexes of the model. You can almost immediately see the violations here. Everything is one piece, the legs are obviously done individually, there’s a weird slide in the middle of the table which serves no aesthetic value and if you zoom in on the top of the legs…

A TRIANGLE! However if you take the same pic in wire-frame you can see something much worse.

The bit circled in yellow is a hidden and folded face!!!! A big no-no especially for game dev where you’re trying to minimize the number of faces rendered on screen at once. Now you may ask yourself “Will. It’s still a table why do we care” the problem comes in when you make UV Maps.

from https://lkinulas.github.io/development/unity/2016/05/06/uv-mapping.html

To the uninitiated a UV map is a 2d projection of the external facing surfaces of an object, for a cube if you unwrap it you’ll get a chunky plus sign shape(more about this here: https://lkinulas.github.io/development/unity/2016/05/06/uv-mapping.html , which I skimmed but it seems better than anything I could write). Usually the way that adding textures onto a 3d model works is that you attempt to make the UV map in blender, then you dump into substance painter or equivalent program where you can paint onto the model in 3d, then you can dump the files out as text images. For example here’s the UV map of a keypad I made last year

Which here each of the keys have a single UV map, so therefore they have a single image to represent the color (known as albedo majority of the time, atleast with blender and unreal which both use “Physically based rendering” see https://en.wikipedia.org/wiki/Physically_based_rendering)

The 3d model holds the decoder-ring (which is the UV map) to convert the image file to properly positioned colors on the 3d model. Now you make now ask “hey everything you made for this game is literally a flat color and there’s no detail to mis-align” which is true. However with modern game engines they literally take the UV map and use that information to calculate how it interacts with light. An improperly made UV map can cause 3d models to flicker in bright lights, make them dark when they should be light and vice-versa. In the worst cases it can cause them to disappear entirely! In addition when you start doing things like bullet holes or blood stains on world models, an improper UV map will make the decal that is put onto the model become very mis-aligned from the intended position (think a bullet is shot at a table, the bullet hole should be where the bullet hit).

So now back to the table. The main issue here is that blender is actually pretty awesome at automating the generation of UV maps…Assuming your model is a simple geometry object (i.e. sphere, cube, cone, torus, plane) and doesn’t have the triangles. So if we try to automate the export of the table:

To give context of what you’re looking at, the left hand side shows each face on the table face, each grey square directly corresponds to each face on the 3d model on the right. If I select and individual face:

It shows exactly where the face will appear on the output image. So if you go back to the first image you can see that if I tried to just blindly apply either lighting effects or an image to the uv map we start hitting issues. For instance if I put a light directly on this corner

What will most likely happen is that everything in between those two faces will be lit in addition to the two faces in question. What’s in the middle you ask?

Not the areas you would expect to be lit. There’s also other factors here that I could get away with by getting creative with materials (which determine the direct lighting parameters like luminosity, albedo etc) but that would be much more work than just restarting, making a tabletop model, making a leg model and making a crossbar model then just copy+pasting the whole thing again.

With all of this you may also still be asking:
1.) Why are you making a table
2.) How does this fit into a game?
3.) Why are you blogging and modeling on Saturday night?

Answers:
1.) I haven’t made a model in a few weeks and I wanted to get my feet wet again
2.) Idk, places have tables. Wooden tables. Nice tables. With cross bars.
3.) It’s cold. I feel like crap and shut up

Also I’m straight up dreading adding more animations to the robot, I need to add a knife stab animation, a grenade throw animation and some kind of heavy shot animation. Unreal is very very bad at handling an updated model with updated animations. The process involves re-exporting everything as another .fbx file, deleting redundant animations, deleting the new re-imported base model and re-assigning each animation’s skeleton to the original skeleton and hoping you remembered the export settings from 6 months ago. If your forgot the aforementioned export settings you need to turn a knob keep doing the same process until things look kinda right. I’m debating on buying maya just to avoid this situation but I’d love to avoid learning new things until I get this silly game on steam.

Editors note (1 day later): I realized I wrote this whole thing without explaining why I did a bunch of dumb stuff: I was getting back to modeling and I just ran with the feelings for an hour rather than thinking it through. So I made a bunch of critical early mistakes which makes the model very hard to use.

Leave a Reply