Bodies not detecting collision with my player

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Bodies not detecting collision with my player

Postby Julio Jerez » Tue Jan 03, 2017 1:03 am

Ok guys I just committed the first working demo that show that the technology is actually going to work.
I am very please with the result I am seeing so far :mrgreen: :mrgreen:

Now I only have one thong left on the graphics are to do.
and the is the loop that recalculate the vertex normal.

I can go tow routs on that,
1-do a least square optimization to extract the normals from the original shape normals, this is another time consuming task but is will be the most elegant because the rendering code will only interpolate vertex and normal from the soft mesh. However this requires lots of work, first I have to write the least square optimization code and second I need to save the normals with the collision shape. The second part is the one I do not really want to do because I do not want to mix physics with graphic data at least I want to keep that to a bear minimum.

2-no keeping normal at all and have the rendering code do the calculation after the vertices are skinned. With the compute shaders this is not a problem at all so I will go with this method because of its simplicity. Also this method is generalized other shapes for example cloth, and later fluids.

anyway if you guys test it let me know what you think so far.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Bodies not detecting collision with my player

Postby JoeJ » Tue Jan 03, 2017 3:34 am

That skinning looks very good.
How do you do it, using 3D version of barycentric coords?
Each mesh vertex is affected only by the single tetra it is inside, right?

I'd go for the second option.
And if you do the first make it optional so we can disable it if we don't use it.

Thinking of the low resolution tetras on CPU usecase, i may go a different route:
Calculate a matrix from surfacing tetras and do regular skinning with that.

Advantage would be almost continuous bending even the tetra resolution is low (let me know if you already have this with your method),
vertices can be outside the volume,
need to upload only surface tetra vertices.

Disadvantage is the matrices end up non-orthonormal und with non uniform scale, so probably i need to have to store unique mesh verticex data for each affecting bone, so approx 4 times the memory.


Really a great feature! :mrgreen:
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Bodies not detecting collision with my player

Postby Julio Jerez » Tue Jan 03, 2017 7:26 am

ok I added the code to do the normal.

is seems to be fine, the reason I like this method is because graphic programmers are use to do this all the time when they render procedural geometry.

this can be done with a compute shader that process the geometry before retendering. it could also be done in a geometry shader by save the mesh on the appropriate format with adjacency.

we can focus on the later, now that I have working framework, I will test few shapes to test robustness and reliability before moving to complete the missing derivatives in the solver and finally collision.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Bodies not detecting collision with my player

Postby Julio Jerez » Thu Jan 05, 2017 8:00 pm

Ok guy not I added, the first pass at the cloth solver.

the sample is a cloth path of 16 x 16 nodes.
256 points and 900 links.

the is a very crude demo, only collision with a ground floor, and the solver still missed some of the derivative, but it give a glints at how it will behave. you can see that the cloth pact act as if it was a real carpet with very lithe stretching even without any tuning whatsoever.

performance is negligible we can probably do several dozen in a single core. so we have plenty of heard room for more functionality.

an Sweeney, you ask if we will be able to implement hard malleable metal sheets, here is you answer. :D

my next tow steps are:
1-complete the solver derivatives, this will make it possible to be even stiffer.
2-self collision seem imperative.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 11 guests

cron