Neighbors with PhysX
#1
Still can't get my head around groups, neighbors, export (A,B,C...).. etc 

Simple problem and question: 
There is a brick wall being squashed by a series of metal balls shooting. 

It's all working, and I did it really simply with 2 events, (one is brickwall, the other shoots balls), and both, of course, contains PhySX shape. 

Now, I want to control it a little better. I want brick wall to be static (PhysX kinematic), and when ball approaches (for example 30cm from the brickwall), to send closest bricks to the next event, where I will turn them dynamic. 
That way, I could have huge control on parts of the brick wall affected by the distance of approaching wall. 

So far, I solved this with PhysX Collision modifier (inter-particle collision), but don't really like it, because I want to make some bricks active, before ball collides with them (I want to give PhysX a little bit time to react, and not worry on substeps, and I want to manually control area of ball influence). 

I've tried with property test, and neighbots, then adding group 1 to ball particles. 
I've managed to make it work - but without PhysX. 
First thing I noticed when adding a group, is that iz start to ignore (defaul) floor collision. 
Then I added floor plane... so I made... Ball - group 1, BrickWall - group 02, Floor plane - group 03. 
I turned in all PhysX shape all 3 groups - It won't react. 

I am sure I am missing something really simple.
  Reply
#2
Particles will only collide with things that match their own groups. If you set a group on a particle, you must also set that same group on the default ground in the tyFlow PhysX settings.

The particles don't need identical groups, they just need to overlap. For example...a particle with group 1 and 3 set, will collide with a particle with 3 and 5 set, but not with a ground plane set to group 2.
  Reply
#3
Thanks Ty. 

First of all... here's  what I don't get... Why PhysX cares at all which particle group is what, if that option is disabled? 
I understand if I enable it in PhysX... but it's disabled by default, and yet, it react. 

Second... I (think) I did overlapping, but it won't work with "property test" modifier. 
Let me repeat: 
Ball - group 01
Brick Wall - Group 02
Plane ground - Group 03

All 3 events have PhysX shape operators, and in all I enable groups, and check all (1,2 and 3). 

If that's not overlapping, I don't know what is overlapping Smile
Everything overlaps with everything  Smile

But anyway.. I repeat... I managed to make PhysX works with group... I managed to make "property test" with groups... 
But can't manage to make both PhysX and property test working together. 

I can quickly create file, if needed. 

Cheers!

Ok, I created a file, that should very clearly shows what I want. 

Tyflow 01 (dissabled) is exactly what I want to do 
Tyflow 02 (enabled) is what I am trying to do. 

I colored bricks red, so it's more clear when I want them to turn into PhysX dynamics and correspond with the balls. 
-------------

Someone might ask why I want this if flow 01 already works? 
The answer is, in much more complex sims, this would be great way to control where I want to brake. 
And I need to learn this way for many more situations. 

Cheers and thanks. Smile


Attached Files
.max   Neighbors_PhysX_prob.max (Size: 760 KB / Downloads: 13)
  Reply
#4
This is what I wondered as well, isn't there a object/surface ( with a falloff) test for the bullets/balls, so we can control the impact/ pre impact more?

I sort of did what you did without the groups, but with binding the wall pieces and test for accelaration to go to next event ( purple ).... I discover that that worked somewhat with an older version of Tyflow, where "sleep" and "awake" were still enabled.
   
Anyway still trying to wrap my head around the particle groups..
  Reply
#5
Ok, here is a dumb solution, but it works.  Smile

I just created another flow with exact shooting event, and I added mesh operator, disabled the "render only" switch, and basically, now it can be treated just like any other normal animated mesh. 
Then I just used "surface" test in previous flow, and I selected my new flow, to drive them to another event. 

Just what I wanted. Smile


Attached Files
.max   Neighbors_PhysX_prob_solved.max (Size: 780 KB / Downloads: 8)
  Reply
#6
Nice one ! Sounds good !

Cheers
  Reply
#7
(02-01-2020, 11:56 AM)d4rk3lf Wrote: Ok, here is a dumb solution, but it works.  Smile

I just created another flow with exact shooting event, and I added mesh operator, disabled the "render only" switch, and basically, now it can be treated just like any other normal animated mesh. 
Then I just used "surface" test in previous flow, and I selected my new flow, to drive them to another event. 

Just what I wanted. Smile

Thank you
  Reply
#8
Overlapping should be like this:


A= groups 1+2
B= groups 1+3
C= groups 1+4

So now they all can react with physx to other by overlapping group 1, but you can all test them separately with their uniquie group (2,3+4) through property/neighbour test. 

thats how it works for me.
  Reply


Forum Jump: