Search the Community
Showing results for tags 'attribute wrangle'.
-
Hi, my title may be confusing, but it's a noob question. I'm having trouble accessing points attributes in detail mode. I can create points easily, but when I want to access let's say it's position, it always returns 0,0,0 with the point() function. Also it seems that points created AND removed still appear in detail attributes but not in my points. I'm not sure I completely understant the logic of detail vs point(...) and it's relation/interactions. I have attahched a file containing both examples of my problem noobQuestion.hipnc
-
I am certain that this is a simple question, but I am still struggling with it. I have a vector attribute called "centroid" on a bunch of primitives, and I want to create a point cloud whose P values match the centroid positions. I could use any of David Kahl's methods here https://www.youtube.com/watch?v=iyZ8dIqJ47U if I wanted a point at the centroid of every prim, but instead I have several prims with the same "centroid" vector because I obtained it by running "extract centroid" over prim pieces via a for-each loop. My instinct is that this is a super simple VEX expression like: @P = @centroid; But that is obviously wrong. I also tried the set expression, but that didn't seem to work either. Is this like "promoting" an custom attribute into an intrinsic one like "P?"
- 5 replies
-
- centroid
- attribute wrangle
-
(and 1 more)
Tagged with:
-
My question is: Can the following functionality be implemented with the node running in point mode? Not sure this is possible but there may be a work around to keep it running in parallel? I have dense geom (about a million or more points) at input 0 I have some points with 1 attribute "A" (a per point rotation value) at input 1 Using a for loop for each point at input 1, use its "A" value to rotate geom at input 0. When geom at input 0 is rotated, use point at input 1 to shoot it at the rotated geom. Add a point with the hitpoint coord, Create some attributes on the new point for distance, direction to hitpoint, etc. I have spent several days, including implementing this with a foreach loops but that is way too slow. Any suggestions appreciated.
-
I would like to get some basic understanding on how to use attributes, channels, references in vex properly. I'd like to understand in detail why this works: v@planepos = {`chs("../grid1/tx")`, `chs("../grid1/ty")`, `chs("../grid1/tz")`}; While this throws an error on the fourth line: f@planeTx = ch("../grid1/tx"); f@planeTy = ch("../grid1/ty"); f@planeTz = ch("../grid1/tz"); v@planepos = {@planeTx, @planeTy, @planeTz}; And could I avoid the relative references at all? I am aware that the attribute wrangle has some optional inputs, how could I make use of them to achieve the same result as my first example? something like: v@planepos = attrib(1, 'Center')
- 9 replies
-
- vex
- attribute wrangle
-
(and 1 more)
Tagged with:
-
how to create this hexagonal animation..using attribute wrangle
-
- hexagon
- attribute wrangle
-
(and 1 more)
Tagged with:
-
Hi, I'm trying to delete primitives by 'Attribute_Wrangle' based on their attribute value, and the result is not the one I expect, what am I doing wrong? int a; for(a=0; a<@primnum; a++) { if(@c1<0.3) removeprim(1,a,1); } in my opinion, this should delete every primitive in the mesh whose value of attribute "c1" is less than 0.3. Instead, it deletes some random primitives (well not random but unrelated ones) p.s: I know that I can do it easily by 'Blast'-node)
-
I'm trying to control the extruded distance per primitive of the sphere. I have the values that I want which will drive the extruded distance of each primitive. It's labeled extrudeHeight in the geometry spreadsheet. To do this, I'm using a primitive wrangle where I will store the height values into zscale and then use the local control on the polyextrude node to override the distance using zscale. For some reason this isn't working as @extrudeHeight seems to return 0. I was wondering if someone knew a way to do this. It doesn't have to be through an attribute wrangle I really just want this thing to work. Many thanks in advance for any help!
-
Hello I want to ask one quick question. How to store all primitive number in array using VEX. I am writing int nearpts[] = nearpoints(@OpInput1, point(1,"P",0), 20); to store points in array. Now i want to store prim num. I connected grid on 1st input and one centre point on 2nd input to use this one. If you have other way to store points tell me that also. Thank you
-
Hi guys, I need to ask one quick question. How to use nearpoint expression in vex . Thanks in advance
- 3 replies
-
- vex
- attribute wrangle
-
(and 2 more)
Tagged with: