brjig
02-12-2009, 08:30 PM
OKay
soo im having this problem and been trying to figure it out for the past couple days, but im stuck and nothing seems to work.
soo i have a vector number which is the worldPosition of a particle.
this particle is moving in the world
and what I did was that the shader is gonna take the worldPosition and base its color on the worldPosition.
now I have this script.
vector $pos = particel1.position
userVector1PP = <<$pos.x,$pos.y,$pos,z>>
now the problem is is that the particle is changing color every frame, because at every frame the particle changes in the world position
so i changed the script
missileSmokeShape.userVector1PP = <<(sin($pos.x)),(sin($pos.y)),(sin($pos.z))>>
thinking that the sin function, will smooth it out, but it didnt make a difference.
Now what I want to do is that so we have the particles world position, but instead I want it to take the position every # of frames and it smoothes it out.
example
frame 1 its at (1,1,1) and at frame 10 its (2,1,2) and at frame 20 its (3,2,2)
so it will take those numbers and get the average, then, it will take the average of the next 10 frames, and then smoothly change the numbers.
but it doesnt need to be every 10 frames, it can be a set number of frames specified.
Please
ive been trying to figure this out for a couple days, I checked the mel command, but all I got was the equivalent line, but that doesnt return a value, and the floatEq but that doesnt return a value either.
any and all help would be appreciated.
The thing is that with every frame the number changing, and in turn the color changing every frame, it doesnt look right.
soo im having this problem and been trying to figure it out for the past couple days, but im stuck and nothing seems to work.
soo i have a vector number which is the worldPosition of a particle.
this particle is moving in the world
and what I did was that the shader is gonna take the worldPosition and base its color on the worldPosition.
now I have this script.
vector $pos = particel1.position
userVector1PP = <<$pos.x,$pos.y,$pos,z>>
now the problem is is that the particle is changing color every frame, because at every frame the particle changes in the world position
so i changed the script
missileSmokeShape.userVector1PP = <<(sin($pos.x)),(sin($pos.y)),(sin($pos.z))>>
thinking that the sin function, will smooth it out, but it didnt make a difference.
Now what I want to do is that so we have the particles world position, but instead I want it to take the position every # of frames and it smoothes it out.
example
frame 1 its at (1,1,1) and at frame 10 its (2,1,2) and at frame 20 its (3,2,2)
so it will take those numbers and get the average, then, it will take the average of the next 10 frames, and then smoothly change the numbers.
but it doesnt need to be every 10 frames, it can be a set number of frames specified.
Please
ive been trying to figure this out for a couple days, I checked the mel command, but all I got was the equivalent line, but that doesnt return a value, and the floatEq but that doesnt return a value either.
any and all help would be appreciated.
The thing is that with every frame the number changing, and in turn the color changing every frame, it doesnt look right.
