Jump to content

r-a-n-d-o-m

Members
  • Content count

    5
  • Joined

  • Last visited

Everything posted by r-a-n-d-o-m

  1. @numpt vs npoints (VEX vs Hscript)

    @davpe and @noobini : thanks!
  2. A newbie question: Can somebody explain me when to use @numpt vs npoints. Which is actually a question VEX vs Hscript. Since Houdini 16, is it now advisable to only use VEX? Example: You lay down a LINE SOP and connect a GROUP SOP to it, in the Base Group you can type in 0 `npoints(0)-1` this results in getting the first and the last point. Can you do the same thing with the @numpt? Because that doesn't seem to work in the Base Group field of the Group node. In attribute wranglers I use @numpt. I'm getting a bit confused.
  3. @numpt vs npoints (VEX vs Hscript)

    I understand the complexity of it all, I read that Hscript is there only for compatibility reason, that is why I want to do as much as possible with Vex script, hence the example above to illustrate that in some places it doesn't work (like accessing @numpt for instance). If I use the Group by Expression node, where there is a field called VEX expressions and type the following: @ptnum < 5 That works @numpt-2 That doesn't work...confusing to me
  4. @numpt vs npoints (VEX vs Hscript)

    Thanks for summarizing this clearly. This is explains why Houdini has the reputation of being difficult to learn. The use of all these different types of syntaxes is pretty daunting. Why not stick to one? (all Vex or all Phyton) This reminds me of Flash, where one could mix ActionScript 1.0, 2.0 and 3.0 all in the same file. This resulted in bad coding, unoptimized websites, draining Iphone batteries and gone was Flash. Adobe should have had the balls to dump 1.0 and 2.0 entirely with each new update. Maybe making old users angry, but then it was clear what you needed to use. I know it is not easy (backwards compatibility and such) but I believe a software company should be taken this into account because it confuses new users. That is why I want to clarify this for myself, I don't want to write bad code :-) And there is not much good reference of best practice H16 examples (yet) on that topic. Or I haven't found them yet. thanks again! PS back to my example: You lay down a LINE SOP and connect a GROUP SOP to it, in the Base Group you can type in 0 `npoints(0)-1` to get the first and last point. The follwing line does the same but all with the @ notation @ptnum = 0 @ptnum = `chs("../line3/points")-1` (channel reference to the number of points on the line, since @numpt doesn't work) So what will sideFX favour? PS2 the space issue is also something SideFX should fix
  5. @numpt vs npoints (VEX vs Hscript)

    That is clear. But why can I write in the base group field of the GROUP SOP the following: @P.x<0 (selects all points with a x position lower then zero) and NOT @ptnum < 5 (In my mind this should select all points whose number is lower then 5, but it doesn't) this confuses me. if I read http://www.sidefx.com/docs/houdini/vex/snippets both @P and @ptnum are Vex attribute names, yet one is accessible and the other is not.
×