Particles Local Orientation outwards - How to?

Plugins linking to this thread: (hide)

UnfurlAuthor: Rob Chapman
Disclaimer: This is from the resourcedump thread on si-community.com so »some restrictions may apply« (but usually don't)

Video demo here. Rob shares a scene relating to an inquiry by si-community user Maximus: I've setup this and now i want every single particle (instance) to point outwards locally, not all together. I tried to modify the particle orientation but everything i do is done on all particles not on single also i cant find a way to have a proper orientation.I am having this problem quite often and would be nice to create a compound that works once for all. [..]

Continue reading in the si-community thread which seems to provide a few additional solutions to Maximus' question.

local backup: fibbonnaci_send.scn

Discussions about SOFTIMAGEs© Interactive Creative Environment©
User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Particles Local Orientation outwards - How to?

Post by Maximus » 05 Sep 2012, 18:13

Hello guys, i'm havin an hard time to find out how to achieve this effect..

Image

I've setup this and now i want every single particle (instance) to point outwards locally, not all together.
I tried to modify the particle orientation but everything i do is done on all particles not on single also i cant find a way to have a proper orientation.

I am having this problem quite often and would be nice to create a compound that works once for all. Cause everytime i have to orient particles i have this issue.

For example, see how those points outwards based on their position?

Image


Any suggestion?

Thank you

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Particles Local Orientation outwards - How to?

Post by Daniel Brassard » 05 Sep 2012, 18:32

Not in front of SI right now but, this would be a good application of the vector field node each vector pointing in the normal direction.

You will have to orient the triangles in the same direction as the vector field.

How do you define the triangle direction right now? (look to me they are all oriented in the -z axes)

Where is the pivot point relative to the two triangles?
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Particles Local Orientation outwards - How to?

Post by Maximus » 05 Sep 2012, 18:38

They dont have a custom orientation atm, that geometry has the pivot in the center. Its a normal grid and i melded 2 vertices in the middle to create an arrow-like shape.

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Particles Local Orientation outwards - How to?

Post by Maximus » 05 Sep 2012, 18:48

Image

They all move together! X(
I have to try something different i guess.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Particles Local Orientation outwards - How to?

Post by Daniel Brassard » 05 Sep 2012, 18:52

OK, the first thing i would do is determine the pivot orientation.

The Fibonacci algorithm give you a point in space. The point in space will determine where to put the triangle base location/pivot point (your are there from what I see).

The orientation is the angle between the origin point and the pivot/triangle base. The angle determine the direction of the tip.

So you could determine the vector direction from origin to pivot point and set the vector direction between the pivot point/triangle base to tip point with the same angle amount.

Basic vector mathematics.

Dan
Last edited by Daniel Brassard on 05 Sep 2012, 19:08, edited 4 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Particles Local Orientation outwards - How to?

Post by Daniel Brassard » 05 Sep 2012, 18:55

You have to do it for each instance/particle or they will move together as a group.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Particles Local Orientation outwards - How to?

Post by Maximus » 05 Sep 2012, 19:07

well i think i got the math behind this, but its really hard for me to translate it into ICE nodes.
I would start with Get Data and dig into the "arrow" but i cant get what i would need. Sadly i think this is quite off my knowledge
Thank you for the help!

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Particles Local Orientation outwards - How to?

Post by Daniel Brassard » 05 Sep 2012, 19:09

If you don't get the answer by tonight, I'll put something together for you. You are almost there.

Dan

p.s. maybe this can help in between...

http://xsisupport.com/2011/04/11/ice-mo ... -to-edges/
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Particles Local Orientation outwards - How to?

Post by Maximus » 05 Sep 2012, 19:36

I think i solved it! gonna post in a few! Thanks alot!!

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: Particles Local Orientation outwards - How to?

Post by Tekano » 05 Sep 2012, 20:41

splendid that you got it , was gonna say you are barking up the wrong tree with align particle by force or whatever compound that was - it may have been using the velocity vector. It was also a bit cruel of Daniel to leave you overnight stewing like that but to be kind, in order for you to learn, sometimes one needs to be cruel ;)

Ive been using ICE since beta and I still dont fully understand rotations or quaternions or the merits of splitting rotation up into quaternion or axis and angle or euler or rotation by orientation... its not exactly crystal clear on how to do this anyways with so many options and ways to connect and sometimes the factory align compounds don't behave as expected either! :-s

but here is how I approached the problem. I knew I had to globally align to a position (the centre) then I had to rotate or tilt each particle around their axis locally. breaking it into 2 stages helped to try out various solutions and get each part working then it was just a matter of joining the two. heres my compound and screenshot, don't download unless you have solved it already!

this has got quite a bit of usage for those Motion Graphics folks too as you can alter the tilt by distance to null so the flower petals open and close - a bit like your reference picture where there is more tilt the further from centre :-bd
Attachments
align_and_tilt.jpg
Align to position and Tilt.xsicompound
(10.77 KiB) Downloaded 231 times
Gossip is what no one claims to like, but everybody enjoys.

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Particles Local Orientation outwards - How to?

Post by Maximus » 05 Sep 2012, 20:59

Alright here is the final result- I was doing this compound for myself its based on some other compounds and some modifies i did so for anyone who find it useful here it is.

Image

@Tekano, thanks for that elegant solution, i saw that it uses a Null, nicely done :)
Attachments
Fibonacci .xsicompound
(45.27 KiB) Downloaded 130 times

User avatar
dwigfor
Posts: 395
Joined: 17 Nov 2009, 17:46

Re: Particles Local Orientation outwards - How to?

Post by dwigfor » 05 Sep 2012, 23:15

This looks like a good exercise for me to try out. Glad you guys solved it.

Another useful node for rotations is Direction To Rotation. That's essentially a LookAt node (I saw that used a lot in XNA C# game code), which adds UpVector support.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Particles Local Orientation outwards - How to?

Post by Daniel Brassard » 06 Sep 2012, 04:41

Me cruel ..... Never my intention! :D

Now for a bit of a challenge:

1. Scale the instance so that they are smaller closer to the center and get bigger the farther away from the center.

2. Rotate the instance so that they point to the center near the center and slowly point outward as the instance is getting away from the center.

3. Translate the instance so that they are close together at the center but slide downward (or upward if you prefer) on the main axis as they grow away from the center to simulate a plant growth.

4. Combine the Scale, rotate and translate into one effect.

(hint ... Think transform matrix scaling first, then rotate then translate in that order.)

5. Bonus point: add a bent deformation to the instance, controlled by the distance from the center, to add some interest to the shape.

Now I'm cruel...... :ymdevil:

EvilDan
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: Particles Local Orientation outwards - How to?

Post by Tekano » 06 Sep 2012, 10:55

In anticipation of any of EvilDan's challanges, the compound posted earlier already takes into consideration his challenge points 1 & 2. For point 3 I had merely offset the centre of the instance petal so that its centre was on the bottom of the leaf. but it is worth including 3's functionality of an offset in Y based on distance for completion of Point 4.

Didnt get any bonus points for 5 though :- but for sure you should have a go and make it a feature rich 'particle localised orientation' compound
Gossip is what no one claims to like, but everybody enjoys.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Particles Local Orientation outwards - How to?

Post by Daniel Brassard » 06 Sep 2012, 14:48

I won't give up that easily, Tekano.

Challenge 6. Animate the growth of the particles, from the center outward following the path traced by the Fibonacci curves.
Attachments
EvilDan.jpg
EvilDan.jpg (11.47 KiB) Viewed 1310 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: Particles Local Orientation outwards - How to?

Post by Tekano » 06 Sep 2012, 18:33

growth... in what way the instance shape getting bigger? :ymbringiton:
Gossip is what no one claims to like, but everybody enjoys.

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests