Search the Community
Showing results for tags 'point'.
-
Hi there, this is probably way simple and a dumb question but.... I'm trying to make a tool that will use a string from a spare parameter and use it to reference geometry on a drive. The point() function works if I type in the value - check . I can make a new attribute and reference the spare parameter- check. But when I use the string attribute or directly reference using ch('myparameter') from within the point() function I draw a blank. I suspect its changing the string to float or something in the point() function. Any help much appreciated Thanks John //mycode s@mystring = chs(“geo”); v@Cd = point("mystring",“Cd”,@ptnum); v@P = point(“mystring”,“P”,@ptnum);
-
Hello good people of the interwebs! I have a VEX (beginner) question. I want to group points of a poligonal mesh based on their acuteness (i.e. how "pointy" they are). Very similar to what the group node allows to do with edges, where one can simply define the minimal edge angle of the two adjacent primitives to decide if an edge is included in the group. I need a similar thing, but with points and a point group and taking into consideration the angles between the three (or more) adjacent edges. (I imagine a loop and the neighbor and neighbor count functions and some angle comparison wizardry but I can't figure out how to tie all that together in any meaningful way Houdini can understand.) Your help is very much appreciated. Beautiful holidays to you and sweet learning by your handsome examples to me! Felix
-
Hey all, I was trying to create instance path in vex and trying to use few bgeo sequences, I have different wedges for my main geometry and I want to use instance path in such way that. It will change directory path based on point attribute. it looks something like this, "$HIP/houdini/geo/test/wedge_`chs("parm")`/test.wedge_`chs("parm")`_`chs("../Version/vers")`.`chs("frame")`.bgeo.sc" but when I try to use point attribute in string, it doesnt work, or maybe I dont know the right way to write the syntax. I have to create parameters and call it. but it doesnt work accurate. can you guys please help me with it ?
-
Hi everyone, I have a little confuse about pc open. Normally we create a pc open need a current element "P" to be the query position. and then search the target file by radius. but what if i create pc open in cvex shader builder to work with vex volume procedural in Shop. where is the current P comes from? we still need a "P" to be the query position to do searching. (plz let me know if I'm wrong thx) if I connect pc open query pos to geo vop global parameter "P" then do the rest of part. although it still work but no idea how. and I don't know how to export the parameters to check on the spread sheet.
-
Hi all, I've looked for an answer on the forum but couldn't find exactly what I am looking for, I'm sure this is super basic question (I'm learning python right now). how can I reach point that are within different groups ? I want to do simple math operations for different groups of points, so the idea is that once I have access to points within a group I'll do something like MyAttrib = [p.attribValue("MyAttrib") for p in points] to do some statistics of MyAttrib Thanks Alex
-
Hello, Can you please help me a little bit? Lets say I have 8 points. four them are simulated. You can see them in the green circle. And I have another 4 close to them which are static points? You can see them in the red circles. How can I copy the movement of the animated point to the static points? I tried with attribute transfer in a solver node but I'm sure I made something wrong because it didn't work. Thank you Gabor
-
Hey guys I'm just trying to calculate distance between opinput 1 position to opinput 2 position via wrangler but doesnt seem to work any ideas? v@CalcDist = distance (@P, point (1, "@P",0) ) ; Distance_Calc.hip
-
How can i import attribute to geoself() geometry from second input of wrangle node if i don't know type of this attribute. I write function: parameters: native_input = 0 (first input of wrangle node) sample_input = 1 (second input of wrangle node) attribs = string like "attrib1 attrib2 attrib3" native_ptnum = number of point in current geometry where i want create attributes like in second input sampled_ptnum = number of point from second input where i want sample attribute. but cannon import any array attributes like "Cd" and etc... This function correctly worked only if attribute is not array (type = 0 or 1 or 2) :((( void sampleattribs(int native_input; int sample_input; string attribs; int native_ptnum; int sampled_ptnum ) { foreach(string aname; split(strip(attribs), " ")) { aname = strip(aname); if ( haspointattrib(sample_input, aname) ) { int atype = attribtype(sample_input, "point", aname); if (atype==0) { addpointattrib(native_input, aname, int(0)); int value = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==1) { addpointattrib(native_input, aname, float(0)); float value = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==2) { addpointattrib(native_input, aname, ""); string value = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==3) { int def_value[]; addpointattrib(native_input, aname, def_value); int value[] = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==4) { int size = pointattribsize(sample_input, aname); string typeinfo = attribtypeinfo(sample_input, "point", aname); float def_value[] = {}; for(int i=0; i<size; i++) append(def_value, 0.); addpointattrib(native_input, aname, def_value); setattribtypeinfo(native_input, "point", aname, typeinfo); float value[]; resize(value, size); int success = -1; //value = point(sample_input, aname, sampled_ptnum); //printf("%d\n", sampled_ptnum); //foreach(float v; value) { printf("%f", v); }; setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==5) { string def_value[]={}; addpointattrib(native_input, aname, def_value); string value[] = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; }; }; };
-
Hello guys ! I noticed that in vex, if you modify an attribute and then read it back using the point() function (or prim(), or anything not using the @ nomenclature), it will return the input value, not the modified one. See this code, running over Detail vector thePos = point(0, "P", 0); // Input point's pos is {0,0,0} thePos += {1,2,3}; setpointattrib(0, "P", 0, thePos); thePos = point(0, "P", 0); printf("%d ", thePos); // Prints {0,0,0} instead of {1,2,3} I mean, even this code doesn't work ! No input, running over Detail addpoint(0, {1,2,3}); vector thePos = point(0, "P", 0); printf("%d ", thePos); // Prints {0,0,0} instead of {1,2,3} But interestingly enough, when running over Points (or prim or whatever), this happens //Input is one point, at {0,0,0} @P += {1,2,3}; vector thePos = point(0, "P", 0); printf("Real pos : %d\n", @P); // Prints {1,2,3} printf("Problem pos : %d\n\n", thePos); //Still prints {0,0,0} Not sure what that means, but it can't be applied in my case, as I need to run over Detail. Just wanted to point it out. I need to be able to modify some point attributes (pos and others) and then read them back when running over Detail. How can I do that ? Is it possible ? Thanks in advance ! point_old_value.hip
-
hey! I'm about to create a fairly simple effect where a deforming mesh (a man running for instance) is made of spheres, not only on the surface but inside as well. Of course I can scatter points inside, but my question is how can I keep the distribution of spheres constant through the animation so that each sphere moves with the body (and on top a little noise to make each sphere alive...) a good example is this video at 1:32 any tip? cheers!
-
Simple problem: I have a foreach loop running over points on a curve each with an attribute that is randomized for which variety of geometry it needs to use. The varieties are coming from 1 input, but where each variety has a different primitive attribute for which variety it is (I get the geometry in from Unity). I got the geometry getting piped in to a copy to points node, in the foreach, but before that I need to delete, per loop, what is not used. Or I need to pick it, I don't know. I just need the loop to select a variety based on the randomly generated attribute. So the way I did it was with a delete node, with an expression with the following python code: curVal = hou.pwd().curPrim().attribValue("namechoice") compareVal = hou.node("../foreach_plank_start").geometry().point(0).attribValue("nameselect") if curVal != compareVal: return 0 else: return 1 Comparing the primitive attribute (int) with the point attribute (int). But.. I get this error: Error: Unable to evaluate expression ( Traceback (most recent call last): File "<stdin>", line 3, in expression AttributeError: 'Geometry' object has no attribute 'point' (/obj/worknode/fence_maker/delete2/filter)). Explanations to why hou.Geometry.point() is not "valid", suggestions for other ways to code it or suggestions for other way to do the network are most welcome!
-
Hi people, I'm trying out Vellum in Houdini and I was wondering how mass works. I noticed that the mass is a point attribute. That said, if I want to know the total mass of the object, do I need calculate the sum of all the points ? Thank you.
-
Hello guys, Is there a way to create to dynamically create curve point custom handles ? I know I can create a simple curve in HDA and export the curve handle to the HDA, but I can't animate the curve position and edit the curve after. The curve node doesn't take account of the transform node, so it's a bit wierd to modify the points of the curve when the result is 100 meters away. Any help would be appreciated !
-
Hey magicians, Been getting crazy with wire solvers. I think the issue is because I get the points changing over time and the constraints go crazy. I've been reading that I need to create a id attribute with $PT to hold the value, tried that with no luck. Animation works fine until the number changes Any tip will be super helpful, thanks in advance.
-
Hello Odforce, I'm trying to create groups based on the @P.y attribute of a bunch of vertical lines I have. I am almost there, but I'm not exactly a Vexpert and can't figure out exactly how to assign multiple groups with different names. I'm able to create a string attribute with the correct name for the groups with s@test = sprintf("%f", @P.y); s@groupname = concat("group_", @test); I tried using setpointgroup(0, @groupname, @ptnum, 1, "set") after this, but it didn't do anything, now I'm just stumped on how to approach assigning this attribute as a group. Any input would be greatly appreciated! Thank you
-
Hello, I have a feeling this is a common issue, but its a bit hard to explain / search for a solution. I've imported an animated alembic file, used unpack to get the points and put it through a trail node to get the point velocities, the problem is that the point count changes as some of the objects "disappear", so you get brief flicks of extreme velocity as the point IDs shuffle, I am curious about the method(s) for dealing with this problem.. Thank you
-
hello guys. I am new Houdini user. I got a question about copy to point. I can't find out a way to get each sphere scale from 0-1 when every time it generated in this case. I need some help to know about the concept to make it happen please. thanks. here is the file link: copy to point file
-
I got this dla growth system, that generate new points from "old" points each frame. i want to instance different objects to the growing dla system. My problem is that when i use an attribute randomize "pscale" and "orient" to the growing points, that result that each point changes size for each frame, same goes for orient. Ive put my randomize in the solver, and was hope that would do it, but no luck. I guess i have to give each point a id attribute once its born, but not sure how to proceed. I went through entagmas toturial "Diffusion Limited Aggregation", that is where my dla/growth system is from, so im just going to give ewach point a randomize pscale and orient. Anyone know how to do this? dla_attribute_problem.hiplc
-
Hey all! I have a bunch of points travelling around, and I would like to create a new set of points, where each of them is orbiting around the given point, in the direction of the main point, I guess the image attached explains it a little better than words...just trying to do it with vex code cheers
-
I'm trying to build out an idea for an HDA that would create a vine along a surface based on a find shortest path SOP and some controllers for where the start and end points would be to control how long the vine is. This is mostly intended to be a tool in a realtime engine with the idea that it would be cooked into a static mesh (so it doesnt need to animate). I have the main branch generating fine but I am attempting to create some branching points from the main curve to create child branches from this main branch. However, I'm fairly new to Houdini and kind of stumped where to go from here. Currently I'm scattering points from the main branch and attempting to drive them away from the main branch while following along the surface normal of the underlying mesh. I've got something really basic(just sending them out at a random vector direction and snapping them to the surface) but I feel as though this method doesnt give me any control. I thought about trying to make the branches use a find shortest path as well but Im not sure how to control where the start and end points would be procedurally, hence why I was trying to create curves along the surface normals in an attribute wrangle instead. I attached a .hip file for anyone willing to take a look. Thanks for any advice, I appreciate any pointers in understanding VEX better. IvyGrowing.hip
-
Hello ! I'm struggling to analyse points from a mesh and only keep x number (like 4?) of the farthest points from each others. I tried to grab the distances in vex then using delete node but its not working properly, didnt find a way to parse every point and compare between them. Tried average but then again I dont know how to compare each points from each other. Thanks
-
Hello! Normally I always find the answers to any Houdini issue that comes into my way, but this time I decided to finally communicate my current issue! My first question ever in odforce hehe So well... I'm doing my graduation film, and is about a shepherd that transforms sheep wool into clouds for doing rain! After some previous phase of research, we decided to give the wool a "cloudy" look, more than giving clouds a "wooly" look. So I'm using volumes to recreate the sheep wool! Thanks to various threads made by countless users here in odforce, I was able to: *Create interesting noise density values for the VDBs, hence giving a "wooly" look to the volume. I wanted "puffy" looking volumes, so I scattered particles in the sheep mesh, and created VDB out of them. *Transfer spatial transformation data from an alembic animated mesh to a volume, this way helping me to maintain the overall noise that will have otherwise been calculated at each frame if I moved the mesh I used for the VDB creation directly. *Deform the noised volume through a volume lattice technique by Juraj Tomori and Matt Estela (I'm enormously grateful for having shared their hip files!!! They saved my life). The volume will keep its noise while being deformed by box, itself deformed by an edit or a bend node. Up until now! Everything is going well! The only issue I have is.... How can I assign the point cache information of an animated lattice in Maya to a box with the same dimensions and subdivisions in Houdini? I thought that maybe an attribute transfer I could transfer the P data.. But I don't know if I need some vex to grab the position of every point in the lattice an assign them to a new matrix... I have no idea.. But knowing how to do this will be excelent! This way any lattice deformations the animators will do in Maya will be directly fetched to the box in Houdini! Any ideas?
-
Hello Guys. I got stuck here in a middle of an project and i can't find a solution. My problem is : I have a grid of points , and an animated point running over the surface of the grid. My "running" point have an attribute that is transferd ( via attrib transfer SOP inside anSolver) to the grid points by an proximity radius. then I use the transfered attribute to isolate only the grid points that are tuched by the "running"point. But the @ptnum of the remaining points is changing. And i need the @ptnum to grow in the order detection ( @ptnum 1, 2, 3, 4, 5 etc) why is that happening to understand better I've attached the scene file ptnum_chaos.hip
-
In older versions of Houdini I could add a point to a group's selection. Has that changed in H16 because I can't seem to get it to happen? Any advice would be appreciated. Thank you David