Ambient Occlusion in Nuke

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 11 November 2010   #1
Ambient Occlusion in Nuke

Hello all,

I really would appreciate a little help with two Nuke questions.

I have very recently started to use Nuke as part of my animation course. One of my lecturers was talking about render passes in Maya today and insists that AO passes need to be plus rather than multiply in Nuke.

I have always been under the impression that AO is used as a muliply operation. What is the best way to use AO in Nuke? Also, is there a particular order that render passes need to be placed in the node tree? I have my first Nuke assignment and I have been given a number of render passes to composite together over a tracked piece of footage.

Any advice would be superb.

Many thanks
 
Old 11 November 2010   #2
AO is a multiply operation... I'd keep an eye on that instructor.

As for the order, when dealing with most passes (which tend to be additive), the order of operations doesn't matter (remember the associative property of addition?). However, for something like AO, typically it would be multiplied by your diffuse pass before that is combined with things like lighting, reflection, refraction, etc.

If you're comping renders over live footage, just think of it in terms of what order you'll see them from the camera's perspective... obviously your contact/environment shadows will go down first, followed by any environmental reflections, followed by the actual comped object.
 
Old 11 November 2010   #3
Cheers for the super quick reply, I appreciate you taking the time to answer my questions.

So, AO followed by reflections etc and then comped object? When you say 'comped object' do you mean that you place all the other passes together and then comp these on top of the AO and reflections?

Am I being really silly here? Ha ha, more coffee is needed I think!

Cheers again.
 
Old 11 November 2010   #4
Ambient Occlusion should be multiplied with your Ambient pass not your Diffuse pass.
 
Old 11 November 2010   #5
Generally its:

(indirect x occlusion)
+diffuse+spec+reflection+refraction
 
Old 11 November 2010   #6
Thank you soooooooo much guys. This information is like gold dust to me right now. Many, many thanks again.
 
Old 11 November 2010   #7
Originally Posted by earlyworm: Ambient Occlusion should be multiplied with your Ambient pass not your Diffuse pass.


Yeah, technically you're right. We just use different pass schemes here, so we bypass the "ambient."
 
Old 11 November 2010   #8
copy and paste this into Nuke and you'll get the idea:

set cut_paste_input [stack 0]
version 6.1 v3
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.diffuse.exr
 version 1
 colorspace sRGB
 name DiffuseRead
 selected true
 xpos 70
 ypos -725
}
set N1761b7d0 [stack 0]
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.VRayDirt1.exr
 format "960 720 0 0 960 720 1 "
 version 1
 name GIRead1
 selected true
 xpos 345
 ypos -598
}
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.GI.exr
 version 3
 colorspace sRGB
 name GIRead
 selected true
 xpos 224
 ypos -733
}
Merge2 {
 inputs 2
 operation multiply
 name Multiply
 selected true
 xpos 203
 ypos -599
}
push $N1761b7d0
Merge2 {
 inputs 2
 operation divide
 name Merge1
 selected true
 xpos 186
 ypos -518
}
push $N1761b7d0
Merge2 {
 inputs 2
 operation multiply
 name Indirect
 selected true
 xpos 151
 ypos -453
}
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.lighting.exr
 version 1
 colorspace sRGB
 name LightingRead
 selected true
 xpos -62
 ypos -727
}
push $N1761b7d0
Merge2 {
 inputs 2
 operation divide
 name Merge2
 selected true
 xpos -51
 ypos -511
}
push $N1761b7d0
Merge2 {
 inputs 2
 operation multiply
 name Direct
 selected true
 xpos 5
 ypos -448
}
Merge2 {
 inputs 2
 operation plus
 name Diffuse
 selected true
 xpos 70
 ypos -398
}
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.refract.exr
 version 2
 colorspace sRGB
 name RefractionRead
 selected true
 xpos -123
 ypos -333
}
Merge2 {
 inputs 2
 operation plus
 name Refraction
 selected true
 xpos 70
 ypos -304
}
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.reflect.exr
 version 3
 colorspace sRGB
 name ReflectionRead
 selected true
 xpos -123
 ypos -207
}
Merge2 {
 inputs 2
 operation plus
 name Reflection
 selected true
 xpos 70
 ypos -178
}
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.specular.exr
 version 2
 colorspace sRGB
 name SpecularRead
 selected true
 xpos -123
 ypos -92
}
Merge2 {
 inputs 2
 operation plus
 name Specular
 selected true
 xpos 70
 ypos -63
}
Read {
 inputs 0
 file /Volumes/HOME_RAID/WORK/turbosquid_models/pillow/images/tmp/passtemp.background.exr
 version 1
 colorspace sRGB
 name BackgroundRead
 selected true
 xpos -123
 ypos 23
}
Merge2 {
 inputs 2
 operation plus
 name Background
 selected true
 xpos 70
 ypos 52
}
Viewer {
 inputs 2
 input_process false
 name Viewer1
 selected true
 xpos 70
 ypos 250
}
 
Old 11 November 2010   #9
That is really generous of you, cheers for that Dave. Thank you for taking the time to help me out.

We had another Nuke lecture today and it's now all starting to sink in (hopefully lol!)

The lecturer for the actual Nuke lessons is brilliant and really knows their stuff. I just wish that some lecturers (i.e. the original lecturer I mentioned in the beginning of my post) did not feel the need to pretend to know stuff when they don't, it only serves confuse everyone. Rant over, cheers again for all the help so far. I am very grateful.
 
Old 11 November 2010   #10
where are you studying?

Have a look at my other reply to your post. Its not as simple as just saying AO should be multiplied. Ideally you should only be adding in your comp and your AO should be multiplied by the ambient in the renderer.
__________________
aneks
compositor

 
Old 11 November 2010   #11
that's what we've been saying and that's what my Nuke scene posted does.
 
Old 11 November 2010   #12
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:56 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.