Particle Flow Discussion


#881

I have a question that I asked over in the Maxscripts forum. I figured it’d probably be answered here quicker so i’ll quote…

Alright I have two questions.

First: I just need to know how to create a simple distance script operator for a PFlow system such that when Object A and Object B are a certain distance from each other, Object B will fire an event. For a literal example, i’m creating a totally Pflow-driven space battle scene and I want an Object B (black ship) to shoot once it’s close enough to an Object A (white ship)…

Secondly. How would I script a PFlow event that would create an omni-light and automatically keyframe some intensity settings based on a Spawn event. Literal example being: When a ship shoots and it’s missile detonates, I want it to create an Omni light that will light up and decrease in intensity as such with the intensity of the explosion so that I don’t have to manually create and keyframe omni-lights for every PFlow-created explosion…

Hope you guys understood that and can help… Cheers!:smiley:


#882

yeah should work the same, I mean ideally I’m just saying a lot of the effect you’re talking about is more a 2D thing than a 3D so build lots of 3d elements with lots of variation in colour (falloff or gradients work well) and then glows/defocus/blurs/multiplay/overlays realy allow you to get the desired effect you’re after.
you see a lot of this stuff in motion graphics and broadcast work.

cryptite.
okay kinda busy so can’t really test this… but you could build a script test which when it turns true, it tells a particle to go to the next event, then have a spawn and a “send to” event, so the particle loops back if you want, so it just triggers to spawn a particle or something (or by age).

anyway moving on. you’d want something like

objectA = $frendly_ship
objectB = $enemy_ship

then for the runtime expression:
count = pcont.numparticles()
for i in 1 to count do
(

if (distance objectA.position objectB.position) >= 5 then
(
scripttest = true
)
)

this isn’t actual values, I’m nowhere near max, but basically there’s only really one command in the script test (just load up the script and it’ll be right in front of you). but what it does is if it’s “true” then the particle will send out to the next event, which is how you trigger it based on distance.

and what the if statement is doing is just saying run the distance function and if it shoots back a value less than 5 (whatever distance you want) it’ll send that particle out to the next event, which will spawn a particle(s). get me? obviously friendlyship might need to be a particle and so you might use pcont.particleposition.

hope that helps, that’s just off the top of my head, but I did something similiar to that to test the bullet distance from an object at one stage…


#883

Thanks, that sounds good, but being the noob at Maxscript that I am, I don’t fully understand the syntax of this code yet so let me run this code by you and see if everything is as it should be… I’ve named the different PFlow sources Good and Bad.

on ChannelsUsed pCont do
(
pCont.useTime = true
pCont.usePosition = true
)

on Init pCont do
(

)

on Proceed pCont do
(
objectA = $Good
objectB = $Bad

–then for the runtime expression:
count = pcont.numparticles()
for i in 1 to count do
(

if (distance objectA.position objectB.position) >= 50 then
(
scripttest = true
)
)

)

on Release pCont do
(

)

How does that look…?


#884

For allan and the rest of the particle pro’s

here is a animation i just setup for show.
http://www.jamaicafarewell.com/download/cgtalk/constantest.mov

suppose i wanted a constant flow of particles to achieve something like this
http://www.jamaicafarewell.com/download/cgtalk/millclip.mov

how would i setup my flow??

here is another cool example

http://uvphactory.com/Portfolio/commercial/att-clev/att_clev.mov

??


#885

This effects could be done using compositing softwares like in this old example :
http://www.creativecow.net/articles/oneil_bill/vector_paint/index.html

but u can do similar in PF

Here is a quick test:
I use an instance shape plane, path follow, rotation speed follow, animated scale.
The Material :face map, opacity mask with gradiant ramps and animated noise

http://forumel.free.fr/PF/lightTail00-sor.mov


#886

yeah!:thumbsup: that’s it right there…can you send me your test max file so i can look over. From there on i should be good.

thankx again loran!:scream:


#887

First time I use PF… trying to make some grass…


#888

CHRiTTeR - that’s cool! Can you post the settings or a sample scene?


#889

No problem, its al basic stuff though… still needs work

The render wont look the same, coz I (quickly) changed the materials and rederer to default max ones so everyone can open it. The other one was using brazil.

Here’s the maxfile (R6)


#890

Got a question for allan and all the particle pro’s

Other than the material,
Does the particles -

-Amount
-Spawn
-Shape
-Display type

have anything to do with how the particles look?

how do you setup your flow to emit…say for example…a straight line of light…versus multiply lines

does your flow of particles have to be constant…to emit a solid object…

can someone explain


#891

Erm, I’m not sure what effect it is that your trying to acheive here Castelle, do you want to produce continuous lines of light?

CT


#892

No…not really being specific to particular effect…just want to know if its only the material you have to take into effect when create your particles.

and that answer maybe no. so what else do you take into consideration?

does the display type ,shape, speed, scale…that sort of thing have to do with the look?


#893

display type: How it looks in the viewport
shape: what ‘form’ the particles have
speed: how fast they move
scale: how big they are

Seem pretty straightforward to me :shrug:


#894

ok…lets say a line…for example…scorpio from mortal combat.

when he throws his harpoon or whatever you call it you have a rope that follows, say you were to use particles to emit the rope.

you have your material for your rope already. how would you setup the flow to emit…that rope??


#895

Do u want to have it interaction with other stuff? (swirls in the wind, wraps around objects and stuff).

This i’d like to know too :slight_smile:

Or just like in MK, u throw that thing and a straight rope folows, no more, no less?

Then I would make the ‘spear’ the emitter.
Shape: boxes
Speed: 0
Birthrate: just enough so the boxes seem to form 1 line. (a bit more, to be sure)
Rotation: direction of travel


#896

and if you apply the rope material to your material dynamics…u will have a rope right??


#897

Depends on your texture, but basicly yes…


#898

if i apply the same material to this effect that i did, will i get the same result??http://www.jamaicafarewell.com/download/cgtalk/constantest.mov

retorical-


#899

If u apply the ropematerial 2 those particles in your movie?

No, it wil result in peaces of rope being trown away by that stick.

To learn about realistic ropemovement and dynamics.

Press F1, press the index tab and search for rope :wink:


#900

so i guess the answer to my question is Yes i have to take the

shape
scale
birth
spawn

when creating certain materials…i was just trying to understand something
that is why i ask for a explanation.

I knew allen and some of those other guys could break it down pretty nicely.

but thanks:thumbsup: