Copy-To-Point : Normals are not affected [{SOLVED}]

   648   8   1
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Hi!

I was making a simple car setup. I created a point with v@N and v@up for each wheel (total of 4) with normals (left wheels point to the left, right wheels point to the right).

My goal was to use a copy-to-point to copy those 4 points to a single animated point (position, Normal and up is animated). When I do, the 4 point positions are perfectly moving and rotating but the Normals never changes.

In the image, you can see the problem. The car is going from top of the image to the bottom. The Normals are already wrong at frame 142 and they dont even rotate during the animation.
Edited by olivierth - Feb. 29, 2024 15:48:24

Attachments:
Houdini_Car_motion_01.JPG (69.7 KB)

User Avatar
Member
396 posts
Joined: Nov. 2016
Offline
I could not replicate the problem, doing the same setup had the normals rotating as expected. Could you post your scene?
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Sadly, I can't share my scene. It's company stuff.

My setup is a point moving along a curve. The normal is always pointing in the direction of the animation. Here's my copy to point settings:

Attachments:
Houdini_Car_motion_02.JPG (70.9 KB)

User Avatar
Member
1010 posts
Joined: April 2017
Offline
I created polygons from my 4 points in the hope that it would solve my problem. I still get the probleme. BUT! If I overwrite my custom normals by using a normal sop (set to point), I dont get the problem. Why would creating normals from a wrangle behave differently than using a normal sop?
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Ok, my work around was to copy grids to each point, use a normal sop to calculate prim normals and copy those grids onto my animated point. Right after that, I have a wrangle that creates a point for each grid with the prim normal as the point normals. Now all works.

I'd still like to understand why a copy-to-point behaves differently with custom wrangle-created normals than those created by a normal sop...
User Avatar
Member
7794 posts
Joined: Sept. 2011
Online
olivierth
I'd still like to understand why a copy-to-point behaves differently with custom wrangle-created normals than those created by a normal sop...

when you create them with a wrangle, are they generic tuples named "N" or do they get set as type 'normal'? generic tuple attributes don't get transformed; normal, point, and vector type attributes do. You can see the type by middle mouse inspection.
User Avatar
Member
396 posts
Joined: Nov. 2016
Offline
Attributes can either be 3-float or vectors. Vectors will be transformed (normals, velocity, etc), 3 floats won't (colors, rest position...). The normal node creates vectors, but when you create them on the fly through wrangles, they'll use a default type. However some attributes like N should be assigned the right type even if created through wrangles. Did your normals have a different name?

Anyway, a solution would be to create them through Attribute Create first and give them a vector type before assigning them values in your wrangle.
User Avatar
Member
1010 posts
Joined: April 2017
Offline
I've never heard of "tuples" before. But I can see a difference between my point normal and a normal sop. When I middle click my custom normals, I see N3flt. When I middle click the normal sop, I see N3flt(Nml). I'm guessing that's the "tuples" you talked about.

I noticed that if I put a normal sop on my points, it doesnt affect my normals (there's not polygons so it can't recalculate a vector) BUT, it adds the "Nml" when I middle click. Now, all works perfectly!!
Edited by olivierth - Feb. 29, 2024 15:47:37
User Avatar
Member
7794 posts
Joined: Sept. 2011
Online
olivierth
I've never heard of "tuples" before. But I can see a difference between my point normal and a normal sop. When I middle click my custom normals, I see N3flt. When I middle click the normal sop, I see N3flt(Nml). I'm guessing that's the "tuples" you talked about.

a tuple just means a set of multiple values. They're all tuples, but the one with(Nml) is qualified as being a 'normal'. I'm using the word tuple to distinguish a set of three numbers from a 'vector' which is also a qualified type.

A normal sop set to not calculate normals can add this qualifier to the attributes, but another way using just the wrangle is to use the 'setattribtypeinfo()' function to explicitly declare the type as normal or point or whatever.
the qualifiers affect transforms:
point: translate rotate and scale
vector: rotate and scale
normal: rotate
there are also some others, color and texture coordinate but neither of them would be transformed, so they behave the same as an unqualified 3 float in this context.
  • Quick Links