mottosso Posted March 12, 2020 Share Posted March 12, 2020 Hi all, I'm new to VEX and am facing an odd issue. With an Attribute Wrangle iterating over points, connected with any polygonal mesh (in this case a Sphere). // Why does this not work.. vector broken_normal = point(0, "N", @ptnum); // Why this does? vector working_normal = @N; // And this as well? vector working_position = point(0, "P", @ptnum); if (@ptnum == 0) { printf("%s\n", broken_normal); printf("%s\n", working_normal); } // {0,0,0} // {-6.31725e-09,7.5807e-08,-1} As you can see, the "broken_normal" yields a value of { 0, 0, 0 } when I would have expected a value identical to the "working_normal". I'm running this on Houdini 18. vex_and_normals.hipnc Quote Link to comment Share on other sites More sharing options...
bunker Posted March 12, 2020 Share Posted March 12, 2020 Nothing weird there. Your sphere doesn't have normals, @N is creating them on the fly. Have a look at your Geometry spreadsheet. Quote Link to comment Share on other sites More sharing options...
mottosso Posted March 13, 2020 Author Share Posted March 13, 2020 That's it, thanks. I figured it must have been something obvious like that. But that begs the question; what attributes are generated on the fly like this? More importantly, how do I generate attributes on the fly for anything other than geometry 0? Quote Link to comment Share on other sites More sharing options...
animatrix Posted March 14, 2020 Share Posted March 14, 2020 Hi, I think N is the only magical syntax SESI added to wrangles. But you can't manipulate any input other than the first input (yet). In a theoretical version of Houdini, this will be supported, that's why SESI advises to use geoself() for now. Quote Link to comment Share on other sites More sharing options...
mottosso Posted March 14, 2020 Author Share Posted March 14, 2020 Thanks @animatrix 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.