Jump to content

Shadow matte with envlight


Jouk

Recommended Posts

Hi,i've encountered problems with shadow matte probably caused by the envlight which casted like an occlusion to the geometries and resulting in a darker wall. Are there any ways to avoid this situation or render those shadows/ occlusion separately?

post-4868-124832340532_thumb.jpgpost-4868-124832308218_thumb.jpg

Link to comment
Share on other sites

Hey ,

I see several problems with the GI light that can be worked around in comp and rendering using different mantra rops.The main problem lies in the way you comp your shot as using the GI light you get the secondary illumination and the colour and occlusion.

Mantra ROP one , render all yourdirect lights with your deeprasters

Mantra ROP two , render just your env light with full irradiance

Mantra ROP three , render your occlusion

then comp your images like this

I am at the moment trying to figure how to set up a lighting loop within a surface shader to render the env light as a arb output.Which would make life a lot easier !

hope this helps

r

post-1566-124836203358_thumb.jpg

Edited by rob
Link to comment
Share on other sites

Hi,i've encountered problems with shadow matte probably caused by the envlight which casted like an occlusion to the geometries and resulting in a darker wall. Are there any ways to avoid this situation or render those shadows/ occlusion separately?

post-4868-124832340532_thumb.jpgpost-4868-124832308218_thumb.jpg

Exclude the wall in the shadow mask on the envlight, then it should be all good.

Hey ,

I see several problems with the GI light that can be worked around in comp and rendering using different mantra rops.The main problem lies in the way you comp your shot as using the GI light you get the secondary illumination and the colour and occlusion.

Mantra ROP one , render all yourdirect lights with your deeprasters

Mantra ROP two , render just your env light with full irradiance

Mantra ROP three , render your occlusion

then comp your images like this

I am at the moment trying to figure how to set up a lighting loop within a surface shader to render the env light as a arb output.Which would make life a lot easier !

hope this helps

r

I might be going crazy, but I'm pretty sure direct diffuse should not be multed with ambocc. It should only be used to ... occlude the ambient light.

Link to comment
Share on other sites

Hi Sam,

The ideal solution would be to render the secondary illumination without any occlusion as you can with MR and FG.Building a shader that could do all of this would be ideal, as then you could compare your beauty to the reassembled outputs.Currently I just don't know how to do that and I end up with 3 mantra rops :) . Can you even render an arb of the env light and output just the colour part ?.

Do you fancy showing your idea in action so we can compare.

r

Link to comment
Share on other sites

Can you even render an arb of the env light and output just the colour part ?.

Hi Rob. You absolutely can. Mantra makes this easy for us by having separate light and shadow shaders. We can grab the result of the light shader, grab the result of the shadow shader w/ the light shader and then divide the two to give us just the shadows. This is how the VEX Shadow Matte material works.

I attached an example showing this in action. The uploaded didnt allow the .pic or the .exr for the area map, but hopefully you've got one to pop in there.

Good luck dude.

also sam.h

I might be going crazy, but I'm pretty sure direct diffuse should not be multed with ambocc. It should only be used to ... occlude the ambient light.

Nope, you're not crazy! You're right on.

envstuff.hip

Link to comment
Share on other sites

Hi Sam,

The ideal solution would be to render the secondary illumination without any occlusion as you can with MR and FG.Building a shader that could do all of this would be ideal, as then you could compare your beauty to the reassembled outputs.Currently I just don't know how to do that and I end up with 3 mantra rops :) . Can you even render an arb of the env light and output just the colour part ?.

Do you fancy showing your idea in action so we can compare.

r

I was under the impression that the OP only wanted the shadows caused by his objects on the wall from the env light. The wall is self shadowing which is a problem because that is something that already exists in the plate.

My suggestion was to simply exclude the wall from the shadow mask in the env light so that the wall won't self shadow. I think we are talking about different problems here :)

I was putting together an example (Just with the wall excluded from the shadow mask) but realised that it wouldn't work so well, since that would mean that shadows are cast from every direction.

I'm putting something together now to show a different idea ...

Edited by sam.h
Link to comment
Share on other sites

Hi Brian,

Great scene file.It certainly goes a long way to explain things.

I might be going crazy, but I'm pretty sure direct diffuse should not be multed with ambocc. It should only be used to ... occlude the ambient light

This I take it is more to do with how your shader is constructed surely ? and then how the arb outputs are assembled in comp.

Edited by rob
Link to comment
Share on other sites

This I take it is more to do with how your shader is constructed surely ? and then how the arb outputs are assembled in comp.

Of course its all about doing what looks good in the end, but scaling all your lights by ambient occlusion is not physically correct. Direct occlusion is taken care of by shadows, so scaling the direct lighting with ambient occlusion would essentially be double occluding certain areas. Ambient occlusion is meant to roughly approximate the shadowing of indirect light by assuming the indirect light is a constant (ambient) color and is coming from a full hemisphere. This also means that rendering irradiance and ambient occlusion is redundant as irradiance is the true calculation of what ambient occlusion is trying to approximate - the bouncing of light.

Houdini does a good job of indicating the correct technique in the way the VEX Global Illumination shader works. When we use this shader in Ambient Occlusion mode, it adds a constant color (the background color parameter) scaled by ambient occlusion. It does this without changing the direct lighting at all.

Of course, we can make it all so much easier by forgetting these oldschool hemispherical sampling approaches altogether and render with PBR! :D

Link to comment
Share on other sites

Thanks for all the replies and really appreciate that =D but how can we tune the grain/noise of that shadow layer. It'll definately be visible under HD. I had try and error and area sample reduces that however at a higher cost of rendering time.

Link to comment
Share on other sites

so scaling the direct lighting with ambient occlusion would essentially be double occluding certain areas

But if I render my dif pass without shadows and then add them in as an arb the above comp would be correct wouldn't it ? Rendering with the GI light gives you as you say the true approximation of bounced light you just get the occ for free yes ?

r

Link to comment
Share on other sites

Thanks for all the replies and really appreciate that =D but how can we tune the grain/noise of that shadow layer. It'll definately be visible under HD. I had try and error and area sample reduces that however at a higher cost of rendering time.

You can use the VEX global illumination shader which is faster, described here: http://www.sidefx.com/docs/houdini9.5/light/ambientocclusion but I don't think that works properly with the shadow matte shader. To get around that you could just render your wall with the basic shader and use that for your shadow matte.

I have put together an example for you to get around the self shadowing problem on the wall... I rendered three passes to get around it:

A: The wall occluding itself

post-4420-124858407146_thumb.jpg

B: Everything occluding the wall

post-4420-124858407986_thumb.jpg

C: The spheres lighting (just an environment light, no spots or anything).

post-4420-124858413991_thumb.jpg

and then in the comp I got the shadows by subtracting A from B, the hip file will probably make more sense than my ramblings. Hope this helps, you seem to be past this issue anyway :/

post-4420-124858410134_thumb.jpg

gishadows.hipnc

Edited by sam.h
Link to comment
Share on other sites

Hi rob,

oh no , i am still working on it , i saw your hipnc file, was amazed at it. i shall give it a try.

anyways i found out to reduce the samples is to actually increase area size and samples under the env lights settings, but i still would give your method a try.

Link to comment
Share on other sites

Hi rob,

oh no , i am still working on it , i saw your hipnc file, was amazed at it. i shall give it a try.

anyways i found out to reduce the samples is to actually increase area size and samples under the env lights settings, but i still would give your method a try.

Link to comment
Share on other sites

Hi rob,

oh no , i am still working on it , i saw your hipnc file, was amazed at it. i shall give it a try.

anyways i found out to reduce the samples is to actually increase area size and samples under the env lights settings, but i still would give your method a try.

yup, increase the samples, the VEX GI shader will be much faster so definitely give that a go :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...