PDA

View Full Version : Motion Curve offset



RAZ
07-01-2003, 04:14 AM
I'm pretty new to dealing with motion curves etc in Layout so need some help here...

I've created a long motion path for an object and would like to clone the object 100's of times.

I'd then like to randomly offset the clones on that motion path so they appear to be following each other down a road. How would I best go about this considering that the clones maybe running into the thousands? Obviously some sort of quick or automatic approach to offsetting each clone would be best.... using a plug-in maybe?

Any tips with the graph editor or plug-ins would be very helpful indeed.

Many thanks

Razz

Lightwolf
07-01-2003, 04:35 AM
Hi RAZ,
Howzabout using particles?
Create an emitter.
Create a Wind object that follows your path.
Set the Wind Mode to Path.

You can then use the PFX Linker to creat random clones of your object that get linked to the particles...

Cheers,
Mike

RAZ
07-01-2003, 06:08 AM
As I said I'm pretty new to Layout's fancier functions but that sounds like a very elegant solution. If the particles do indeed conform to a motion path and there is some control over their distance from each other then you may be onto a winner. I'm assuming also that the motion can be saved for network rendering etc. I'll have a tinker and let you know....thanks.

Lightwolf
07-01-2003, 06:14 AM
Hi Raz,
I did something similar a couple of weeks ago, I wanted a couple of package boxes to fly from a building to a logo (don't ask...). I used the particles to do that.

Make sure you calculate the particles ("Start" in the PFX controller), and that you save the emitter motion.

Also, the size of the emitter pretty much influences the spread of the particles around the path, so i you want them all to be at the same height, create a very thin emitter with a tiny Y size.

Also, to make the scene more manageable, parent your object ot be cloned by the linker to a Null object, that way you can easily "unclutter" the scene editor by just collapsing the Null object.

I hope it helps,
Cheers.

RAZ
07-01-2003, 06:57 AM
Thanks mate...I'll give it a go and post how I get on today/tommorrow

RAZ
07-01-2003, 09:06 AM
Well...I just had a go and.....wow...it works. Holly cow!!! I just need to write this all down now as its pretty complicated for me. I'll follow your advice regards the parenting of linked clones to a null. I only seem to be able to copy 1 object type to the particles at the moment so I have hundreds of the same car. Can I get FX Linker to choose from a selection of object models randomly? One way round this I thought of was to use a null during the fxLinker operation and parent different vehicle models to those. This of course requires manually replacing each parented stand-in null with vehicle objects!!!....Can you think of anyway around this?

Anyway, brilliant solution thus far...thankyou very much

Razz

Lightwolf
07-01-2003, 09:12 AM
Originally posted by RAZ
Can I get FX Linker to choose from a selection of object models randomly?
Yep, multiselect the objects you want cloned, and off you go. I think wou'll have to manually divide the number of particles by the number of clones though (I'm can't remember 100%).

Basically with 100 Particles
1 object -> PFX Link 99 clones
2 objects -> PFX Link 50 clones
3 objects -> PFX Link 33 clones
4 objects -> PFX Link 25 clones
... and so on.

I'm glad to see it work. The only drawback is that this won't work with hierarchies...

Cheers,
Mike

RAZ
07-01-2003, 09:43 AM
Thanks for that but I'm stuck trying to multiselect objects. I'm probably in the wrong place here....I'm in Particle FX Linker, I've chosen my emitter in the 'particles' field and I'm trying to multi-select objects in the 'replace object' field. It'll only let me choose 1 object. I've tried using the ctrl key but no luck. Am I confused and in the wrong place maybe?

Thanks again

Razz

Lightwolf
07-01-2003, 09:45 AM
RAZ:
First select the object, then open the PFX Linker...
(wait, let me check first before I BS you...)
..yep, works. On the top right it should say "replace object: x items".
Cheers,
Mike - fastest reply in the west ;)

RAZ
07-01-2003, 09:58 AM
Thanks for your speedy response and patience.

Yep, top right of PFX Linker there is a 'replace object' and you can choose an object from the pop-up....but only 1 object from the list not multiple objects.

Lightwolf
07-01-2003, 10:02 AM
Originally posted by RAZ
Thanks for your speedy response and patience.

Patience is a virtue or so they say :)

Again:
1st: Multiselect your objects to clone
2nd: open PFX Linker

Don't multiselect after you opened the linker, first multiselect. It shouldn't show a popu menu on the top right, but just a small info area...
I assume you're on 7.5, but this should work with 7.0 as well...

Cheers,
Mike

RAZ
07-01-2003, 10:11 AM
Ok...brilliant...daft me thought I had to select the items in the pop-up not before running PFX Linker. Wow, what a time saver...fantastic. One more itsy bitsy problem. I selected four items and they did all work but they linked in a repeat pattern rather than randomly. Is there a way to make it random?? I know I know...I want the moon on a stick. Thanks a lot mate anyway for all your help.

Lightwolf
07-01-2003, 10:17 AM
Hi RAZ...
I'm back ;)
Well, the only way I can think of is to create a bunch of clones _before_ you link them, then select them in a random order and then use the PFX Linker...

BTW, if you want to dissolve them with the particles, you can add a channel plugin (I think Flink or something like that), to the cloned objects. If you clone tham afterwards, PFX Link will automagically link them to the right particle...

Cheers,
Mike

RAZ
07-01-2003, 10:31 AM
Yep, that makes sense, thanks. I'll have a look at that dissolve plug-in to and let you know if I discover anything else useful.

This is pretty exciting for my project, I've got 8 lanes of traffic several miles long to do so you can imagine how much I needed a non-manual keyframe solution. I may just create 1 motion path for each direction along the central line of the road and offset the 8 wind objects and emmitters to each traffic lane. Anyway, a huge time saver :)

I'm in awe of your expertise...I don't know how you figured all this out. thanks a million.

Razz

marvin
07-01-2003, 11:06 AM
Lightwolf and Raz,

Wouldn't another method to get random dispersement be to create four emitters attached to the same wind for path. Logically it seems like it would work, but then there is a problem of how to not get them to go through each other.

I think there is an option for not having particles collide. This is all just a thought, so Lightwolf can verify because he apparently knows more about this than I do.

marvin

Lightwolf
07-01-2003, 12:34 PM
Hi Marvin,

Originally posted by marvin
I think there is an option for not having particles collide. This is all just a thought, so Lightwolf can verify because he apparently knows more about this than I do.

Thanks *blush*
Well, yes you can give the particles a size (a sphere around them), and then go to the collision options and, sorry to say, play around with them. You'd have to be carefula so that you don't have cars bouncing off each other, and I'm not sure if they would decelerate properly if they get too close, or if they'd just avoid each other and fly off the street.
Self collision only works if you calculate the particles using the "Start" button in the PFX controller, but you should do that anyway, its quite fast as well.
Mind you, you can change the particles after you linked them, the linked items will follow.

If you have 8 lanes you could create 8 emitters, or one emitter object (just create points in modeler that will emit the particles) and use the vertices mode in PFX. That way you'll get a certain randomness on how the cars are spread on the lanes.

For the traffic going the other direction, you'll need a different path object. Create PFX groups to separate them.

Cheers,
Mike

RAZ
07-01-2003, 12:50 PM
It's just gets better, using emitter points sounds ideal. As for PFX groups, I'll try that out too. I thought that I'd use a new wind object for the southbound traffic but was worried about how it would effect the northbound particles. Anyway, I'm on it now...I'll let you now how I get on shortly.....THANKYOU....months of my life are returning :)

Lightwolf
07-01-2003, 12:52 PM
Sounds great,
I wish you all the best of luck!

Actually, the second 3D job I did (the first one for gadget, back in, oh '96), involved around 200 cars on a highway.
Luckily they were meant to be in a traffic jam, so I only had to place them :)

Cheers,
Mike

RAZ
07-01-2003, 01:37 PM
Ok, I've tinkered with it and found the following...

Using vertices as the nozzle emitter is great but not right for what I want. My four lanes of traffic move at differing speeds, inside slowest etc, so I'm back to seperate emitters. Also the particles from the offset vertices crowded together on corners because they used the same motion curve rather than change it for each vertices car lane, even with the wind object aligning to path etc.

This also happened when parenting offset cloned wind objects, so again, seperate wind objects for each lane with their own motion path.

Grouping sounds ideal though for keeping the particles immune from neighbouring lanes.

This is a huge first 'commercial' project for me thats vast in scale. I've been really worried about sorting this bit out so hats off to you sir for being such a gentleman.

I owe you a few pints I think.

Cheers and all the best.

ps. Anything else interesting crops up in the next few days I'll post it on this thread.

Lightwolf
07-02-2003, 02:44 AM
Hi RAZ,

Originally posted by RAZ
This is a huge first 'commercial' project for me thats vast in scale. I've been really worried about sorting this bit out so hats off to you sir for being such a gentleman.

I owe you a few pints I think.

You're welcome. I'm glad to see it work.
As for the pints... :cool: :p ...anytime... ;)

And yes, please keep us updated, I'm as nosy as hell (just look at the avatar) :D

Cheers,
Mike