View Full Version : What is the coordinate space that particles are using??
11-01-2007, 04:19 AM
sorry, this is a double post in the mel section, but I think this might be the appropriate section.
so I create a particle node using (particle -p x y z) and it places the particle on the point that I tell it to. Now if I go back and check the position or the worldPosition of that particle it is not the same position. its about 2.4times farther, but it seems like that number is always changing. What is this particle space? why does it not just reflect the worldspace like every other object? do I have something set incorrectly? Could someone shed some light?
I know I can reference the real worldPosition with the pointPosition command, but I want to attach these particles to transform nodes and I dont want to have to call that command in the expression editior for every particle in every frame.
11-01-2007, 02:44 PM
Is your particle's own transform node moving? Is it parented or constrained with something? Any scaling, rotation or shear applied?
11-01-2007, 08:26 PM
no, its in a brand new particle node. If I execute this mel:
vector $v = << 15, 23, 65 >> ;
particle -position ($v.x) ($v.y) ($v.z) -name "p" ;
emit -position ($v.x) ($v.y) ($v.z) -object "p" ;
it places the initial particle at 15, 23, 65 in world space but when I query its particle position it says 38.100, 58.420, 165.100. The emitted particle gets placed somewhere about 2.5times closer to the origin but its position says its at 15, 23, 65. So I have no idea what is going on.
The strange thing is, if I create a particle node, emit all the particles into the positions that I need them. Then scale the particle transform 2.540 in all directions, it places all the particles in the correct worldspace.
if I scale the transform, and then emit the particles, it emits them in the same wrong spots!!!
Ive already had someone say that they did not have the same problem and that it emitted both particles in the same position. If this is the case, then I must have some setting or preference converting units or something. If anyone knows what could be going on, your input would be awesome.
11-02-2007, 01:57 AM
alrighty, solved my own problem.
Turns out that the maya team developed the particle system to revolve around centemeters. If you set your units to anything but it, it requires the system to convert all units to centimeters. I had my setting on inches. I just turned it back to centemeters and everything worked just fine. Kinda lame, but whatever.
This could as well be that maybe you changed from one to the other if imported scene, or if initial setup was different.
If it's not too much hasle maybe you should try creating new scene with inches set up, and repeat creating particles and quering them. I think you should get the same result, so that values should be the same. If you can be bothered that is...
Thanks for the solution, it's one of those which can make one thing is gone mad :banghead:
11-05-2007, 05:19 PM
Oh yes... dynamics and measurement units. The eternal source of confusion...
From particles POV one maya unit equals to 1 meter. Since the default preference is centimeters it's like 1cm = 1m which is kinda <insert your own word here> ;)
I believe changing the preference only scales the values you see in channel box and attribute editor but not the actual values used in calculations...
11-05-2007, 05:19 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-2013, Jelsoft Enterprises Ltd.