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

   387   2   1
User Avatar
Member
14 posts
Joined: 4月 2011
オフライン
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 - 2025年9月16日 20:16:21
User Avatar
Member
538 posts
Joined: 11月 2016
オフライン
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: 4月 2011
オフライン
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 - 2025年9月16日 20:16:01
  • Quick Links