6
$\begingroup$

I am trying to understand better how to create smoke/fire simulations in Blender. One of the crucial things in creating smoke/fire is how you build your smoke domain material.

Blender Internal makes use of "voxel data" to build the smoke domain material.

Voxel data renders a voxel source, working very similarly to an image texture, but in 3D. Various input data source types are available (such as smoke voxel data, or external files), as well as various interpolation methods.

Smoke Use smoke density and color as texture data. Flame Use flame temperature as texture data. Heat Use smoke heat as texture data. Values from -2.0 to 2.0 are used. Velocity Use smoke velocity as texture data.

In Cycles these simulation fields can be found in the .vdb files under the following names: color, density, heat, heat old, flame, fuel, react, velocity, shadow and texture coordinates. So I guess these simulation fields are also a sort of voxel data ?

My questions are:

  • are all voxel data always available in the smoke domain or is that determined by the flow type of the flow object ?
  • could you explain a bit more how these voxel data / simulation fields can be used in the set up of the smoke domain material

enter image description here

  • the Smoke Domain Materials I have seen so far only use density, flame and color for building the material. What could be the use of these other fields ? Could you maybe give an example ?

P.S I have studied the manual, I have seen the tutorial of Blender Guru.I want to have a deeper understanding of the Smoke Domain and the Smoke Domain Material

$\endgroup$
14
  • $\begingroup$ For the other voxel atributes like Heat or Velocity see this: blender.stackexchange.com/a/23803/7777 $\endgroup$ Commented Oct 23, 2016 at 21:23
  • $\begingroup$ @Jerryno Thanks. So next to flame, smoke density and color now heat and velocity are available ? What is the difference between flame (flame temperature) and heat ? $\endgroup$
    – user13877
    Commented Oct 24, 2016 at 9:31
  • $\begingroup$ Heat is the temperature data, Flame is the density data. That's the difference. $\endgroup$ Commented Oct 24, 2016 at 13:44
  • $\begingroup$ but there is also a density keyword ... what is the difference between flame and density when it is both density (also .. flame is used for emission, that sounds not logical when flame is density ?) $\endgroup$
    – user13877
    Commented Oct 24, 2016 at 14:25
  • 2
    $\begingroup$ Correction: Density is the smoke's density and Flame is the smoke's emission. Flame is indeed how much light is emitted from the volume and Heat is the temperature in the volume - even the smoke can have cold and warm areas and not emit in visible light. $\endgroup$ Commented Oct 24, 2016 at 17:28

2 Answers 2

5
+100
$\begingroup$

I will go ahead and post this although I am not sure that it will completely satisfy all points of your question. I found this to be an interesting question that allowed me to learn some new things as I researched it, so thank you for that.

I found the currently supported attributes for smoke and fire to be located at lines 1114-1120 of blender_session.cpp as a result of finding the commit from earlier this year where official support for velocity was added. Heat was added at roughly the same time, in this commit. You can see also in the 2.78 Cycles release notes here that official support was added for heat and velocity. I was not aware that they could also be seen in /addons/cycles/kernel/kernel_types.

The description for the heat attribute (from the commit where it was added) in cycles reads as follows:

Similar to velocity, it was kind of supported by the mesh manager but was missing a code in BlenderSession to get actual values.

In Cycles Heat is an attribute which goes from -1 to 1, where -1 is the coldest ever temperature, 1 is the hottest ever one.

Now to your main points(I'll do my best):

are all voxel data always available in the smoke domain or is that determined by the flow type of the flow object ?

It appears that the data is there, but perhaps only to a certain degree, if you will. Smoke in cycles cannot become fire simply by accessing the appropriate attributes. That part would of course be determined by the flow type. To represent this, I did a test. In the following image, there are three domains that each share an identical material. The flow object in each domain is a plane, with flow type set as the text before it states. Note that here, I added the velocity attribute to flame to get the result I did with smoke. It is not clear to me exactly how velocity intended to be used, so forgive any inaccuracies in the material. I will edit and correct if I discover an error in the setup.

enter image description here

This is the node setup for the domain:

Domain material Click to enlarge

could you explain a bit more how these voxel data / simulation fields can be used in the set up of the smoke domain material

According to the manual, flame is the density of any fire in the domain. Of course, we can see that flame is the emission, and where we get the light for our fire.

density is the density of the smoke. This is a scalar value.

color is the color given to the smoke in the domain. Color and vector outputs give the same result, while factor gives an average of the channels.

The last two, heat and velocity are fairly undocumented as far as I have found. The only example of usage for heat I found was in a report on the tracker of all places. I have replicated that example here in the node setups posted. The only "official" explanation of them that I have found is what is in the commit where velocity was added for 2.78, as noted above.

the Smoke Domain Materials I have seen so far only use density, flame and color for building the material. What could be the use of these other fields ? Could you maybe give an example ?

Certainly. Here is one using both the heat and velocity attributes:

nodes Click to enlarge

The below (low sample) image is the result of the preceding node setup. Instead of using color for the smoke here, I instead used velocity, and it turns out nicely. Heat is used to drive emission along with flame.

enter image description here

I have enjoyed learning as I have researched this,and I hope that this is helpful, and that perhaps I have answered at least some points of your question well enough.

Edit:

Here is the .blend file containing the domain materials shown above.

$\endgroup$
15
  • $\begingroup$ Thanks a lot for your valuable answer. Could you perhaps include a bigger image of the node setups (I cannot read them very well on my screen) ? $\endgroup$
    – user13877
    Commented Oct 29, 2016 at 14:16
  • $\begingroup$ @OldMan, of course. I have added new images. They should display larger when clicked. $\endgroup$
    – Timaroberts
    Commented Oct 30, 2016 at 6:46
  • $\begingroup$ I have a question about your last node tree. You use Velocity for creating the color of the smoke. That seems weird, can you explain ? Also could you explain that node setup (how you use for velocity for creating the smoke colour) ? $\endgroup$
    – user13877
    Commented Oct 30, 2016 at 8:47
  • $\begingroup$ Heat attribute can be used (multiplied by 1500) as input for a blackbody node plugged into the emission color of the flames. $\endgroup$
    – Bithur
    Commented Oct 30, 2016 at 8:56
  • $\begingroup$ @Bithur I did not know of the existence of the Blackbody node but I looked it up and it converts temperature to colour. Nice idea !! So Flame would not be necessary anymore ? And the control of strength of the emission, still with the heat attribute ? And how would you acquire the temperature in Fahrenheit ? $\endgroup$
    – user13877
    Commented Oct 30, 2016 at 10:56
1
$\begingroup$

As a sort of "wrap up" of the comments I will answer my own question.

Available attributes from version 2.78 in a Smoke Simulation are:

  • color
  • density
  • flame
  • heat *
  • velocity *

They are now all defined in /addons/cycles/kernel/kernel_types. It is not certain if the last two keywords (heat, velocity) are yet usable (maybe in some test builds).

You can use an Attribute node with color as a keyword to read color information from smoke (use colored flow objects). The Color (of the smoke) atrtibute is more interesting if you want to mix two smokes with different colours, but if you have only one colour Color Ramp gives you more control

enter image description here

Flame is light (emission), Smoke is density, Heat is temperature. In real world the light is proportional to temperature and visible light is a subset of that light. Density is the smoke's density and Flame is the smoke's emission. Flame is indeed how much light is emitted from the volume and Heat is the temperature in the volume - even the smoke can have cold and warm areas and not emit in visible light.

$\endgroup$

You must log in to answer this question.