Given a node type category, operator name and digital asset library path, return an HDADefinition object. Module containing functions related to Houdini Digital Assets. Of a python viewer state stored in a digital asset. Of a python viewer handle stored in a digital asset. User-defined Python module containing the implementation and registration code Represents a section of data stored along with a digital asset. Stores miscellaneous options about a houdini digital asset (HDA). That are stored with and accessed from a digital asset. User-defined Python module containing functions, classes, and constants Int near_pts = pcfind_radius(0, "group_name","P", "pscale", 1.Represents the definition of a houdini digital asset (HDA). Int near_pts = pcfind_radius(0, "P", "pscale", 1.0, max_dist, max_pts) The cool thing about this is that we can easily use the pscale as radius for the search and search just in a specific group of //points The cool thing is that it returns directly an array and not a //point cloud. Int neighbour_points = you are a fan of point clouds there is also a function called pcfind_radius. Int nearpoint = (0, There is also the neighbours function which gives us a list of points connected to the point through some sort of primitives. But as before if we run it in the same //geometry, we are not going to get the real closest point There is also the nearpoint function which returns just an integer with the closest point. Int closest_point = near_pts //take the second element of the list, so index number 1 Int near_pts = max_dist, max_points) // create a list of all points in the radius until reaches max_points the first, but the second element in the list (which has index number 1). If we need the real closest point, we have to take not For Houdini the closest point in the same geometry is going to be itself. If we look at the closest point in the same geometry coming from the first input ( so input number 0) there is another thing to keep in // mind. Pay attention that this function returns a list of all the points, so returns an array (that's why I added to the attribute name). We can specify how far we search and the maximum amount of points Nearpoints function returns the closest points to the current. Int inst = uniqueval(0,"point","sourcept", i) //the unique value at index inst) //put all the unique values in an array called There are several ways to find the closest points and there are a couple of things to keep in mind Int n = numiqueval(0, "point", "sourcept") //the amount of unique values in the attribute "sourcept" For some reasons we don't know the number of source //particles, but we need to know their values and put all of them in an array. Each //sourced particle is storing the point number of the particle it's sourced from. Let's say in this case let's say we have a certain number of particles sourcing 100+ particles each. For example if the unique values are 9 and in the function you put 9 as index, is // going to return the 9th and last unique value uniqueval returns the unique value at a certain index. numiqueval is going to return the integer number of unique values stored in an attribute I haven't used this a lot but I've found "numiqueval" and "uniqueval" useful a couple of times, especially for loops.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |