Entagma Spline Wrap: keep normals? SOLVED

   2055   3   0
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Hi!

I followed the Spline Wrap tutorial from entagma:

https://vimeo.com/181458408 [vimeo.com]

But his method doesn't preserve the previous normals. How do I use the matrix to rotate the normals?

-Olivier
Edited by olivierth - Dec. 9, 2020 12:24:36
User Avatar
Member
5100 posts
Joined: Feb. 2012
Offline
Hi,

For normals you can multiply them with the inverse transpose of the matrix:

@N = normalize ( @N * invert ( transpose ( m ) ) );
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
1177 posts
Joined: April 2017
Offline
I tried it but I'm still getting some funky result.

Since my normals (before the spline wrap deformation) has custom normals on vertex, I used a another wrangle (the first “wrap” is a point wrangle). And I tranfered a gradient float attribute to the vertices (it's used in the primuv function).
Edited by olivierth - Dec. 9, 2020 12:12:41

Attachments:
Matrix_to_rotate_normals.JPG (139.8 KB)
Matrix_to_rotate_normals_viewport.JPG (93.4 KB)

User Avatar
Member
1177 posts
Joined: April 2017
Offline
Solved!

Ok, so I changed 2 things

A: So, one thing I did wrong was in my “Flat_Z” transform sop. I needed the Z to be flat for my spline wrap to work. That node not only flattened the Y position, it also flattened the Y normals!! (Doh!). I set it to only affect position.

B: I used a Transformbyattribute sop and didn't use invert.

-Olivier
Edited by olivierth - Dec. 9, 2020 12:24:16

Attachments:
Matrix_to_rotate_normals_solved.JPG (186.5 KB)

  • Quick Links