Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
FORUMS: listlist (w/ descriptions)archivetagssearchhall of famerecent posts

Switch 3D Geometry on/off in Nuke

Cow Forums : Nuke

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Switch 3D Geometry on/off in Nuke
by Dan Privaria on May 9, 2009 at 11:19:53 am

Hello :)

Currently i am diving into the Nuke 3d workflow, importing .obj files and creating a gizmo to switch objects on/off.

The test project i make is one base 3d building imported as 1 .obj file and in addition to this 3 or 4 .obj files that contain additional elements of that base 3d building. Loading in these elements works fine, however;

I would like to create a Gizmo that enables the compositor to simply switch the options on or off, note that its not about setting the texture transparency, its about only loading in the geometry options that are needed.

In what way can i achieve this?

Thank you for your help,
Dan

Respond to this post   •   Return to posts index

Re: Switch 3D Geometry on/off in Nuke
by Peter O'Connell on May 9, 2009 at 2:28:38 pm

Hi, maybe you don't need a gizmo perse. Maybe you can just use a noOp node and add some checkbox user knobs to it (right click and select manage user knobs). Then create expressions between the disable of the read geo nodes and the checkboxes you have created. Here are a couple nodes that show what I mean:

set cut_paste_input [stack 0]
version 5.1400
push $cut_paste_input
NoOp {
name disabler
selected true
xpos -209
ypos -34
addUserKnob {20 User}
addUserKnob {6 disableReadGeo1 t disableReadGeo1 +STARTLINE}
}
ReadGeo2 {
inputs 0
name ReadGeo1
selected true
xpos -391
ypos -89
disable {{parent.disabler.disableReadGeo1}}
}



Good luck
Pete

roguekeyframe.com




Respond to this post   •   Return to posts index

Re: Switch 3D Geometry on/off in Nuke
by Dan Privaria on May 9, 2009 at 5:00:47 pm

Hey Pete,

Thank you so much for your fast reply, it works great! :)
One question though; is it possible to reverse the expression, so that when the checkbox is checked the ReadGeo is enabled?

I tried to multiply the expression by -1, but unfortunately that didn't give the result i expected.

Thanks again,
Dan

Respond to this post   •   Return to posts index


Re: Switch 3D Geometry on/off in Nuke
by Peter O'Connell on May 10, 2009 at 8:52:44 pm

Hi Dan, in the previous expression enabled = 1, disabled = 0. If you want to reverse that, subtract 1 from both values so that enabled = 0 and disabled = -1 then take the absolute value of these so enabled becomes 0 and disabled becomes 1.





set cut_paste_input [stack 0]
version 5.1400
push $cut_paste_input
ReadGeo2 {
name ReadGeo1
selected true
xpos -568
ypos -142
disable {{abs(1-parent.enableReadGeo.enableReadGeo1)}}
}
NoOp {
inputs 0
name enableReadGeo
selected true
xpos -386
ypos -87
addUserKnob {20 User}
addUserKnob {6 enableReadGeo1 t enableReadGeo1 +STARTLINE}
enableReadGeo1 true
}





Pete

roguekeyframe.com



Respond to this post   •   Return to posts index

Re: Switch 3D Geometry on/off in Nuke
by Dan Privaria on May 12, 2009 at 10:34:46 am

Excellent! :)
Now my last question (hope this is not getting too boring for you ;)) i will bug you with...

Can i set the display view (off, wireframe, solid, solid+lines, textured, textured+lines) in all the ReadGeo nodes at once via a drop-down menu in the disabler node? Which expression should i use so all ReadGeo's obay this setting?

I didn't expect Nuke to be this kind of accessible, just great software!

Thank you for your support :)

Greetings,
Dan

Respond to this post   •   Return to posts index

Re: Switch 3D Geometry on/off in Nuke
by Peter O'Connell on May 12, 2009 at 2:20:54 pm

Hi Dan well the closest I think you could come to that would be to create a group with a front end that controls each display property. I don't think you can combine them all into 1 though. See if this helps.


set cut_paste_input [stack 0]
version 5.1400
push $cut_paste_input
Group {
name Group1
selected true
xpos 242
ypos -116
addUserKnob {20 User}
addUserKnob {41 displaySphere T Sphere1.display}
addUserKnob {41 displayCylinder T Cylinder1.display}
}
Camera2 {
inputs 0
translate {0 0 3.847}
name Camera1
xpos 505
ypos 40
}
Input {
inputs 0
name Input1
xpos 334
ypos -100
}
set N26c88500 [stack 0]
Cylinder {
display solid
name Cylinder1
xpos 402
ypos -33
}
push $N26c88500
Sphere {
display solid
name Sphere1
xpos 262
ypos -29
}
Scene {
inputs 3
name Scene1
xpos 340
ypos 40
}
Output {
name Output1
xpos 330
ypos 171
}
push 0
push 0
Viewer {
inputs 3
input_number 2
name Viewer1
xpos 440
ypos 171
}
end_group















Pete

roguekeyframe.com

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]