Hazoc Posted February 26, 2015 Share Posted February 26, 2015 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? Quote Link to comment Share on other sites More sharing options...
eetu Posted February 26, 2015 Share Posted February 26, 2015 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 Quote Link to comment Share on other sites More sharing options...
eetu Posted February 26, 2015 Share Posted February 26, 2015 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 Quote Link to comment Share on other sites More sharing options...
Hazoc Posted February 27, 2015 Author Share Posted February 27, 2015 (edited) 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 February 27, 2015 by Hazoc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.