Search - User list
Full Version: I need HELP! with expressions.
Root » Houdini Lounge » I need HELP! with expressions.
joseffg
Hello all. I am currently working on a project for a class and am having trouble with expressions. For my project I am modeling and animating an Awika! wind up toy. Attached is my Houdini file. Here are my problems…

First off my spring coil (that powers powers the toy). My professor helped me to get it to rotate a section, but now it looks like a ribbon unraveling uncontrollably. I am not quite sure how to go about fixing that one. That particular problem is under the “spring” node. I tried inputting different numbers and such but am truly clueless. What is supposed to happen is the metal coil is supposed to grow larger as the toy unwinds. The key axis is supposed to unwind the spring.

My second problem is under the “sparky” node. Theoretically I should be able to just add noise to the z rotation and get the effect I want. I just want the object to jitter against the neighboring spinning circles on gear 9. I tried using the noise function but nothing happens. I also tried using using rand(). I checked the help file and it said I was doing it right. In the end the “sparky” object will be creating sparks by its contact with gear 9. I have a feeling I just missed a step somewhere.

If anyone could help me or give me any pointers that would be great. Thank you for your time and let me know if I need to clarify anything.

Also, any equations in any channel are left there as my the last thing I tried. I hope this is the right forum to ask this question. And just to say I am not asking anyone to do my work for me. I just want pointers because I am lost. Thank you in advance.
craig
On the spring - is the result supposed to be a wound coil, that gets tighter as time goes by? Right now, it does a neat spooling and unspooling thing, but I'm not clear on what it's supposed to be.

On the rotating sparky thing, though, that's easy - first of all, you are using $TX, $TY and $TZ in the Transform SOP - but those are not valid local variables in that context. So they just evaluate to zero all the time, and so the noise function always returns the same value. Since you don't want me to do your work for you, I won't tell you what to use instead, but I will say to look at the Transform SOP helpcard, and use some local variables that you find there.

Also, you need to multiply the result by 90 or 180 or 360 or some other number of degrees - right now, you are just getting numbers between 0 and 1 (or would be), and that's not much rotation.
joseffg
Well…I got the sparky thing to do what I wanted it to do. A friend showed me how to use a wave on a chop network to create the clacking effect I wanted. The coil on the other hand is supposed to start wounded tight but then go and relax as time goes on. Its the pressure of the coil expanding to a larger size that turns the gears and moves the toy. Thank you again for your time.
craig
Try this - just wave the “unwind” slider back and forth in the Point SOP.

I'm not sure this is exactly right, because it seems to have the effect of stretching out and shrinking the length of the coil (even though the length isn't changing), which presumably doesn't happen with a piece of metal.

I added the “radius” control as a way of maybe offsetting this - try animating them both together and see if that's what you want. Probably not, but at least it's a hint toward what you do want.

But at least I can hide behind the claim that I was trying not to do your assignment for you… :wink:
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB