I was messing around trying to make some kind of foam with Blender’s particles, and it came out better than I expected so I thougth I’d post it here. :o
(Rendered with Luxrender with each particle rendered as a semi-translucent sphere.)
There are two particle systems here - one visible and one invisible. The invisible one is about 50 large (about 10% the size of the cube) particles all repelling each other with a “charge” force field. I just let them bounce around inside a cube, and added quite a lot of damping so they move slowly and find an equilibrium position. At the same time, I added thousands of tiny particles in a separate system. These don’t interact with each other (there are too many and the calculation would take forever) but they feel the force of the big particles. They too have high damping, and I gave them a lifetime so they would die at around the time the big particles had settled down and stopped moving. I selected the button to render dead particles, so you still see them but they just stop moving.
The idea of all this is to have the invisible large particles pushing the small particles away from certain positions, making hollows and indentations in the particle distribution so that it isn’t too uniform. If you look at the head of a glass of beer, sometimes you get large bubbles which push away the smaller bubbles. When the large bubbles burst, you’re left with a foam of small bubbles with indentations in where the large ones used to be. This ended up looking more like foam rubber than beer, but the idea is the same.
A nerf-borg! If it is beer foam it is definitely not Guinness (an emperical study may be required, however.) This reminds me of some kind of synthetic foam padding. It is not woven enough to be fiberglass insulation. Very interesting.
This technique could very easily be used for landscape hedges (pittosporum).
I’d also love to know how you did it; I have been experimenting with simulating different kinds of foam using particles, but I haven’t had very good results yet.
Rice crispie squares, perhaps? Same basic setup, but bigger particles and different settings for the children.
I might make a tutorial on how to do it sometime But it’s really all about having loads of small visible particles emitted from a volume, and a few invisible particles to stir them up a bit (by adding fields to the particle system). Then you let it go, wait for all the particles to stop moving and render…
The kind of shape you get at the end depends on a lot of things - the strength and type of the fields, whether or not you have any gravity, whether the invisible particles are allowed to move or “self-effect” with their forces, how long you allow the simulation to run… I find it helps to have quite a lot of damping and drag on any moving particles so that they settle down instead of bouncing around forever.
My settings for the “rice crispies” are below. For the first picture, the settings for “big bubbles” (the ivisible particles) were the same, and the “small bubbles” were the same except that there were many more of them, they were smaller and the child radius was smaller (and the children were also smaller).
So much for the simulation. Apart from that, you can change the texture of the object by the size and random size variation of the particles, and whether you have any child particles and if so their sizes and shapes etc etc…
Oh, I forgot - to make sense of the size settings and field strengths you need to know that the size of the cube containing the particles was the size of the default cube, 2x2x2 units.