particle goalOffset in local space?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  03 March 2011
particle goalOffset in local space?

Hi all,

Just looking for a little help with goal offsets for particles. I have some text drifting through a scene which I am using the text as a goal for some particles. I want to have the particles offset from from the z axis of the text. From what I understand goalOffset only works on world space not local space, so if I simply offset them in z, then the result isnt really what I want as the text rotates within the scene. So I guess what I am looking for is a way to offset the particles along the z axis of their goal object as opposed to the the worldspace z axis.

Any suggestions would be very much appreciated as I am not yet very competant with mel (something I am working on, hehe).
  03 March 2011
You need to get direction of your object(X,Y,Z) as vector.

float $matrix[]=`getAttr object.matrix`; //local matrix of object
vector $vecX=<<$matrix[0],$matrix[1],$matrix[2]>>; //X axis
vector $vecY=<<$matrix[4],$matrix[5],$matrix[6]>>;//Y
vector $vecZ=<<$matrix[8],$matrix[9],$matrix[10]>>;//Z
goalOffset=$vecZ;//offset in Z
  03 March 2011
Ahh ok, I think I see what you have going on in there, Thanks a lot ginodauri. I added a simple rand function to the offset as well I have it working in my secene, and although I haven't got it working perfectly (particles still not quite alligning with the goal object in Z), I think you have given me a good starting point for further research.

Thanks again
Attached Images
File Type: jpg goalOffset1.jpg (84.4 KB, 24 views)
  03 March 2011
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

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

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.