+ All Categories
Home > Documents > Cracking algoritm By Christopher Stenström All credits to Andrew Lowndes for algorithm,code and...

Cracking algoritm By Christopher Stenström All credits to Andrew Lowndes for algorithm,code and...

Date post: 21-Dec-2015
Category:
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
18
Cracking algoritm By Christopher Stenström All credits to Andrew Lowndes for algorithm,code and images.
Transcript

Cracking algoritm

By Christopher Stenström

All credits to Andrew Lowndesfor algorithm,code and images.

Concept

This presentation will go through a way to create realistic cracking explosions in real time.

This is a work made by Andrew Lowndes, 2009 and I will show a algorithm and pseudo code for some of the steps in the algorithm. 

Real world

When an object is put under stress it will eventually break.  Fractures only occur when the stress on the material is larger then the energy present at a point in the materials, usually at points where there are flaws in the material

There exist different types of fracture, which is determined by the material. The two main classifications are: ductile materials, like metals and brittle materials such as glass.

  

Real life Image.

. Many small fragment appears at impact, the algorithm try totake care of this by letting the voxels stay on the screen as small individual pieces. Also flaws in the material are evenly distributed throughout the object

Overview of the algorithm

 

Overview 

 

Model. Volym baised, Voxel

This algorithm uses a Volume Based model, called Voxel Model.

Voxels are "3D pixels", they are used to replace the polygonal model to render an image.

They  store the colour information.

Voxel a line

 As Voxel work on Integer scale, similarly to pixels, Bresenham's algorithm is a suitable starting point. The modification from Bresenham's algorithm is the change of increment per step.

In the new algorithm, a gradient step is used as an increment and a test to see whether the height of the line at the next right edge is checked to determine whether  or not the y steps. If the y does step, then we know a shift from one Voxel to the other has been made in the y axis, so the Voxel is shaded.

Voxel a line

 

Voxel Surface One important thing to not here is that other methods created hole in the polygons(more on this later) so this "brute force" was the only solution that worked.

Trimming

There is a trimming step, this is done so that the fracturing will be easier executed. This is done by representing entire polygons as a series of trimmed polygons, which will all be connected by adjacent voxels.  

Trimming

One method per axis is used, here is the pseudo code  for the x axis.

Ray intersection

This algorithm uses a ray intersection to calculate the impact point. This based on using a mouse click to show the crack(see in movie later)

Fracture, Noise

To determine the path through voxels, this algorithm uses Noise. Created by Perlin, 1985 a noisy texture function is applied to  generate a "flaw map", this flaw map could be made manually by an artist.This will cause the fracture to show up seemingly random in uniform, which will make it appear more realsitic

Re-mesh

Re-meshing is made to cover the "inner" parts of an object. Other wise a problem can occur when cracking a hollow object, object such as cans,  cups etc are usually modeled as enclosed object but are in actually hollow.

There is two common Re-mesh methods, here "Flat filling" is used the other one is called "Marching cubes".

Flat filling.

In flat filling the process is to sweep the faces of fractured Voxel, completing any faces that are incomplete withing the Voxel. It matches two voxels and creates an edge between them, if their vertices's are not already connectedWhen each face have been swept. the result is a surface that can be added to the resulting object and the broken piece

Result

Before I talked about that apparently only the "brute force" method work in surface voxels here we see why.

Movie time.


Recommended