>: CG Forums on 3dtotal - The best forums for CG artists :.
threedy forums home
 


top-table-gradient
Go Back   3DTotal Forums > Archives > Archives > Scripting & coding
bottom-table-gradient

 
 
Thread Tools Display Modes
14211 rads test
Prev Previous Post   Next Post Next
Old 29-09-2003, 08:57 PM   #1
charlieb
Registered User
 
Join Date: Sep 2003
Location: UK
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
MaxScript - Get the true PRS of an X-Formed object

Hi there,

I'll jump straight into my problem.

I want to animate a cube rolling along, and I want to deform it using an FFD. I want to use X-Form to animate the rolling cube as it allows me to animate the pivot point, very useful indeed.

So I build my stack Box > XForm > FFD

In this situation the FDD is carried along with the cube, but the lattice does not follow the rotation. In fact the FFD simply wraps itself around the bounding box of the cube - not very useful.

I re-order the stack Box > FFD > XForm

In this situation the FFD is simply left behind by the cube.

After a bit of poking about in maxscript I use the Box > FFD > XForm ordering and the following piece of code to extract the rotation of the xform and feed it into the FFD lattice Rotation controller


obj=$Box01
objTM=obj.objecttransform
modTM=getModContextTM obj obj.xform
rpnt=obj.xform.gizmo.rotation * (inverse modTM) * objTM
(inverse rpnt)


This rotates the FFD lattice to follow the cube. However I cannot work out how to position the FFD around the cube. Everything I try the FDD just pops all over the place. It is a weird thing that you cannot get the PRS of the Xformed object, its a weird freaky controller and I don't know how to do it.
If you have a suggestion, or a better way to animate pivot points in max then I would be most grateful.

thanks!

Charlie B
__________________
What you see is not what you get.
charlieb is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:57 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
all images displayed on this site are copyright the original artists and may not be reproduced, copied or published elsewhere without their express permission