Jump to content
frankyoualot

shadows / deep map vs raytrace

Recommended Posts

Is it a general rule to use shadow maps with volume rendering?

I typically use raytrace shadows because of the quality...and have heard that shadow maps are typically used for video games, not feature film.

Thanks!

Share this post


Link to post
Share on other sites

I think shadow maps are pretty much standard for volumes.

You can increase pixels samples on your map and blur it a little to get better results.

For small volumes you might be OK with raytraced shadows.

Share this post


Link to post
Share on other sites

I know this is a little off the question, but an alternative fast render cheat is to use a ramp through a volume. It does not get edge highlights(thus a cheat), but since you render the volume as a constant with out light shading it plows through real quick. Good for atmospheric shading, and non-hero objects. Especially stuff with a lot of screen real estate.

In order to do it create attributes at the sop level based on the BBOX variables to be able to import them into your shader. Use axial max and min for source max and min values and the object position for the value. For custom orientations you can use a a negativa and positive value of the maximum size values and the object position modified by a transform matrix that will let you do euler rotations to rotate the ramp around like a light.

Share this post


Link to post
Share on other sites

I know this is a little off the question, but an alternative fast render cheat is to use a ramp through a volume. It does not get edge highlights(thus a cheat), but since you render the volume as a constant with out light shading it plows through real quick. Good for atmospheric shading, and non-hero objects. Especially stuff with a lot of screen real estate.

In order to do it create attributes at the sop level based on the BBOX variables to be able to import them into your shader. Use axial max and min for source max and min values and the object position for the value. For custom orientations you can use a a negativa and positive value of the maximum size values and the object position modified by a transform matrix that will let you do euler rotations to rotate the ramp around like a light.

Thanks for this tip - i will try this method..

Share this post


Link to post
Share on other sites

Is it a general rule to use shadow maps with volume rendering?

I typically use raytrace shadows because of the quality...and have heard that shadow maps are typically used for video games, not feature film.

As was stated using opacity shadow maps for volume shadows are the norm.

I do believe that shadow maps and opacity (deep) shadow maps are used very frequently in CG feature film. Essential for furry critters.

Share this post


Link to post
Share on other sites

As was stated using opacity shadow maps for volume shadows are the norm.

I do believe that shadow maps and opacity (deep) shadow maps are used very frequently in CG feature film. Essential for furry critters.

I see; nothing personal, but it would be good to hear the 'why' to your statement.

So far I've been told by artists from both film and video games, that maps are used for gaming (faster, low-res), and ray-trace for film (high-res, accurate).

Share this post


Link to post
Share on other sites

I see; nothing personal, but it would be good to hear the 'why' to your statement.

So far I've been told by artists from both film and video games, that maps are used for gaming (faster, low-res), and ray-trace for film (high-res, accurate).

Do a simple test.

Create a volume from a sphere, point a "spot" light at it. Align the depth map shadow correctly, then do a test render of it then switch it to ray traced. You'll be able to notice the difference of render time versus quality. It will change up for different scenes. Never use an env light and ray trace with it though, but that is a simple test to.

Share this post


Link to post
Share on other sites

Do a simple test.

Create a volume from a sphere, point a "spot" light at it. Align the depth map shadow correctly, then do a test render of it then switch it to ray traced. You'll be able to notice the difference of render time versus quality. It will change up for different scenes. Never use an env light and ray trace with it though, but that is a simple test to.

IMHO - it seems that maps are outdated and a cheap workaround. Sure, fx is all about cheats and squeezing out unnecessary r-time..but by the time your map is 2-4k and you're blurring it to hide artifacts, raytrace is faster (my tests with mist over an ocean and bamf fx with a character).

Maps seem like a typical workaround post multi-core procs and for real time rendering where baking maps is the only choice (video games).

Furry creatures - well, they look dang good if maps are being used, so - cool there. Makes sense if the finer details of the light are not needed or visible.

But give me my attenuation!

Share this post


Link to post
Share on other sites

Hi,

I think it depends on your production demands. Shadow maps and raytrace shadows got their pros and cons. For me shadow maps especially deep shadow map is fast and you can get a good result while you can store it for later purposes. If let just say your scene is only consisting of moving camera only while the objects are static, using one shadow map is enough and you don't have to calculate shadow for every frame, so it can make your scene render faster. The downside for that is sometimes in a very complex scene your shadow maps can grow quite large and even more expensive to use than using raytrace.

So that's why I think you still need to use both and depends on the situation of your project.

Cheers..

Share this post


Link to post
Share on other sites

Hi,

I think it depends on your production demands. Shadow maps and raytrace shadows got their pros and cons. For me shadow maps especially deep shadow map is fast and you can get a good result while you can store it for later purposes. If let just say your scene is only consisting of moving camera only while the objects are static, using one shadow map is enough and you don't have to calculate shadow for every frame, so it can make your scene render faster. The downside for that is sometimes in a very complex scene your shadow maps can grow quite large and even more expensive to use than using raytrace.

So that's why I think you still need to use both and depends on the situation of your project.

Cheers..

Very well put - thank you...In my growing understanding of this, I can't imagine lighting animated volumes with maps.

Share this post


Link to post
Share on other sites

Very well put - thank you...In my growing understanding of this, I can't imagine lighting animated volumes with maps.

Maps can be animated also, and deep shadows deal well with motion blur. Generally you're right about a feeling that maps are not a song of future. It looks like they'll be obsolete one day. But it's not today yet. They are still very useful, one - for shadowing dense media like volumes and hair (or anytime traced shadows are too expensive), two - for they let you reuse your cpu cycles, what has a big impact on efficiency in big productions.

Most people simple don't know the power of deep shadows since none of popular renderers support them. Beside rmans and mantra only mental ray has it, and they seem to be broken there. Thus folks tend to think shadows maps == realtime, which is not entirely true.

Edited by SYmek

Share this post


Link to post
Share on other sites

Most people simple don't know the power of deep shadows since none of popular renderers support them. Beside rmans and mantra only mental ray has it, and they seem to be broken there. Thus folks tend to think shadows maps == realtime, which is not entirely true.

I agree with you. I used mental ray for quite a long time in production but it seems they don't intend to improve their shadow map capability, even tough they have detailed shadow map mode for shadowing volumes and hair. For the current production that I'm currently working on right now, deep shadow maps from 3delight has better performance than raytrace shadows in terms of fur and hair lighting. And also due to the fact that the sets are complex and heavy, most of the time I can reuse the maps whether animated or not.

Some of my friends that use vray also confused what does it mean with deep shadows, is that a technique to make shadows more deeper? That's what they say. Frankly speaking, shadow maps and deep shadow maps are still being use until maybe if raytrace shadowing can handle complex geometries with better cpu speed and management.

Share this post


Link to post
Share on other sites

Maps can be animated also, and deep shadows deal well with motion blur. Generally you're right about a feeling that maps are not a song of future. It looks like they'll be obsolete one day. But it's not today yet. They are still very useful, one - for shadowing dense media like volumes and hair (or anytime traced shadows are too expensive), two - for they let you reuse your cpu cycles, what has a big impact on efficiency in big productions.

Most people simple don't know the power of deep shadows since none of popular renderers support them. Beside rmans and mantra only mental ray has it, and they seem to be broken there. Thus folks tend to think shadows maps == realtime, which is not entirely true.

So if a volume is animated (not clouds, but volcanic ash for example), the lights are still calculating and writing the maps every frame. So would raytrace but no storage. But, the maps can be written to disk and future renders will go much faster especially if several passes are needed. Am I getting this correct? But if maps need to be calculated at every frame then how are they more efficient then raytrace every frame?

Sorry for the confusion and thanks for the advice..

Share this post


Link to post
Share on other sites

So if a volume is animated (not clouds, but volcanic ash for example), the lights are still calculating and writing the maps every frame. So would raytrace but no storage. But, the maps can be written to disk and future renders will go much faster especially if several passes are needed. Am I getting this correct? But if maps need to be calculated at every frame then how are they more efficient then raytrace every frame?

Sorry for the confusion and thanks for the advice..

You are correct, in the real life you're hardly ever computing a sequence once. More likely iterate over and over again. Moreover, during a production, lighters usually don't touch the geometry, only lit and shade a scene, thus they can assume, that maps computed once, will stay valid for a while, unless something changes upper in a chain. That makes maps efficient, even though you're computing map every frame in a sequence, it happens once at the day you get the shot to lit, after which they are reused many days until you finish the shot.

Secondly, deep shadow maps algorithm is usually faster per se than ray tracing, as you can assume knowing it as a hack. But this varies, and there's no way to assume it unless you try it. They are limiting in a number of way also. Last year during a production we have to switch at the end from maps to ray traced shadows for a couple of shots, simple because for reached a point where the performance of these two switched order. With a few hundreds (!) deep shadows in a shot it apparently became faster to render them as ray traced. Specially if you start counting not only render time, but also user time spent to manage shadow maps. It's great to have that option anyway.

Finally, deep shadow maps are fun as they allow many tricks. Deep composition which is a hot topic this summer, came from that very idea, and was developed in Houdini 2 or 3 year ago.

Share this post


Link to post
Share on other sites

Finally, deep shadow maps are fun as they allow many tricks. Deep composition which is a hot topic this summer, came from that very idea, and was developed in Houdini 2 or 3 year ago.

That makes a lot of sense and I'm glad to see there is no strong opposition to raytraced shadows.

Can you share an example of having fun with deep shadow maps? It'd be cool to hear..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×