kiryha Posted January 29, 2019 Share Posted January 29, 2019 How to get P.y only in such VES expression: point("../nodeName/", 0, 'P',0) Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 30, 2019 Share Posted January 30, 2019 point("../nodeName/", 0, 'P',1) 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted January 30, 2019 Author Share Posted January 30, 2019 So... it is not a VEX expression, but Hscript? Can not find docs for it... Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 30, 2019 Share Posted January 30, 2019 point expression function Returns the value of a point attribute. Replaced by hou.Geometry.iterPoints() hou.Point.attribValue() point(surface_node, point_number, attribute, index) surface_node is a path to a surface node, for example "/obj/geo1/grid1". point_number is the point number to read the attribute from. When instancing, you can use instancepoint to get the number of the point currently being instanced. attribute is the name of the attribute (for example, Cd for diffuse color). Two special attributes exist: P and Pw which represent the position of the point in space (Pw allows you to access the W component of the position). index specifies the component position in multi-component attributes such as vectors, colors, and arrays. For example, if the attribute is a color, an index value of 0 returns the red component, 1 returns the green component, and 2 returns the blue component. Note This function will interpolate between point values if the point number is fractional, such as 3.35 EXAMPLES point("/obj/geo1/facet1", 3, "P", 0) Returns the X component of point 3 of the facet1 surface node in geo1. point("/obj/geo1/facet1", 3, "N", 2) Returns the Z component of the normal attribute of point 3 in the 1 Quote Link to comment Share on other sites More sharing options...
MagicRej Posted February 5, 2019 Share Posted February 5, 2019 (edited) On 1/30/2019 at 11:19 AM, kiryha said: So... it is not a VEX expression, but Hscript? Can not find docs for it... getcomp(vector(point(1,"P",@ptnum)),1) Should works Edited February 5, 2019 by MagicRej Quote Link to comment Share on other sites More sharing options...
kiryha Posted February 5, 2019 Author Share Posted February 5, 2019 How can I define the object to grab attributes from in this case? Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted February 5, 2019 Share Posted February 5, 2019 On 30.01.2019 at 4:58 AM, kiryha said: How to get P.y only in such VES expression: point("../nodeName/", 0, 'P',0) In which node are you going to use this? And for the sake of clarity: are you asking for vex or hscript solution? 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted February 5, 2019 Author Share Posted February 5, 2019 In this case, I was talking about expression in the UI parameter (to set tx in transform sop from some attribute of some node in the scene, for example). And I am confused about this, how does it called (parameter expressions?) and which language is used here (Hscript or VEX)... Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted February 5, 2019 Share Posted February 5, 2019 In help it is calling hscript expressions, and it usually compute value in parameters in case with transform sop as Noobini said above you should use point expression. For convenience you can use spare input. in case with scatter sop if you want use @Cd for scattering uncheck Force Total Count and control density with Density Scale parameter 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted February 5, 2019 Author Share Posted February 5, 2019 In translate X expression point(-1, 0, "P", 1) The second argument (0) is a Spare Input 0 reference? What is -1? Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted February 6, 2019 Share Posted February 6, 2019 (edited) 10 hours ago, kiryha said: In translate X expression point(-1, 0, "P", 1) The second argument (0) is a Spare Input 0 reference? What is -1? It is point expression function http://www.sidefx.com/docs/houdini/expressions/point.html At the first place in this function you should put number of spare input instead of a path of surface node. Just drag and drop a node from Network View to a field of spare input in Parameters tab and you get a path of this node. As spare inputs may be more then one so Spare Input 0 has number of input -1, Spare Input 1 has number of input -2 and so on Edited February 6, 2019 by vicvvsh 1 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.