Shadow pass

Started by ndeewolfwood, August 04, 2011, 10:13:14 AM

Previous topic - Next topic

ndeewolfwood

For a animation project i need to be able to render scenes with a shadow pass to tweak it into compositing.
My idea was to render a beauty pass with shadow disable on my main light and a pass with a white constant shader on everything(terrain and population) with shadow on.

Somebody have already try something in this way.

Nobody have a better workflow to do this ?

Tangled-Universe

Render passes are in development, but there's no information yet on which exactly and when.

I actually considered this as well, but never tried it?

Tangled-Universe

Ok just tried it a bit.

You can achieve similar results, but I think not exactly what you are looking for.

Create a whit Lambert shader as final surface shader before your compute terrain.
Disable rendering of atmosphere in the renderer.

Render image with same settings as your beauty pass.
Invert image.

You can also disable GI entirely, but then you will loose the differences between lighter and darker shadows.
If you'd use such an output as shadow pass then you would always adjust every shadow in a similar fashion, since the image basically is black+white  only.
Perhaps this is what you want.

ndeewolfwood

thanks for the quick reply.

you fully understand my needs
I'm not in front of my terragen computer but everything you said make sence.

Just a small comment.
If you use a Lambert shader, i think you can get some diffuse and specular on the render and not only shadows, right ?
Did you disable the light specular highlight option, or something else ?

QuoteYou can also disable GI entirely, but then you will loose the differences between lighter and darker shadows.
I don't use GI here, but additionnal light and ambient occlusion. This is not a artistique choice. I never succed to render a FullHd animation without flicking with GI and reasonable render time.





cyphyr

Glad to hear this works, always assumed it would be a workable solution but just never got around to trying it.
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Tangled-Universe

Quote from: ndeewolfwood on August 04, 2011, 01:04:40 PM
thanks for the quick reply.

you fully understand my needs
I'm not in front of my terragen computer but everything you said make sence.

Just a small comment.
If you use a Lambert shader, i think you can get some diffuse and specular on the render and not only shadows, right ?
Did you disable the light specular highlight option, or something else ?

QuoteYou can also disable GI entirely, but then you will loose the differences between lighter and darker shadows.
I don't use GI here, but additionnal light and ambient occlusion. This is not a artistique choice. I never succed to render a FullHd animation without flicking with GI and reasonable render time.

A lambertian shader model does not have reflectivity/specularity. Only diffuse.

In case of a white lambert shader you get white surfaces and black shadows. However, a normal shadow pass has white shadows and black surfaces which are directly lit.
Therefore you need to invert the image.

ndeewolfwood

You right about lambert, my bad. Thx for help.

bobbystahr

Is this the right time to suggest again looking at how Vue outputs Multi Pass info for stills or animations in .psd files that are easiliy worked with in Photoshop and After Effects...on my wish list for sure...worth a look Matt et al.. ...it's explorable in the Vue PLE btw.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

ndeewolfwood

QuoteIs this the right time to suggest again looking at how Vue outputs Multi Pass info for stills or animations in .psd files. ...

almost agree with this if you replace .psd by 32bit float .exr  ;)

bobbystahr

Quote from: ndeewolfwood on August 07, 2011, 09:44:48 AM
QuoteIs this the right time to suggest again looking at how Vue outputs Multi Pass info for stills or animations in .psd files. ...

almost agree with this if you replace .psd by 32bit float .exr  ;)


Does 32 bit float .exr give you all the separate layers for objects,atmosphere etc that .psd does...dl the Vue PLE and have a look at the multi-pass output they give...it's truly the best compositing path I've seen...I've never run into the .exr path so far tho...extrapolate please...I like to learn.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

ndeewolfwood

you can insert any information you want in .exr this is a multichannel file type. It's a open file format support by all major compositing software(nuke,after effects,flame,etc.).
Playing with channel is a little bit different from layers.
The main idea is  to put a lot of information for the same pixel.
In .psd, you have only 4 channel (R,G,B,A) for each layer.
In .exr you can combine in the same file a lot of information you can extract to create custom layer.
This is very effective way to do with a linear light ("linear blending" or "gamma 1.0 compositing") workflow.
For example instead of creating different layers for vegetation, you can render a pass with object ID and put it in a channel. From this pass you can output any layer you want if you need to tweak just one population.
Linear blending allow you to do some operation impossible with classic Blending.
For example with a linear workflow : Beauty - reflexion - specular = diffuse.
Adobe products can do linear workflow but with some limitation. For example in 32bits in photoshop a lot of tools are not available.
After Effects deal with this better since they include linear light blending color space (since cs3 i think) and the 3d extractor plugin (cs4or5) but a lot of effects are still not fully working in 32bits.
Talking about linear workflow with .exr can be long.
I didn't talk about the nuke and fusion workflow who is in some case more effective than the Afx way to do. (nuke is trully non destructive)

 




JimB

You could render using a lambert shader with shadows off (not sure if you want a shadow from an object), then render with shadows on and create a difference matte in a 2D app to extract the shadows. You might not even need to use a lambert shader, but I've not tried it.

Or, you could render/output the poly geometry for the terrain as an LWO, import it onto a 3D app (the TG2 and 3D-App scenes would need matching cameras), and use your 3D app to create your shadow pass. See link:
http://i331.photobucket.com/albums/l469/jimbowers/MATTE%20PAINTING/110_004_3dmp_01_small.jpg?t=1312736025
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

ndeewolfwood

QuoteOr, you could render/output the poly geometry for the terrain as an LWO, import it onto a 3D app (the TG2 and 3D-App scenes would need matching cameras), and use your 3D app to create your shadow pass.

that's a good idea when you don't have population.
We can't export terrain + population geometry ? Right ?


JimB

Quote from: ndeewolfwood on August 07, 2011, 02:53:30 PM
We can't export terrain + population geometry ? Right ?

If you switch raytracing for objects off you should be able to export populations, although it might not be as refined as you see in a render with object raytracing switched on. Understand that I'm talking about a camera based poly output; the type that looks like a LIDAR scan from the camera's position. I usually render out meshes from cameras at different angles, and combine the meshes in an external 3D app. To output a separate population and landscape, you can switch off surface rendering in the Planet node but the population should still generate.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.