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


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
  • 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 56 results

  1. 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
  2. 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); } }
  3. 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.....
  4. 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
  5. 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
  6. 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.
  7. I have an attribute wrangle SOP running over points, in which I need to read the value of a detail attribute for every point. This seems fairly straightforward using the supplied attribute functions, but I can't get the behavior I need. Below is a simplified version of my VEX code, with calls to printf for testing. The geometry it's running over has an integer detail attribute called "last_clean." printf( "last_clean=%d\n", int(detail( 0, "last_clean"))); printf( "ptnum=%d\n", @ptnum ); if( detail( 0, "last_clean" ) == @ptnum ){ printf( "test\n"); //do stuff in this loop } and here's the output: last_clean=0 ptnum=1 ptnum=2 ptnum=3 ptnum=4 ptnum=5 ptnum=6 ptnum=7 ptnum=8 ptnum=9 ptnum=10 Note the lack of "ptnum=0" or "test." The only rationale I can imagine for this is that the call to detail() turns the wrangle into a detail one for that iteration, thus making all references to @ptnnum basically meaningless (which still doesn't exactly explain why it only reads the detail attribute once). But I can't find anything in the documentation about this behavior of those functions or wrangles (what else is new...). Can this behavior be changed? Is there a stupid error I'm missing? The wrangle is in an orange for loop block if that's relevant. Thanks for your help!
  8. Hi Guys I have a question for chramp function I moved RampValue using Addvop or Add function wrangle worked Look like repeat and vop worked clamp I don't know why two output is different (Left image uses Wrangle Node and the right image uses Vop Node) I think Solution is same , but result is different I wonder why this results chramp.hipnc
  9. How can I access the ptnum of the points coming in though the second input of of a wrangle? I tried to do it with a point expression but i don't know what to put for the atttibute_name. s@name = point(1,"ptnum", @ptnum); I want to concat the second input's point ptnum with the first input's name attribute after a copy to points sop. the copy and transform sop creates a copynum attribute which works to rename copies. but copytopoints doesn't How can i do this? thanks
  10. Hey, if someoene can help me solve this problem? I've got a grid and softtransform it, but the division can support the rotation. How to add division lines by script such as point wrangle or python nodes?
  11. Hello everyone, It is not entirely clear to me. The handle geoself() is generating an int value. Is it variable? Is there a difference between using geoself() or int 0? If so what are examples to use it.
  12. POP Wrangle Group

    Hello, I want a second age ("myage") for particles, when they are in the group "active". Very simple? But it don't work
  13. I have a curve where I used the parallel transport algorithm to transport the normal along the curve and then I use this curve as a follow curve fora bones chain. My question now is how can I setup up the twist along the bone chain and also make it twist beyond 180 degrees without flipping? (see attached file below) any guidance and examples will be greatly appreciated. Thanks. parallel_transport_curve_framing_03.hip
  14. Hi people, I got some problem with color loss in my balls array attached to point box. Everything is working as intended until I transform my array to RBD Object. In my scene I would like to have balls bounce around and collide with everything but I would like to have some materials and distribute them randomly on them as well. Everything is working but color is lost inside Assemble node at the end in Attribute Wrangle node called : add_name_attribute. I have no idea what happens but this node is making additional groups from my balls and in the end there are many groups which I don't need. All balls are turning grey in viewport as well. If you could have a look I would be grateful. ajz3d_randomize_materials2.hipnc
  15. wrangle nodes pragma?

    Does anyone knows if it's possible to define the UI of Wrangle nodes using some kind of vex #pragma?
  16. [SOLVED] VEX in Volume Wrangle

    Hi all, I'm trying to write some vex in a volume wrangle but I'm really struggling atm, not sure if the problem is the syntax or my inexperience with voxels. I have a volume which I set up with random densities and then, in the next step, the density of a voxel should be affected by the surrounding voxels. I've done the first step but can't figure out how to access the "closest neighbour voxels". I guess they have some sort of index but can't figure out which voxel has which index or if I should access them by their position. Tried to use the function volumeindex() to find index and volumesample() to take a sample from a position but both only returns 0 so I'm obviously doing something wrong. I wrote it like this: vector pos = {2, 2, 2}; float temp = volumeindex(0, "@A", pos); printf("%f\n", temp); @A += temp; It doesn't seem to matter what position I use for the vector pos, the functions always return 0 either way. So if someone knows anything about this it would be great volumeRandom.hipnc
  17. Hello there! Kinda new around here; think this is my first post, but lurking in the shadows and reading a lot this forum has been a great resource in learning the tools of the trade with Houdini lately. Well, straight to the point; I'm wondering if it's possible to make a parameter fetch a value from a created attribute. Can't post my network right now, but imagine; I have a IsoOffset, which creates a volume from a Boolean to be read by a Measure node; After that I promote the created Primitive attribute to a Detail attribute and Scatter some points on it. After this, a PopNetwork is created and I want it to emmit from the created points; but I need it to stop when the Volume Detail attribute is over a certain value; I'm wondering if via Wrangle I can do this with an If function, but then again, how would I transfer the final variable value to the Birth Rate Parameter in the Pop Source? I thought of something like this in the Parameter Field `detail("obj/Geometry1/attribpromote1", "VolCut", 0)` but it doesn't seem to work. Any ideas? Kind of noobish, so don't judge me hard on this! Cheers and thanks in advance!
  18. Hey guys, I'm doing a blood seeping/absorbed on a tissue. Have done one with AttribWrangle & Solver based of a tutorial. The logic is a. points selection, b. blood starts to grow from selected points by choosing neighbors While it works with a point selection at the Solver StartFrame, I would like to improve the point selection step, with a dynamic selection like where a newer bullet[animated sphere] touching the surface should start spawning the blood. New to Solver & need your help on this. Thanks in Advance Arun bloodSeep_v01.hipnc
  19. Hello, I have decided to study more Houdini. As i want to expand my knowledge regarding Houdini and not limit myself only with shelf tools. VEX expressions what tutorials or educational materials would you recomend and in what order? Note (need only up to date tutorials as out of date tutorials where they use nodes that are obsolite etc will not help but only create more confusion). Also what tutorials to go over regarding wrangle nodes. Best regards Tanel
  20. Silly question, but total wrangle noob here... I want to set random grey scale values on points, not sure if I should be using @id or @ptnum and how the expression would look? TIA
  21. VDB to "tidy" geo

    Hi Been watching the Hive Siggraph vids specifically the procedural game level building At 40 mins 28 sec in there is a corridor that looks interesting and i can replicate a lot of it (because of the way it is described) but i cant understand how the vdb is so clean. On the left it is just possible to see a convert vdb node connected to what looks like a wrangle of some kind? Does anyone have some insight into what would be happening in this wrangle to get such clean geo? I have no idea... Thanks for any input Dave
  22. Hey all! I'm pretty stuck in a rut trying to think my way through what I want to accomplish with a brick tool I've been working on. Currently I can feed in a box, tube, or an L-shaped box that I've modeled and I can get well stacked bricks around the perimeter. What I'm stuck on is then taking this and adding in holes for windows/doors/etc. Similar to what is seen here: https://letshoudini.wordpress.com/2016/06/19/031-procedural-modeling-for-destruction/ What I want to be able to do is copy a pre-fractured brick to the points, like the simple box I have now in the attached hip file, with rotations to help vary the layout a bit. Thus, should I boolean out holes from the mesh after generating bricks? Maybe taking into account where windows are (will be) and then not placing brick points there? (then I would have to have half bricks to copy). Not sure the booleans would behave as I want to be able to instance high detail geo to the pieces after simulation. The solution in the link looks to be a boolean as the simulation then only runs with simple bricks clustered to add some interest to their breakup (https://letshoudini.wordpress.com/2016/09/18/037-earthquake-building-collapse-rd-01/). I don't think I'm seeing this problem clearly right now and would really appreciate some nudges in a direction to help grease the logic wheels! Hartman- BuildingForDestruction.hiplc
  23. Hey guys, sorry for my english There is a way in Houdini to detect the collision and have a organic style deformation without dynamics to avoid the intersection of the meshes? I have some geometry groups (tentacles based on curves) in a single object, so, I thinks is possible with volumes and a vex expression with if and else, but I'm not so good with vex, i'm still learning. So, using a foreach loop , maybe converting the mesh into volumes and use a scatter to have the surface and inside points to detect their position, how can I import in a wrangle the groups and their points info to create this type of action? I know the message but i don't know how to write it, some ideas? Thank you
  24. Point Wrangle inside foreach loop

    I'll get right to it. I am running a foreach loop on a bunch of prims. For each prim I scatter a number of points. Still within the foreach loop, I run a point wrangle on those points. In the wrangle I run intersect on each of the points and if one hits I want to set an attribute on the prim (foreach loop peice) that the points were scattered on. In the end I don't need the scattered points, I just need the prims output with the attribute @keepage. What I cant figure out is how to set up the forloop so that this works.
  25. Hello! Sory for my English I'm trying create geometry with AttribWrangle node in Detail mode. I use addpoint, addvertex and addprim nodes. When I created some points how could I get access to them into the node? For example, I created point pnt0 = {0,0,0,}. And now I want to create point pnt1 which is close to pnt0: int X = 3; int pnt0 = addpoint(0, set(0,0,0)); int pnt1 = addpoint(0, set()); - and here I want to get position of the first point and add X to each coordinates. Is it possible?
×