View Full Version : Problem with volumic light z-depth render pass
04-22-2010, 12:25 PM
I am doing an animation project where the task is to model and animate the 20th Century Fox logo fanfare. As you know several moving light spots with visible light cones are present in this scene (see for example http://www.youtube.com/watch?v=YxuJSqDIqbA&feature=related)
To make the light cones I set up a couple of spot lights and gave them a volumic property and keyframed the spot of interest for the light sources to make the cones move around.
The problem then arises when some of these volumic lights cross each other. My intention was to render crossing volumic lights in seperate render passes and then composite them with a pass consisting of the rest of the scene.
However, to do that correctly I need z-depths aswell because some of the volumic spot lights are sometimes partly occluded by something in the scene during the animation. So I need z-depth render passes to composite the volumic lights with the rest of the scene.
The problem with this is that I cannot get the z-depth for the volumic lights. I tried to set up z-depth passes for some of the volumic lights, but it seems not to work. I simply get the light intensity in the z-depth pass aswell and thus I cannot composite the render passes correctly.
So my question is if any one can help me how I can get the z-depth for the volumic lights or if you got some other idea about what render passes to set up and how to composite them.
Please let me know if something is unclear. Thanks in advance.
04-22-2010, 04:03 PM
Well, you could always go old-school with these since they are so stylized.
Use cone like cylinders with either a straight up gradient on them OR a volume shader (not SSS) and a gradient to get the look you want. Parent these to the lights, animate etc.
The obvious advantage to using grads only is that it is VERY easy to now get your depth pass, and a few extra ones, and you'll have a lot of control over the look. If you light ever looked into the camera, then you'd be SOL trying this technique!
Just another way to do it if you're in a bind! There are many more, or combination of them.
I've included a really basic scene to show. This one just uses the volume shader straight up, with no lights attributed. Not nearly as accurate, but it renders quickly and is very controllable. With some basic comp work etc. you could get things looking just as good with grads IMHO.
Primitive Example (http://www.gideonklindt.com/share/Fake_Spot.zip)
04-23-2010, 02:04 PM
Thanks a lot for your reply :)
For some reason I cannot open your scene from my own computer - it says my version is too old (it is SI 2010 though) - gonna try it at the university where I usually work with it.
I tried using the "volume_effects" node as a volume shader. This works quite neat when setting a distance falloff.
This method of using cylinders will cut it for this project so I think I am going to use it for this project, however, I am still curious if any other solution exist without "cheating"?
I can imagine there might be similar problems in other situations where there aren't such alternatives?
04-23-2010, 03:43 PM
"...I am still curious if any other solution exist without "cheating"..."
First rule of CG or any other image creation is there is no cheating! Otherwise we might as well be spraying bison blood with our mouths, using our hands as stencils, on cave walls. Maybe in the year 3000 programs will be so advanced that there is no such thing as a "work around" anymore, but until then crafty types and TDs are going to have a job! I understand your frustration though with something like this.
Sorry, I did it in 2011 without even thinking. I should have chosen the previous version since I still have it installed.
I'm sure there is a way to do it though, as the lights AFAIK, are using depth values internally (maybe I'm wrong) in mr.
Another option if you are using the volume shader in the normal way, is to just make "mask" passes, with each light having a separate pass (color, mask etc.). Use the mib_color_alpha (texture->mr) shader on your geometry here as it will let the light be occluded by geometry, but will NOT show up in the alpha (it saves a few steps). This can be a PITA though with more than just a few lights but AFAIK it works since it's based on old school tech.
Basically you're just making a new mask for each light this way.
I also suppose, though I have not tested it, that you could manually assign each light a different shade and create your own depth pass that way, though I doubt it would be easier to set up or use in the end. You may be able to automate it using an expression based on the distance to a null to control several light parameters (can we drop lights into ICE?- I guess that's an option too).
Sorry Amigo! Need somebody like Saturn to get on here and post- have you tried the sicommunity yet?
04-23-2010, 07:58 PM
I can't really find the mib_color_alpha shader - how can I find it? Searching in the preset shaders did not yield any results.
I haven't asked other places than here yet. I can try that aswell :)
04-23-2010, 11:34 PM
Ah man, sorry, I keep throwing 2011 stuff at you! It is probably something new since they added all the mib shaders. There is probably something that will do the equivalent though.In the past I just used black constant shaders.
04-25-2010, 01:57 PM
Ok thanks for your effort in helping me with this problem.
I am gonna use the cylinders for now. If a similar problem shows up in the future I will see what kind of work around I can use by then :)
04-25-2010, 01:57 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.