Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Blender Simulations the Right Way

You're reading from   Learn Blender Simulations the Right Way Create attractive and realistic animations with Mantaflow, rigid and soft bodies, and Dynamic Paint

Arrow left icon
Product type Paperback
Published in Nov 2022
Publisher Packt
ISBN-13 9781803234151
Length 368 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Stephen Pearson Stephen Pearson
Author Profile Icon Stephen Pearson
Stephen Pearson
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Using Mantaflow for Fire, Smoke, and Fluids
2. Chapter 1: An Introduction to Mantaflow FREE CHAPTER 3. Chapter 2: Understanding Domains, Flows, and Effectors 4. Chapter 3: Creating a Realistic Campfire Simulation 5. Chapter 4: Creating a Waterfall Using Mantaflow 6. Chapter 5: Creating a Realistic Explosion 7. Part 2: Simulating Physics with Soft Bodies and Cloth
8. Chapter 6: Getting Started with Soft Bodies 9. Chapter 7: Creating a Soft Body Obstacle Course 10. Chapter 8: Introduction to Cloth Simulations 11. Chapter 9: Creating a Realistic Flag 12. Part 3: Diving into Rigid Bodies
13. Chapter 10: An Introduction to Rigid Bodies 14. Chapter 11: Creating a Rigid Body Physics Course 15. Part 4: Understanding Dynamic Paint in Blender
16. Chapter 12: Introduction to Dynamic Paint 17. Chapter 13: Creating a Paintbrush Effect 18. Chapter 14: Creating a Raindrop Effect 19. Index 20. Other Books You May Enjoy

Gas and liquid simulations

You’ve seen me throw around the terms gas, liquid, and fluid, but what are the differences? As mentioned previously, the term fluid is used to describe the entire simulation. Inside the simulation, there are two options to choose from:

  • Gas is the name Mantaflow uses for smoke and fire simulations
  • Liquid is just the name to describe fluid simulations

Let’s talk about each one separately so that you can understand the differences and how each one works.

Gas simulations

Gas simulations allow you to create smoke and fire in Blender. But what can you do with it? Well, you can combine fire and smoke to create a massive explosion. Other examples might include a flamethrower, campfire, steam, mist, or fog – there so are many things that you can create, and the possibilities are almost endless. The following figure shows what we will learn to create in Chapter 5, Creating a Realistic Explosion:

Figure 1.2 – Explosion example

Figure 1.2 – Explosion example

Smoke and fire simulations are made up of what we call voxels. You can think of a voxel as a 3D pixel of the simulation. The smaller the pixel, the better the simulation will look. You can change the size of these voxels by increasing the resolution of a simulation. Higher values will make the simulation more detailed, but that will also cause the simulation to run slower and take longer to bake:

Figure 1.3 – Example of a voxel

Figure 1.3 – Example of a voxel

In the preceding screenshot, the left simulation has a resolution of 8. This is quite small, so that is why the voxel is very large. The simulation on the right has a resolution of 64 and, as you can see, the voxel size is much smaller. You can also tell the size of the voxel by looking at the bottom-left corner of the domain object:

Figure 1.4 – Domain voxel size

Figure 1.4 – Domain voxel size

The domain is the container for the entire simulation. We will cover them in detail in the What you need to create a simulation section.

These voxels represent all the attributes of the simulations such as heat, density, temperature, and velocity, just to name a few.

What is an attribute?

An attribute is simply a term used to describe data that is being stored. You can take this data and use it to influence materials, modifiers, and more.

The smoke that gets created in the domain can be from either a mesh or a particle system. These objects that emit smoke are called flows. They are used to add or remove smoke from the domain. Using a particle system as the emitter, you can easily create an explosion, which we will learn about in Chapter 5, Creating a Realistic Explosion!

The movement of the smoke or fluid is controlled by the flow of air. The airflow can be controlled by the following properties:

  • The settings inside the Domain object, such as Density and Heat, which set how fast the smoke will rise.
  • Effectors, which are mesh objects that will collide with the smoke, restricting its movement.
  • Flow objects, which can affect how fast or slow the movement will be.
  • Force fields, which also offer a way to affect the movement of the smoke. Depending on which force field you add, you can give your simulation a much more dynamic and interesting look! For example, the Wind force field will give a constant force in the direction you point it in. This can be very useful for adding just a little bit of movement to the smoke and making it look a lot more interesting!

Now that we have covered gas simulations, let’s talk about liquid simulations.

Liquid simulations

Liquid simulations are very powerful, and there are many things you can do with them. Do you want to have a glass explode when it hits the ground, causing fluid to fly everywhere? What about creating a waterfall, waves, lava, or honey? All of this is possible with the liquid simulation:

Figure 1.5 – Waterfall example

Figure 1.5 – Waterfall example

These simulations are used to simulate the real physics and behavior of fluids. Unlike the gas simulation, if you increase the resolution of the fluid, it will add geometry to the scene:

Figure 1.6 – Fluid resolution example

Figure 1.6 – Fluid resolution example

In the preceding screenshot, the left-hand side has a resolution of 96; on the right, it’s set at 32. The left-hand side looks highly detailed with a lot of geometry, creating lots of splashes. However, the right-hand side has low detail, giving the look of low poly. Sometimes, a lower resolution might be what you are going for; it all depends on what you are trying to create.

The fluid can only be emitted into the domain using a mesh object such as a cube, sphere, or plane. Particle systems will not work for fluid simulations.

Increasing the resolution of fluid will drastically change the vertex count

The vertex count went from around 8,000 up to 200,000, just by increasing the resolution by 64. This will add to the total memory of the scene, making Blender run a bit slower. You can view the total memory of the scene by right-clicking on the Status Bar area at the bottom of the screen and selecting System Memory.

Both gas and liquid simulations are powerful, and they allow you to create so many different things very easily. Now that we’ve covered the differences between them, let’s get into what you need to create simulations!

You have been reading a chapter from
Learn Blender Simulations the Right Way
Published in: Nov 2022
Publisher: Packt
ISBN-13: 9781803234151
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image