Efi Posted April 3, 2021 Share Posted April 3, 2021 Hello, I need a way to set the value of a voxel of a hou.VDB with python. Do you know if there is an equivalent to the setVoxel() function used to the hou.Volume for the vdb ? Thanks in advance, Quote Link to comment Share on other sites More sharing options...
bunker Posted April 3, 2021 Share Posted April 3, 2021 why not use VEX? Python is extremely slow and single threaded. Quote Link to comment Share on other sites More sharing options...
Efi Posted April 4, 2021 Author Share Posted April 4, 2021 I need to specify the volume's name with a variable because I use a multiparm block to collect the volume name. I didn't find a way to specify the name by variable with vex so I try first to generate vex with python, something like this content = "@" + volume_name + " = " + volume_value + ";" return content But the problem with this solution is that the wrangle is in a for loop (for the multiparm block) and so on it crash sometime because of the update of the vex code. So I did it on python, but I'm stuck with vdb volume. I would have liked to do it in vex but for that I would need a function like point setpointattrib(0, name, @ptnum, value, "set"); It's for the tool of this video (time : 01:34) Quote Link to comment Share on other sites More sharing options...
bunker Posted April 4, 2021 Share Posted April 4, 2021 in a volumeWrangle, if you turn off Autobind by Name you can separate the volume Name in SOPs from the volume name in VEX. here, density can be referenced to any string attribute bindName.hiplc Quote Link to comment Share on other sites More sharing options...
Efi Posted April 4, 2021 Author Share Posted April 4, 2021 Great. Thanks a lot I will try this way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.