PDA

View Full Version : Ambient Occlusion in Nuke


MINTY1974
11-12-2010, 04:07 PM
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 :)

alkali22
11-12-2010, 04:49 PM
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.

MINTY1974
11-12-2010, 05:48 PM
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. :beer:

earlyworm
11-14-2010, 11:03 AM
Ambient Occlusion should be multiplied with your Ambient pass not your Diffuse pass.

ndeboar
11-15-2010, 02:54 AM
Generally its:

(indirect x occlusion)
+diffuse+spec+reflection+refraction

MINTY1974
11-15-2010, 04:48 PM
Thank you soooooooo much guys. This information is like gold dust to me right now. Many, many thanks again. :beer:

alkali22
11-15-2010, 04:48 PM
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."

cgbeige
11-16-2010, 07:55 PM
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
}

MINTY1974
11-16-2010, 11:27 PM
That is really generous of you, cheers for that Dave. Thank you for taking the time to help me out. :D

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.
:beer:

Aneks
11-23-2010, 11:47 PM
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.

cgbeige
11-26-2010, 03:25 PM
that's what we've been saying and that's what my Nuke scene posted does.

CGTalk Moderation
11-26-2010, 03:25 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.