[Q] How to create "attribute" on Volume Wrangle?

   1231   2   1
User Avatar
Member
14 posts
Joined: April 2011
Offline
Greetings Community.

We can create custom attributes on Point Wrangle by:

@foobar = 0.1234; // And then fetch this value from a downstream node.

I would like to do the same with a Volume Wrangle, but it doesn't work the same way as Point Wrangle:

"Unlike how the Point Wrangle and Attribute Wrangle nodes work, writing to an unknown @‹name› variable will not create a volume."
https://www.sidefx.com/docs/houdini/nodes/sop/volumewrangle.html [www.sidefx.com]

The document page never explains how WOULD it work.. Can anyone please advise?

I'm hoping to use VDB to compute some cost function (a scalar value) without overwriting the default density/surface attribute.

Much appreciated!
Edited by aeonzeon - Sept. 16, 2025 20:16:21
User Avatar
Member
569 posts
Joined: Nov. 2016
Offline
you can rename your density field to something else in a separate branch using the name sop, merge it back with your density, then edit the result in the wrangle and write to this new field.
User Avatar
Member
14 posts
Joined: April 2011
Offline
Tanto
you can rename your density field to something else in a separate branch using the name sop, merge it back with your density, then edit the result in the wrangle and write to this new field.

Thank you, Tanto. Much appreciated for the info!

Also, I came across this article with very useful/helpful tutorials (with Houdini example files) on Volume/VDB in general:
https://www.tokeru.com/cgwiki/HoudiniVolumes.html [www.tokeru.com]

Cheers.
Edited by aeonzeon - Sept. 16, 2025 20:16:01
  • Quick Links