Just Code it!

Soft Body Physics – Part 2

January 18th, 2012 | Posted by riccardotramma in CSharp | Maths | Physics - (0 Comments)

After the first version I worked on an alternative approach to obtain a Soft Body Simulation, starting from a custom model.
The idea behind is to simply have one model drawn in any of the available 3D modelling tools, export it and have it transformed automatically into a jelly object :).

Initially I spent some time writing the algorithm that have to import the model and filter it in order to obtain the malleable mesh we want to interact with.
This was initially representing only the skeleton of the figure. A secondary problem to solve was the ability to render it using the original textures intended to cover the object. This required some extra thought because of the needed filtering process that necessarily modifies the original model structure.

The result is quite satisfying and (being a fan of auto-generated features) it is quite impressing to been able to simple draw a model and see it moving without any other step :).

A sample, from original model to its animation, is the sequent (no, I am not a 3D modeller :P):




Soft Body Physics

January 12th, 2012 | Posted by riccardotramma in CSharp | Maths | Physics - (0 Comments)

It is quite a while that I am playing around with soft body physics.
It is quite interesting and fun and I have to admit that once you start playing with it, it is difficult to ignore it :).

In this page I inserted just few screen-shots related to one of the first algorithms I implemented. A most recent version of the algorithm has few things to share with this initial approach, but I will try to talk about it in future posts.
Despite this, I have to admit that the two main solutions I ended up implementing demonstrated to be equally valid and each one is preferable over the other, really depending on the context: Speed with simple geometries or slightly more complex (well… quite a bit actually) but very, very flexible (not only from a body elasticity point of view of course :P).

I will probably write few words about it in future posts, but for now these are just few images that show the body elastic deformation and fracturing at work :)

Some Real-Time deformation and fracturing at work: