View Full Version : droping particle to vertex 1by1
anggahenggara 07-30-2009, 06:02 AM Dear forum
I want to drop particle to a plane's vertex 1 by 1
Iam able to drop particle to vertex but just drop randomly
what I want is like particle drop in queue by it's ID.
so how to do that????
|
|
3DMadness
07-30-2009, 02:46 PM
You'll need two flows and two scripts: one birth script, to place one particle at each vertex for one flow. Another flow with a find target using motion vector script to make it go to the right place.
I've done it for some jobs with the scripts posted here, I used a similar one that anselm once posted: http://forums.cgsociety.org/showpost.php?p=5933085&postcount=10
anggahenggara
07-30-2009, 04:42 PM
thx for your answer 3Dmadness
but all I want is droping particle 1 by 1 not randomly
for example particleID #1 drop frist then particleID #2 drop second then particleID #3 drop third and so on
here my video preview
http://www.youtube.com/watch?v=uT1TGWeZFd8
here my pic
http://img29.imagefra.me/img/img29/2/7/30/free_dood/f_v41m_d5505a0.jpg
3DMadness
07-30-2009, 08:06 PM
I bet you can use a script test to send the particles one by one based on the index to the other event with the find target, but I'm no scripter so you'll have to wait and see if someone comes with a script that does it.
But you can try with another flow as I said, and make the particles birth one by frame using the find target, so as they birth they will go to the other position.
anggahenggara
08-18-2009, 08:29 AM
hey fellas...i waiting answer from you...
i'm in tight deadline....please anyone answer immediatelly
thankss....
JohnnyRandom
08-18-2009, 03:41 PM
Try the posted scene.
It uses the vector channel to store original position data.
Basically goes like this:
1 Birth your particles on your target object, adjust the time as you wish
2 store the position data in the vector channel
3 send out to new event
4 position your particles on your emission object
5 find target by time (you can use speed too, if you like) grab the position data by using the Target->Point->Use Script Vector in the find target parameters
6 link to new event to stop particle speed and spin
7 go to rotation to match world coords.
EDIT: I made an adjustment to the birth timing so see what it does more clearly.
anggahenggara
08-19-2009, 09:16 AM
thx for your answer JohnnyRandom
but its still drop randomly
here my attachment file
look at my particleID when they drop at plane..
i want it to drop sequence for 1 until 42 at vertex plane
JohnnyRandom
08-19-2009, 05:51 PM
You need to pay more attention to your Particle Age! :)
In order for them to drop 1 by 1 by time you need to create a difference in the particle age, particle ID 1 needs and age of 0, particleID 2 needs an age of 1, ect. You have birthed all of your particles at the same time without assigning them a different age value, how can you get them to proceed in order of time without having a base time to work with?
You also need to directly assign the ParticleIDs to the corresponding vertices on the target object. So ParticleID 1 will equal target object vertex 1.
Your script operator is dividing the ParticleID by the total amount of verts on the object the assigning the remainder to the particle ID. You could simplify it and assign the ParticleID directly to the mesh object corresponding vertex.
Something like this:
on Proceed pCont do
(
count = pCont.NumParticles()
theMesh = snapshotAsMesh $Plane01
for i in 1 to count do
(
pCont.particleID = i
pCont.particleVector = getVert theMesh i
)
delete theMesh
)
This assigns the particle with an ID of 1 to Plane01 vertex number 1, ID 2 to vertex 2, and so on.
You should control your Find Target with Time, it is more logical from the stand point of making one thing happen after another. In your case particle 1 does something before particle 2. Right?
The attached is how I would do what you are doing with standard operators.
Hope that helps :)
anggahenggara
08-20-2009, 10:09 AM
thats great, the ending is exactly what i want :)
but the problem is at frame 0 i want particle on the vertices of the sphere (just like in my file attachment above)
i have try to modify your file, john.
but i still cannot get what i want :(
JohnnyRandom
08-20-2009, 04:19 PM
Seems I am doing this all for you :D
Unless you are going to alter your particle ages by script, your first "render" frame would be frame 30, when all of your particles have been born and have a proper age value that you can use with the rest of the flow. Something to take into consideration when creating other particle-based projects, not everything has to render from frame 0. ;)
In the file I posted -
Event 01 add:
1. A speed operator set to icon center out with a speed value of 0.01
2. Below that a rotation operator set to Speed Space Follow
Event 03 add:
1. A rotation operator set to Speed Space Follow below the force operator
If you want the particle rotation to align to the target object normals use the part of Bobo's birth script you posted earlier and add it to a script operator in the final event.
Next:
buy John an ice-cold Coca-Cola ;) :D
anggahenggara
08-24-2009, 04:50 PM
hi JohnnyRandom..
thanks for your help, finally it solved..
again, many thanks...
cheers
CGTalk Moderation
08-24-2009, 04:50 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.