Why is the entity-to-voxel propagation [of fire] important and necessary? What are the next steps, when do we start updating the fire effect itself, and will it change color based on fuel?
TL;DRA prototype demo shows fire based on voxels with physical material properties, spreading through radiation, convection and damage, with extinguishing via heat, oxygen and fuel, while static objects are averaged per voxel for performance and visuals are all temporary.
We prepared a little demo for the fire propagation, so I can go through the demo and answer some of those. So we've got everyone's favorite ship, the 600i. Maybe not. We're going to set it on fire. So we are going to base our fire on voxels, so you can see the squares. I can put a debug on with this. I don't know if you can see the green edges, but those are all voxels with material properties. So in those voxels we are going to bake the environment, and in the environment we have material properties. So for example, plastic, the material properties... this is all prototype work, so nothing is final. A lot of tweaking and balancing and setup still needs to be done for all of this to be implemented. But for now, this for example says plastic, so in plastic we have all of these properties which will affect fire. In here we have wood dense and plastic combined. Here we have fabric as well. So all of these have these kind of properties. They're physically based. So we're going to start with a physically based propagation system and see how far we can get with that. And then we have an entity as well. What's the difference between an entity and a voxel? Basically, a lot of the environment in our game is static. It will never move, and we have a lot of those kind of static objects, and it's mainly for performance reasons. We can't keep track of the fire state in all of those objects. For example, here in this voxel, we have all of these dirty pillows. We can't set each pillow separately on fire. So we kind of average out all of these properties inside a voxel. So for example, if I turn the physics on, you'll see that the stool was falling, because it's a dynamic entity and it can move in game, while the plant pots will remain hovering over the table because they're static. They do have static physics, but they don't have any dynamic physics or anything. So we can be sure they will always be in the same place. So we can set these voxels on fire, and we have different effects as well. So if I set this voxel on fire, we'll have the generic effect that most materials will have. But for example, this one has fabric, which is a different material and a different effect as well. So we'll have more low effects compared to the high flames from the generic one.
These are work in progress, so I'm still working on them. They'll look more distinct than that.
Yeah, definitely. All the visuals you see here are temporary for the prototype. They're definitely not final. We've also got this one, that's the vegetation. I don't know if it's very well visible with the quality of the stream, but this one has ash floating up from the flames. So you can see the ash. We can also do electrical fires and whatever. And in the meantime, you see that this fire is getting out of control. It's burning around. It's spreading around. We also have a fog volume. So you see that the room is getting a bit foggy because of all the smoke being released by the fire. This is something we'll also add. This will be based on the atmosphere of your room. So if there's lots of smoke or toxic gases, your room will start fogging up to add to the visuals. How do we propagate? We've got some quite fast propagation here in this area. We have a few ways of propagating the fire. So the first one is radiation. Radiation is basically your object shooting rays of energy to nearby objects. So it will heat up by radiation. This is not the most effective way of heating up an object, but it's simulated anyway.
Think infrared and not nuclear radiation.
Yes, exactly. Good point. We also have convection. This is basically the way you heat up the air and the air starts moving around in your room. We won't do full fluid simulation for this, but we will try and add gravity in there, so that if you have low gravity, then the convection won't be as strong, while if you have high gravity, then there will be more convection. We'll also try to model in wind, so that the wind direction affects the propagation of your fire.
This is important actually for visuals, sorry to cut you off there, because the particles will follow forces like wind and gravity, so you would expect flames going up a wall, for example, to then have more of the voxels above them catch fire.
Yes. For example, if we set a voxel on fire near a wall, then there should be more propagation upwards rather than around it. And the last type of propagation is damage. So if we heat up an object, and this will be based on the material type as well, so not all material types will do this kind of behavior, it is possible for that object to have a chance to ignite when it receives damage. And this allows us to model a more random fire behavior, while the convection and the radiation are really deterministic. It's always the same. It will go up with gravity, with a certain wind direction. The radiation, based on the strength, will always just go around. So the damage gives a little bit of randomness. And then there was one more thing I wanted to show here, with the entities and voxels. So for example, if I set this voxel on fire and I move this static brush, the fire doesn't move, because everything is baked into this voxel. While if I set this dynamic entity on fire, we can move it and the fire will move with it. And what this means is that you can set fire around here just because this stool is on fire.
I never get tired of seeing this.
It's really cool to play around with, to be honest. I've got some more, if we have time. A rolling barrel. Keeping the best for last. If we ignite it and we enable physics, the barrel will start rolling. And we can keep track... So if we track this voxel, then we can track the temperature of this voxel. And if it goes above the yellow line, it will go into the smoke temperature, so it will start smoking, and that means that the voxel can also start to catch fire. So in here you see it just spiked up; that's because it went into the fire range of the temperature, and this voxel caught on fire, basically. And we have this for all these voxels around it. So the temperature will go up, they will start smoking. And when is this important? It's going to be important if we want to start extinguishing. Our extinguisher is not working very well, but we've got a debug extinguishing feature which we can use. Let's speed this up a little bit so I can speed up the propagation. And then I can start extinguishing, and hopefully you'll see the fire die down where I extinguished. So basically what you need to do is make sure that there is no more smoke anywhere. Extinguishing works in a few different ways as well. Because we go physically based, we can use the fire triangle, which is used by firefighters: fuel, heat and oxygen. So basically what we do is we take away the heat inside this debug sphere that you see here, and we also take away the oxygen, so that the fire dies down. And then by taking away the heat, we are able to make the temperature go below the smoke temperature, and that will make sure it won't be able to reignite and catch fire. We also track fuel, so if that specific voxel or object doesn't have any mass left to burn, it will die down on its own. And of course, later down the line, if we decompress a ship, then your fire will be gone as well. So yeah, I guess this is my demo, completely running out of control.