Fractures...

Community Forums/Showcase/Fractures...

Nate the Great(Posted 2010) [#1]
I decided to make a fracture simulation. Its probably been done before. This is realtimeish (10 fps) and I think its pretty cool stuff. I was shocked by how realisticly the fractures spread. Unfortunately all collisions I have tried interfere with the fracture process so the balls that would normally be chunks of material flying around and colliding, simply fly through stuff.

Here are some screenshots, I'll post a downloadable demo as soon as I get some bugs ironed out and mess around with it a little more.

edit another video
http://www.youtube.com/watch?v=h-rnqCJa8Co








Mainsworthy(Posted 2010) [#2]
very unusual to see this, Looks realy effective.


WERDNA(Posted 2010) [#3]
Looks pretty cool!

Was this written in Blitz3D, or Blitzmax?


Nate the Great(Posted 2010) [#4]
thanks mainsworthy, what do you mean by unusual?

Thanks werdna!

its blitzmax btw


Mainsworthy(Posted 2010) [#5]
unusual because Ive never seen an app like this! you could do all sorts of stuff with it :)


Nate the Great(Posted 2010) [#6]
oh cool thanks, I wish I could put it into a game of some sort, that would be awesome but as of now it is way to slow.


Mainsworthy(Posted 2010) [#7]
can you go backwards?


Nate the Great(Posted 2010) [#8]
well no, I mean the constraints would have to magically reapear to go backwards. If by 'go backwards' you mean record it and go backwards, I guess thats possible.


WERDNA(Posted 2010) [#9]
You know I can see some sort of weird puzzle game being made using this.
Not sure how it would work, but it might be fun :)


slenkar(Posted 2010) [#10]
very good,

the pieces left over on the last image look like countries,

then i realized that countries are created from fractures!

This could be a good map creator.


Nate the Great(Posted 2010) [#11]
@werdna

yeah that would be interesting... I can have a physical model of different objects made of virtual glass, I drop it on the virtual ground, it shatters and you have to put it together... Loads of fun ;)

This could be a good map creator.


haha yeah they can act like continents and tectonic plates... that would be a twist for sure if there was a game where the continents were moving all the time changing the strategy of the game...


Nate the Great(Posted 2010) [#12]
ok heres a video... I actually found a bottle neck and fixing it sped it up so it runs at a full 60 fps with no recording software.

http://www.youtube.com/watch?v=3byrgHZNVTU


slenkar(Posted 2010) [#13]
dude, make the map creator (!) a lot of rpg entusiasts will pay for it


Nate the Great(Posted 2010) [#14]
haha ill get collisions working first but I can see the possibilities... instead of a loading screen it would say:

Your world is being created.

and have a bunch of little connected balls like above getting hit by an asteroid and smashed appart to form different islands every time... that might be a bit robust for map creation but it would be cool.


Noobody(Posted 2010) [#15]
It's more like cloth ripping right now; it touches the ground and stretches, when single rips go through the whole object.

It would be cooler if it touched the ground an instantly shattered into single pieces. I think you'd need a different approach for that, possibly a voronoi diagram constructed from randomly chosen points within the object, where edges of the diagram represent the 'cut' lines.


Nate the Great(Posted 2010) [#16]
I agree it is like cloth ripping in 3d but this is limited to 2d and it looks like cracks forming... A lot of objects stretch and bulge in slow motion while cracks or rips rip through them and spread in a tree shape if you could sense when it is going to break and simulate all of the breaking frames in one frame then I think it would look realistic but that may be a little furthur off in the future before that is practical.

on a side note I cant find any slow motion vids of cracks forming that arent animations


Noobody(Posted 2010) [#17]
but that may be a little furthur off in the future before that is practical.

Actually, there are a lot of simulations out there capable of that. It's just not the most efficient approach to model the entire internal structure of the object and simulate the connections breaking, as computational complexity largely depends on the size of the object and 'instant' fracturing is not possible.
It's sufficient to just model the surface and compute the split lines based on that, using, as I mentioned above, voronoi diagrams.

on a side note I cant find any slow motion vids of cracks forming that arent animations

Me neither. The only shattering related video I could find was this one.


Axel Wheeler(Posted 2010) [#18]
I'd call it a crystal, since the molecules are orderly and split along the resulting pathways. Presumably you could start with different patterns (hex, etc.) or a random one.?

Instead of falling toward the bottom of the screen, try leaving it where it is but adding random momentum and direction to each particle (say, on a certain keypress).

Seems to me this is essentially a verlet physics engine, but used for a different purpose.

Noobody:

Me neither. The only shattering related video I could find was this one.



Wow, that's some fine graphics! :)


Axel Wheeler(Posted 2010) [#19]
I'd call it a crystal, since the molecules are orderly and split along the resulting pathways. Presumably you could start with different patterns (hex, etc.) or a random one.?

Instead of falling toward the bottom of the screen, try leaving it where it is but adding random momentum and direction to each particle (say, on a certain keypress).

Seems to me this is essentially a verlet physics engine, but used for a different purpose.

Noobody:

Me neither. The only shattering related video I could find was this one.



Wow, that's some fine graphics! :)

As far as voronoi is concerned; that would be a "fake" shattering effect, unless the points are in some way determined by the impact. Even then it would be fake-ish I think. The way he has it the fractures are caused by nothing but the physics.


Nate the Great(Posted 2010) [#20]
ok theres another video up, this time with collisions and it looks more realistic too.

http://www.youtube.com/watch?v=h-rnqCJa8Co

edit: i should really have combined my two physics threads but they are on different topics... and I didnt forsee the second one when I resurected this one.


slenkar(Posted 2010) [#21]
yes it does seem more realistic


Noobody(Posted 2010) [#22]
As far as voronoi is concerned; that would be a "fake" shattering effect, unless the points are in some way determined by the impact. Even then it would be fake-ish I think. The way he has it the fractures are caused by nothing but the physics.

Yes, it would be fake - but still not much more fake than a verlet based approach. As long as you're not a NASA scientist putting centuries of effort and study into such an animation, it wouldn't be quite right to call your program physically accurate ;)
But that's entirely not the point here. In games (or real-time applications in general) it's more about whether it looks realistic. Nate's program certainly fulfills that aspect, but it might look better using voronoi diagrams, in my opinion. That's why I suggested them.

Voronoi diagrams are somewhat popular in "destruction" simulations for their ease of use. Someone on the german forums also used it in his Rigid Body based engine, where he set the split points somehow based on the geometrical features of the object (animation).

Wow, that's some fine graphics! :)

I think I heard they call it real life :) As far as I understood, he was looking for videos that weren't animations to have a reference.

@Nate: Cool new video! The simulation looks much better now.


Nate the Great(Posted 2010) [#23]
I have never heard of a voronoi diagram but ill look it up and see what I can do.


Axel Wheeler(Posted 2010) [#24]
Great vid!

Ideas:

- Breakout game

- 2D castle siege. You must knock down the castle walls to stop the archers on the walls. Or, castle v. castle (knock down theirs before they get yours)

- Coolest Asteroid clone ever!


slenkar(Posted 2010) [#25]
good ideas