What do you guys do for level of detail models? Characters, static art, cloth, skeletons, all that- whatever info you’re willing to give. Are you making them by hand? With a script- does it use built-in poly reduction, or have you written your own? Do your programmers generate them? I have theoretical answers to all these questions but I want to know what people have actually been doing in production and how you found it.
Well we are using multi-res in Max its not super but it works. And lately I had to re-write the re-skinning algorithm correctly and was a bit painful. This being said if I had XSI the decimation would produce better results I actually did some test and as far as poly reduction goes they are the only I’ve seen succeed. I’m all good for automation of LODs or assisted creation but I strongly recommend to have the ability to edit them manually we currently can’t (old legacy sytem). This is for characters and for level art its all done manually.
All but the simplest of models are reduced manually. The most distant scenery LOD’s are made with multi-res and the textures atlased. Everything else is LOD’d manually.
We use a script to create LOD’s manually with in MAX. Fairly standard stuff nothing too sexy. I’m curious to see what everyone else does.
For stuff like characters and weapons we tend to do it manually - more control and quality in the end, and it doesn’t take that long, especially for something that’s going to be on screen a lot of the time.
For world geometry though I much prefer automatic, programmer-generated LODs - it’s usually the stuff you don’t notice as much if the world is full of objects and some off in the distance are losing detail.
I find it interesting that a lot of people (not meaning the people who replied) still ‘forget’ to LOD shaders.
Shaders generally have a much larger impact on the performance then the number of polygons.
For mesh, the same deal, poly-reduce it wiht multi-res mostly.
kees,
I didn’t even think about down-res textures. Thanks for the tip!
[QUOTE=kees;1972]I find it interesting that a lot of people (not meaning the people who replied) still ‘forget’ to LOD shaders.
Shaders generally have a much larger impact on the performance then the number of polygons.
For mesh, the same deal, poly-reduce it wiht multi-res mostly.[/QUOTE]
I’m doing lots of this… Reducing texture layers (esp. detail textures), Atlasing textures (and baking lighting into textures on scenery) on distance LOD’s. Moving from image-based lighting to basic vert-lighting in the distance on creatures, removing specular lighting where appropriate. Fading out small geometry. If it can be Lod’d, it is.
(nb. Wii game, so no “shaders”, but there’s still plenty of material effects that can be reduced)
I used to work with some crazy people who believed slightly too far in the future : modeling characters starting with a spline cage, then surfacing all that to obtain a quad object. (it really fascinated me first but I quickly discovered its clunckiness)
“Approximated Catmull-Clark Subdivision Surfaces with Bicubic Patches” is supposed to be the next-gen stuff with hardware tessellation : meaning “automatic lods” , therefore HUGE time-saver in your pipeline and GPU powered at runtime (hull shader).
But I believe this DX11 thing will first benefit to terrains only as it’s gonna be far from obvious to ask or find artists able to create proper Npatch models : less vertices but 4tangent handles to adjust topology at each point… I think the “tools” (like NURBS?) are not quite ready yet, so there’s a high risk that it might fail to be widely adopted just like ATI’s “Truform” did (which is a shame).
I ended up reverting to the classic “polycrunchization” (I found Maya “Progressive Mesh” plugin not bad at all : http://www.pojar.net/ProgressiveMesh/)
Then adjusting by hand the UV potentially destroyed in the process - just to make them look good enough in the distance - as for skin weights : Maya’s copy/paste function seemed to be doing a fairly good job : only a few to re-paint for final touch.
I started to cook all that in a MEL “batchprocess” but never quite polished it (I was too busy actually doing the job by hand and I would have needed a much higher volume or perhaps 10 other artists asking me the features to really spend more time on it…)
As for shaders and other texture perf : any good engine should be handling miplevels for you : diffuse well compressed in DXT1 and possibly specular stored in the alpha channel along your normal map. (DXT5)
You might want to have loded skeletons but more especially fewer influences per vertex in each lod skinweights : 4 for max LOD , then 3, 2 ,1 (or 4,2,2,1)
If you use stencil shadows there’s also a technique that would consist of using the lower lod mesh data extrusion when you’re far in the distance but that’s really in the graphics coder’s hands.
[QUOTE=kees;1972]I find it interesting that a lot of people (not meaning the people who replied) still ‘forget’ to LOD shaders.
Shaders generally have a much larger impact on the performance then the number of polygons.[/QUOTE]
Actually, pixel shaders DO automatically scale their performace - based on screen size. As an object moves away, there are fewer “expensive” pixels to calculate which makes it faster. So in general you don’t need to LOD pixel shaders.
We do LOD the vertex shader though, which usually just means less bones/vert which the geo LOD supports.
[QUOTE=whargoul;1977]Actually, pixel shaders DO automatically scale their performace - based on screen size. As an object moves away, there are fewer “expensive” pixels to calculate which makes it faster. So in general you don’t need to LOD pixel shaders.
[/QUOTE]
Yes that is true. I wasn’t specifically saying pixel shaders though.
I was saying shaders in general.
For example, if you have a SSS skin shader, you are still doing all your blur passes etc even if your object is very small.
So it can still be really beneficial to LOD to a cheaper shader.
And even making your pixel shader cheaper can still have benefits. Especially if you have many objects on screen that use that shader, because together, they still fill most of the screen with pixels.
So I disagree with you that ‘in general’ you do not have to update your pixel shaders, but it depends on the type of game you work on.
I can imagine that i.e. a race game with only a few cars on screen would benefit little for updaing the cars pixel shader.
But if you are working on an RPG and you are fighting a nest of spiders, it can be really beneficial to make sure the spiders that are far away have much cheaper pixel shaders.
-Kees
It is important to look at how modern GPUs draw, quite often it makes no (very little) difference if you draw 1 poly or 1000 polys in a single draw call. Im not saying you dont need to LOD things, but you do have to look at every situation.
Textures have LODs using Mip Mapping, so this is kind of automatic, shaders are interesting, even though pixels in the distance may be cheaper there are cases were it is worth doing on expensive shaders.
The last thing you want to do with LODs is end up making more draw calls
with more verts because you have two LODs rendered in some kind of transition. I had a situation where when I measured the performance the LODing system for certain assets was slowing down peformance and causing popping, so we ripped it totally out. Every case is unique though…
speaking of LOD
The following neat demo ( massive crowd rendering with LOD ) runs great on my Radeon 4850:
http://developer.amd.com/documentation/videos/pages/froblins.aspx
hit escape fer the technology examples
[QUOTE=mikiex;1979]It is important to look at how modern GPUs draw, quite often it makes no (very little) difference if you draw 1 poly or 1000 polys in a single draw call. [/QUOTE]
Careful there, if you have too little polys you’re idling your GPU, because you’ll be spending more time setting up materials and prepping the GPU then actually rendering, we ran into that for a while.
We also found more issues with using LODs then not, we ended up using having a ingame rez and a cutscene rez, and since all the heads were the same topology we just hand made the LODs for everyone.
[QUOTE=mikiex;1979]
The last thing you want to do with LODs is end up making more draw calls
with more verts because you have two LODs rendered in some kind of transition. I had a situation where when I measured the performance the LODing system for certain assets was slowing down peformance and causing popping, so we ripped it totally out. Every case is unique though…[/QUOTE]
Performance wise, yes, but visually, no. On our recent PS2 and Wii racing game, we spent quite some time making sure that rather than having LODs pop on and off which is visually very distracting and ugly, we blended between them. The result is an expensive band where it draws both, but you can’t see the transition happening which looks massively better than having bits of scenery just disappear or leaving visual gaps. This was for environment geometry. Vehicles did pop but the difference between the LODs was so small that you couldn’t really tell.
We also baked textures onto simple box versions of buildings for the low LOD for them. Again, blending rather than popping the LODs made the transition much smoother. We didn’t bake lighting into the textures since the textures wouldn’t have been reusable then. They did end up looking a bit flat in the distance, but since the lighting blended out to the vertex lit boxes it wasn’t too noticable.
We didn’t have time to do anything fancy with shaders beyond having a dynamic environment map for the cars. That faded down over distance too and wasn’t drawn for the low level LOD. I understand texture passes are roughly linear in terms of drawing time for the Wii so getting rid of a second pass will halve the draw time. Probably a win for more fancy shaders than simple textured, vertex coloured triangles like ours.
We used volume shadows for the cars and used a super optimised model to cast them. No way you can use the visible geometry for that on the PS2, besides the visible geometry was open, not sealed. The shadows weren’t actually all that expensive when small on screen so they stayed on until the car wasn’t visible any more.
As for generating the LODs- edge loop> remove, edge ring> collapse. Took no time to make manually and I doubt it would have been as clean from an automated solution. We took roughly two out of every three loops out from the world geometry for the low LOD (there were only two).
[QUOTE=lkruel;1981]Careful there, if you have too little polys you’re idling your GPU, because you’ll be spending more time setting up materials and prepping the GPU then actually rendering, we ran into that for a while.
We also found more issues with using LODs then not, we ended up using having a ingame rez and a cutscene rez, and since all the heads were the same topology we just hand made the LODs for everyone.[/QUOTE]
This was my point, LODs are not always worth it because a GPU can draw 1000 polys as quick as 1 poly, so why bother doing LODs of something say 1000 polys, its just not worth it these days. I should of mentioned as you have the negative aspects of drawing too many calls - which you must avoid.
[QUOTE=robinb;1985]Performance wise, yes, but visually, no. On our recent PS2 and Wii racing game,… [/QUOTE]
I was focusing on modern GPUs - probably because I think of the older hardware as been fully known on how to get the best out of it.,- everything is totally different on platforms like PS2/Wii with fixed function pipelines compared to modern GPUs. This has been a bit of a shock to some people working only on consoles moving from say PS2 to PS3. Developers more experienced with PCs should know better how the hardware works. This is not to say they know everything, performance tools are the only way to really know whats going on.
Every situation is unique, in our case on PS3/360/PC dropping lod transitions was the right thing to do, on PS2 it may of been totally different as we frequently used them on those platforms
How do you measure all these things ?
PIX ? PerfHUD ?
[QUOTE=sebddd;1990]How do you measure all these things ?
PIX ? PerfHUD ?[/QUOTE]
Yes :): Gpad is nice too, though I havent played with it as much
[QUOTE=sebddd;1990]How do you measure all these things ?
PIX ? PerfHUD ?[/QUOTE]