FractureEffect mesh prerequisites.

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

FractureEffect mesh prerequisites.

Postby Crashy » Wed Apr 13, 2016 8:16 am

HI,

I'm playing around with FractureEffect, taken from the demos and ported into my engine.

I would like to know if there are some prerequisites to meshes being fractured, IE they need to be manifold, convex, etc..

Concavity doesn't seem to be a problem though, but I have some objects that raises some assertion in "dgMeshEffect::PlaneClip", at the line:

Code: Select all
dgEdge* const devideEdge = ConnectVertex (startEdge, end);
dgAssert (devideEdge);

For some objects ConnectVertex returns null.

However I cannot find what's the rule, as one of the problematic mesh is just a box...

It works fine with spheres, more complex models, another cube model I have but this one...no.

Thanks.
Crashy
 
Posts: 101
Joined: Fri Dec 03, 2010 6:30 am

Re: FractureEffect mesh prerequisites.

Postby Julio Jerez » Wed Apr 13, 2016 10:31 am

Ah perfect timing.

I am precisely working on a generalized fracture feature right now.

This method will handle concave, and it will be possible to do hollow thin objects, for example destruction of the plaster layers of a wall.
chunk swill also brake on composite chunks as opposed to now the they can only break in atomic pieces.
This will be the last feature to complete 3.14 and put a stable release.
if you are working on that they you can give me feedback and what you like to see.

at the moment I am on the general boolean operator that will replace all the special cases clipping function that I have now. I estimate I will have ready by the weekend.

regarding the questions
I would like to know if there are some prerequisites to meshes being fractured, IE they need to be manifold, convex, etc..

for fracture the only prerequisite Is that the form a close manifold surface. this is what is called STD mesh in some modeling packages, I know that 3ds Max, maya and autocad has it, you can apply a modifier that tell you if the mesh is STL and where the error are. It is easy to detect if the mesh has open edges, but to fix it has to be by a person.

Crashy wrote:HI,
For some objects ConnectVertex returns null.
However I cannot find what's the rule, as one of the problematic mesh is just a box...
It works fine with spheres, more complex models, another cube model I have but this one...no.
Thanks.


you may have found the one special case that my implementation of the Delany triangulation in height dimension fail to build.
Bassicaly if goes like this.

Say you want to build a concave hull 2d, you cam do that for any set of point that are not a straight line.
say you want to build a convex hull in 3d, you can do it for any say of point that does no form a flat plane.
say you want to build a convex hull in 4d, you can do that for any set of four dimension point that does no form a flat hyper plane, it is much harder to come of with a set of point that all form a hyper plane, but is just happen that a perfect box do form a hyper plane, basically is is the equivalent of a 4 dimension straight line.
to avoid that what I do is that I add some random point inside the box.

in the new implementation I will try to handle that king of special case. I do for normal 3d convex hulls, but is more difficult for 4d convex hulls.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: FractureEffect mesh prerequisites.

Postby Crashy » Wed Apr 13, 2016 10:44 am

Nice news !

Thanks for the explanations ! If I add some random displacement along my vertices to make faces less "planar", this could fix the issue, couldn't it ?

My needs aren't that complicated: break any kind of object into small parts, even convex only parts would be ok :)

chunk swill also brake on composite chunks as opposed to now the they can only break in atomic pieces.

What do you mean exactly ?

I'm looking forward your enhancements :) Hope this will fix my problem.

This let me some time to fix some material related stuff on my side :)
Crashy
 
Posts: 101
Joined: Fri Dec 03, 2010 6:30 am

Re: FractureEffect mesh prerequisites.

Postby JoeJ » Wed Apr 13, 2016 11:13 am

Julio Jerez wrote:if you are working on that they you can give me feedback and what you like to see.

I have a vision of how to use fracture for modeling terrain:

Make a very low polygon mesh of the landscape.
Add a lot of points inside the solid volume (the distribution of the points may follow some typical sedimentary patterns, dense points near surface, other ideas...)
Newton cuts the volume to voroni cels from the point set.
Shrink the voroni cels a bit so there is some space for movement between them.
Do simulation steps under gravity (some rocks will tumble down, also it would be possible to simulate plate tectonics with some big bodies doing compression).
Finally mark some smaller bodies at the surface as dynamic,
and merge the rest to a static polygon soup and optimize it.

I think this could generate beautiful rocks and terrain without much handwork :)
I hope Newton provides boolean operations on meshes too :D
I already have some mesh segmentation and remeshing stuff for render optimizations,
need to do this anyways for my realtime GI, and being still very busy with this i don't have time for testing, :(
but the idea my serva as some inspiration beyond realtime usecases.
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: FractureEffect mesh prerequisites.

Postby Julio Jerez » Wed Apr 13, 2016 1:28 pm

Crashy wrote:My needs aren't that complicated: break any kind of object into small parts, even convex only parts would be ok :)
chunks will also brake on composite chunks as opposed to now the they can only break in atomic pieces.

What do you mean exactly ?

Oh I believe you will use it when you see the new results.

Breaking as compound collection of convex is that right now there are two demos. one where you brake
simple compound and when the breaking force is reached, the entire structure disintegrates into its simple atomic component.
this is not bad but it can be and entry level destruction feature for bombs and stuff like that.
It still required lot of end user side support.

The second demo tries to break structure into large compound which are new structures, but this is not working well.

The new solution will unify bot demos. the structure will not brake break on impact.
Instead it will do a micro solve solution to calculate the contact when the force exceeded the breaking force and will replace the links for a sticky contact joint. Then let the solver determine if the joint should brake or not.

This will produce a more natural destruction.
Some housekeeping will check that joint that where no broken and turn them back to links after few frames. This will keep the code efficient

My goal is to be able to make very large destructible structures like buildings or bridges but also small structures with a single unified algorithm.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: FractureEffect mesh prerequisites.

Postby Crashy » Wed Apr 13, 2016 3:49 pm

Sounds cool and feature-rich :). I'm always fascinated by all the stuff included in Newton.

BTW, I didn't saw this at once:
for fracture the only prerequisite Is that the form a close manifold surface. this is what is called STD mesh in some modeling packages, I know that 3ds Max, maya and autocad has it, you can apply a modifier that tell you if the mesh is STL and where the error are. It is easy to detect if the mesh has open edges, but to fix it has to be by a person.

I used the STL check modifier to see the problems in my mesh, solved them and now the problematic object is not problematic anymore. Thanks a lot.
Crashy
 
Posts: 101
Joined: Fri Dec 03, 2010 6:30 am

Re: FractureEffect mesh prerequisites.

Postby Julio Jerez » Wed Apr 13, 2016 4:22 pm

when you get something, can you make a youtube video?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: FractureEffect mesh prerequisites.

Postby Crashy » Thu Apr 14, 2016 2:36 am

I'll try to do that. I must check that with my partner, I won't be able to show something from my project but at least create a sample for our engine.
Crashy
 
Posts: 101
Joined: Fri Dec 03, 2010 6:30 am

Re: FractureEffect mesh prerequisites.

Postby Julio Jerez » Thu Apr 14, 2016 2:23 pm

Oh do not worry about, you can post when you have anything to show.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron