PDA

View Full Version : Speed Space Rotation with Random Spin - Help


Cabraswel
06-09-2008, 03:15 PM
Hi all. I'm a long time lurker here, but this is my first actual post.

I am trying to create a particle simulation in Max similar to the scenes in Hero and 300 where thousands of arrows are fired towards the camera. I've got everything working properly, except that the "arrows" are all oriented the same way. I would prefer to give them each a random spin so that the flechettes don't all line up the same way, but there doesn't seem to be an easy way to do this when using "Speed Space Follow" for rotation.

Can anyone help?

Piflik
06-15-2008, 07:44 PM
I would fire the arrows at an angle by turning the emitter about 45°, add a speed event with a low divergence value. Then add a gravity force. That should give each arrow a unique ballistic trajectory.

grury
06-16-2008, 07:33 AM
You could clone your arrow and do a offset rotation on each arrow, then group them and use the group as your instance. That way when the leave the emiter they already have slightly diferent rotations.

Cabraswel
06-16-2008, 02:00 PM
Hi guys. Thanks very much for the input. I wound up having to manually pose each projectile (it was for stills, not animation) because I was running out of time to complete the job.

Piflik - Good suggestion. That's actually similar to what I was using for a setup. Getting a unique trajectory for each projectile wasn't the problem, it was spinning each projectile by a random amount. Thanks, though!

Grury - What an inventive solution! I think that would actually have worked for me. I'll certainly keep it in mind for next time.

PsychoSilence
06-16-2008, 03:23 PM
Hi all. I'm a long time lurker here, but this is my first actual post.

I am trying to create a particle simulation in Max similar to the scenes in Hero and 300 where thousands of arrows are fired towards the camera. I've got everything working properly, except that the "arrows" are all oriented the same way. I would prefer to give them each a random spin so that the flechettes don't all line up the same way, but there doesn't seem to be an easy way to do this when using "Speed Space Follow" for rotation.

Can anyone help?

i did a similar shot for a movie a while ago. mine pierces ice rocks in the ground...but u should be set by replacing the shape instance :)

the trick lays in habing a rotation set to speed space followed by a spin set to speed space follow. then u get nice gravity beding AND a nice spin...

check the stripped max9-32 file. u will need the particle flow FREEBIES to get this working. u can download them for free at orbaz.com

kind regards,
Anselm

charleyc
06-16-2008, 03:23 PM
Edit: This post was NOT the way to do it :p

For the right way, do what others have posted or read below :D


-Deteled trying to use two constant evaluated Rotation Ops to solve problem to avoid confusion as it does not work.-

PsychoSilence
06-16-2008, 04:13 PM
hah! we´re are heavenly connected somehow :D same minute same posting (content wise)

charleyc
06-16-2008, 08:33 PM
I am wrong here. This is what I get for posting something without trying it first. Good to hear you got a solution, but just to set people straight from my erroneous post...

The Speed Space Follow overrides any other Rotational Op (the Spin). It would appear that the best ways to do this would be as Grury says, or to set a rotation animation on your reference Geometry and use a random animation offset (if you do this, you need to apply it using an XForm modifier).

grury
06-17-2008, 09:34 AM
.

The Speed Space Follow overrides any other Rotational Op (the Spin). It would appear that the best ways to do this would be as Grury says, or to set a rotation animation on your reference Geometry and use a random animation offset (if you do this, you need to apply it using an XForm modifier).

Yep i did bang my head for a while last week and that was the quickest solution I could came up with. Gotta have a look at PsychoSilences' setup.

Cabraswel
06-17-2008, 01:42 PM
I want to thank everybody for all of their helpful input.

PsychoSilence & Charleyc - I, too, thought it would be a simple matter of setting Rotation to Speed Space Follow, and then adding a Spin operator afterwards. Alas, as Charleyc pointed out, they override each other, though.

My next thought was to animate the spin of the instanced object and offset it randomly in the animation, as Charleyc said, but I didn't know that it had to be done via XForm. I think that would have solved all of my troubles! Oh well, now I know for next time.

PsychoSilence, I haven't had a chance to look at your file yet. I do appreciate it, though, and I look forward to examining it later this week!

PsychoSilence
06-17-2008, 02:38 PM
PsychoSilence, I haven't had a chance to look at your file yet. I do appreciate it, though, and I look forward to examining it later this week!

np, ur welcome :)

what my scene file does different then charley´s approach is that i dont use two SPIN operators but a RotationOp set to Speed Space and a SpinOp set to Speed Space follow. thats it so u get a nice down going motion with the gravity dragging the arrow down AND a spin.

kind regards,
Anselm

JohnnyRandom
06-18-2008, 12:49 AM
Hah! I tried the the spin+rotation op a couple of days ago and was having the same issues.

I thought I tried every possible combo to get it to work!

Seems using the Speed Space Follow last and the Rotation divergence are the keys to getting the objects to fly correctly. Cool.:thumbsup:

charleyc
06-18-2008, 01:20 AM
The Key to Anselm's approach is that Speed Space does not update continuously like Speed Space Follow. Therefore, the Spin Op will take over and do the continuous rotation. This is a very good place for Box3 :D

JohnnyRandom
06-18-2008, 03:27 AM
I tried a little box#3 love, but not enough to get me there. Still waiting on this book (http://books.google.com/books?id=p5gKudZjM2kC&printsec=frontcover&dq=Mathematics+for+Computer+Graphics&sig=lndCnO_6G6i-sDbUJXOsX9pzvQ4) to arrive, hoping it will help me out with box#3 a little or a lot.:)

LOL, a quick little screw off render...

http://www.4rand.com//TEST/ParticleFlow/Misc/pf_arrows_06.png

PF Arrows QT 2.3mb (http://www.4rand.com//TEST/ParticleFlow/Misc/pf_arrows_06.mov)

PsychoSilence
06-18-2008, 03:47 AM
Hey John! Looks pretty cool. show the data view :)

is it really that much faster with box#3 then with the oldschool trick?

JohnnyRandom
06-18-2008, 03:58 AM
No way Dude...TOP secret:p

Just kidding, I used your technique, I haven't spent enough time with the box#3 version to get it working correctly.

Where I noticed the biggest speed hit was when using high poly mesh as a collision object. I added a noise+turbosmooth+displace (with smoke map) for the ground and bam collision test came to a grinding halt (somewhat expected of course)

charleyc
06-18-2008, 06:20 AM
Here is a Box3 method (R9 file). There are other ways to do this in Box3 (perhaps even simpler, but I already had an operator similar to this built).

www.charleycarlat.com/Tests/PF_ZSpinFollow_Box3_R9.zip (http://www.charleycarlat.com/Tests/PF_ZSpinFollow_Box3_R9.zip)

JohnnyRandom
06-18-2008, 06:59 PM
Cool...quaternions...:D

JohnnyRandom
06-18-2008, 09:13 PM
So that scene you posted Charley helped explain a lot, I was trying to use real numbers to the rotation angle+axis outputs and getting nowhere. I had an idea it might have to do with them but I wasn't sure how to connect data.

I am curious though where does the randomness come from? I noticed some spin opposite and some spin faster than others. Is it the variation in the scalar sub-op in the multiplier group?

charleyc
06-18-2008, 09:21 PM
Yeah, I have found that Quaternions work well for 'local' particle rotation. The randomness comes in from the Multiplier Scalar SubOp. To avoid a constantly updating random number, I need to connect the Scalar to an Input Standard set to In New Event, but I don't want that to limit the entire Data Op, so I send that data out as an Output New and then back in as an Input Custom. That way the Multiplier data gets set once, but updates the particles continuously. That is where the random Z spin comes in.

charleyc
06-18-2008, 09:45 PM
Another advantage to using Box3 is that you can very easily make the spin dependant on the Speed of the arrow. Simply multiply the Input Custom data by the Input Standard Speed_Magnitude (I used a Post Multiplier of 20, but that could be exposed for easy control) and now the arrows spin faster as they move faster and spin slower as they move slower.

JohnnyRandom
06-18-2008, 09:52 PM
Ok:)

So the time input, does that define a base for the spin? ie give it something to base the amount of rotations applied to each particle off of.

Edit I think I answered my own question.

Thanks Charley, tried the speed magnitude, nice:)

PsychoSilence
07-15-2008, 03:52 AM
that hell of an usefull data set :)

thanks four sharing!

i learn alot about box#3 these days thanks to bobo :beer::bowdown::bowdown::bowdown:

CGTalk Moderation
07-15-2008, 03:52 AM
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.