Join Andy Needham for an in-depth discussion in this video Starting a fire, part of X-Particles for CINEMA 4D Essential Training.
- We've seen how to make liquids. Now let's look at using the Domain tag to turn scene objects into fluid emitters. And we'll build a cool fire sim. I played NBA Jam a lot growing up, so let's simulate that flaming basketball. There's a basketball in the content browser, such a handy resource. We just do Shift F8 to get that up and make sure you're searching within the presets. And if you just look for a basketball, you'll find one there. In the scene, we have the basketball with a Vibrate tag on, we're just going to give some motion to it.
And I'm going to right-click and choose an xpDomain tag. You can use the Domain tag to tell (mumbles) that it should use this object as a fluid emitter. From there, we can set boxer properties, such as Temperature, Fire, Pressure, Smoke, Fuel. And the tag can be added to an emitter object also, but we're not focusing on that. The Shape settings allow us to choose how the fluids will be emitted. Volume will use the whole of the object. Or you could use one of the Surface options.
So, we will use Surface Outwards. The Radius is the distance from the object surface or Volume over which to set the boxer properties. And we're going to add a load more fire, and some Pressure. In the Texture field, we're going to add a shader to modify the emission properties. By using a shader, we can essentially art direct where the emission takes place. Typically you'd use a noise shader, but we'll take the texture of the black stripes inverted and we'll do some other things as well.
So let's grab what we need. It's already in the bitmaps here so, I think using this one. And I'm just going to move that into a filter, and go into the settings. We just scroll down to Gradiation Curves. I can right-click and flip that, and just add a bit of Contrast. So I only really wanted to emit from this white section.
We can make this a bit more complex. We'll add it into a Layer shader. We'll add some Noise. I'm going to choose Fire, and animate it a bit. If we bring this under the filter that we just made. And, in fact, bring in another version of that. We can use this as a layer mask for the noise and add the filter on top, so we're going to get a broken up pattern.
It's just going to be bit more useful for us. It will just create more of a random field when we're emitting. I think we'll just have to really see how that goes. And we'll have to tweak it, but I think that'll do for now. So you use the Domain tag in conjunction with the Domain object, so we need to set that up. We'll create a system. And we'll move our basketball into the other objects. You don't have to, but I like to keep things neat and tidy. And, in the domain no, in the Object section we'll add the FLIP Domain.
The type we need to set it to is Gaseous. This is rather large. We'll come to the settings in a minute. We're going to turn off Weak Spring. I'm going to increase the Vorticity quite a lot because I want to have lots of swirls. And now, when we come to the bounce, we can reduce the size of this Sober quite a lot. And make sure that my document is only 30 frames. We don't really need to be simulating this forever.
Going to zoom in a bit on the object. Let's scoop the domain over so that it's at the beginning. Making sure that the basketball is still inside the Domain. So we've reduced the size of the Sober bounce to include only the area we're interested in. And that kind of focuses the simulation. It's important to use the right size bounce so that we can keep the memory required to solve this into a minimum. So I can now add more detail by making the boxer size much smaller. Just have a look at this number when we made this boxer size smaller.
So that's jumped up quite a bit. We've got more detail on the grid. And we can tow down the Sober settings and the accuracy and just turn on Fast mode. It's less accurate, but it will speed up the solve. Finally on the domain, I'm going to increase the particles per boxer to something like eight. These are the air particles needed by the Sober. And increasing this number will produce a more accurate sim. But it will also take a bit longer to solve. I'm going to go over to the Display tab, so that we can see something when we do a solve.
In the Property, I'm going to choose Fire. Get a representation of that. And we really will need a cash object, so we'll just create one of those, and, let's just build the cash. You can see in the display we're getting some fire, some visual feedback. And as with all these settings, it's finding a balance of quality and speed. You just got to have a little patience to tweak them and test them. These are settings that work due to a fair amount of trial and error.
And we can now use the Domain tag in conjunction with the Flip Domain to turn scene objects into fluid emitters. Next, we'll take this simulation and set it up for rendering.
- Working with the Emitter tabs
- Adjusting particles with modifiers
- Creating visible particles
- Using sprites
- Colliding, freezing, and lighting particles
- Caching in X-Particles
- Applying constraints
- Adjusting materials settings
- Sculpting particles
- Saving and loading presets