3d forums home Resources for 3d artists

MAYA : moving a single particle

Posted: May 23, 2006
drop007
hi
does anyone have any ideas on how to move eg particleShape1.id[1] to eg 10 in Y?
Posted: May 23, 2006
Sid Conner
ctrl+a? Razz
Posted: May 23, 2006
drop007
no Razz
I want to just move the particle with id = 1 to the new position
Posted: May 23, 2006
Sid Conner
ah
heh
I don't know
think you have to move the emitter
Posted: May 23, 2006
drop007
then i move all the particles
Posted: May 23, 2006
Sid Conner
yes
Smile
couldn't you just select it and move it? Razz
from the outliner
Posted: May 23, 2006
drop007
nopp, cant move it in 3d space
I konw there is possible to do it using expression, I am just having a hard time moving just one.
Posted: May 24, 2006
Ted Town
maybe in the componentEditor
Posted: May 25, 2006
Shawn
h3ro: expressions is your friend =)
Posted: May 25, 2006
drop007
i know, but sometimes people you like hate you...just like expressions:P
Posted: May 25, 2006
Shawn
hmm
like... lemme se now
something like: if particleID = 1{set translation or offset}
as a per particle attribute
Posted: May 25, 2006
Ted Town
how many particles you have ?
Posted: May 25, 2006
drop007
a lot:P
Posted: May 25, 2006
Ted Town
and that one is bothering you ?
maybe you can just kill it
Posted: May 25, 2006
drop007
I have to sett the particle possition for ca 2000 particles Sad
I guess i can use the metod Shawn wrote in a loop?
Posted: May 25, 2006
Ted Town
so you want to move all particles ?
or only that one with ID == 1 ?
Posted: May 25, 2006
Shawn
thought you wanted to move those who was emitted from a certain emitter?
and that several emitters are connected to same partShape?
create several emitters and make em emitt same particleShape?
and then translate the emitters to the different vertexes?
Posted: May 25, 2006
drop007
ok, this is what i try to do: I have lot of particles which do need to have the same position as the vertexes of a object (particleID1 = vertex1 and so on), but I only want this relationship in X and Z, not Y
the particles are beeing puched around, so i am trying to fix their postion with using expressions
Posted: May 25, 2006
Ted Town
maybe you should make 2 particle systems, one fully goaled, and the other aligning the x and y to the particles of the goaled one, after dynamics
i mean one particlesystem fully goaled to the object
Posted: May 25, 2006
drop007
Ted, look like something in the way i need Smile
so, then particleShape1.pos = particleShape2.pos?
or will is still have to use if (id ==1) {stuff}
Posted: May 25, 2006
Ted Town
no unfortunatelly it is more complex than that
at least concerning getting and setting the position
unfortunatelly it has been a while since i needed such particle-expressions
Posted: May 25, 2006
drop007
thanks a lot anyway Smile
just one more question, how can I use the data from a Xform command in a expression?
Posted: May 25, 2006
Ted Town
have you checked the developer mel-area of the manual ?
there are mostly examples
Posted: May 26, 2006
drop007
yes, but there are no examples of how to use it in an expression
Posted: May 26, 2006
Ted Town
what are you interested in in particular ?
which flag ?
there are 2 help lines about xform, you just have to supply the right values for the flags
Posted: May 26, 2006
drop007
I was thinking of maybe using the ouput from vector $a = `xform -q -ws -t polyVertex[1]` in the pos of the particle. if id =1, pos = $a.x,1,$a.z
Posted: May 26, 2006
Ted Town
but the matrix stuff is more complex
try it, i dont know if that works, sounds feasible
Posted: May 26, 2006
drop007
it does not work
Posted: May 26, 2006
Ted Town
xform is only for the transformation node
not for shape-information
like vertex-positions, i checked
Posted: May 26, 2006
drop007
you can use it to get vertex pos
wait, that did work...
dont know what i have done wrong, last time i tryed it did not work. Just did it again in order to get the error message
Posted: May 26, 2006
Ted Town
hmm i only read its for the transformation Node and that node is only for the whole object not for components, but if you say so
Posted: May 26, 2006
drop007
vector $posVert = `xform -q -ws -t pPlane1.vtx[1]`;
just added it in a loop, works like a dream Smile
Posted: May 26, 2006
Shawn
dreams can very quickly turn into nightmares =(
Posted: July 23, 2006
Bugdishe
maybe... Smile
_________________
Bugdishe is here