0
$\begingroup$

I created a Geometry Nodes (GN) node tree that simulates the smoke trail from a missile.

The simulation of fire from the nozzle is done with emission, which is limited by a gradient. Its position is linked to the missile, which moves with the constraint Follow Path along the same curve on which the smoke is "pulled".

Then I wanted to get rid of constraint, so I joined the geometry of the missile with the smoke, stored the position of the missile to the attribute, and used it in shader nodes. But when I turn the smoke mesh into a volumetric, the attribute is "nulled", because you can't write an attribute on a volumetric.

Here the question arises - how do shader nodes calculate the missile position for volume and is it possible to repeat it somehow with GN?

enter image description here

enter image description here

("Missile pos" empty created for fast switch between attribute and "old" shader in shader nodes)

$\endgroup$
4
  • $\begingroup$ I don't know how to solve it actually, but I guess the problem here is the attribute data you want to store has to be stored somewhere in the geometry. In the Store Named Attribute you have several domains to choose from: Point, Edge, Face, Face Corner, Spline and Instance. But the Geometry you plug in there to store the data is a Volume Grid. Which means, there is no geometry on which you store the information and therefore you cannot read it with an Attribute node in the shader. $\endgroup$ Jan 31 at 16:23
  • $\begingroup$ ...so actually the title of your question is very misleading. It has nothing to do with how the Principled Volume shader works, more with how attributes are stored in Geometry Nodes. $\endgroup$ Jan 31 at 16:37
  • $\begingroup$ I wrote that I understand that the shader breaks because the attribute cannot be written to the volume field. And my question is directly related to the topic title. How does Principled Volume work, how does it calculate gradient position if volume cannot have an attribute? Or blender developers just forgot to add volume type to store attribute node, and actually volume has attributes? Because otherwise how does texture coordinate calculate gradient for volume? $\endgroup$
    – Dmitriy
    Jan 31 at 18:23
  • $\begingroup$ A volume grid in Geometry Nodes is as the name says, a grid. You define the resolution etc. similar as you have to define a resolution for a smoke simulation for example. You define voxels in which density information is stored. Shaders (not only the Principled Volume) work different. A simple linear gradient for example can go from 0 at the left to 1 at the right side. You can zoom in anywhere inbetween and it goes seamless from black to white (mathematically speaking, limited only by the capabilities of the colorspace and/or float precision). Voxels are discrete locations, not functions. $\endgroup$ Jan 31 at 22:18

0

You must log in to answer this question.

Browse other questions tagged .