Download

newbie questions (mostly poly and texture optimization)

Hello everyone,

I used to be film/ad modeler and I recently switched to game modeling…
I have a lot of questions mostly in regard to optimization (I never had to worry about 16 or 32k textures for film props, or milions of polys)

Now I found many tutorials showing me how to bake normals, how to model props, but non of them tell when to do what… so here are my questions:

  1. I am confused, someone counts poly, someone counts triangles, for example my barrel has 436 poly but 854 triangles

  2. Is 854 triangles too much or not enough for unreal engine?

  3. what should be LODing like? I could not find any reliable resources, just guys from Warhorse studio said something about 30%
    however do they mean like lod0=300poly lod1=200poly lod2=100poly… or did they mean lod0=300poly lod1=100poly lod2=30poly…

  4. When should I model Hi-poly model and bake down normal maps?
    for example games from 2007 (crysis etc…) didnt really had many props baked for example I created a crate prop, whitch has just 512x1024 texture but since UVs are totally overlayed, I saved lot of texture space I also chamfered edges to substitute baked hipoly edges normals

however if I want to bake normals I cant overlay UVs so texture needs to be much higher res for same detail ingame also whole HP modeling is more expensive and texture cant be used for another assets

so the basic question is: in year 2015 is it performance wise, hardware supported and demanded by audience to bake down all assets from high poly or should I bake just 50% of most important assets? or something else? I am really confused here

  1. I see geometry is LODing but what happens to texture? does it automatically change or it changes material? I heard about mip mapping but some references to its concepts in UE4 would help

thank you for all the help in advance, and you can expect even more dumb questions as I am starting to work on my first game in September :smiley:

Box without normal bake: 663aa32eb2a1caf15639683aa21479d95bf5b4d8.jpeg

Barrel wire and Hi-poly: 0253be7e1f24557752d1d5dd55e9336641d47518.jpeg

Hi IamWinside!

Good questions. I come from the same background (non-realtime rendering, counting minutes/frame rather than frames/second… yeah, just throw a couple more 8K maps here, it’ll be fine) so I understand the confusion.

  1. Yeah, one poly (quad) is two tris, and so on, so no mystery there. I prefer to count vertices instead. That’s where the memory costs are (each vertex has to store its position, normal and tangent vectors, UV coordinates and possibly vertex color, whereas tris don’t store a lot aside from which verts they should use, most of which are going to be shared with adjacent tris).

  2. That depends (really, that’s the only valid answer). It’s too much for a matchbox, too little for a decent character LOD0, just right for something else.

  3. The UE way seems to be roughly 50% of previous LOD per step. So a LOD0 with 1000 verts would have ~500 in LOD1 and ~ 250 in LOD2. It doesn’t have to be exact of course, and depends on the exact nature of the asset in question. More of an art than hard science probably.

  4. Again, that depends. Personally I bake normals and AO for everything all the time, but it all depends on what you’re going for. Some simple background things may be just fine without baked data, others might not. Case by case.

  5. Yes, “mip map” is the texture equivalent of mesh LODs. This happens automatically when you import a texture, (although you can control the mip generation if you want to) and the renderer will switch between different texture resolutions on the fly as needed.

EDIT: Addendum: In general, rendering lots of polygons is not a problem these days. Performance problems tend to come from other factors (too many drawcalls, too expensive shaders, too many dynamic lights in the same spot, etcetera). If one would be inclined to pick nits, your barrel has three edge loops that do nothing for the silhouette of the shape, and should therefore probably be removed, unless they are used for UV purposes… if you want to be all fussy and thorough.

Hello Winside,

  1. Your model is made out of polygons. Every model upon importing into game engines gets triangulated. PolyCount and TriCount are relative to each other. You are good to either have PolyCount or TriCount in mind. So if I said 436 poly is fine for the barrel it also means 854 triangles is fine for the barrel (since they are bound together right?). Most people count polygons because they don’t triangulate the model themselves before porting to game engine. You can stick to counting polygons only.

  2. For something like the barrel you can still go lower. Usually for game props most of the detail is coming from diffuse and normal maps. But generally, no that amount of polycount isn’t high. A single game character can be 100k polygons or even higher. It’s up to you to prioritize the assets. the more important it is, the more you are supposed to focus on it in game, the more polygons you’d spend on it. For small props keeping it around 500 polygons is better. In this image I’m linking here, you see if you delete those loops nothing happens to quality of the geometry but you get a lot of polycount reduce there. http://uupload.ir/files/avxf_1.jpg

  3. LOD entirely depends on yourself. You’d want to keep a good shape when LODs are happening right? for example, if it’s a rock, main mesh is 2k polygons, LOD 1 can be 1.5k, or 1k. You don’t want to notice the mesh switching between Main mesh and different LODs so as long as you don’t easily notice the change you can keep lowering the polycount.
    A container (on cargo ships) can be:

Main mesh = 1000 polygons
LOD 1 = 500 polygons
LOD 2 = 200 polygons
LOD 3 = 6 polygons. Because you are far enough from the model so you don’t notice anything. So LODs work like that. Now if one says Reduce 30% of the mesh for LODs it’s just a general guideline but not efficient because it works different for each model. You have to trust your eye.

  1. Do high poly bakes any time you want to have soft edges, or want to capture detail in the normal map but have a simple mesh. You can ignore the crate, it’ll be fine with hard edges. The extra time spent baking isn’t worth the few seconds a player crosses the crate. Even if you baked the crate, you don’t notice much of a difference but if it was a weapon, you’d really notice.

  2. Mip mapping is automatically done in engine.

  3. Keep texture sizes maximum 2k. You can use 4k in some cases. But don’t go upper.

  4. Welcome to the club.

Edit: Xenome was faster, obviously.

Thank you for really helpful answers you are right about those three loops on barrel, but I plan to add some bends on barrel, so overall silhouette is not just rectangle from side which leads me to another question:

  1. is it good approach to model basic barrel, bake out normals (as it is on screenshot now) and then take textured and uvd geometry to bend it… modify it… then adding bend detail in post, (I got quixel demo few days ago, and it seems absolutely brutal :smiley: with integrated toolbox in 3do )

  2. as Hi-poly modeler smoothing groups were tabu for me, now when I tried to follow tutorial that used combination of smoothing groups with normal baking and unwrapping it went horrible for me :smiley: I had so many problems with them, wouldnt it be better to just put one smoothing group on whole object and let bake to deal with normals? I can clearly see why are smoothing groups useful on non normal baked objects, but why did they use them on baked?

I heard that I need to add seams on smoothing groups borders, now I am going to experiment some more

-Winside

  1. Yeah, if you plan on making some moderate deformations on the low res, it is sometimes easier to do what you propose, i.e. deform after the textures have already been made/baked. As a general rule, I tend to keep multiple versions of the base meshes for various purposes, so I’ve got one mesh that’s only used as a bake target, then another one (or multiple variants thereof) that are used only as in-game models. Just have to make sure the UVs match of course!

  2. I’ve seen both approaches, not sure if one is better than the other. Personal preference is to have hard edges on the low res where it makes sense, even though the normal map is indeed capable of handling all of it. Just don’t like looking at the unshapely blob that is an entirely smooth volume :slight_smile: YMMV!

Bonus: Yes, where there’s a hard edge on the low res, there must be a split in the corresponding UV layout. So, hard edge = split the UV. In Max terminology I guess that means each smoothing group corresponds to a separate UV island (not a Max person here)

This is what I got with your help, its on the way, still some problems with wavy cylindrical object bake, but I managed to fix them in photoshop

Tomorrow I will have a closer look on Draw calls, what they are and how do they affect the performance

Looking good :slight_smile:
You can get rid of waves by baking a 16 bit normal map and then in PS converting it to 8 bit.

Yeah, those wavy lines are typically the result of the cage used when baking (if you are using a cage). A few edits to the cage would definitely solve the problem. Or, another solution, is to add support edges in the low poly geometry to help lock down the face normals. Painting it out is a fix, but if you can fix it at it’s source, it’s better for the production pipeline (revisions, etc.).

Barrels look good!

Here’s a huge post about why there’s waves when you bake. http://www.polycount.com/forum/showthread.php?t=81154

TwistedPrism is right though, you really want to avoid painting normal maps, especially if you are using a sync tangent workflow.