Newton Destruction Feature

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Newton Destruction Feature

Postby Julio Jerez » Sun Jan 12, 2014 10:10 pm

Joe, I opened a new topic for this.

Now I added the function that doe a plane Clip, for quick demonstration I simple delete the cell above the cut.
I checked in the demo so that you can see how it looks.

Imagine a complex structure like column of a building hi at some point and brake in tow pieces.
There are still mode thong to do, leik uptime the code,
also make so that the clip id no an infinite plane by a convex polygon, this is important because essay you have a boiling supported by four column
if on column is broken by a hit, and infinite plane cut will cut all four column and the while building will collapse.

a plane cut bounded by a convex polygon will capture only that column, and the other column will have to be broken for the structure to fall.

after I do that, I will also add the union function, this is a function for making complex structure by part.

day for example you have a building with columns and ceiling and other pieces.

you can select the columns one at a time or just one and use as instance, the ceiling and so on.
the you can put together the entire structure by combining the separate parts.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton Destruction Feature

Postby JoeJ » Mon Jan 13, 2014 8:00 am

Julio Jerez wrote:a plane cut bounded by a convex polygon will capture only that column, and the other column will have to be broken for the structure to fall.


Some additional ideas about that:
Optionally use sphere / ellipsoid as bounding volume for the slice plane. That means feature is easier to use and should be accurate enough mostly.
Or use sphere alone without plane: At sphere center probability to erase a cell is higher, et the edge probability is low.
Or use 3D texture cube with bit texels: If a set bit intersects a cell, cell will be deleted.
... anyway maybe you can create an interface so that users can do stuff like that themselves :)

Worries i have:
Maybe there should be some kind of callback that gives information about stuff like:
"Some Cells have been deleted here and there", so user can generate particles and update hidden surface removal data...
I use a coarse polygon approx. for HSR. If a wall get's destroyed, i'd like to be able to link that physics wall to my HSR polygon so i can remove it.
Also i'd like to have a list of broken pieces, so i can delete them when they become too much.



There is this great game based a lot on destruction, if you don't know: http://www.youtube.com/watch?v=Gau64RmevJs
You cut the world i pieces and place them so you can reach a higher position, etc.
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Newton Destruction Feature

Postby Julio Jerez » Mon Jan 13, 2014 9:48 am

yes I will also add a volume carving with some primitive type.

the feature has tree backs.
Code: Select all
void (*NewtonFractureCompoundCollisionOnEmitCompoundFractured) (NewtonBody* const fracturedBody);
void (*NewtonFractureCompoundCollisionOnEmitChunk) (NewtonBody* const chunkBody, NewtonFracturedCompoundMeshPart* const fracturexChunkMesh, const NewtonCollision* const fracturedCompountCollision);
void (*NewtonFractureCompoundCollisionReconstructMainMeshCallBack) (NewtonBody* const body, NewtonFracturedCompoundMeshPart* const mainMesh, const NewtonCollision* const fracturedCompountCollision);


these are called when chunk or other compound are emitter, and the third one what the mesh is changed so that the application reconstruct the visual mesh
the cleint application can use any of those to emit particle or any graphical or sound effect.

I want to state away form shaders instead I am providing the information so that the application build the graphics anyway the want.
The feature has all king of interphase,
I think that the next thing will be to put it in the editor so that I can be authored.

On that Game, I believe that is similar to how I made the destruction the fist time in core 2.xx, which was but planes cut only.
this is cool, but is too stylized.
I may bring that feature for 2.00 again, it doe not heard, to have it


Now I added the demo when the mesh if cut along one plane, this is just a test, I can see that some time the tow piece can get I\entangle, I may nee to validate If the two half has at least one degree of freedom to move freely.
if you sync you can just play the executable to check it out
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton Destruction Feature

Postby Bird » Tue Jan 14, 2014 12:57 pm

Excellent! I'm really excited to see that you're making some good progress on this part of the engine again!

I don't have time at the moment to study the demos, but I'm wondering if you will you be able to support destruction of parts from a compound collision body? I want to break some cows ... will that possible?

-Bird
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Newton Destruction Feature

Postby Julio Jerez » Tue Jan 14, 2014 1:24 pm

yes the destruction is based on compound, for breaking a cow that will rewires some authoring , by for you I do no think that will be a problem.
I still need to complex some features to get to that point.
basically that nee the union of tow destructions, but that's is easy to do when the components are all solids.

for now it will be nice if you start by testing the simple functionality. that was I can get some feedback.

my objective is to be able to destroy entire buildings and complex structures.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton Destruction Feature

Postby Bird » Thu Jan 16, 2014 12:31 am

for now it will be nice if you start by testing the simple functionality. that was I can get some feedback.


I tried some simple tests using the basic code from the SimpleConvexFracturing demo.

http://hurleyworks.com/media/flash/AP_Fracture_Test/AP_Fracture_Test.html

In this test, I have set the number of internal points for the call to NewtonMeshCreateVoronoiConvexDecomposition to 250 but there's only around 120 pieces actually generated. I assume that's because you're populating the whole bounding box with points and so some of the cells generated won't actually intersect the mesh being fractured. Is that correct?

Any chance you have the time to make a VS 2010 Express solution for the Model Editor so I can compile it. I had some crashes with different meshes and I'd like to import the OFF files into the viewer to see if they work there.

Thanks!
-Bird
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Newton Destruction Feature

Postby Julio Jerez » Thu Jan 16, 2014 3:53 am

Bird wrote:I assume that's because you're populating the whole bounding box with points and so some of the cells generated won't actually intersect the mesh being fractured. Is that correct?

yes this is correct, also if point a too closed together the are filter out, because they generate too tine convex that more problems than the worth, I believe the values is 1.e-3 of a unit.

The point cloud is passes it a parameter, you can do interesting arrangement, for example if you make a grid plane and you apply a vertical displacement (like a high map) and you place a the center of the bounding Box, you get
something that looks like a would splinter, if you made a smooth high field and you place outside of the mesh then you can make a think layer of plate.

Bird wrote:Any chance you have the time to make a VS 2010 Express solution for the Model Editor so I can compile it. I had some crashes with different meshes and I'd like to import the OFF files into the viewer to see if they work there.

I see if I can make a solution this weekend. Is the problem that Visual studio express does not handle subfolders?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton Destruction Feature

Postby Bird » Thu Jan 16, 2014 6:57 am

I see if I can make a solution this weekend. Is the problem that Visual studio express does not handle subfolders

Nevermind, You've got better things to do and I finally figured out how to do it myself. :)

-Bird
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron