PDA

View Full Version : Aligning Particles To Spline


ODoul
12-10-2004, 06:21 AM
This is probably an embarassingly easy problem to correct but I can't seem to figure out how to get particles to follow a spline. I've searched here and there and everywhere for a tutorial or something in the manual that addresses this but can't locate anything. Any help would be greatly appreciated ... even if it's "look at page XX in the manual, dumb*ss"

Thanks!

Per-Anders
12-10-2004, 06:22 AM
srek has some examples on his website i believe, www.bonkers.de

ODoul
12-10-2004, 06:24 AM
bless you, my man.

ODoul
12-10-2004, 02:54 PM
Hello Srek, are you out there?

Let me explain what I am trying to accomplish first. I am going to be creating a helix spline that wraps around some objects in my scene. I would like to attach some particles to this spline which will be a series of volumetric lights, kind of like a volumetric light tornado of sorts.

I downloaded your example scene and was pleasantly surprised that it was pretty much set up almost exactly like I need with just a couple tweaks it would be perfect.

When I replaced the cube with the volumetric light, the particle lights follow the spline for about 5 frames and then switch back to being cubes.

Please excuse my complete lack of knowledge on the subject, I'm only just now starting to learn the basics of TP.

I was hoping that you may be able to offer some insight into how to accomplish this seemingly simple task.

TIA

Srek
12-10-2004, 02:55 PM
Hi,
i have no idea why the shape is switched. If you want you can mail me the scene to b_marl (at) maxon ( dot) de and i'll give it a try.
Cheers
Srek

ODoul
12-10-2004, 02:59 PM
Thank you Srek, I will send you the file when I get home this evening. You da man.

bobtronic
12-10-2004, 03:09 PM
Hi Ray,

Do you need this for animation or still image. If its for stills then you could set the
particle speed to 0 and move the emitter along the spline. This way you can virtually
paint with particles. As for TP I have no clue (I don't have TP).

ODoul
12-10-2004, 03:12 PM
Very interesting idea, Bob, so basically, you are saying that I should align the EMITTER to the spline and then move along the timeline. As the emitter travels along the spline, it will "drop" the particles as it moves?? Now that sounds promising too as it is a still image. I must try this when I get home.

Thanks!

bobtronic
12-10-2004, 03:18 PM
Yes exactly and if you tweak the lifetime and the emitting speed you can get some really
nice effects. Unfortunatly I have no nice example picture at hand.

Bob

AdamT
12-10-2004, 03:24 PM
You do know that R9 comes with a "TP Follow Spline" object in the object library?
http://www.3danvil.com/TP_spline%20path.html

ODoul
12-10-2004, 03:49 PM
Did not know that, Adam. I have to admit, I am a bit intimidated by the whole TP thing. Espresso really throws me for a loop. Sadly, I have little time to invest in learning much about it ATM. What little I was able to play with, was way over my head in terms of comprehension. Linking this node with that node, etc, etc. Makes my head spin.

But now that I know it's there, I'll be sure to take a look, Adam. Thanks!

AdamT
12-10-2004, 03:50 PM
Did not know that, Adam. I have to admit, I am a bit intimidated by the whole TP thing. Espresso really throws me for a loop. Sadly, I have little time to invest in learning much about it ATM. What little I was able to play with, was way over my head in terms of comprehension. Linking this node with that node, etc, etc. Makes my head spin.

But now that I know it's there, I'll be sure to take a look, Adam. Thanks!I'm exactly in the same boat, which is why I know about all those prefab TP objects. :)

bobtronic
12-10-2004, 04:06 PM
I found an old testrender.

http://home.snafu.de/bobtronic/misc/aqsis/particles.jpg

It was a test for my RIB exporter so its rendered with Aqsis but the particles were
created with Cinema.

Bob

ODoul
12-10-2004, 04:17 PM
Very close to the effect I'm looking for Bob. More individual lights but that's an easy tweak. To be honest, your method is probably going to be the way I go because I understand how this method works.

TP is definately on my list of things to come to grips with though.

Thanks for all your help guys, it is much appreciated.

AdamT
12-10-2004, 04:23 PM
You should try it with the prefab TP objects; it couldn't be easier. Just load a TP Basic Emitter object and a TP Follow Spline object. Click on the emitter object and drag your light into the AM shape field. Click on the follow spline object and drag your helix spline into the spline field. That's it. Now you can click back on the emitter object and adjust the particle properties to suit.

Oh, I think you have to make the helix editable first.

ODoul
12-10-2004, 04:35 PM
Sure sounds easy enough. I'll give it a go. The thing is, I WANT to do it with TP (for no other reason that I have not used them before), just didn't feel I had the understanding yet to do it that way. I'll give both methods a go!

ODoul
12-10-2004, 05:25 PM
Just tried the Thinking Particle method from the Objects menu. Worked like a charm. Much Thanks!

ODoul
12-10-2004, 08:39 PM
Sorry to keep bumping this thread. I just have 1 more question. Is there a way that any of you know to make the particles just stay very close to the spline but to not follow such a regimented path as to stick exactly to the spline. Make sense? I want some variation in the path but not so much as to not be able to tell they are following one.

bobtronic
12-10-2004, 09:26 PM
I can only speak for my method and I would give the emitter some random rotation along the timeline. You can also vary the emitting angle and the speed. This can give you some nice puff
effects and a dynamic look.

Bob

AdamT
12-10-2004, 10:32 PM
How about a fake? Try duplicating and offsetting your path spline a few times. Then connect the splines and use the new one as your path spline. Put the emitter in between so the particles will be drawn to the different segments.

Also try lowering the point velocity in the follow spline object to a low value like .2-.5.

If necessary you could animate the position of the emitter so it'll be sure to distribute the particles to the different segments.

ODoul
12-11-2004, 01:32 AM
Fantastic ideas. I've learned alot from this thread.

ODoul
12-11-2004, 04:08 AM
Adam, I found the best way to give some variety to the way the particles travel along the spline is to enlarge the emitter diameter. Just a little tip you might find useful some day. Oh yea, BTW, I had a couple of these scenarious in my scene. When one was too close to another, the particles jumped from the spline that they were supposed to follow over to the other spline, I resolved this by using Bob's method for one of the particle systems, It worked equally well so there ya have it, issue resolved, thanks guys!

darf
12-11-2004, 04:19 AM
Sorry to keep bumping this thread. I just have 1 more question. Is there a way that any of you know to make the particles just stay very close to the spline but to not follow such a regimented path as to stick exactly to the spline. Make sense? I want some variation in the path but not so much as to not be able to tell they are following one.

Add a particle collision node. If you have CPT you can use the Attract/Repulse node. You can see an example here: http://www.corearsenal.com/forums/viewtopic.php?t=4

Regards,
darf

ODoul
12-11-2004, 04:39 AM
Is that how you made each of the particles look like they were following their own separate path? OK, hope I don't sound to out of the loop but what is Core Particle Tools? Is it a plug in or part of thinking particles. Sorry, I'm only just getting started here with TP so this is all pretty overwhelming ATM. It's been very interesting though, for sure.

BTW ... Quite an interesting ani on your site there. Liked that alot.

AdamT
12-11-2004, 01:48 PM
CPT is a plugin that adds a lot of functionality to TP. It mainly allows you generate splines from particle paths, but it has other cool stuff as well--highly recommended. You can get it for $100 off (courtesy of Maxon) if you buy before 12/31.

bobtronic
12-11-2004, 02:44 PM
Now I am curious what you are cooking up Ray :)

ODoul
12-11-2004, 03:09 PM
Thanks guys, new software doesn't exactly fit into the Christmas budget this year, especially since I upgraded to 9 just a couple of months ago. :(

Bob, I hope you won't be disappointed, it's really not THAT impressive ... lol. I have decided that in order to learn different aspects of C4D that I have not previously explored, I am going to try to incorporate 1 new thing into each render I do. This time around, it was TP.

I'll post it when it's done.

darf
12-11-2004, 03:50 PM
There is a Particle Collision preset object in the 'Objects' menu. It does something similar to ours. Quite a bit slower if you use alot of particles. It will do what you want though. Try it.

Regards,
darf

jaymackey
12-13-2004, 04:11 PM
I just did an experiment last night, trying to create a clump of particles that would behave like a viscous fluid, i.e. something in the range from water to 'goop'.

I had what appears to be some success with the RepulsionBounce node. It's a little tricky, but the idea is to compare each particle's location to each other particle's location, and then use a range mapper to set the Repulsion value accordingly. First, I simply do not know if I am doing this in the most correct way, and would love some feedback from the TP-Xpresso experts. I used PPass to set All particles to a Group A, and then another PPass to send all particles from Group A to a Group B. Then I used the PPassAB to send particles to the RepulsionBounce node. To do the position comparison, I used the outputs from the above PPassAB to go to a PGetData for each Group (2 total), which output the positions. Using a Math node, one position is subtracted from the other and output as a Real, and ran it through an Absolute node. The final result 'should' be the distance between two particles. This result is fed into a range mapper. The values used will depend on the scale of your 'simulation', i.e. if you want your particles to try to maintain a separation of .1m or 100m. The concept is to apply positive values when below the ideal separation, and negative values when above ideal separation between particles. The range mapper output is connected to the Repulsion setting on the Repulsion node. (Negative values on the Repulsion setting results in Attraction.) You have to get these setting just right, because you can end up with some serious 'spring-like' oscillation, and your 'sim-fluid' will blow up. A bit of global friction will help. I also clamped the min and max values in the range mapper, which is key to avoiding 'blow-up'. Finally, I added a compare to the value coming out of the Math node. The purpose of the compare is to check to see if the distance is greater than some max value. This will be the threshold at which two particles are so far apart that they will have no affect on each other. Connect the output of this compare to the ON input of the RepulsionBounce node.

I started with some bounce in the Repulsion/Bounce node, but ended up setting it to zero. This only adds to the instability, which is already a problem with this technique.

When I had found the ideal particle separation values for the range mapper, and the threshold value for disabling attraction between two particles, the 'clump' of particles became very stable and fluid.

Unfortunately, I do not yet know enough about the inner workings of Xpresso to say if this scheme is ideal. I am assuming there is a problem with the method, but that it does in fact approximate a sort of fluid cohesion, while maintaining a minimum fluid volume.

I've already tested this 'fluid' with gravity, a SurfacePosition node, and a deflector node, in various permutations. I 'attracted' it to an object behind a deflector object, and then released the attraction. With the Deflector node friction and other parameters set correctly, in conjunction with gravity, the behavior of the 'fluid' is pretty realistic.

Sending this clump along a spline should be no problem, and the Repulsion node should force them to maintain separation from each other as they travel. I'll try this out, because I want to see what happens!

Is there a forum anywhere that discusses TP/Xpresso exclusively or more frequently?

Thanks,

Srek
12-13-2004, 04:46 PM
Hi,
should work fine, although you can leave out the PPass nodes you use for the group assignments. PPAssAB will work fine with the same group of particles in both link fields. As for the distance between particles there is a single node (Distance) who should do the trick. You might like to add some friction to this to dampen out unwanted movements.
Cheers
Srek

jaymackey
12-14-2004, 01:15 AM
Srek, thank you very, very much for those hints.

More fun with the r9 demo experimentation tonight. :)

ODoul
12-14-2004, 03:39 PM
Great tips! I can't wait until I can get home and digest this information properly. I've been having alot of fun playing with thinking particles the last week. It is exceedingly easy to generate some very visually interesting material with them. One thing I have experienced is the generation of "rogue" particles that just kind of appear out of nowhere and hang out for a split second and then join the rest of the crew. It's actually kind of funny to watch but I can see where in a production environment it could be a problem. Perhaps it just that I don't know much about them yet and the settings need some tweaking. Anyway, just sharing some of my TP experiences. I'd really like to post some of the movies but I still havn't quite figured out how to do that yet ... lol

lachlan_k
12-15-2004, 10:27 PM
I have to admit, I am a bit intimidated by the whole TP thing. Espresso really throws me for a loop. Sadly, I have little time to invest in learning much about it ATM. What little I was able to play with, was way over my head in terms of comprehension. Linking this node with that node, etc, etc. Makes my head spin. Try the first of the tuts on my site:

http://www.wonderful.org.uk

It is a very very simple intro to Xpresso. Another one is just very simple.

jddog
11-08-2005, 08:29 AM
Hi all, I bump up this message because I try to use the concept "particle follow spline" to create a pyrocluster efx. But here I'm a bit lost :blush: due to my very high level ignorance in TP and expresso.

I supposed that I can use srek's file and simply drag the pyrocluster material on the emitter... but I saw that didn't work... hee... what direction I must take to use Pyrocluster particle to follow a spline and form and elix smoke/flame efx without using an object assigned at an emitter ?

jdd

Creature
11-08-2005, 11:35 AM
There should be some helpfull ideas in this thread:
http://forums.cgsociety.org/showthread.php?t=290672&page=1&pp=15

Especially this file could be of interest (it's the final outcome of the thread mentioned above by tony)
http://www.tonygold3d.com/Public/test2.c4d


For use with PyroCluster simply remove all Pshape Nodes from the expresso, make sure that there is a Particle-Geometry object with no childs and assign your pyro material directly to the Particle-Geometry object. You'll also need an environment object with pyros volume tracer asigned to it.

jddog
11-08-2005, 02:55 PM
Thanks so much for these info Creature, tomorrow i will check and test it again...
jdd

basilisk
11-08-2005, 05:30 PM
Idiot way to make particles move in a spiral - use a twist deformer on the particles. Note: particles need real geometry (not lights), and the individual particles get distorted

CGTalk Moderation
11-08-2005, 05:30 PM
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.