Jump to content
Sign in to follow this  
shinkicker

ShadowLODS - Do we really need them stil?

Recommended Posts

This was discussed not long back on the skype modellers channel and so I thought I would extend it to here to see if any developers add comment, or to allow others to contribute to the discussion.

I started off with a question of 'how come I had a shadow, even though I did not have a shadow LOD in my model'. Turns out that, if no shadow LOD is available, it defaults to using one of the existing distance based LODS (but no one was sure which).

This then opened up the question of optimization, because of course a shadow LOD is typically very low poly, unlike the first distance LOD of 0 or 1.000

Others in the chat made comment that with modern powerful GPU's, you could leave them to process the shaders using existing LODS and the overhead cost of resource requirements was very minimal.

Now I admit, I am a bit clueless in this area, so thought I would raise this here so a consensus / correct view can be achieved.

Is it still very important to have an optimized shadow LOD?

To save the answer if 'depends on your mesh', lets use the examples of a car @ 20k, character @ 10k and a gun @ 3.5k

Share this post


Link to post
Share on other sites

shadowVolume LODs are there to provide an alternate LOD to generate the shadows so that you can close, triangulate and sharpen the mesh properly to avoid shadow artifacts. The fact that you can also use them to reduce the shadow's polycount by removing details that aren't necessary and don't show up in the shadow projection (things like concave surface details) is merely a bonus.

If you don't close the mesh and/or triangulate it, you get weird extruded projections that are visible through other objects (mostly visible when using stencil shadows), and if you don't sharpen the shadow mesh it sometimes warps weirdly as the direction changes, though this is less noticible and doesn't always look too bad (i.e. you can sometimes do without). The game is much faster at generating shadows that conform to these rules of being closed, triangulated and sharp. If you turn on 'Show Shadows' in buldozer and see how long it takes to load a model with a malformed shadow LOD compared to a properly made one, you'll notice a difference.

Making optimal use of polycount and vertex normals in your resolution LOD doesn't always lend itself to closing, triangulating and sharpening the whole mesh to avoid these rendering errors. So yes, it does depend on the model and how it's made, wthrer you can completely rely on using the res LODs to project the shadows.

Share this post


Link to post
Share on other sites
Others in the chat made comment that with modern powerful GPU's

well, do you only want people with modern powerfull GPUs and CPUs to play your addon only, or do you also want to allow people to play your addon that meet minimum or medium spec "only"?

If every addonmaker just disregards the optimisation step the fps spiral downwards rapidly. Yes maybe 1 addon doesnt harm if it lacks optimization. But who does only use 1 addon?

Saying modern gpus are powerfull is imo just a lazy excuse to not make a proper and optimized shadowLOD. Why even bother optimising the rest of your model then and cramping everything into as-small-and-few textures as-possible ?

Forget baking guys, we use the real geometry now :yay: <hyperbole>

Edited by Fennek

Share this post


Link to post
Share on other sites

Well, to be honest, I agree with things the others said in this thread. However, my own personal opinion differs a bit:

Shadow LODs were neccessary for creating good looking shadows back in the old days. That was because of the massive content, provided in an open World Sandbox.

Nowadays, this should not be neccessary anymore: Algorithms + Hardware today are more advanced and optimized thus they allow a proper and fast generation of shadow maps.

Special Case A3: With Stencil Shadows, you are visually limited in detail and correct display of shadows cannot be guaranteed. (Static shadows on dynamic geometry for example - shadow isn't displayed)

Another aspect is the fact that shadow visibility is limited to a certain degree which is controlled via options (max. 200m distance). However, this shadow is often hardly noticeable. With Shadow maps, the detail can be made adaptive - depending on settings and hardware.

Plus, every shadow LOD increases content size, therefore loading times and so on. If A3 would use shadow maps only, this time could be converted for shadow maps generation.

Last but not least: Shadow Maps are soft. ;)

Conclusion: Personally I think that stencils are still ingame as a relict from A, A2 because of proven usability. If I had the choice, I would completeley disregard shadow LODs as they also produce more effort managing and optimizing models.

Share this post


Link to post
Share on other sites
Static shadows on dynamic geometry for example - shadow isn't displayed

what do you mean by that?

That was because of the massive content, provided in an open World Sandbox.
This is still the case so i wonder why it would be less relevant now.
Nowadays, this should not be neccessary anymore: Algorithms + Hardware today are more advanced and optimized thus they allow a proper and fast generation of shadow maps.

I dont trust assumptions that are based on "its advanced now" at all.

Share this post


Link to post
Share on other sites
what do you mean by that?

This effect can be seen in several situations.

This is still the case so i wonder why it would be less relevant now.

Scalability.

We do have even more and more detailed content now. Imagine how it would be if you put ALL assets into one spot of the map. Memory consumption, CPU stress, Calculating additional LODs are less efficient as creating an adaptive, dynamic shadow map. They could even implement shadow map instancing. But as RV4 builds up on previous versions, this would require a massive rewrite of some portions of the engine. However, the technology to create better shadows exists. There are tons of R&D documents on the web too. :)

I dont trust assumptions that are based on "its advanced now" at all.

I usually don't do either unless I know what I am talking about. I'm quite into technical progress and have seen some neat algorithms the past 10 years. Some of them have been implemented in severeal engines (id Tech 4, UE3, UE4, Source, etc.).

Share this post


Link to post
Share on other sites

Yes but this isn't Disneyland. You can't just imagine all the cool tech that we should have. We have to play with what were delt. And that means using the shadowlod to optimize the model in game.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×