View Full Version : Fluids casting shadows - how?
Hey
I have a fluid simulation (see pic) but i need to use the use background shader on a ground plane, to catch the shadows on the ground cast by that thick plume of smoke.
http://www.timothyrussell.co.uk/misc_images/test.jpg
However I have found fluids cant cast shadows onto that particular shader, which is annoying because i have always used this method to render shadow layers separatley and composite with them afterwards. I basically need that render to have an alpha channel with the shadow showing in it, dosen't have to actually show in the colour.
Any workarounds or other methods would be highly appreciated.
Many thanks
|
|
check this link.
http://agentfx.blogspot.com/
Thanks for the link, however interesting those tutorials were, there was nothing about getting a shadow pass for the shadow cast by the fluid.
The surface the shadow is cast on is not user made, and it needs to look as if the shadow is being cast on the ground, therefore i need to use a use background shader to only catch the shadows.
Any other ideas?
Well if the use background shader doesn't catch the shadows from the fluids, I would then try to fake a shadow pass by turning the fluids primary visibility off, casting shadows on a white plane. Then just use that image as a multiply on the BG image (exactly as an ambient occlusion pass).
The tricky part is to get the ground plane white without losing details on the shadows, but after tweaking a bit you get there.
Maybe I didn't tell you exactly which one you should watch so you said that. Those tutorial is from David Schoneveld, one of Gnomon instructor. Anyways, you should watch Fluid Rendering Optimization Maya/Metalray to see how he set up the scene to have different passes (include shadow pass that you are looking for) and how to reduce your rendering time from couple minutes per frame to less than 1 minute per frame.
Yeah, he comes across the exact same problem as me, where the fluid shadow on the use background shaded floor isn't showing up in the alpha. He applies a background shader to the floor, and the floor shadow is not showing up in the render. He says "hes not going to deal with it, as it can be solved. That's another issue", and dosen't fix it :(.
Had anyone got any email details for this guy, or know of a solution?
I might have to try DJ's suggestion. Not exactly great, but it will probably work.
Thanks so far.
destruct007
07-09-2009, 04:42 PM
so the background shader isn't catching the shadows? I've also done RGB lighting passes to get shadows. like
R = key light/B = shadows
G = fill light/black shadows
You can make a few versions of that kind of pass. then in comp, I'm sure you know, break the channels appart and use them solo as mattes. Does that help?
Ah ok, i don't know how to do RGB lighting passes (slightly stepping out of noob territory here). Care to briefly summerise for me? I know how to set up render layers and whatnot, and compositing is fine, just need a clear explanation on how to get that ground shadow i crave!
Many thanks
destruct007
07-09-2009, 05:46 PM
yeah it's pretty stright forward. Make the fluid white/take out all the color and no incandesence in the shader. Make your key light (main light) color red, and the shadow color blue. Make your fill light if you have one, green. Make the ground a white in color lambert. When you render that with no other lights in the scene you will have separated out your colors to specific things. when you look at the red channel you will only see the key light, green channel only the fill, blue channel only the shadow pass you originaly wanted.
Take that into shake for example and use the node in color > reorder. Set the channel to rrrr = white solo of your key light, bbbb white solo of your key light shadow etc.
Duncan
07-09-2009, 07:04 PM
By default fluid shadows on use background shaders works in the Maya software renderer. However in Mental Ray you need to make ShadowMethod = "segments" for fluid shadows to work on the use background shader(don't know why). (reflections and refractions do not require this, although one does need to enable visible in reflections/refractions on the fluid node if desired)
Duncan
Excellent, it worked (strangely it didn't before). Thanks, duncan.
Also destruct 007's method worked too if anyone had wondered.
Thanks everyone for your suggestions!
Fantastic. Thank you Duncan.
@Vord: I'm sorry that I didn't finish the whole tutorial so I didn't know he got that same problem.
s'cool, learned a bit more about particles & fluids from the other vids though!
Cheers
CGTalk Moderation
07-09-2009, 10:45 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.