Advertisement

Tricount and texture sizes for some middle sized props

Started by April 15, 2018 06:23 PM
7 comments, last by Scouting Ninja 6 years, 7 months ago

I've started making some props for a chemistry lab recently, but I found out it would be smart to ask some questions here before proceeding since I'm a beginner so I don't have to redo too much. Any help I can get would be really appreciated. I've tried looking for triangle count and texture sizes for various props in current gen games, but find it hard to find specs other than for characters. I'm not making these for use in games myself, but as I get better I would be interested to start sell on markets like Unreal and Unity so I have to make sure the props fits the general performance requirements.

Magnetic stirrer:

Given the information given below, do you think the triangle count and texture size is acceptable

Size: 15x25x12 cm

1024x1024 texture size. Should I add similar/mirrored UV's that can't be seen simultaneously on top of each other to preserve UV space? Do I need extra UV maps for light map generation if I do that?

LOD0 = 2600 tris
LOD1 = 1400 tris
LOD2 =   700 tris
LOD3 =   300 tris
Approximate tris counts!

magnetic_stirrer.PNG.46a147340d0125de5a596f44f89b499b.PNG

In the picture below of the LOD3 mesh I have a little problem. To get nice normal bakes I had to add UV seams add every sharp edge. When I then start to remove geometry to make lower LODs it sometimes happens that some of the mesh is removed from the UV map. As you can see here this leads to no white border around the orange color for this mesh. Any nice tricks here, or is this acceptable considering the distance will be pretty large?

magnetic_stirrer_1.thumb.PNG.92516c35c0aa84826e1e33ba1244e7de.PNG

 

Analytical balance:

Triangle count of LOD0 (wireframe) = 2000

The part I've marked with a red circle in the second picture below is not connected to the main body of the balance since I would need a lot of extra triangles to connect it. The plane below it will obviously not be rendered and doesn't need UV space, but I wonder what the cheapest solution to "remove" this area without too much extra geometry?

high_front.thumb.PNG.2a731a728f0c9b155e04ce2a3aaf42c2.PNGlow_front.thumb.PNG.54561fb17f8df72ab40e4fa0b3e79a7b.PNG

back_high.thumb.PNG.9cb123bae2030e6dff446d936f5a2529.PNG

back_low.thumb.PNG.21c429bd4362f90f6991b5235879139d.PNG

 

This got a bit much, sorry for that. If some of it got cleared up I would be very glad.

At 2600 tri they are actually consider mobile level, but things are never that easy.

This is the rule of thumb: 1 000 - 4 000 very Low poly, 8 000 - 16 000 Low Poly, 32 000 - 64 000 Mid Poly and any thing above that is high poly for a game.

With the main character as the most important object in the game, it decides the poly count for the rest of the game.

7 hours ago, mathiasxx94 said:

I've tried looking for triangle count and texture sizes for various props in current gen games, but find it hard to find specs other than for characters.

It is because things isn't that simple. basically when rendering you can think of it like a health bar. Meshes, textures, shaders, amount of objects and animations all consume a bit of that health.

Take Infamous Second Son and (+/- 120 000 tri) and Order 1886 (+/- 100 000 tri) looks very similar but if I had to take a guess I would say Infamous uses 3 meshes per character(Head, upper body, lower body) with a very simple UV map and one smooth group. Order 1886 probably uses 2 meshes (Head, Body) lots of smoothing, UV as needed and heavy focus on large triangles.

As for terrain Infamous focuses on Large meshes with smaller details, a common approach for large world games, that allow details to be LOD away. So a building would have large(walls and windows), medium (Fans, railings, fire escapes) and small(Lamps, wires, ornaments) LODing as needed.

Order 1886 has large and small details showing inconsistent. It's not strange to see a large flat wall leading to a very complex and detailed part of the exact same wall.

The results is that in the Order you get a very consistent triangle count over the whole scene and in Infamous the triangles is much denser near the player than further away.

8 hours ago, mathiasxx94 said:

Given the information given below, do you think the triangle count and texture size is acceptable

LODExplain.jpg.b640d20fbb1be1f8956ea022e822af2b.jpg

As you can see here you are preserving details, this is the same way I expect the Order 1886 graphics work. Where with Infamous red details would be removed on first LOD and yellow on second LOD.

Your model is so low poly here would be merged with other models in a process known as batching to save on meshes.

All you have to remember is that the smooth groups, UV map and mesh for a large environment model should be +/- 64 000 vertices. After that the engine needs more than one mesh to represent the same object. Dividing is often done behind the scenes. Any mesh larger than 64 000 isn't one mesh in engine.

Modern engines run huge amounts of polygons with a single shader and instancing. https://youtu.be/oMIbV2rQO4k?t=1485 

11 hours ago, mathiasxx94 said:

1024x1024 texture size

No way to know what texture sizes will be needed. The best way to solve this is to give the master textures and to inform the down-loader to scale textures as needed.

The main problem is that different games have different texel densities and some completely ignore good texture practices.

8 hours ago, mathiasxx94 said:

Should I add similar/mirrored UV's that can't be seen simultaneously on top of each other to preserve UV space? Do I need extra UV maps for light map generation if I do that?

If you use mirror UVs then yes you need a shadow map, also when using modular workflow.

For this asset there is no need for mirror UVs. Mirror UVs are for very large assets. The performance you save here wouldn't be worth the drop in quality.

9 hours ago, mathiasxx94 said:

To get nice normal bakes I had to add UV seams add every sharp edge.

Feel like I need to mention you can do the same thing by baking a object normal and converting to a tangent normal. Works every time because Hard Edge models have 90 degree angles.

Second you can just use a 2 bevel there. The argument is that modern rendering is so fast that the time this saves (No UV splitting of cages needed) more than make up for the small, almost insubstantial, performance loss. The basic workflow is to also bake the normals from the higher mesh into the lower, to control the bevel shading. https://www.youtube.com/watch?v=oAGEGBulzSU

2Bevel.png.e550637d7ccbec0a6710c0b1d2d63c29.png

You can stick with what you know if you want the results from both is identical to most players, the 2 bevel is just faster(10-12%). Only cost slightly more in rendering time ( < 2%).

12 hours ago, mathiasxx94 said:

As you can see here this leads to no white border around the orange color for this mesh. Any nice tricks here, or is this acceptable considering the distance will be pretty large?

Ignore it, that model should be so small it only takes 16-64 pixels on the screen, with less than a pixel to render that border. Remember that textures and shaders get LODs, with textures it's called Mipmapping. By the time the last lod is rendered it lost most details.

It may be hard to believe so to test it render the last lod to a 64 pixel image and then zoom out in Blender till they are the same size. I remember when I started as a 3D modeler it sounded impossible to me, but yes most models in the background have textures less than 64*64 pixels.

12 hours ago, mathiasxx94 said:

The part I've marked with a red circle in the second picture below is not connected to the main body of the balance since I would need a lot of extra triangles to connect it.

That part is right at the tipping point so it's your choice, you won't gain anything by making the hole the cost of texel vs poly should be equal here. Maybe make a hexagon, if you want?

Much more concerning is the topology of you circle, the pizza slices pole normal is going to be hell on shaders.

 

All in all good model 7.5 out of 10.

Advertisement

My tips are: make sure Mip0 of the texture is actually used, and make sure you're not using many pixel sized triangles. 

If you can create a texture in your engine with hand-authored mip-maps, make Mip0 a 1024px green texture, Mip1 a 512px blue texture and Mip2 a 256px red texture. Then, when looking at your model you can instantly see if you're wasting texel. If the mesh shows up green, you're making good use of your 1024 res... But if parts show up red, it means you could've just used a 256px texture and it would've looked the same! 

For the second test, you need to be able to turn on the wireframe view in your engine, with 1px thick non-AA lines. Any areas that are solid, because there's too many lines right next to each other, are too high-poly. Ideally most lines would be 4+ pixels apart. Ideally each polygon would be above around 64+ pixels in area. The polygon count itself doesn't matter too much, as long as they're put to good use - but pixel-sized (or sub pixel sized) polygons are very very wasteful. 

13 hours ago, Scouting Ninja said:

Much more concerning is the topology of you circle, the pizza slices pole normal is going to be hell on shaders.

Didn't know this so I'm really glad you told me. What a reply btw. can't thank you enough.

11 hours ago, Hodgman said:

If you can create a texture in your engine with hand-authored mip-maps, make Mip0 a 1024px green texture, Mip1 a 512px blue texture and Mip2 a 256px red texture. Then, when looking at your model you can instantly see if you're wasting texel. If the mesh shows up green, you're making good use of your 1024 res... But if parts show up red, it means you could've just used a 256px texture and it would've looked the same! 

Sounds like a good idea, but I don't think I understand exactly what you mean/how to do it. Wouldn't the color of the whole mesh just change color G -> B -> R as I move further away from it. General guidelines like the one you mentioned with 4+ pixels apart are perfect, thanks for that.

 

I have to thank you both again for exceptional answers!

17 hours ago, mathiasxx94 said:

Sounds like a good idea, but I don't think I understand exactly what you mean/how to do it

The DDS texture type allows for custom Mipmaps and is what most game developers and modders use. Both Gimp and Photoshop has a plugin for it.

This is one I use for mobile games feel free to use it, you can also expand it for larger texture sizes: 2048ColorMips.dds It is a bit large because it isn't compressed, to allow editing.

https://drive.google.com/open?id=107_vHcHx_wByMARYj-LOgXnQYVyDhQEj

The above video shows what @Hodgman was talking about. Because the screen is small(Unity pre-view screen) the mips only reach the full texture size when the camera is pressed against it.

So considering that most high end PCs use 1920x1080 and Mid end uses 1600x900 you can see that with both these a 2048x2048 texture covers the complete screen. Meaning that a texture size of above 2048*2048 should only be used for monster PC with 4K screens and higher.

Only 2% of the computers in the world uses higher than 2560x1440 . Meaning around 2% of all players in the world would be able to render a 4K texture.

 

Using that material you can check what texture size you need by placing the camera where you think most players would view it from.

2048ColorMips.dds

23 hours ago, mathiasxx94 said:

Wouldn't the color of the whole mesh just change color G -> B -> R as I move further away from it.

Generally, yes, but, you can still use that to tune your LOD distances in-engine. 

More importantly, it helps you spot texel density issues though. If different parts of the model have different scales in the UV layout, or different levels of distortion (more of an issue for organic objects than hard-surface models like this), then different parts of the model may transition mips at different rates. 

Advertisement
On 17.4.2018 at 6:01 PM, Scouting Ninja said:

snip*

Thanks again for a very good reply! Just to make sure I understand: The mip mapping algorithm automatically lowers the texture resolution if a pixel in the current texture is smaller than a screen pixel on the object the texture is assigned to?

On 17.4.2018 at 11:58 PM, Hodgman said:

Generally, yes, but, you can still use that to tune your LOD distances in-engine. 

More importantly, it helps you spot texel density issues though. If different parts of the model have different scales in the UV layout, or different levels of distortion (more of an issue for organic objects than hard-surface models like this), then different parts of the model may transition mips at different rates. 

I see, thanks a lot! Just one thing I wonder about: In the magnetic stirrer asset I made the texel density of the display a bit higher than the rest of the mesh, I tend to do the same with things like screws and other small things whenever I have extra UV space I can't use for anything else. I feel that higher resolution of things like screws and places where it's written something gives the illusion that the whole texture is higher res. Should I stop doing this, or do you  think it's an ok practice?

1 hour ago, mathiasxx94 said:

The mip mapping algorithm automatically lowers the texture resolution if a pixel in the current texture is smaller than a screen pixel on the object the texture is assigned to?

Yes. When you import a texture the engine will make the mips for you. Then while the game is running it will also solve the mips. It's no extra work for you.

Texel density is often decided by posting the camera at some angle from the model then mips are checked to see what texture range would be best for the game. When making assets for asset stores this shouldn't bother you much, it is something a developer decides at the start of a project.

All you need to do is provide the developer with a good enough texture that they can do these things. A 4-8K texture should allow them to scale as they need. 2K is also good.

This topic is closed to new replies.

Advertisement