MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

Xpresso math issue

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Daniel MooreXpresso math issue
by on Jul 14, 2014 at 5:28:24 am

I'm working on an Xpresso program to fit x number of slats within a frame. As the frame dimensions are changed, the spacing between slats is kept uniform. As the number of slats or their width changes, likewise the spacing between them remains uniform. I've got it almost there but notice a problem with the math derived from the two formula's in place. First, it I keep it to whole numbers things are almost perfect. There is a .015" shift to the left of the slat members in the frame. But for that it would be perfect.
Second, if I venture into using float values, say making a slat width of 1.375", the shift within the frame takes on that error, plus the initial .015" error. It's quite predictable it seems even though I've checked all values are floats (except slat count) and I've dialed in step values where possible in the .001 range to aid precision.

I'm hoping someone can shed some light on why this is happening. I admit, I've looked at this problem for way too long to be objective anymore and have no further insight as to what in the heck is going on.

I trust it's OK to link to the scene file:

Any and all ideas are welcome!

Return to posts index

Brian JonesRe: Xpresso math issue
by on Jul 14, 2014 at 4:42:30 pm

it's encouraged to share the file (assuming it's not huge :-) makes it so much easier to figure out...

try this, cloner was not at zero so I centered it and changed the formula that feeds into the cloners Transform value.

Return to posts index

Daniel MooreRe: Xpresso math issue
by on Jul 14, 2014 at 6:14:43 pm

I can't thank you enough for your help with this. It works beautifully and the transform formula is an eye opener. I was certain I had to include the first space (or P. X) in the formula for some reason.

To get the cloner back to zero, entering zero in the coordinate manager was all it took? This may seem a silly question but I only have a handful of hours logged in C4D.

Return to posts index

Brian JonesRe: Xpresso math issue
by on Jul 14, 2014 at 6:21:34 pm

yes, it's just entering 0 in the coordinate manager. That's always possible (unless you are driving a value with an xpresso or have the value locked with a Protect tag) so you can put in any value you want without having to move the object around in the viewport when some values are hard to hit exactly

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved