2
$\begingroup$

I am new both with blender software and in the forum (btw I am spanish, sorry for my english)

I have to do a gas simulation for a science project with blender. I need to create a box, and create some "molecule" particles inside. Until here I don't have problems. But then I have to make the particles move all around the box:

  • moving in a linear way each one in a random direction.
  • colliding and bouncing with the box, without friction
  • colliding between them
  • in every collision, the consequent rotation.

I am trying as hard as I can, but I always have these major problems:

  1. gravity is messing everything up. Particles have to move randomly, and in linear way, gravity induces curvature in the movement, and that's critical at the first frames.
  2. I cannot make them collide both with the box and between them. Only one or the other...
  3. Also I am having some problems in lighting, even with few particles it is taking too much time to render.
  4. I made a sphere where the particles are emitted (in order to shoot them in all directions) but when I render, the sphere always appears, I set the material only with transparency.

Finally, if you want, I link you here a youtube video wich reflects what I want to do (but improving the video quality) https://www.youtube.com/watch?v=lzkOoSG8YKI

Thank you so much for your attention.

$\endgroup$
1
$\begingroup$

Final result

final

Sorry for the gif quality.

Overview

You can use Rigid Bodies simulation to achieve something similar. I'll write an overview of methods I've used. Ask if you need more steps.

Each bold text could be treated as a keyword for searching in Blender Manual.

I will use metric system for measurements.

You result may vary. Slight differences in models could bring some problems (or not) as "physics" in Blender isn't real physics.

Remember to Apply Scale for every object.

World

Turn off Gravity (or set it to 0).

Speed will control... Speed of animation.

Steps per second and Solver iterations will increase quality.

world

A box

Model:

Simple Cube 2x2m with Inverted Normals. I've assigned two materials to it. One for base color and one for front face (Transparent Shader).

Rigid Body:

Set Type to Passive and Shape to Mesh. Change margin to something around 5cm, this should help with keeping molecules inside the box. Friction to 0. We don't want any.

rigid

Molecules

Model:

Again, nothing fancy. Three Spheres joined together with assigned two materials. Size around 13x8x8cm. Duplicated couple of times. Duplicate it after setting Rigid Body values.

Rigid Body:

Similar to the box but. Type is Active, Margin 1mm or none, Mass 1g.

"Activator"

I've used Force Field > Force with keyframed Strength. At frame 1 Strength is -0.3 and at frame 10 it's 0.

Such setting allows us to pull molecules to the center of the box and after 10 frame Force Field is deactivated and molecules are living on their own. You can also try positive value to push molecules but this could bring some problems and molecules will be pushed outside the box.

$\endgroup$
  • $\begingroup$ Oh god, thank you so much. I was trying to do it by using particles what a mess... I will try this option later at home. Something like your gif is just what I want to make by my own. Again, thank you $\endgroup$ – Breaking Vlad Jul 19 '18 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.