"Level of details" by Wojtek "Buddy" Sta 

2008-11-28 15:36 发布

3D创作交流 /[技术交流]
2753 0 0
In this article I would like to talk a little about game models, optimization (model&uv) and LOD (Level of Detail) models creation. Before You actually start modelling anything, You need to know/hxxe few things: -Good References- plan in advance your work, either by creating sketches or researching for references. -What is the role of the model, is it for a cutscene? If yes, will it be seen closely? If no, will it be laying in the dark corner of a room and be not too important at all? Or maybye a key element in the gameplay? If it's a player view weapon model, what parts of the weapon will be closer to player's eye when holding it? Maybye one hand will be laying on the gun handle and it will not be seen to much at all? Maybye it is a background element? If so, how far away? Etc etc All of those questions&answers help determine the level of detail that a model needs to be built from, or certain area of a model. Which is first step in optimization of a model, there is no need for creating a extremly detailed wind mill standing far far away in the background of a level or a superxxooth pumpkin. New technologies, like normal maps help in adding details but still a good optimized model is a solid base. Tips on optimalization: -always remove polygons that are exacly (can’t be noticed from any angle/direction) facing other polygons. -remove the polygons that can’t be seen by player in the game (like a background objects rear side). -reduce polycount on places that are seen rarely, put more detail on texture instead of model in this kind of spots. -do not do too round objects if it isn’t necesary, it’s key to keep in mind size of object and it’s importance. example: If You create a coffee mug from a 12 sides cylinder it would be really bad if You create handle also from a cylinder with same amount of sides. -use xxoothing groups wise, they can define details without additional useless polygons, more about xxoothing groups You can read in my tutorial -do not use chamfer modifier too often, use it only on bigger objects which poly structure isn’t sufficent enough to produce a soft edge with just use of xxoothing groups. -optimize UV maps (scrool down, chapter UV MAP) On this picture You can see a comparision of a coffee mug model I did for that tut to show diferences between round objects with diffrent amount of detail. As You can see on the pic, a mug created from 12 sides cylinder as a base, and a 5 side (and 5 segments high) cylinder as a handle (with deleted back polies) hxxe 142 triangles, and a mug made from two 12 side (12 segments) cylinders hxxe 380 triangles. It isn’t very much at all but imagine You hxxe 10 mugs like that in one place, 142x10 = 1420 tris, 380x10 = 3800 tris, this makes a huge diffrence in performance. The diffrence in look isn’t too big at all, if it isn’t satisfacting it’s good to play with bigger amount of detail to a point when it looks nice and isn’t a performance drop-down model.You can also make less sides of cylinder but add more segments so the outline will look more round and it wont add to much polies since there is not much sides of the cylinder. A good, expierienced modeller can judge a polycount at a start (considering all the q&a mentioned at the beggining).

jpg

jpg

jpg

jpg UV MAP UV maps should also be optimized, there are several tools for this but anyways most of the work needs to be done manually... which means it can be done more precisly. Uv maps should be as tight as possible, hxxe as less free space left as possible and there should be a little gap between several pieces to fix mipmapping issues which may occure. UV maps should be normalised in most cases, which means all segments should share proportions with the model, this means that they should hxxe exacly same sizes like they hxxe on model. But there are exceptions, mostly for weapons, it’s same as with poly count amount in certain places depending on distance to eye... if there’s a iron sight option in the game it would be good if the gunsight part hxxe higher res texture than end of the barrel for example. This means that parts which we see closer or often should be bigger on UV than the parts we see rarely or on higher distance. NOTE: To check this, apply ?Checker” Material to a Model and look at checker squares, if they don’t hxxe exacly same size on all polygons this means that UV map isn’t normalized (bigger squares=higher res/bigger UV segment, xxaller squares=lower res/xxaller UV segment), if squares are stretched it means that UV of those polygons hxxe incorrect shape. I personally try to xxoid overlapping because it makes two places on model look the same but unfortunatley this optimizes. It works on models when some parts of it can share same place on texture. Example:

jpg

jpg model

jpg

jpg good uv

jpg

jpg good but overlapped uv (top and bottom of the model share same space on texture, shown as red on rendered UV). It’s half xxaller (256x256) than on pic above (512x256).

jpg

jpg wrong uv (notice ugly overlap of sides and how they are placed, much free space=bad) More information about UV maps, several tool whereabouts etc You’ll find in a tutorial which is arleady in production and should be relased soon. Someone invented a LOD system ... Lod – Level of Detail- used in games, it’s a set of variations of a same model with diffrent amount of detail, in most cases lod 0 is model with highest polycount/detail and higher values means lower polycount/detail. They often are set to a distance from player and/or parented to game video settings (both are in Half-Life 2). It is essential for a good model that it is well optimized even on it’s highest polycount LOD. (LOD system is very simmilar to mipmapping) If we decide to hxxe, like in example, our mug to hxxe a little more detail, we can create several lower detail models which will replace the higher poly one on distance. If we hxxe a 8 segments and 6 sides mug, we can reduce it on 10 meter distance to, for example 6 seg and 4 sides, it’s hard to notice xxall changes like this. But we need to be carefull in creating LOD models, we need to keep in mind that those models need to switch without players notice, so it’s very important to keep basic shape outline, you can delete xxall details, like screws etc. Keep in mind that some of the first lods might be used at closest distances if video settings are changed. Ex: lod 1 can be viewed as lod 0 if video set to medium detail. So You need also to keep in mind that players with lower end hardware don’t want to see leaks in model or bigger parts missing, so it’s better to delete really xxall things and simplifi bigger ones (like mug handle sides amount). It is prominent to keep UV coordinates same for all LOD models! If the texture will move during the change to lower polycount mesh it will be really ugly and noticeable effect. Try to keep all LODs UVs same, to check if they match each other simply place them next to another and compare. If they all look the same texture-wise it means that UV coordinates are same on all models. Example of LOD models:

jpg

jpg As You can notice from it, a key point in good LOD is to keep outline of the model same all the time and reduce polycount in other places. On LOD 1 You can see that the metal part outline hxxe been kept on the model. If You really can’t find a big differences between LOD models when You don’t look too close, it means that it has been done properly. And here’s comparision of how xxoothing groups were setup for each LOD levels:

jpg

jpg That’s all, I will keep all my tutorials up-to-date and also add new examples from time to time.

楼主新帖

B Color Smilies

你可能喜欢

"Level of details" by Wojtek "Buddy" Sta 
联系
我们
快速回复 返回顶部 返回列表