Jump to content

VEX 101 and new point SOP


Isleofgough

Recommended Posts

A lot of old tutorials use the old point SOP for a color ramp, purely to assign a number between 0 and 1 for some future purpose. For instance for a line oriented along the y axis, the old point SOP has the color channels deleted and then puts an "add color" of ($BBY,0,0). Sometimes normals are deleted as well. Commonly the next node added is an attribute VOP with a ramp parameter to reassign this 0-1 range on the red channel to some  spline ramp value.

I am trying to not use the old point SOP for new models. I see there are two different nodes, and I am not sure which to substitute: the "point wrangle" with yellow cowboy hat (attribute wrangle) and the new "point" with red cowboy hat (attribute expression). Which is better to use? With the point wrangle, I can put in VEX code like "@Cd = set(.5, 1, 0);" to assign a constant color, but what would be the equivalent of $BBY? What is the VEX equivalent of the old point SOP "no normal" to delete normals? Thanks.

 

Edited by Isleofgough
Link to comment
Share on other sites

Thank you. That is very helpful and works perfectly! A lot of tutorials are for older versions of Houdini, and some of the newer nodes appear to be completely different from the older versions: most notably the new and old point SOP. It looks like it would be better to learn VEX than python for Houdini work. I am somewhat familiar with older programs (Algol, Fortran C++, Visual basic, etc.) but have no experience with VEX. Your code will be very helpful for substituting a point wrangle (and a attribute delete) for the old point SOP.

Link to comment
Share on other sites

  • 2 years later...

I have a question regarding this topic. Initially, I had normals pointing in the x-direction as shown in the image. I wanted to make normal and point away from the surface so I used the old point sop and just did no normal and reversed it. That worked as shown in the second image. What I want to know is what does the no normal option does in the background to make the normals proper (like does it add something )? How can I use the VEX expression to get the same result without the old point sop just using the attribute expression?

 

Thank you.

normal_direction.png

No_normal.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...