Is this a BUG or just not possible?
#1
Is this a BUG or I don't know how to use it, but it should be a very simple task:

1. boxes are in perfect alignment (3x3)
2. boxes falls down (PhysX)
3. boxes are back in perfect alignment (start position)

Ofcoruse the animation should play smoothly

Please help me with this one.

Thank you all! Smile



.max   Find_Target_Test2.max (Size: 704 KB / Downloads: 182)    
  Reply
#2
I think that this is a bug.

Everything works fine if I turn off or delete the PhysX.

The PhysX should be turned off with the PhysX Switch and it somehow still affects the simulation. So, for me this is a bug.

Yep, found it! Big Grin


Attached Files Thumbnail(s)
   
  Reply
#3
this setup works for me:

https://www.dropbox.com/s/81b3gaozpi3ic3...5.png?dl=0
  Reply
#4
(05-30-2019, 04:54 PM)joe_coke Wrote: this setup works for me:

https://www.dropbox.com/s/81b3gaozpi3ic3...5.png?dl=0

Can you please share your file?

Thanks a lot for testing! Smile
  Reply
#5
Hi Johncro,

The scale behavior you're seeing is not a bug. Your custom properties operator in Event_002 is before your Shape operator, and your Shape operator is what's defining the particle's scale. So that's why your particles shrink back down at the end...because the TM they have saved doesn't have the same scale that you later apply to the particles.

The alignment issue may be a bug...I'll have to look into it a bit more.
  Reply
#6
Here's my scene.


Attached Files
.max   return_to_postion_.max (Size: 800 KB / Downloads: 182)
  Reply
#7
(05-31-2019, 08:57 AM)joe_coke Wrote: Here's my scene.

Thanks but it's 2020... I'm in 2019... so can't open it...

Thanks anyway! [Image: smile.png]

(05-31-2019, 04:51 AM)tyFlow Wrote: Hi Johncro,

The scale behavior you're seeing is not a bug. Your custom properties operator in Event_002 is before your Shape operator, and your Shape operator is what's defining the particle's scale. So that's why your particles shrink back down at the end...because the TM they have saved doesn't have the same scale that you later apply to the particles.

The alignment issue may be a bug...I'll have to look into it a bit more.

Hi tyFlow Smile

thank you very much... and yes the problem is in the alignment...
  Reply
#8
So I looked into this closer and it turns out the alignment isn't a bug.

The problem is this:

PhysX introduces both linear and angular momentum to particles. Linear momentum is assigned as velocity, angular momentum is assigned as spin.

When you do your particle switch (deactivate), the particles are no longer processed by the PhysX engine, but the vel/spin attributes are not cleared (which is desirable in most cases). In your case, the residual PhysX velocity on the deactivated particles is quickly overtaken by the Find Target velocity changes. However, nothing changes the residual spin values, which is what is skewing your rotations (because spin is integrated at the end of the time step).

So basically your particles are inheriting some PhysX angular velocity (spin) and then that spin is being integrated into the final particle transforms at the end of the time step, after the particles are perfectly aligned to their Find Target location, resulting in the offsets.

Easy fix: just add a Stop operator to the Find Target event, and stop the spin values. Or add a slow operator and slow the spin magnitude to zero over time.
  Reply
#9
(06-03-2019, 05:00 AM)tyFlow Wrote: So I looked into this closer and it turns out the alignment isn't a bug.

The problem is this:

PhysX introduces both linear and angular momentum to particles. Linear momentum is assigned as velocity, angular momentum is assigned as spin.

When you do your particle switch (deactivate), the particles are no longer processed by the PhysX engine, but the vel/spin attributes are not cleared (which is desirable in most cases). In your case, the residual PhysX velocity on the deactivated particles is quickly overtaken by the Find Target velocity changes. However, nothing changes the residual spin values, which is what is skewing your rotations (because spin is integrated at the end of the time step).

So basically your particles are inheriting some PhysX angular velocity (spin) and then that spin is being integrated into the final particle transforms at the end of the time step, after the particles are perfectly aligned to their Find Target location, resulting in the offsets.

Easy fix: just add a Stop operator to the Find Target event, and stop the spin values. Or add a slow operator and slow the spin magnitude to zero over time.

Thank you so much tyFlow! That's very kind of you. Smile 

Well, now that you explained it, it makes sense. I'll try it your way and see if it works.

Thanks again!
  Reply
#10
It's working!!!

Here is the max scene if anybody needs...

Thank you all!

Smile


.max   Works.max (Size: 788 KB / Downloads: 178)
  Reply


Forum Jump: