Jump to content

Search the Community

Showing results for tags 'vex'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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 594 results

  1. VEX Array Functions

    Harder, Better, Faster, Stronger please! Looking for some voodoo to optimize these snippets... Find Unique Elements in One Array function int[] unique_elements (int arr[]) { int _arr[] = sort(arr); for (int i=0; i<len(_arr); i++) { while(_arr[i] == _arr[i+1]) pop(_arr,i); } return _arr; } Get Duped Elements in One Array function int[] duped_elements (int arr[]) { int _arr[] = sort(arr); int result[] = {}; int dupe; for (int i=0; i<len(_arr); i++) { while(_arr[i] == _arr[i+1]) { dupe = pop(_arr,i); } append(result, dupe); } return result; } Find Common Elements in Two Arrays function int[] common_elements (int arr1[]; int arr2[]) { int result[]; foreach (int i; unique_elements(arr1)) { foreach (int j; unique_elements(arr2)) { if (i==j) push(result,j); } } return result; } Find Different Elements in Two Arrays function int[] different_elements (int arr1[]; int arr2[]) { int result[]; int _arr1[] = unique_elements(arr1); int _arr2[] = unique_elements(arr2); foreach(int i; _arr1) { if(find(_arr2,i)<0) append(result,i); } foreach(int j; _arr2) { if(find(_arr1,j)<0) append(result,j); } return result; } Swap Arrays function int[] swap (int arr1[]; int arr2[]) { int temp[] = arr1; arr1 = arr2; arr2 = temp; return {1}; } Here's some of what I was using to test it... these are all based on arrays of integers but could be tweaked obviously for other types. i[]@arr1 = {3, 2, 15, 27, 1, 3}; i[]@arr2 = {3, 2, 3, 15, 41, 41, 1, 2, 2}; i[]@arr_comm = common_elements (@arr1, @arr2); i[]@arr_diff = different_elements (@arr1, @arr2); i[]@arr_uniq = unique_elements (@arr1); i[]@arr_dupe = duped_elements (@arr2);
  2. Hi folks ! A tutorial about recursive backtracker in vex to create mazes. The idea is simple : You get your adjacent neighbours and check if they are not visited, if not, you randomly choose one and move to it. If no valid neighbours, you backtrack the stack of your previous positions and check if there is a valid neighbour until you find one. If the stack is empty no valid cells are left so the maze is done. recursive_backtracking_001.hiplc
  3. CurlNoise + Vex Help :(

    Hi there! Houdini noob here ^^ Some days ago I found this image on the internet and I really liked it so I thought about trying to replicate it but maybe animating it hehe to me it seemed like it could be made using curl noise fields so I followed the entagma's vex 101 tutorial and I manage to make this little animation as a test, and I really liked it. I think is pretty close to the image, BUT i have 2 issues with it that i don't really know how to fix or adjust a little, so i was wondering is maybe some of you guys could help me a bit or at least guide me to the right path. https://imgur.com/a/wyg2zMS First: Looping it, is it possible to loop The curlnoise or the curlxnoise? Or is there any other noise function that would produce a similar result but easier to loop Second: Is there any way to soften the curlnoise behavior in these spots? https://imgur.com/a/rLB40Hf My best idea so far i just placing the camera in a place where these intersections aren't in frame haha but would love to know if it's possible at least to make those somewhat less dramatic? CurlNoiseTest_v1.hip
  4. Hi I'm trying to make a chain of points follow a curve, maintaining the distance between them. I can achieve this in a rough way by using primuv/ primitive attribute in vops and offseting the U value by the distance. However this doesn't preserve the length L, due to the curvature. How would I find the 'chord' points of the curve along the vector P1P2 ? Another way to think of this would be the intersection of the curve and a sphere of radius L. Are there helper functions already part of Houdini that will allow me to do this? Thanks
  5. time based lerp/conditions in VEX

    Hi everyone. I'm hoping someone could take a look at this VEX and help me simplify it/point towards a more standardized way of handling time based conditions and blends in the DOP context, as I keep hacking together things to fill the similar requirements but it's always really over complex. 'm searching for nearby points on prims in the 2nd input of this wrangle and if found snapping my position to the nearest point on that prim, plus adding a bit of the velocity. I want to start a timer from the time that the point is found and run that through two ramps; one to lerp the position and the other for the velocity. Clearly its very convoluted and i'm also setting a lot of extraneous attributes, as I find if I try to use variables they often get reset each frame. It would be amazing if I could cut this number of lines in this down, or just get some tips on making it more readable. Many thanks, H window_odforce.hiplc
  6. Stopping particles popnet

    Hello everyone! The guys need help how to slow down or stop a particle based on its age. That is, the more her age. the slower she moved and then stopped altogether deceleration.hip
  7. Trying to get sin wave through pscale

    Hey all, I'm trying to get a sin wave to vary the size of pscale driven geometry through vex over time. I can get it to affect the scale initially but it doesn't fluctuate it over time. Anyone want to have a look and see what I'm doing wrong here? pscale_sin.hip
  8. Displace points along normal in VEX

    Hello everyone ! I want some points to be displaced along their N, for various reasons it needs to be in VEX. But some points doesn't react as they should. I tried the same workflow in VOP and it works perfectly (but once again, I need to do it in VEX ^^"). Do you have any idea where there can be a problem ? (I put the hipfile for a better understanding !) Disp along normal VEX.hipnc
  9. I'm new to VEX, and I am having a hard time remembering the functions, conditions etc. I guess I need more practice, but how can I get good at using them in create ways to solve problems better?
  10. setdetailattrib "min" issue

    Hi everyone, Simple question for ya'll this morning. I've just found out that the setdetailattrib has modes which can apparently return min/max and more. The max seems to work fine, but the min not so much. Always returns 0 in my case. Just add this in a wrangle of some scattered points or anything. f@noise = anoise(v@P, chi("turbulence"), chf("roughness"), chf("attenuation")) + chf("offset_min"); setdetailattrib(0,"min",@noise,"min"); setdetailattrib(0,"max",@noise,"max"); Is this a bug? Thanks
  11. Hello everyone! I recently made a setup to achieve magical smoke effect that orbits while moving. I shaped and animated a bunch of points that move along a custom curve. I want to make all those points orbit or twist around the original path (curve), something similar to curve force node for POP. I'm having some difficulties making this happen with VEX. I would appreciate your help. Cheers; Basic Shape.hip
  12. Pop orbit object [Tutorial]

    Hi all ! I did a simple vex scene with particules orbiting an object. The main challenge is to avoid particules to exit their orbit by computing an vector that correct their distance to the surface object from an iso value. Hope you like it. Update : Added the gradient of geodesic distance as axis of rotation for the particules. Usefull if you want to rotate along each element of a geometry, like arms, legs, tentacles, etc. pop_orbit_001_odforce.hiplc
  13. Is there a way to distribute points on a line according to a ramp's density? I'm aware of the scatter node's density input , but that uses a random sample which isn't ideal for my use case.
  14. Curved velocity in vex

    Hello people. I have created points and with my Vex code I am giving them velocity to "attack" an object, but right now my points are going in a straight line to an object. I wanted to ask if there is a way how I could make my points travel with curved velocity (like missiles in my reference photo are travelling)? I know there is POP Curve force, but I would like to find a way to do it in POP Wrangle. mplay.mp4
  15. Sort points

    I am trying to find points with the same xz but different y. Keep the lowest and highest of each xz pile . Make a new clean polyline from those. i need some help with my vex code, argsort isnt working as i expected, i cant find out why sort.hip
  16. Hi all, I need to generate an integer attribute on points that switches between 0 and 1 across a frame range like this: so the length of the spans is driven by a min/max, and their distribution is then randomly scattered across the frame range. This also need to be different for each new point as they are born . Could anyone help me break down what I need to do this in vex/vops? I was told to look into arrays and while loops which is well beyond my current VEX level. Many thanks, H
  17. Hi all I am posting a simple procedural desintegration that is very fun to build, as always, with quaternions and vex. Vex is annoted, Hope you will like it. There is a line in vex where i remap a random quaternion [0, 1] to [-0.7, 0.7]. It roughly removes the random overlapped orientations. If you disable it you can see that orientations are a bit biased because of the 0 - 1 range. Update : Now with RBDs lego_desintegration_RBD_001.hiplc
  18. Hello there, I simulated a bunch of geometries, street rubbles, cobble stones etc and now that I have my final geo, I would like to delete a bunch of cobble stones, so i need to be able to select them by polycount, that would be really dope. What would be the vex way to do that ? Thank you ! Tanguy
  19. Hi, I'm running into a small problem trying to automate a Daily Tool. Basically I want to be able to get the BBox of my asset to transform them accordingly next to each other for presentation. Only Problem is when I query the Bbox_size or min,max,etc... using the Vex functions(usd_getbbox_size) houdini returns values that are huge (bboxSize = {-6.80565e+38,-6.80565e+38,-6.80565e+38}). Which makes it basically unusable. I don't know wether it's a bug Or I'm using it wrong. Thank you very much in advance! Antonino Here is my vex snippet: //=========== Parameters =============// string parentPath = usd_parentpath(0, @primpath); //----------- String Path Par string wildCardAsset = "/cube1"; //----------- Setting Bbox Par vector bbox_size = usd_getbbox_size(0,wildCardAsset,"Render"); printf("bboxSize = %g",bbox_size); usd_getbboxsize.hipnc
  20. I very much enjoy the convenience of the "Alembic Group" node and would like to bring that to an FBX (File node) pipeline. Alembic Group's hierarchy selection seems to be based on a writeable string primitive intrinsic called "abcobjectpath." When importing an FBX using a File node, it comes with path attributes that can be used with Alembic Group but ONLY if I can somehow copy them as a prim intrinsic called "abcobjectpath." Is there any way of creating an arbitrary prim intrinsic out of nothing?
  21. Hi there, I'm trying to learn vex, but I've run into a bit of trouble with the RBD solver. My goal is to apply forces to individual points on a model, and have the model respond appropriately. My first assumption is that I would use a bulletRBD solver to accomplish this, along with a POPForce node. However, this applies force to the center of mass of the object, which is fine, but I also want some rotational values as well. For instance, if I have a cube, and I apply force (0, 10, 0) to verts on the left side of the cube, and I apply the opposite force (0, -10, 0) to verts on the right side of the cube, I would like to see the cube spin. I know I can manually edit the @w attribute to add angular velocity, but do I have to calculate the angular velocity manually to make this work? Thanks for your help.
  22. Hi, A hobby project as a vex and python challenge for myself mostly. So, the idea is to "mix" (scramble) attributes like layers in photoshop. If you feel like sinking your teeth into it there's the hda in attachment... and of course, critique and comments are very welcome! V1 and V2 didn't support vectors and things were simpler. This is V3 that I decided to take to the next level. There are 2 functions in the python module for checking the type of attribute being used (float or vector). They toggle invisible parameters in the multiparm, which control the visibility of ramp parameters. (haki.h is embedded into the hda, just so you can see its contents. the attrib wrangle WILL FAIL without it (that is unless you put a copy in $HOME/houdiniXX.X/vex/include), but the attrib VOP won't because it's in its outer code. there's no other difference between the two.) [EDIT 20 Nov 2020] : This is totally broken right now. It outputs the wrong values. Cheers! Hristo
  23. Vex polysplit behavior

    Hi, As show in my picture, I'd like to split the polygon from one point to another. It may have more than one prim between the two points. Does, someone could give me a hint on how to acheive that? I know approximatly that I need the add point/vertices and reconstruct the polygons with a good winding direction, but I don't have clue on how determine how much edges are between and how to put the news points the good position. Find the solution for that will definively help me to ramp up my knowledge in vex polygon manipulation/modification.
  24. Group create vex removeprim

    Guys, please help, I can’t understand how to write the conditions for creating groups, so that after deleting a primitive, a group is created for primitives that have been deleted and those that have not been deleted
  25. RBD and its sleeping properties

    I set up a scene with crates that I want to get destroyed by a flip sim. figured out that I had to put a attribwrangle with i@bullet_sleeping = 1; so that RBD stays in place until the FLIP collides. The problem is now that with a little hit of flip to a group of crate the push activates all of them to break. I am a noob, but found that there is a threshold to control the amount of impact to activate the RBD. I just dont know which one of these it is and how to apply it to wrangler. bullet_angular_sleep_threshold bullet_ignore bullet_linear_sleep_threshold Documentation found here : https://www.sidefx.com/docs/houdini17.5/nodes/dop/rbdpackedobject.html Here is the original failed vid: https://www.dropbox.com/s/dl8ze5rv4vf6gse/Test.mp4?dl=0 Here is current failed test vid: https://www.dropbox.com/s/sa4sumxfqpqmdhq/Flud Test2.mp4?dl=0
×