PDA

View Full Version : Zero out xpresso values


brasco
12-18-2012, 02:41 PM
Hi all,

Sure this is a simple one, is there a way to zero out/reset a Previous global matrix influenced value when going back to frame zero?

The example I'm finding this issue with is Base80 and Majoul's awesome BaseWheel (http://www.base80.com/index.php/2008/12/20/reinventing-the-basewheel) setup.
Having moved my rig around and resetting to frame zero and position zero, the wheel rotation is an extremely high value, and I can't seem to get it back to zero. The rig uses previous positions to turn the wheel based on distance difference, is there a way to force it to zero again, and start calculating from zero?

cheers
brasc

douwe
12-18-2012, 03:25 PM
You could add a simple Xpresso Condition.

if frame == 0 then use 0 as the value for your wheel's Rotation,
otherwise use the Previous Rotation value.

http://www.mediafire.com/conv/8dce4a98c8047d1a9740ed00f6ad4a5d0514eeda2c8b9a6d780c41a13c0708a86g.jpg

cheers,
d

brasco
12-18-2012, 03:33 PM
Douwe, that is perfect, thank you kindly.
I'm relatively Xpresso ignorant, so this rig build is actually to help me learn it in more depth, it's opening my eyes to how powerful it is.

cheers
brasc

fuat
12-19-2012, 05:31 PM
am i missing something or am i assuming right that in your setup douwe you are adding 0 to an existent rotaion value (as far as can be seen from the screenshot) - which would mean nothing changes...or is the "math: add" node set to "multiply" but not showing up in the editor?
right? or wrong?
cheers
fuat

douwe
12-19-2012, 07:04 PM
am i missing something or am i assuming right that in your setup douwe you are adding 0 to an existent rotaion value (as far as can be seen from the screenshot) - which would mean nothing changes...or is the "math: add" node set to "multiply" but not showing up in the editor?
right? or wrong?
cheers
fuat

wrong ;)

In Base80's original file : Current Value = Previous Rotation Value + New Value
In my edit : On frame 0 Current Value = 0 + New Value

All it's supposed to do is to quickly set the Current Rotation Value back to a value near 0

cheers,
d

HamedAlbadri
12-28-2012, 12:13 AM
hi

maybe this tutorial help a little i think

https://vimeo.com/18492755

cheers

CGTalk Moderation
12-28-2012, 12:13 AM
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.