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.
Copy-To-Point : Normals are not affected [{SOLVED}]
648 8 1- olivierth
- Member
- 1010 posts
- Joined: April 2017
- Offline
- Tanto
- Member
- 396 posts
- Joined: Nov. 2016
- Offline
- olivierth
- Member
- 1010 posts
- Joined: April 2017
- Offline
- olivierth
- Member
- 1010 posts
- Joined: April 2017
- Offline
- olivierth
- 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...
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...
- jsmack
- 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.
- Tanto
- 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.
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.
- olivierth
- 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!!
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
- jsmack
- 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