Maniphest T102342

Attributes from Geonodes cannot drive Principled Volume node (but custom properties can)
Closed, Archived

Assigned To
None
Authored By
Nick Masterton (VupliDerts)
Nov 8 2022, 12:35 AM
Tags
  • BF Blender
  • Geometry Nodes
  • Nodes & Physics
Subscribers
Nick Masterton (VupliDerts)
Omar Emara (OmarSquircleArt)

Description

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 522.30

Blender Version
Broken: version: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: rBb292cfe5a936
Worked: (newest version of Blender that worked as expected)

Short description of error
It seems as though it is not possible to drive the values on a principled volume node using an attribute output from geometry nodes.
It is possible to drive the the principled volume using a custom property on the object.
It is possible to drive the values on surface shaders such as the diffuse bsdf using an attribute output from geonodes.

Exact steps for others to reproduce the error

  • Create geonodes nodetree on an object
  • Create an output attribute (float)
  • Connect the output socket to the group input of the genodes nodetree for ease of numerical input
  • Create a material for the object
  • Delete the principled BSDF node
  • Create a principled volume node and connect to the volume output of the shader nodetree
  • Use the geonodes output value as an attribute in the shader nodetree and connect to the density input of the principled volume
  • Edit the value of the geonodes attribute, the volume density does not change

---extra---

  • Create a custom property for the object
  • Use the custom property 'prop' or similar as the input for the volume density
  • Set type to Object
  • Varying the custom property does change the density

Event Timeline

Nick Masterton (VupliDerts) created this task.Nov 8 2022, 12:35 AM
Nick Masterton (VupliDerts) updated the task description.
Iliya Katueshenock (Moder) added projects: Geometry Nodes, Nodes & Physics.Nov 8 2022, 12:37 AM
Omar Emara (OmarSquircleArt) closed this task as Archived.Nov 8 2022, 2:29 PM
Omar Emara (OmarSquircleArt) added a subscriber: Omar Emara (OmarSquircleArt).

The output attribute has a point domain type, which means you need to access it using the Geometry option in the Attribute node. Doing that should make it work.

Nick Masterton (VupliDerts) added a comment.Nov 8 2022, 4:13 PM

Ok, forgive me if I misunderstood, but even after setting the attribute node to 'Geometry' the shader nodetree, I still cant change the volume density, (see attached).
Curious to know how to get it working!

Omar Emara (OmarSquircleArt) added a comment.Nov 9 2022, 7:42 AM

That's probably my fault as I was accidentally testing on surfaces. Accessing such attributes in volumes is not possible as explained in T93240.
The only solution I can think of is if you use instance-level attributes by using the Geometry to Instance node and change the output attribute domain to Instance and likewise in the Attribute node in the shader.

Nick Masterton (VupliDerts) added a comment.Nov 10 2022, 12:42 AM

Thanks for the clarification, that helps me to come to terms with the limitations.
I did find this workaround by adding a custom property to the object, driving that with the output attribute, and then reading the custom property in the shader nodetree:
Its a bit convoluted but it works, allowing for density controls on the geonodes modifier panel.