Jump to content

Search the Community

Showing results for tags 'wrangle'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Found 75 results

  1. Hello, I have a for each connected loop, and I created a meta import node. To access the node using the detail function in a wrangle I have to use the back ticks to get the value of the iteration otherwise it just shows 0 without the back ticks. Can some please explain to me why we need to use the detail function in back ticks, for example `detail("../eachP/", "iteration", 1);` in a wrangle node for it to work? Thanks, This is with back ticks This is without back ticks
  2. Analogous Colors

    I would like to color a set of primitives using random analogous color pairs. (or triadic/tetradic etc) The color sop node provides this information but only as a guide to choose from. How would i go about this? i suppose vex is the way to go but i don't have a clue as to which functions or what method should be used. Any tips?
  3. POP stream/group in wrangle

    Hi everyone. I have a pop stream called "stream_main" and is written that its a pointgroup. Though when I refer to it in a wrangle, if doesn't work. I don't know why.
  4. Hi, this is a basic question but I have spent hours and didn't see the answer anywhere. I have some geo packed and ready for a rigidbody simulation, but i want to cotrol when the geo start to simulate. So I put a wrangle node to control it, for example: I want to start in the third frame: i@active=0; if ($F>3){ i@active=1; } But in the Dopnet, it never starts. In the spreadsheet active keeps 0 and never changes to 1. I tried to put the wrangle in a solver (because it worked for me with working with attribute transfers stuff) but it didn't work either. I did a simple scene with the problem. P.S. I know I can change the frame of the start of the sim but actually i would like to have diferents objects with differents starts so I though @active is the way. Thanks in advance active_update_question.hip
  5. POP wrangle number of inputs

    Is there any way to add more input slots in a POP Wrangle node? By default it has 4.
  6. Wrangle Cook Time

    Hello ! I noticed that the Last Cook info to know how long the node has cooked for is "wrong" for Wrangle Nodes. This can be seen easily when using the Performance Monitor to get the real data When we look at the values in the Performance Monitor itself, we can see that the Last Cook Time for a Wrangle Node is actually only the Output VEX Code step. This seems to ignore the whole attribvop step. This doesn't occur for other nodes, such as the blast or delete nodes. Is this an expected behavior regarding the Wrangle Nodes ? Attached is the test file, where I compare the speed of four methods to isolate the points I want. 1 - blast, cook time 0.189s 2 - delete, cook time 1.193s 3 - wrangle (pt), cook time 0.56ms ("real" is 1.632s) 4 - wrangle (detail), cook time 0.13ms ("real" is 4.189s) At first, I thought "hey, wrangles are sooo much faster than even the blast node, so why not use them always instead" But then, I noticed that the wait time I felt when cooking the node was a bit longer on the wrangle, despite the Cook Time telling me otherwise. This is what sparked this whole investigation wrangleCookTime.hipnc Thanks !
  7. i am trying to reproduce a ramp sliding effect from vop to wrangle. I used the vop version for very long without issue,i add a parameter before the ramp to move its position(usually used to slide the ramp across UVs) For some reason it seems i am not reproducing the wrangle the right way. you can see the vop in the pic and my attempt at reproducing it in wrangle. i posted the file. script: float ptnum = (float)@ptnum; float numpt = (float)@numpt; float anim = chf("page_animation"); //slider from -1 to 1 float div = ptnum/numpt; float bend_anim = div+anim; float ramp_bend = chramp("ramp_bend",bend_anim); @bend = fit(ramp_bend,0,1,chf("bend_left"),chf("bend_right"));//slider from -90 to 90 book_odforce.hip
  8. what is intrinsic in VEX?

    some function like below one: setprimintrinsic() carry the intrinsic with themselves, what are they, and how we can use them?
  9. recursive_division.hip I am trying to randomise a for each using vex and metadata.i only get 0 as a return. I made it work in another scenarios, but i am unable to find why it doesn't work in that specific case. I used all the different script without success: int i = detail("op:../meta","iteration"); or plugged-in int i = detail(1,"iteration"); See the file attached Thanks for the help.
  10. Hi, can someone please explain to me, why we would set the run over parameter in a wrangle node to detail or points? What is the difference between these two? I know that run over points means that the vex code is run over each point in parallel, but what exactly is run over details? Thank you
  11. Primitive Center Rotate in VEX

    Thought I'd share a little primitive center rotation snippet, any comments welcome. Note: Requires connectivity node upstream set to primitive and attrib "class". //Rotate primitive around center and defined axis int points[] = primpoints(0, @primnum); vector axis = set(0,1,0); //define user axis //vector axis = normalize(@N); //if normal axis is required float angle = ch('angle'); matrix3 rotm = ident(); rotate(rotm, radians(angle), axis); //get center (requires connectivity node, set primitime and sttrib "class") string grp = '\@class='+itoa(i@class); vector CenterPivot = getbbox_center(0,grp); vector pos; // move points to origin, rotate, move back foreach(int pt; points) { pos = point(0,"P",pt); pos -= CenterPivot; pos *= rotm; pos += CenterPivot; setpointattrib(0,"P",pt,pos, "set"); }
  12. Hello wizards, i have a little problem, and im not able to understand why my code doesnt work. I have: -a couple of points, -each with a vector attrib "size". -some code in a wrangle to order the points one above/under(direction shouldnt matter because im taking the absolut value, right?) the other without modifying the first point (0): if(@ptnum > 0){ vector last_point_size = point(0, "size", @ptnum-1); vector last_point_pos = point(0, "P", @ptnum-1); @P.y += ( abs(last_point_size[1]) + abs(last_point_pos[1]) ); } Here before/after the wrangle. Tint in blue everything that doesnt change. What am i doing wrong? Thanks in advance for your time.
  13. Hello fellow magicians, I have a Point Wrangle with 2 inputs: each input has 1k pts which are sorted to match. I am trying to create a primitive (line) pointing from a point from the set 0 to the corresponding point from the set 1. I have adapted some VEX (as in the image) I found on the forum but it doesn't behave as expected. Instead of connecting corresponding points, it connects all the points from one set to a single point in another. Finally, what would be the best method for creating a normal in the direction of the created primitive?
  14. Hello! I want to reduce the particle points and tried to do using "point wrangle", but there are no results. How do you know to reduce the particle particles using "point wrangle"? I threw off a short video GIF examples here and another project: particle_point.hipnc
  15. 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);
  16. 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
  17. Hi! I am trying to do simulation using crowd system. Agents should decide wich 1 of 3 splines to choose depends on smallest popgroup number in destination point. Could anybody help with VEX in popwrangle? Hier is a scheme attached. I think to use splines because houdini has not navmesh like unreal engine has. And navmesh as far I know just splits polygones and draw optimal spline on its chunks in direction of movement. This should simulate 3 lines in a shop. Agents should go where is not to much people waiting
  18. Hello guys; I want to read value of a parameter of a SOP node, inside a wrangle. Is it possible? Thanks.
  19. Hi guys! I have a problem that's been bothering me for a couple of days and I can't seem to wrap my head around to solve: I have a grid, with scattered points. And I have 3 objects hovering above the grid. With a colour shift on the grid (attribute transfer with an animated ball for now), I "activate" the points in a pop network, and I start adding forces on them, choreographing them, until they reach a certain age and start to move to the 3 objects above, like an attraction (point count is the same in both inputs for simplicity - also I have colour grouped which particles belong to which object for visualisation purposes). So far so good. The problem is that in theory, each $id should correspond in each point on the objects above - but alas, they seem to shift groups! So, instead of clean motion / attraction on each of the objects after a specific time, I get more of a random mass of particles moving back and forth the objects until the end where they stick on the objects. There sure is something wrong with my vex, but I cannot understand what! It should be easy: green goes to green, blue to blue and red to red.. Attached are some images to help understand the problem. the viewport describing the problem: the pop hierarchy: the wrangle to move the points to position after a certain amount of time in the "time_in_release": If anybody has any idea as to why this is happening, please, feel free to share! I would be more than grateful to hear your thoughts! Thank you so much for your time, G.
  20. Enforce Prototypes @ptnum

    Hello, So doing some clean up on my vex code in a wrangle and I turned on Enforce Prototypes to remove a bunch of the hacks to get the code setup. The one thing I can not find out a cleanup for is to replace @ptnum with a non @ function. Is the only way to declare it prior to the wrangle as another attribute? That just seems messy. Even declaring before hands means you need @ptnum to source that attribute. Thanks, -Ben
  21. I'm using about 1000 points in a point wrangle SOP as seeds to generate lines, totalling about 20,000,000 points... performance seems almost single threaded, which I assume is due to the creation of new geo. Is there any way I can speed it up? Here's the code in question if anything obviously jumps out: // trace lines through nested velocity volumes void stepRK4(vector pos; const int prim; const float dt; const vector V0; float dir) { vector V1 = volumesamplev(1, prim, pos + (0.5 * dt) * V0) * dir; vector V2 = volumesamplev(1, prim, pos + (0.5 * dt) * V1) * dir; vector V3 = volumesamplev(1, prim, pos + dt * V2) * dir; pos += (dt / 6) * (V0 + 2 * (V1 + V2) + V3); } void step_forward(vector pos; float dir) { float dist = length(pos); // There are volumes at 5 levels of detail, starting from the origin. This distance metric chooses which to sample from int prim = int(max(log(dist / 8. * 2) / log(4) + 1, 0)); // advection step based on the voxel size float vd = volumevoxeldiameter(1, prim); float dt = vd * 2; vector vel = volumesamplev(1, prim, pos) * dir; stepRK4(pos, prim, dt, vel, dir); } int steps = 10000; int pr1 = addprim(geoself(), "polyline", @ptnum); int pr2 = addprim(geoself(), "polyline", @ptnum); vector pos1 = @P; vector pos2 = @P; for (int i=0; i<steps; i++) { step_forward(pos1, 1); if (length(pos1) >= 1 && length(pos1) < 1000) { int newpt1 = addpoint(0, pos1); addvertex(geoself(), pr1, newpt1); } step_forward(pos2, -1); if (length(pos2) >= 1 && length(pos2) < 1000) { int newpt2 = addpoint(0, pos2); addvertex(geoself(), pr2, newpt2); } }
  22. is there a opinion to jump to an other node in a wranglesop? I.e.: in an if choice depending on the ouput (0/1)? if(i@test == 1) goto node.....
  23. Dear all, A simple looking question about how to pick up an @ttribute's value inside a MATRIX : 2@boo = set(1,2,3,4); printf("boo[0] : %g\n",@boo[0]); it doesn't work while it is working with vector or obviously with array. Saddly, i feel stucked, if needed to pick up one of these values, separatly. Humbly, all/any feedbacks are welcome even if i've dumbly mistaken myself (it could happen to anybody ), thank you all. cheers. alr77
  24. I'm new to vex and was wondering if there is a splat operator to unpack arrays into function arguments? (like javascript's ... or rubys *) The reason I'm asking is I have a wrangle that I want to take an unknown number of points and put their position into the cspline function. In the docs we have vector cspline(float t, vector val1, ...) If it was Javascript I'd do something like cspline(t, ...array_of_parameters) to unpack my array into that list of parameters, is it possible to do something similar in vex? If it's not possible how can you get an unknown number of parameters into a function that takes an unknown number of parameters? Cheers Ben
  25. Hello, Can I get a little help please? I have an RBD simulation where a bridge's rope breaks. The first part is a glue contraints then it turns into soft constraints then I remove the primitives to break the soft contraints. But I have a part of the rope I don't want to break. So I put it into a group. How can I add that group into my primitive wrangle inside my sop solver as an exception. I mean I would like to break all the constraints ( primitives) except the ones in the group. Thank you.