Why is w Norml and not Vector like v?

   903   7   1
User Avatar
Member
339 posts
Joined: June 2013
Online
I don't do a lot of simulations and decided to check out of curiosity what's w metadata. I noticed it's of type Normal and not Vector like v, velocity.


What is the rationale behind this? I don't get it since the length of w also affects spin in the simulation.

Thanks
Edited by probiner - June 17, 2023 16:06:46
User Avatar
Member
8555 posts
Joined: July 2007
Offline
To my understanding, Nml doesn't mean it will be normalized, it's a hint to how it should be transformed, in this case like Normal so instead of direct transform if will be transformed by inverse transpose so that for example if the vector is perpendicular to the surface before transform it will stay perpendicular after instead of skewed which I think makes sense for w as well as N
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4516 posts
Joined: Feb. 2012
Offline
I think it's to preserve the direction of the angular velocity which makes more sense as a transformation compared to how velocity vectors are transformed with respect to uniform scaling using the inverse transpose.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
339 posts
Joined: June 2013
Online
@tamte and @animatrix

I can understand the argument that "if @w is to be tangent to the surface, and therefore perpendicular to @N, why not transform it like @N?" i.e. with inverse transpose. But personally it would also make sense too that it scales, like @v, since the length of @w affects the simulation.
FigA. Inverse Transpose being applied to both @N and @w, having them not change length.




Now, this one is interesting, Transform SOP also has non-uniform scaling and you can see that @w doesn't keep perpendicular to @N, but @v does, while also having its length changed.
Fig.B Non uniform scaling makes @w non-perpendicular to @N.


Does this make sense?...

Scene attached.

Like I said I barely do simulations I was just curious to check the metadata of several default Houdini attributes and this one surprised me.

Thanks
Edited by probiner - June 17, 2023 17:50:38

Attachments:
PRB_w_metadata.hip (132.9 KB)

User Avatar
Member
8555 posts
Joined: July 2007
Offline
probiner
Transform SOP and only @v scales, @N doesn't(as expected) but neither does @w, and I was expecting to see its length change.
It wouldn't make much sense for w to change length as by making a piece larger you don't want it to spin faster
think of Motion Blur for example
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
339 posts
Joined: June 2013
Online
tamte
probiner
Transform SOP and only @v scales, @N doesn't(as expected) but neither does @w, and I was expecting to see its length change.
It wouldn't make much sense for w to change length as by making a piece larger you don't want it to spin faster
think of Motion Blur for example

But if you scale the piece it will also have bigger speed, @v's length. So I just don't get why not affect @w equally.
(For sure there is a point in that you actually probably want to have larger pieces with slower spin and smaller ones with faster spin instead, but the same could be said for @v, I think)

More over like shown in previous post, non-uniform scaling breaks the perpendicularity with @N.

I just want to understand what is the benefit of it being Normal and what would break if it was Vector instead. And because I don't do sims much I'm asking around.

Thanks for engaging.
Edited by probiner - June 17, 2023 17:58:23
User Avatar
Member
8555 posts
Joined: July 2007
Offline
I can't check the file at the moment

But I' expect that w would behave exactly like N if both start the same and both are marked as Nml

In terms of scaling don't think about simulation, applying scaling transform will not behave in momentum preservative way
But it's beneficial to not scale w at all
Imagine you have already cached packed prims, but now you just need to scale them 10x
It makes total sense that v will be 10x longer since pieces will actually move 10x faster
But they will not rotate any faster so it just makes sense to keep w the same scale so that motionblur matches
And for nonuniform scales they will still rotate about perpendicular axis to that stretch transform (not the best description but essentially like the normal transforms) so it just makes sense if w does the same
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
339 posts
Joined: June 2013
Online
@animatrix and @tamte

I finally understood why I was looking at this wrong. I thought @w would be a tangent to the surface in order to make it spin beyond translation of the piece, therefore perpendicular to @N, and should deform like @v to remain still perpendicular to @N, like in the image in the previous post.
But I now understand it's more like an axis-angle rotation, like in this post's image, where the direction is the rotation axis and the length the angular speed. Given it's an axis of rotation, perpendicular, makes sense the direction is treated as Normal, with inverse transpose, along with the remark about motion blur, which was the only thing I was following along before.



Thanks!
Edited by probiner - June 18, 2023 14:54:49
  • Quick Links