Jump to content

Rendering only volume selfshadows


Recommended Posts

Hello

 

I'm playing with Cloud FX tools.

 

I have a case where I'd like to prevent three xyz aligned distant lights used to render worldspace normals for clouds from casting shadows from a volume primitive onto another.

 

The image shows right most cloud blocking the red distant light from the left cloud thus resulting lost X component of the worldspace normal for the feft one.

 

What options there are to control shadows when doing volume rendering? Is there a better way to extract this type of worldspace normal information for each cloud primitive?

 

 

post-1686-0-14573900-1424981091_thumb.jp

Link to comment
Share on other sites

Hello, good sir.

 

I would take a gradient volume sample in the shader and use that as the normal. Of course you lose the intra-cloud self-shadowing, which might be a good or a bad thing, depending what you are using this for. If it's for lighting, then bad, but if you really want the normals, then good :)

Link to comment
Share on other sites

If you only have a couple of primitives you could duplicate the lights, and use the Light Mask on an object to restrict a given light to just affecting that object, and only add that object to the light's Shadow Mask so that no other objects shadow it. A bit clunky and not pretty, but in real pinch you could script the boring bits..

 

ee_shadow_restricting.hip

Link to comment
Share on other sites

Well good morning there houmie!

 

Yeah I fiddled around with the gradient trick. As I'm anyway planning to post-light the clouds and use a loose z-buffer rendered from their iso-surfaces to raymarch some kind of shadows in realtime, the loss of intra-cloud self-shadowing shouldn't be an issue.

 

But if I happened to need this 3 distant lights per every cloud primitive -setup, I guess making a single cloud to a HDA with the three light rig included and masked only for the contents of their own HDA could work. Then just populate these HDAs all-over to create a cloudy sky.

 

BTW here's an example showing lightmasking done from the SOPs level.

http://forums.odforce.net/topic/21946-per-primitive-light-or-per-light-material-in-mantra/

 

Thanks!

Edited by Hazoc
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...