Isleofgough Posted December 12, 2017 Share Posted December 12, 2017 (edited) 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 December 12, 2017 by Isleofgough Quote Link to comment Share on other sites More sharing options...
mestela Posted December 12, 2017 Share Posted December 12, 2017 $BBY equivalent as per your post: vector bb = relpointbbox(0,@P); @Cd = set(bb.y,0,0); You can't delete attributes in a wrangle, you'd use an attribute delete sop. It's all more verbose than before, but scales much better, and is more internally consistent. 1 Quote Link to comment Share on other sites More sharing options...
Isleofgough Posted December 13, 2017 Author Share Posted December 13, 2017 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. Quote Link to comment Share on other sites More sharing options...
mestela Posted December 13, 2017 Share Posted December 13, 2017 Definitely vex over python when starting; python is handy for pipeline stuff, interfacing to other apps, best to delay that until you need it. Usual plug for my wiki notes here: http://www.tokeru.com/cgwiki/?title=HoudiniVex Quote Link to comment Share on other sites More sharing options...
caspgin Posted March 1, 2020 Share Posted March 1, 2020 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. Quote Link to comment Share on other sites More sharing options...
Isleofgough Posted March 2, 2020 Author Share Posted March 2, 2020 Did you try an attribute delete node? I don't have access to a computer this week, but I would think that would work. Quote Link to comment Share on other sites More sharing options...
caspgin Posted March 3, 2020 Share Posted March 3, 2020 Isleofgough Yes, I tried it now. Attribute delete works too. So is the old point sop deleting normal attribute when we select the no normal option in it? How can I replicate it in attribute expression? Quote Link to comment Share on other sites More sharing options...
Isleofgough Posted March 4, 2020 Author Share Posted March 4, 2020 I don't think you can use attribute expression to delete an attribute. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.