RE: SCOPs with more than one output...

Date : Wed, 2 Jan 2008 15:23:55 -0000
To : <XSI(at)Softimage.COM>
From : "kim aldis" <xsi(at)kim-aldis.co.uk>
Subject : RE: SCOPs with more than one output...

// XYZ Position of point(i) at current frame -2

// XYZ Position of point(i) at current frame -1

 

Sorry Dan, you can’t do that.

 

From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Dan Yargici
Sent: 02 January 2008 13:51
To: XSI(at)Softimage.COM
Subject: Re: SCOPs with more than one output...

 

Thanks Brad,

I'm having a little trouble figuring out how to apply this in terms of point positions though...  Here's what I'm doing now:

oKine is the Global Kinematic state of the object.

                // XYZ Position of point(i) at current frame -2
                var aX = oCacheA[i*3];
                var aY = oCacheA[i*3+1];
                var aZ = oCacheA[i*3+2];
           
                // XYZ Position of point(i) at current frame -1
                var bX = oCacheB[i*3];
                var bY = oCacheB[i*3+1];
                var bZ = oCacheB[i*3+2];

                // XYZ Position of point(i) at current frame
                var cX = oCacheC[i*3];
                var cY = oCacheC[i*3+1];
                var cZ = oCacheC[i*3+2];

                LposV1 = XSIMath.CreateVector3(aX,aY,aZ);
                LposV2 = XSIMath.CreateVector3(bX,bY,bZ);
                LposV3 = XSIMath.CreateVector3(cX,cY,cZ);
               
                var >                 var >                 var >
                oNewTransformA.SetTranslation (LposV1);
                oNewTransformB.SetTranslation (LposV2);
                oNewTransformC.SetTranslation (LposV3);

                var oWorldKineA = XSIMath.MapObjectPoseToWorldSpace( oKine.Transform, oNewTransformA );
                var oWorldKineB = XSIMath.MapObjectPoseToWorldSpace( oKine.Transform, oNewTransformB );
                var oWorldKineC = XSIMath.MapObjectPoseToWorldSpace ( oKine.Transform, oNewTransformC );
               
                var GposV1 = oWorldKineA.Translation;
                var GposV2 = oWorldKineB.Translation;
                 var GposV3 = oWorldKineC.Translation ;

                velV1 = XSIMath.CreateVector3();
                velV2 = XSIMath.CreateVector3();
                accV1 = XSIMath.CreateVector3();

                velV1.Sub(GposV2,GposV1);
                velV2.Sub(GposV3,GposV2);
                accV1.Sub(velV2,velV1);

However I still get the same results (transforms not effecting the calculation, only deformations)...

Cheers,

DAN

On Dec 31, 2007 6:36 PM, Bradley Gabe < withanar(at)gmail.com> wrote:

Dan-

 

Have a look at the SDK docs on the XSIMath object which has the following methods:

 

MapObjectPoseToWorldSpace

MapWorldPoseToObjectSpace

MapObjectPoseToObjectSpace

 

These are all you should ever need for converting SITransforms between any local and global space. I was just starting to get decent at matrix math for transforms when I discovered these. ;-p



 

On Dec 31, 2007 11:55 AM, Dan Yargici <danyargici(at)gmail.com> wrote:

Hi Kim, I just got it working!

I'm now creating two variables on the scop itself and pumping my position arrays into there (these are hidden from the user via their capabilities).  This way I can manually update them only on frame change when the scop is evaluated and without anything having to be found dirty.  It works very well!

My next question is which the shortest route to adding the object's transforms into the equation might be?

I am currently looking at AddParentScaling, AddParentTranslation and AddParentRotation in the SDK however I'm unsure as to whether or not this would be the best technique.

Any input would be most welcome indeed!

Cheers,

DAN



On Dec 31, 2007 5:25 PM, kim aldis <xsi(at)kim-aldis.co.uk> wrote:

Send me the code, Dan, I'll take a look for you.

 

From: owner-xsi(at)Softimage.COM [mailto: owner-xsi(at)Softimage.COM] On Behalf Of Dan Yargici
Sent: 31 December 2007 15:44


To: XSI(at)Softimage.COM
Subject: Re: SCOPs with more than one output...

 

Hehe, no worries ;)

OK, so now I gave up entirely on the UserDataBlob and am using a CustomParameterSet...  Now I not only have the same issue with the Cache not being updated unless it's PPG is open, I also have the joy of something else not updating too!

Basically, I now have a CustomParameterSet with two string parameters that I use to store the positions of the points at two different frames.  Except only the last parameter created gets updated by the scop. 

This has all become way too ridiculous for words...

Cheers,

DAN

On Dec 31, 2007 2:48 PM, kim aldis <xsi(at)kim-aldis.co.uk> wrote:

Yeah, sorry. I didn't read your mail properly until I'd replied. Doh!

 

 

 

 

 

 


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.