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


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

  1. I'd like to make a bracelet on my wrist as shown in the picture above. No matter how the object moves or rotates, I want the bracelet to move and rotate accordingly. How can I make it? I tried to insert the circle by making the main axis of the object, but I failed.
  2. I have been studying VEX for a couple of months , trying to making sense of some concepts still. There's 2 functions that seem to do similar things but I can't understand much the difference. What is the difference between NEARPOINTS and NEIGHBOURS? After reading the manual, it didn't provide me much understanding. Cheers D
  3. 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.
  4. VEX Tutorial

    This is an older tutorial I had made, but it has recently moved to a new location, so I wanted to update everyone one on that. Houdini VEX point manipulation tutorial shows four different types of geometry point setups via VEX code . Project file is now available for download as well. Watch the tutorial at Fendra Fx: https://fendrafx.com/tutorial/houdini-vex-point-manipulation/
  5. unique ids in a continuous vellum simulation

    Hi. I'm new to vex and have a problem i can't get my head around. I created a little simulation where paper gets blown away every 6th frame. Now i want to give every page an unique id, but counting upwards. so my code is: f@idpage; if(@Frame%6 == 1){ @idpage+=1; } I@ know its not counting because every frame, the attrib is set back to 0. But how can i count my IDs in dops or on a global level? Paper_Wind_02.hiplc
  6. I need help I newly started with Houdini and doesn't know hot vops and vex works and I want to create a line where the normals are pointing in a different direction while keeping a 90-degree angle to the line. I fount a tutorial on the internet which only make the normals point in a random direction but not in the 90-degree angle I tried to set the normal direction to zero with floats and stuff but it always results in vex errors. @N = sample_direction_uniform(rand(@ptnum)); rand nomrals.hip
  7. Hi guys, I'm a little lost on how to calculate distance between successive points (picture) of my floor mesh. I guess i have to use a "for each point" in Vex. This distance will help me to creat wall with the exact scale between angles. Thank you for your help.
  8. Hi all, Im looking to control the colors on a grid ( YZPlane) in VEX to create a mask (will be used to create a group of the un-masked area), My approach is to use relpointbbox for the position and 3 chrand's for each side profile, Im looking to see if someone has done something similar. My current solution (and for those interested) is fairly simple but gives good control. vector bbox = relpointbbox(0,@P); float Right = chramp('RightRamp',bbox.y); float Left = chramp('LeftRamp',bbox.y); float Top = chramp('TopRamp',bbox.z); //Init to 0 v@Cd = 0; //Top Ramp if(bbox.y<Top ) @Cd.g=1; //Left Ramp if(bbox.z<Left/2+.5 && bbox.z>.5 ) @Cd.r=1; //Right Ramp if(bbox.z > (1-Right)/2 && bbox.z<.5 ) @Cd.b=1;
  9. simple vex function

    I am tring to write a simple vex, refer to the down pic, the goal is to set "visited" attr to be "true", but I can't get the vex code work, I am to new vex, please any help, thank . dfs.hipnc
  10. 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"); }
  11. 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.
  12. Growth animations?

    Hi all, I’ve been able to make fairly random recursive growths but these are next level with the detailed precise in the ridges and expansion. in the comments of this last post for instance, the author suggests it’s the use of curveu & poly extrusion. Could anyone elaborate on this? Ideally I could read about VEX and curveU somewhere to understand better but I am yet to find a resource like this. I feel it might be easier to grasp these concepts through an example though, so if anyone could explain the above animations that would great! If not pointing me to something to read/watch would also be amazing! thanks in advance ODforce :-)
  13. vex precision problem

    hello, I am having a problem, but it almost seems more like a glitch. I have an attribute called "distance" on the curve. I am deleting points based on distance. The point's value that is circled is 0.087. I say to delete anything greater then 0.087, but for some reason that point gets deleted too. It's acting like I said equal to or greater than. I am also including a photo from my actual scene. If I set the value to 0.088 instead of 0.087 some how it works. Any help is welcomed (hip at bottom) curve.hiplc
  14. Hi, I am trying to make a cellular automata sim a la John Conway. The vex version works fine and I think it is true to the original; it runs the same each time for a given set of initial conditions, as you would expect. However, when I try to use the code in openCL there is some variation, from the first frame or whenever I 'Reset Simulation'. I can't work out where this variation comes from and why the algorithm doesn't run as you would expect. I have tried using int, and float for the parameters with 32 bit and 64 bit precision, this doesn't fix the problem. Is there some kind of rounding which happens in Open CL but not vex? Ideally I would like the VEX and Open CL versions to be the same - is that possible? Please see attached hip. Thanks so much. GOL_openCL_vex.hipnc
  15. Local Variables

    A quick Question about SequenceBlend, TimeBlend and BlendShape SOP. I have an attribute that changes from 0 to 1 per point randomly in 100 points. How can I assign it to these SOPs??? Im trying Position blending of Points. THANKS..
  16. Control forces by conditions

    Hey I had this come up a few times today and I was wondering what was the best way to tackle it. I am doing a melting sim of an object thats floating in space. I am using temperature to heat the FLIP and start the melting process. if use gravity then the whole thing starts moving from the start and not just the heated parts. I was thinking if I could just apply the forces based on temperature then that would would be ideal. I tried something like this in the pop wrange but its giving me erratic results. float hot = @temperature; if (hot>1) {@v *= 3;}; Also whats the equivalent of the the geometry spreadsheet in dops, if I wanted to see the values of the temperature or any attribute. I can visualize as color but would be nice to get some numbers. Cheers!
  17. How to add color gradient through velocity plus collision to influence color velocity? to influence the color such as this one here: https://vimeo.com/59024762 how did he do, but he used xsi softimage. if possible to make a Houdini?
  18. How to use references properly

    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')
  19. Hello Community, I am stuck on a problem to get colors from multi-list parameter. I am trying to implement picking a color from a multi-list parameter randomly and I wrote this vex below. int seed = int(rand(@ptnum) * chf("colors")); v@Cd = chv(sprintf("./color%dr",seed+1)); For some reason, it gives me black or white only... And I couldn't figure out why is this happening. Could someone advise me about this? Thank you in advance! Harutabi.hiplc
  20. Using Arrays with no duplicated values

    Hello, i'm new houdini, new to vex and not done any programming for a long time (most of the forum sighs) Coming from a 3DS Max background I’m absolutely loving Houdini, and can really see the power VEX can have so trying to focus a good chunk of my learning time to get comfortable with it right from the start. I've been building a very simple point infection model to get familiar with the various bits and pieces. As part of this I’ve been storing point numbers to an array, using this in a solver and each frame more pt number get added. The only way i could see to do this was to take two arrays, combine them and then deduplicate, but this seemed a bit long winded and not very efficient. Searching around Stack overflow I noticed that in Javascript there was a find function and also this exists in VEX so instead have now used that to search the array and add any unique points on-the-fly. I guess my question is whether this is actually the best way to do this? It's little frustrating that find() isn’t listed on the https://www.sidefx.com/docs/houdini/vex/arrays.html page as I’d have probably tried it sooner. Which is why I’m wondering if there is a reason it's not on there? Sorry bit long winded and hope this makes sense These are the two options ive used: using Find() and only writing if not already in the array i[]@pointsArray1 = {0,2,7,8,10}; i[]@pointsArray2 = {0,3,5,7,8,11,15,16,10}; for (int i=0; i<len(i[]@pointsArray2);i++){ if (!(find(i[]@pointsArray1, i[]@pointsArray2[i])>=0)) { push(i[]@pointsArray1,i[]@pointsArray2[i]); } } De duplicating the array post i[]@pointsArray1 = {0,2,7,8,10}; i[]@pointsArray2 = {0,3,5,7,8,11,15,16,10}; i[]@newArray; foreach (int num; i[]@pointsArray1){ for(int i = 0; i<len(i[]@pointsArray2);i++){ if(num == i[]@pointsArray2[i]){ push(i[]@newArray,i[]@pointsArray2[i]); } } } push(i[]@pointsArray1,i[]@pointsArray2); for(int i = 0; i<len(i[]@newArray);i++){ removevalue(i[]@pointsArray1,i[]@newArray[i]); } thanks
  21. I've been learning a lot of vex over the past couple of months and this is my first real practical use trying to make a procedural tool. Let me know what you think! Next iteration is to add more curved lines using trigonometry instead of smooth. https://youtu.be/UsDpGrcrLhE
  22. random pick point with vex

    I just recently learn to use AttRandom to randomly pick point on a scattered field, how to I do it vex? random pick point.hipnc
  23. Hi folks, I am actually coding some basic operators like divergence, gradient in vex and python to demistify them and wanted to share the file with you. Feel free to update or correct the file since i might not be sure of some operators. it contains : - Divergence (voxel and points) - Gradient (voxel and points) - Curl (voxel) : the curl seems to not have the same order as vdb curl so still in wip - Laplacian (voxel) : The computed laplacian is somehow less precise than vdb laplacian - Covariance matrix and eigen vectors (points) : It works but the scale is normalize - Laplacian matrix of a mesh (python) - Bernstein polynomials basic_operators_001.hiplc
  24. Hey guys! Ive recently been trying to code a basic path finder, for pipes on a building. I have tried writing it in a vex for loop, without much success. Did i just code it wrong, or is this even possible without using the solver node? I have a lot of buildings and i want to generate the pipes without running the timeline, any ideas? Thank for the help!
  25. Kill particles by distance

    Hi all, I'm trying to come up with some vex to use to kill particles in a sim when they have traveled a certain distance from their birth location. I have mother particles that last one frame and i'm using a pop replicate to spawn new splash particles from them. What i'd like to do is store the position of the mother particles and subtract it from the position of each replicated particle every frame to get the distance, then set them as dead once this has passed a given threshold. Extremely limited VEX experience here, so if anyone could give me some kind of starting hint/snippet that would be amazing Many thanks, H