Particle Flow Discussion


#541

Originally posted by Morpheus09
[B]I have a question for the Scriptmasters

In Pflow the Position Object Emitt Particel but random
Is it posible to write a script that Emitt the Particel in a special order ? [/B]

Can you explain what exactly is the idea?
Do you mean something like 100 particles from first object on the list, then 100 from the second, them 200 from the third on the list, or something different? Or do you want the particles to be ordered ON the surface of the respectibe Position object?

The first thing can be done using regular PFlow without scripting.
The second one would be slightly trickier, but I think it is scriptable.

Some example case would be useful to answer this question…


#542

Aight peeps, heres the finished animation.

Particle thingy :slight_smile:


#543

Treed:

That looks great, really cool! Can I ask how you did this?


#544

Ok i have 20 Selected Vertices that emitt Particle
as you can see it is random
some Particle are emitt from the same Vertices

i need a script or something like that, that emitt Patricles from every Selected Vetices and in a special order


#545

Try this:

Instead of a normal Birth Operator use a Birth Script with this code in the ‘on Proceed pCont do’ part:


on Proceed pCont do 
(
	ss = $Sphere01
	varr = getvertselection ss as array -- Get the vert selection
	t1 = pCont.getTimeStart()
	if t1<0 do
	(
		for i in 1 to varr.count do -- Run trought all selected verts and add a particle to each selected vert
		(
			ThePos = getvert ss varr[i] -- Get the selected vert position
			pCont.AddParticle() -- Add a particle
			pCont.particleIndex = pCont.NumParticles() 
			pCont.particleAge = 0
			pCont.particlePosition = ThePos -- Sets the particle Position to the vertex position
		)
	)
)

Where ‘Sphere01’ is the object that the particles will be emmited from (i must be a Editable Mesh).

And the order depends on what you are trying to achieve.

If you want to just make the particles Speed diferent, you could use something like this. Just add a Script Operator after the Birth Script with this code on the ‘on Proceed…’ part:


on Proceed pCont do 
(
	count = pCont.NumParticles()
	ss = $Sphere01
	varr = getvertselection ss as array
	for i in 1 to count do
	(
		pCont.particleIndex = i
		t1 = (pCont.particleTime as float / 160) -- Get the current particle time in frames
		theTime = 50 + i -- Particles will start moving at frame 50
		if t1 == theTime do
		(
			pCont.particleSpeed = (getnormal ss varr[i])*0.1 -- Set the particle Speed to the Sphere01 normals.
		)
	)
)

I’m sure there is a way of mergin those 2 scripts and probably there is a better way of doing what you want too. I’m still learning maxScript so Bobo can probably help you with that :thumbsup:

Btw, Cool animation treed :applause:


#546

ok the script work but it is not exactly what i am searching for

to give you a better understanding the script is for my matrixcode
the problem is that same “matrixcodestrings” overlap :frowning:


#547

Here ist the max file

Matriccode Maxfile


#548

Rens Heeren, I want to see if you can duplicate what I did without just me telling you. :cool: It’s fairly easy to set up. :thumbsup: If you can’t figure it out then i’ll post how I did it.


#549

Ah, another challenge :slight_smile:

Ok, I’ll try to replicate it, I may have some ideas as how you did it.

I’ll post as soon as I have some results worth showing.


#550

NODEN:
To render helix or spline as a shape instance, you must convert it to poly or add a Editmesh modifier.
“renderable” spline option isn’t understandable by PF

I hope that helps

Post pictures or animation of your works !!
I m interrested about MR DOF with PF

good luck

Loran


#551

TREED:
your rain blobmesh (is it?) looks pretty cool !!
this is nearly perfect!
could u tell us more about your settings??
thx

treed tests:
[http://www.queensoul.com/~tylerreed/pflow_rain.mov]
[http://www.queensoul.com/~tylerreed/pflow_rain_final1.mov]
[http://www.queensoul.com/~tylerreed/pflow_rain_final2.mov]


#552

Sure, well basically the whole thing is put together using spawns, collisions, and speed by surfaces. The really big problem on the first and second pflow rain was that it looked like worms crawling over the surface of the sphere and not actual water droplets. I fixed that in the latest animation by tweaking the collision spawn and other spawns in the flow. It was a good learning experience and can be applied to many cool effects such as water running down a window surface or something similar. I wasen’t able to render out all the frames on the pflow_rain_final2 because it was going at about 58min a frame so I stopped it and it turned out pretty good. And yes, the blobmesh is a memory hog. Thats why you never display it in the viewport while working. But it does have really good results when its set up right. :slight_smile:

Heres a picture of the pflow tree.

pflow tree

Again, thanks Allan for your method or this wouldn’t be possible, thanks M8. :cool:


#553

treed:

Ok, this is a very simple setup I just made, see the attachment.

Is this close to what you did?

The spawn test has a per second rate of 80 and a speed inheritance of 25%.


#554

attachment…


#555

Your almost there dude. :slight_smile: I opened up my scene and tried it with your settings and its very very close. I just have different settings in the spawn test. I’m not going to post my settings just yet, I want to see a preview animation before I’ll do that.


#556

Ok, will do :slight_smile:

But how do I apply a motion blur to PFlow particles? Because I can’t seem to get it. Just with scanline for this one.

-Oh, you’re using ‘By Travel Distance’ then to keep a more constant string of particles?


#557

To apply mblur to particles, right click the event and go to properties. Then you’ll see the motion blur option box at the bottom right. Yup, by travel distance is what I’m using and it does get a more defined stringy look than by rate.


#558

Just messing around ^.^

http://homepage.ntlworld.com/aurorae/Find%20target.avi

treed, the rain stuff is really nice, any chance at having a look at the scene file?

Tried to make something similar in max 5, but w/o blobmesh it looks very ‘solid’ and bouncy. Ah well :hmm:


#559

@ Aurorae : Try making the blobmesh 0.5 in tension, and make the “Evaluation Coarseness” low for the render. Turn on “Large Data Optimization” and if you have a fast computer - you can even add a “Relax” modifyer to the blobmesh for it to be more complex.

That blobmesh setting will give you something looking like this


#560

I made a short animation with the stringy particles.

I had another setup with an extra wind force for more turbulence and variation, but that file kept crashing :shrug:

movie (DivX, 600 KB)

It looks a bit boring now, but I’ll try to tweak it this evening.