Showing posts with label Feature Feature. Show all posts
Showing posts with label Feature Feature. Show all posts

Monday, 22 April 2013

Feature Feature: Noise Jitter Controller

In making the heavy damage animation for the bark basher, I had to apply some noise to the torso as he strains to stand up. I could have done this with key frames, but that would have been both messy and time intensive (not to mention difficult to change). To get round this, I came up with a way of applying noise to the movement. Its probably not the best way, but it's pretty simple and it works.

Note: I didn't make the rig, credit for that goes to Hollie Sheppard, who did an awesome job in a very short time.

Okay, first thing we'll need is some noise. I simply used a noise texture for this, and plugged in the time node to the time attribute in the map to keep it randomized. This will give you random noise every frame, which is perfect for my straining animation, but not for smooth, slower noisy movements.

To start, open the Hypershade and go to Create > 2D Textures > Noise, this will add a noise texture to your graph. We won't need to create the time node, as its always present in every Maya scene. The easiest way, in my opinion, of getting it into the Hypershade graph is to get it from the Outliner.

To make it visible, you have to make sure DAG Objects Only is unchecked. This will show everything in Maya in your outliner, but you can type *time* into the filter to find the time node. Once you have it, select it and add to graph.


 Now connect up the outTime from the time1 node to the Time attribute of the noise texture. This will give it random values over time. The graph will look something like above. If the middle conversion node doesn't show up, don't worry, so long as the Time attribute value shows yellow, you know it's connected to something.

We could wire up the noise texture directly if we wanted to, but the values would be tiny, as they'd be between 0 and 1. So to give us more control, we'll want a multiply divide node in there. So go to Create > General Utilities > Multiply Divide. Now connect the outColor of the noise map to the input1 of the multiply divide node. This will let you scale the magnitude of the noise using the input 2 of the multiply node

To let us retain fill control, I recommend grouping the control you're planning on adding the modifier to, and applying the noise to that. That will let you still move the controller underneath as normal. Add a vector attibute to the group using the attribute editor to control the noise in X, Y, and Z. Now put this node into the Hypershade. 

Finally, we do a simple two way wire to set up the control. Wire the output of the noise node into the translate/rotate/scale (whatever you want to jitter) of the group node. Then wire the vector attribute you just set up on the group node into the input2 attribute of the noise node.



And done! What we basically have now is a noise attribute scalable in each axis. The magnitude of the noise will be equal to the random noise value (between 0 and 1) multiplied by the value you put into the relevant axis in your channel box control. The nice thing is that because this is keyable, you can smoothly scale the amount of noise applied up and down.

Sunday, 28 October 2012

Feature Feature: HumanIK

Seeing as it's topical with regards to the MotionBuilder assignment, I'll continue the blog-a-thon. I found the basics of the HumanIK system, and thought I'd share for anyone interested.

HumanIK is basically a character setup that puts Inverse Kinematics across the whole body, a-la MotionBuilder control rigs. If you create one in Maya you get basically what you get in MotionBuilder, but with the added bonus of viewport selectable controls and the general Maya niceness for keyframe animation.

So to create a HumanIK rig in Maya, we have to make sure the plugin is loaded. If its not, you can activate it by going to Window > Settings/Preferences > Plug-In Manager. Then scroll down and check that mayaHIK.mll is set to Loaded. If its not there, probably best to check the Autodesk site for a download.














With that loaded, we can simply go to Skeleton > HumanIK... to load the HIK plug-in.
















This will bring up a control box in place of your Channel Box. Basically we have the same thing here as in MotionBuilder, and it's pretty intuitive. Hitting either Create Skeleton or Create Control Rig will do the same thing with nothing in the scene, as it needs to make a skeleton to control to start with.

Hit Create Skeleton at the top, and one will pop up in your viewport. Then go to create, under the blue button, and hit Control Rig. This will build you some controls.










Voila! You can select controls via the panel, or in the viewport. Play around first, as HIK rigs work in interesting ways compared to our more regular animation rigs. The advantage here is easy importing to MotionBuilder, and the knowledge that the proportions are all exactly the same as the MotionBuilder rig.


Once you've animated a sequence, you can simply use the Send to MotionBuilder option in the File menu to switch it across. If you prefer you can export it manually, but the Send To feature tends to be the easiest way for me. 

Hope this helps someone :) 







Saturday, 27 October 2012

Feature Feature: Buffer Curves

I thought I'd start blogging any useful little tools I find, just in case any of my colleagues dropping in find them useful. 3D software tends to be so ridiculously vast that the little handy tools can get lost in the mix. Anyway, here's a feature on a feature. So, Buffer Curves!

Cool little feature I found whilst poking around the graph editor: Buffer Curves. These are like alternate versions of your curve you can use to make changes, if you want to experiment without losing your original data.






To see them, you have to go to View > Show Buffer Curves. Like so: 


You probably won't see anything for now, but if you start to move keyframes or adjust tangents, you'll see a dark grey curve in the shape of the original. The nice thing about this is it lets you strip out or add keys to your new one, without messing up the old, which is great for experimenting with different overall curve shapes.


To switch between them, just go to Curves > Swap Buffer Curve, and it will invert which is the active curve and which is the buffer. 

Handy stuff. 

EDIT: Forgot to mention, the buffer curve won't show unless you have the curve selected, to stop them cluttering up your Graph Editor.