volumes and transformation matrix

   6508   5   0
User Avatar
Member
53 posts
Joined: June 2009
Offline
Hi!

I am trying to transform a volume with a matrix with no luck so far.

Multiplying by the transformation matrix works on a polygon object but not on a volume
I am guessing this has to do with the fact that the volume only has one point?

I found a workaround: extracting the transformation values and then point()reference those values on a transform node

But I really would like to understand why is the matrix not working on volumes, while the Transform SOP is?
I am missing something important here I think

Is there a way to use a matrix to transform a volume?

Thanks!

Attachments:
transform_volumes.hipnc (157.1 KB)

User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
Use the Transform by attribute SOP, or set the ‘transform’ primitive intrinsic. The first method lets you create a matrix attribute per point, the second requires you to set the rotation/scale component as a matrix3 on the primitive and the translation by updating ‘P’ of the point.

http://www.sidefx.com/docs/houdini/nodes/sop/xformbyattrib [www.sidefx.com]
http://www.sidefx.com/docs/houdini/vex/functions/setprimintrinsic [www.sidefx.com]
User Avatar
Member
53 posts
Joined: June 2009
Offline
Hi jsmack!

Thanks for your answer

Transform by Attribute works like a charm, thanks.

I did not know about primintrinsic:transformattribute

I tried to do it the way you suggested:
- change @P
- set the primintrinsic:transformto a rotation/scale matrix (matrix3 right?)

Well, I could not make it work that way.
The only way I found is to set the primintrinsic:transformas a 4x4 matrix and not set @P
Weird because here [www.sidefx.com] they also mention primintrinsic:transformas being a matrix3…

Did they change anything in 16?
I could not find anything related in the doc [www.sidefx.com]

Is there a list of all the primintrinsic with their type, definition and use?

I updated my file with a transform_volume_02 geo node with my comments in it, if you want to have a look.

Thanks!

Attachments:
transform_volumes_v02.hipnc (1.7 MB)

User Avatar
Member
53 posts
Joined: June 2009
Offline
Hi!

So I investigated a bit further and found out that the matrix4 method works only for VDBs
Matrix3 + setting @P is actually the way to go for other primitives

So I test the size of the matrix before applying the transformation
Then I chose which (matrix3 or matrix4) to apply depending on the size

I really would like to understand why VDBs are treated differently
If anyone knows…

thanks!

Attachments:
transform_volumes_v03.hipnc (218.8 KB)

User Avatar
Member
8551 posts
Joined: July 2007
Online
bebe
Did they change anything in 16?
it's always been this way and I was wondering s well, but since VDBs were developed independently, maybe this was inherited behavior
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1694 posts
Joined: March 2020
Offline
A quick note (on VDBs): if you're transforming a velocity-like volume, make sure the “Vector Type” is “Displacement/Velocity/Acceleration”. (You can set it on a VDB SOP or a Primitive SOP). That way your velocity values will be transformed (e.g. rotated) properly. I don't think it works with regular volumes, though
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
  • Quick Links