PDA

View Full Version : Mental Ray final gather pass?


Dan Wade
10-06-2004, 04:27 PM
Im trying to think of ways to speeding up our rendering pipeline. We do alot of high res still work, and animtion. Now i know about baking of GI maps out. I was wondering if there was a way of doing a FG pass, for compositing?

The only way i could see it, if i did a still with everything in shot, render with FG, save the FG map, then apply a white lamber shader to the scene, turn rebuild FG off, and then use this pre-computed map for the still/animation. This could then be brought into post as a FG pass, no? Im basicaly wondering about how much you can get away with, if you re-use the FG map? Could u get away with any animation at all? I know all the object would be moving.

These might be really silly questions, but the entire subject got me thinking.
Do any of you guys have thoughts on this?

Cheers,
Dan.

MartinGFoster
10-06-2004, 06:30 PM
Im trying to think of ways to speeding up our rendering pipeline. We do alot of high res still work, and animtion. Now i know about baking of GI maps out. I was wondering if there was a way of doing a FG pass, for compositing?
Dan.

have you thought about layering your animated objects seperately from your environment / backgrounds? Each physical layer would also have it's own elements. That way you can really decide where you can get away with stills of any arbitrary layer or matte.

This is pretty much how most people do it, in larger facilities at least. The ambient occlusion / final gather just ends up being another matte that can be treated in many ways in the comp.

If you want me to elaborate more on this subject please ask.

Martin Foster
Look Development
Rhythm and Hues

Dan Wade
10-06-2004, 08:02 PM
Hi Martin, thanks for the reply.

Could you eleborate a little? Im a little confused. Do you mean use render layers like in Maya?

I heard in Shrek 2 they had a clever cheat where they could give material light atributes, so object could actualy omit light, to fake bouced light.

Cheers,
Dan.

ray
10-06-2004, 08:43 PM
maybe this helps

http://www.claus-figuren.de/tutorials/

lets you bake irradiance into either texture maps or vertex colors.
For animation, you could crossfade different irradiance maps for the objects that move.

just a thought, never actually tried it.
ray

lazzhar
10-06-2004, 08:46 PM
I think Martin is refering to the method well explained by Jeremy Birn in his Book:

Take a look to this http://www.3drender.com/light/compositing/index.html

An yes, we wont mind to hear more of course ;)

MartinGFoster
10-07-2004, 12:09 AM
Hi Martin, thanks for the reply.
Could you eleborate a little? Im a little confused. Do you mean use render layers like in Maya?
Dan.

I can't really talk about specific software because I don't really know any commercial packages anymore. I use proprietary software at work. I guess most packages offer some kind of rendered layers/elements but I don't know specifics. I prefer to write my own shaders so I can spit out arbitrary parts of any portion of the illumination model.

However, what others said about Jeremy Birn's book will give you the idea. The basic layers might be:

diffuse (lambert)
specular (phong, blinn etc)
specular reflections (raytraced or raycast environment maps)
sub-surface scattering
diffuse reflections (GI, diffuse raytraced or raycast reflections, single or multiple bounces)
OR
ambient occlusion (similar to final gathering, I think)

You can add all these together with their original values or you can use the power of compositing to dial them in at different amounts, colour-correct them, mask them, and much more.

Hope that helps. I recommend some more reading on this subject. It's much deeper than I can go into in a message.

Aneks
10-07-2004, 04:59 AM
have a look at this tutorial I wrote on multipass compositing:

http://www.vfxtalk.com/forum/showthread.php?t=13 (javascript:OpenWin('http://64.4.46.250:80/cgi-bin/linkrd?_lang=EN&lah=1d1085154d9d6b4097dd2957274014a6&lat=1097120816&hm___action=http%253a%252f%252fwww%252evfxtalk%252ecom%252fforum%252fshowthread%252ephp%253ft%253d13');)


it more or less explains the standard layers I use. All generated from Maya. Nowdays I am working in a pipeline where we are using PRman to produce multiple passes from a single render. But previously I was doing all my renders in a SEPERATE scene file. It is best to avoid Maya render layers as they are very ineffeicient.

We generally will use an ambient occlusion pass generated by PRman (you can use the dirtmap technique I discussed in my tute !) in conjuction with our domelight/gi solution in order to get more compositing control especially in regaurd to lighting.

Another option to look into in lighting using a normal pass.

Dan Wade
10-07-2004, 10:47 AM
Thanx Ray, that method is pretty much exactly what i was after, well one way. Little time consumng in terms of animation, and having several objects, but a very interesting read.

Sorry guys, i must not have made myself very clear. I dont really want to know about renderpasses in general, but about ways of creating a Global illumination/Final gather pass. One of the main reasons for this if, lets say i have a huge scene with lots of character in, a way of being able to split this up, not in terms of spec, colour, shadows...but for bounced light. Every object is effecting each other, so its not just a case of rendering it on its own, because all the objects have to be in shot at the same time for a GI pass?

Jermeys book does mention saving a lighting pass out per light (as Pixar and alot of big studios do), but it wasn't a solution for a GI light pass.

Thanx,
Dan.

MartinGFoster
10-08-2004, 02:39 AM
Sorry guys, i must not have made myself very clear. I dont really want to know about renderpasses in general, but about ways of creating a Global illumination/Final gather pass. One of the main reasons for this if, lets say i have a huge scene with lots of character in, a way of being able to split this up, not in terms of spec, colour, shadows...but for bounced light. Every object is effecting each other, so its not just a case of rendering it on its own, because all the objects have to be in shot at the same time for a GI pass?

GI is just another layer in the way we deal with it. We call it Kdr (Light diffuse reflections). So the methods we have mentioned can be applied to making a new element that only includes diffuse reflections from one object to another. Typically 1 bounce would be good enough.

It's hard to describe this without sample images, but I'll try anyway.

So, for example, if we had a character (or multiple characters) in an environment, the render layer would be the light that reflects from the environment to the character. Another pass would be the light that reflects from the character to the environment. This is typically called colour bleeding or diffuse reflections.

Multiple bounces could be put into different RGB channels. This is sometimes called a false colour-rendering. So the first bounce could be Red, the second bounce Green, third bounce blue. However, one bounce is usually enough from one object to another. The compositor then decides how to use those channels for colour-correction purposes.

I just can't you tell specifically how to set that up in any particular package. It usually requires some sort of shader language or low-level access to the illumination model or shader.

I wish I could get into this in more depth but I'm busy working on a film with a looming deadline.

playmesumch00ns
10-08-2004, 10:04 AM
Hehe me too...

In mentalray, afaik it would not be possible to use the method you are suggesting dan, as the fg cache is (iirc) just caching sample points, not the illumination at those points. So reusing your fg cache with white lamberts would get you a white gi pass, not a coloured one (you might want to try this though, as I could well be wrong).

I assume martin's talking about renderman, but you could do this in mentalray quite easily with the right shaders. All you have to do is pump the indirect illumination into a secondary output et voila...

Not sure if you can seperate different bounces as martin suggests, afaik your access is pretty much restricted to calling mi_indirect_illumination() or whatever the call is to compute final gathering (this is both a blessing and a curse, as anyone who's tried to do gi in prman will tell you:)).

You could try asking one of the mr shader guys in the maya rendering forum if they have, or would consider writing such a shader...:)

MartinGFoster
10-08-2004, 05:09 PM
Hehe me too...
I assume martin's talking about renderman, but you could do this in mentalray quite easily with the right shaders. All you have to do is pump the indirect illumination into a secondary output et voila...

Actually, I was talking about our in-house renderer. But I assumed Mental Ray would have similar capabilities. It sounds like the "secondary output" might do the trick.

Daniel Whitton
10-11-2004, 07:10 AM
Don't want to sound stupid,but if it is mental ray for maya. The Doc's say that Global Passes Option under Render Passes will render GI and FG as a seperate pass.

RayenD
10-13-2004, 10:42 PM
in MR plugging photon irradiance shader into material surface input and enabling FG, will give you only FG pass.

CGTalk Moderation
01-19-2006, 12:00 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.