I was wondering if it is possible to set the voxelsize intrinsic in vex after the vdbfromparticles node?
Using the vex function setprimintrinsic doesn't affect the voxelsize values.
I know the voxel size can be adjusted post the vdbfromparticles node because if I create a transform node with pivot set to the geometry center, the voxel will scale.
Using the transform node I can see the values of the voxelsize change in the geometry spreadsheet.
But I may be mistaken in understanding what's happening?
Maybe the transform node is not directly changing the voxel size, but the voxelsize is only changeing as a result of a few operations within the transform node.
I've tried doing some matrix transformations in vex on the primitive, but that had no result either.
Help is appreciated in figuring this one out. Thanks.
setprimintrinsic() - Voxel Size - Post vdbfromparticles
2870 2 0-
- BabaJ
- Member
- 2164 posts
- Joined: Sept. 2015
- Offline
-
- BabaJ
- Member
- 2164 posts
- Joined: Sept. 2015
- Offline
I wrote to support to find out if this is a bug or you can't inherently write to voxelsize in this case.
Their answer confirms what I thought might be the issue, so if anyone has the same issue hopefully they can find this.
Here's supports response:
Their answer confirms what I thought might be the issue, so if anyone has the same issue hopefully they can find this.
Here's supports response:
Hello,
Not all intrinsics are writeable. Some are derived from other values. The voxelsize is implicitly defined from the transform of the grid. This is why the transform node, which adjusts the embedding of the vdb into space, also adjusts voxel size
The following in a wrangle will reset the transform to identity, thus also change the voxel size to 1:
matrix mat;
mat = ident();
setprimintrinsic(geoself(), “transform”, 0, mat, “set”);
Note that these changes will just scale the volume, not resample it. If you want the same volume, but with more or less voxels-per-centimenter, use VDB Resample.
Edited by BabaJ - May 1, 2018 12:25:57
-
- BabaJ
- Member
- 2164 posts
- Joined: Sept. 2015
- Offline
Ok..finally got what I wanted to do as a vex exercize.
Had a struggle in getting a translation related to the scaling in one wrangle node - couldn't do it.
As if you only translate it changes your voxel size, and if you change your voxel size it changes your position;
With the aim of changing voxel size but maintain its' current geo center.
Managed to do it 4 nodes (the ones in the pink color netbox), and a channel and attribute reference.
Might be able to be done all in one wrangle but I think my limited math understanding of things like matrices prevents me from utilizing the available vex functions most efficiently.
If anyone wants to have a crack at it please go ahead - I'm ok with what I got, but could be educational for myself and others in the future who come across this thread.
Had a struggle in getting a translation related to the scaling in one wrangle node - couldn't do it.
As if you only translate it changes your voxel size, and if you change your voxel size it changes your position;
With the aim of changing voxel size but maintain its' current geo center.
Managed to do it 4 nodes (the ones in the pink color netbox), and a channel and attribute reference.
Might be able to be done all in one wrangle but I think my limited math understanding of things like matrices prevents me from utilizing the available vex functions most efficiently.
If anyone wants to have a crack at it please go ahead - I'm ok with what I got, but could be educational for myself and others in the future who come across this thread.
-
- Quick Links
