TomRaynor Posted September 18, 2012 Share Posted September 18, 2012 Hi, I'm trying to set up a simple rig that allows me to animate a lattice's points by selecting nurbs curves in the viewport and using them to translate, rotate and scale the lattice points. I want to assign each control curve to four points as in my example scene. I currently have a rig set up where I can dive into sop level and select transform nodes and manipulate them but I would like to not have to do that and use the curves instead. Can anyone point me in the direction of a solution? Thanks in advance! rigTest_v01.hip 1 2 Quote Link to comment Share on other sites More sharing options...
edward Posted September 19, 2012 Share Posted September 19, 2012 Here's a quick mock up from your file. There's several things I did in there. Use Null objects for the controllers. This serves two purposes: 1) It prevents them from being rendered by default, and 2) It provides convenient options for default "control" rigging geometry. Added Grid SOPs inside the controllers to serve as the actual lattice geometry so that we can just merge them into the rig object. Added a new /obj/GLOBAL_TRANSFORM controller as the parent Positioned the controllers into place and then ran "Clean Transform" on them so that their local parameters are zero for animation. In the rig object, we merge the grids from the controllers and use them as the lattice. Since we're using the "points" mode, it doesn't matter whether the grids are connected or not. For the "rest" input in the Lattice SOP, I just inserted a Null SOP and then "locked" (red node flag) the grids while they were at the desired rest position. This "freezes" the geometry to act as the "rest". So now we can just animate the control objects and have it directly affect the rig Turned off the selectable (green node flag) on /obj/rig since we don't want the user to select/move it Finally, I deleted everything unused. rigTest_v01_edward.hipnc 1 Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted September 19, 2012 Author Share Posted September 19, 2012 Thanks, that helps a lot! Any suggestions on how you would do it if you had to use the lattice in "lattice" mode rather than "points" mode? I think I might have to do it this way instead. Quote Link to comment Share on other sites More sharing options...
edward Posted September 19, 2012 Share Posted September 19, 2012 Try using a Skin SOP after the Object Merge. Quote Link to comment Share on other sites More sharing options...
edward Posted September 21, 2012 Share Posted September 21, 2012 Er, I take that back. You just need to set the Rows/Cols on the Grids to 3/3. rigTest_v01_edward_BezierLattice.hipnc Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted October 9, 2012 Author Share Posted October 9, 2012 Nice one Edward, this is definitely a step closer and does as briefed, however the one thing that bugs me is that there is a locked node going into the lattic's second input for the rest geometry. It would be really cool if I could make the rig procedural so that if I wanted to make it into an otl, I could dynamically change the number of circular control curves and hence chance the subdivisions of the lattice (also potentially changing the control positions in case the input shape to be latticed was larger, as well as changing the grid resolutions). Any thoughts? Quote Link to comment Share on other sites More sharing options...
edward Posted October 12, 2012 Share Posted October 12, 2012 I just did that because it was convenient. In a real world situation, you need to come up with a sensible scheme for specifying the rest positions of your controllers. The simplest is probably some button on your HDA which writes out the current rest geometry to disk and then reload from that. Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted October 13, 2012 Author Share Posted October 13, 2012 Ah cool, yeh that is what I ended up doing. I used python to work out the bounding box of the incoming geometry to be deformed and redistributed the controls to fit at the push of a button. Cheers! Quote Link to comment Share on other sites More sharing options...
tutumannyaque Posted September 19, 2016 Share Posted September 19, 2016 On 9/18/2012 at 11:22 PM, edward said: Here's a quick mock up from your file. There's several things I did in there. Use Null objects for the controllers. This serves two purposes: 1) It prevents them from being rendered by default, and 2) It provides convenient options for default "control" rigging geometry. Added Grid SOPs inside the controllers to serve as the actual lattice geometry so that we can just merge them into the rig object. Added a new /obj/GLOBAL_TRANSFORM controller as the parent Positioned the controllers into place and then ran "Clean Transform" on them so that their local parameters are zero for animation. In the rig object, we merge the grids from the controllers and use them as the lattice. Since we're using the "points" mode, it doesn't matter whether the grids are connected or not. For the "rest" input in the Lattice SOP, I just inserted a Null SOP and then "locked" (red node flag) the grids while they were at the desired rest position. This "freezes" the geometry to act as the "rest". So now we can just animate the control objects and have it directly affect the rig Turned off the selectable (green node flag) on /obj/rig since we don't want the user to select/move it Finally, I deleted everything unused. rigTest_v01_edward.hipnc Woah thanks edward! This really helped me in my scene. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.