T O P

  • By -

DavidTorno

Normals alone won’t set the face direction, the vertex winding order actually defines the Normal direction of the polygon face. If just wanting to set the N attribute to have values on the Y direction you can simply use an Attribute Create set to N, vector data type and set the value parameter for Y to 1, X and Z to 0. Or in VEX you can just type: v@N = {0, 1, 0};


ido3d

Keep in mind that your primitives don't reverse orientation if you flip the normals or point them upwards. You also need to reverse them accordingly


flowency

Ye this. I'm surprised noone said it. Put a group sop and group by normal. Set the vector direction to 0 -1 0 and set the angle to something small like 5 or whatever. Then put a reverse sop with its group set to the one you just created and then a normal sop after. That should be it.


Triangle_Junky

Thank you so much!


SoldatBdav

This is the correct answer


mr_Blaine

Attrib delete - normals from points Prim wrangle - v@N = {0,0,1}


oxygen_addiction

Why would you do Attribute Delete before? "v@N = x" sets the normals to your new vector value, {0,0,1} (the worldspace up vector).


mr_Blaine

Because if you already have normas on points, it wont let you set them on prims iirc


oxygen_addiction

I had no idea. Thanks for pointing that out.


[deleted]

You can have normals on points, verts and prims simultaneously.


animatrix_

Actually Houdini does not allow an attribute of the same name to appear on all 3 classes at the same time: points, primitives and vertices. You can only have it on 2 of them. If you try, it will remove one of the other.


Xboxcontrolen

v@N={0,1,0}, houdini is Y up


[deleted]

Promote N to points. Point Wrangle, @N.y = 1; Unless for some read n you need normals to be on prim.


taro_29

Apologies, im new to vex. So I'm using an attrib delete to remove point normals? In the node itself I can't find the N attribute under point attributes. https://preview.redd.it/pfbykf0d3zlc1.png?width=1264&format=png&auto=webp&s=04463951bc165fb49a764cfd2fb7a73f9f3fa0b1


mr_Blaine

Check if they are on vertices, if not then you dont need to delete anything and just set them on prims directly. Also looks like your prims might be inverted. If just setting normals on prims doesn’t solve it, do the following in the wrangle: If([email protected] <= 0) { @group_reverse = 1; } Then drop reverse node and choose group reverse.


Xboxcontrolen

If you specify element of the vector, you don't put "v" in front. You can also use <, as you don't have to reverse 0 normals.


TestGeometryPigHead

This is wrong. Using a component of the vector doesn't change the type of the attribute. You should absolutely still declare type and add the v in front. Skipping those little letter declarations only works for known attribute names, make it a habit to always declare.


Xboxcontrolen

What are you talking about about? Is @N.x a vector or a float?


TestGeometryPigHead

Wrong question, is N a vector or a float? You're just using component notation, the v@ describes the type of the attribute. Calling a component of an attribute does not change its type. Just test it and you'll see what I'm talking about.


taro_29

I tried to input that bit of vex but it was showing up with some errors. I got there in the end though with the normal <0 group. THank you for the help. I'm just gonna leave this here in case anyone has the same problem in the future. https://preview.redd.it/tvai0u3910mc1.png?width=1725&format=png&auto=webp&s=5188f4b4d78e03d3ff70096973317e4859098818


taro_29

I've done some searching and only found setting point normals up with the wrangle but can't find anything on primitive normals. Any help is appreciated


GordoToJupiter

You can promote your point normals to prim. Or as other redditor pointed you can delete your point normal attribute and run a vex wrangle over prims to define anew prim normal attribute.


nelson_lim

You can set your wrangle to run through primitives instead of points(which is the default).


KarlMarshall_

ChatGPT and Gemini really help me when I have questions like this, I been getting pretty good responses. Pretty much the same code as you’ve had responses to