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 734 results

  1. Hey guys, So today I tried getting a point's .y position but it gives a value of 0 for some reason. In the attached picture you can see the code that I tried to run. When I use the "P" then it gives the correct vector for the position, but when I want to just get the .Y value(should be something around 1), it stopped working. Is it because I can't use the "P.y" expression in the point function?
  2. Hi All, Quick question, Objective: I have two points (could be any orientation), If the distance is greater than "x" meters ( in world units, 0.5m in this example) I would like to add an additional point 0.25 Meters along the vector (eg.from first point two second point direction) is there a VEX function for this? cheers
  3. How does one deal with multiple paths in POP Steer Path I would like to be able to assign a list of possible paths to each agent particle instead of all the particles following all the paths. Currently I set up multiple sops and multiple agent groups but that's not very scalable. Cheers
  4. I hope to get the nearest position on a surface or line that is somewhere along the inverse normal, searching in a range of angles (a cone if you will). If this can be done in vex that'd be ideal (I've messed around sop loops and group stuff but that as expected gets very slow). Too aid with the question there is an expertly drawn diagram.
  5. 3@transform = set( {-0.146396,-0.0727609,0.0550026},{0.0605058,0.000363445,0.161525},{0.0682531,-0.156387,-0.0252152} ) ; -- Instance with @transform p@orient = quaternion(3@transform); DELETE @transform attribute -- Instance with p@orient Different Results of orientation! If I instance the point with p@Orient converted from 3@transform using quaternion() , the orientation is flipped . It seems that I get the same p@Orient value with ident() and ident() * -1 . Is it the problem? How can I obtain the correct p@orient ? Thank you for reading my question
  6. Hey guys. I want to display info of each LOD on parameter editor panel and I got it work in Houdini, but when I use this hda in UE, all detail scripts turn to be strings rather than values, and horizontal layout of labels messed up, too. Is that because UE don't support runtime vex in label parameter?
  7. whenever I try to use pcfind() I get perfect circle shaped sampling I tried to break this pattern by adding noise to P position in pcfind() as such : if(intpointgroup(0, 'infected', @ptnum)) { @myArray = pcfind(0, 'P', @P+v@noise, radius, max_pts); } *noise was generated in vex using voplib.h but somehow it just shifted the start position, not the sampling pattern itself. (I still get clean circle shape sampling) is there another way I can break this pattern in one wrangle? I've used attribnoise to P and rayed it back to get a similar result, but it messes up the rest position and doesn't feel right sorry for horrible English and thank you in advance!
  8. Circle tagents

    Goal: Looking into tangent lines between two circles and trying to convert this function into vex. The code is originally in Java but looks like it should be easily converted to vex but I'm getting errors with my attempt below. function float[] common_tangent_line(x1, y1, r1, x2, y2, r2) { // Compute the common tangent line of two circles: (x1, y1) - r1 and (x2, y2) - r2 // Return in the form of line equation: ax + by + c == 0 delta1 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) - (r1 + r2) * (r1 + r2); delta2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) - (r1 - r2) * (r1 - r2); p1 = r1 * (x1 * x2 + y1 * y2 - x2 * x2 - y2 * y2); p2 = r2 * (x1 * x1 + y1 * y1 - x1 * x2 - y1 * y2); q = x1 * y2 - x2 * y1; results = []; if(delta1 >= 0) { l11 = { a: (x2 - x1) * (r1 + r2) + (y1 - y2) * Math.sqrt(delta1), b: (y2 - y1) * (r1 + r2) + (x2 - x1) * Math.sqrt(delta1), c: p1 + p2 + q * Math.sqrt(delta1) }; l12 = { a: (x2 - x1) * (r1 + r2) - (y1 - y2) * Math.sqrt(delta1), b: (y2 - y1) * (r1 + r2) - (x2 - x1) * Math.sqrt(delta1), c: p1 + p2 - q * Math.sqrt(delta1) }; results.push(l11); results.push(l12); } if(delta2 >= 0) { l21 = { a: (x2 - x1) * (r1 - r2) + (y1 - y2) * Math.sqrt(delta2), b: (y2 - y1) * (r1 - r2) + (x2 - x1) * Math.sqrt(delta2), c: p1 - p2 + q * Math.sqrt(delta2) }; l22 = { a: (x2 - x1) * (r1 - r2) - (y1 - y2) * Math.sqrt(delta2), b: (y2 - y1) * (r1 - r2) - (x2 - x1) * Math.sqrt(delta2), c: p1 - p2 - q * Math.sqrt(delta2) }; results.push(l21); results.push(l22); } return results; }
  9. Near point constantly updating

    I feel like the answer is going to be simple but I have been hung up on this for a while. I am finding the nearpoint and storing its vector as a lerp target. That part works fine but as the rest position moves I want it not look for a new closest point until distance from rest to the last nearpoint is x far away. Instead of constantly looking for the closest point. The final effect I am going for is to have the sphere move across surfaces and have the lines act like tendrils walking. point_reach_003.hiplc
  10. Hi! This is my first post to this wonderful forum, my teacher recommended it to me since I'm the only one in my CG-course to want to work with Houdini and the autodidactic approach can be harsh sometimes I was following the classic "vex isn't scary"-tutorial on for loops and decided I wanted to try to make the "infected" points also move into a new position within the foreach-loop after they've become infected, which worked fine. But then I tried to create a float parameter that blended the initial position of each point and the new position, so that you are able to see them moving towards the center as they became infected, and got completely lost in the sauce. Anyone know how to write that in VEX? I attached the file with directions. Looking forward to spending time within this community, you guys are awesome! FORLOOPS_VEX.hipnc
  11. Delete Duplicate Packed Geo

    I've got a lot of geo being imported into my scene and it turns out there are many duplicates. Does anyone have any neat ideas how to whittle them down to a single instance? I've packed them and then I was thinking of building an array of point positions for everything and then removing all but one instance of said position. Any ideas? Cheers
  12. Hello Houdini vex wizards! I'm having a lot of difficulty trying to come up with a solution for this one myself. As the title mentions, I'd like a single point to be created for just one frame and then disappear again - I would also like this to happen at random time intervals as the frame number increases. For example the point will flash on for 1 frame, then maybe nothing for 10 frames, or nothing for 2 frames, then another point flash and so on. I'm not very good with time related things in vex, but would love to learn more about random time stuff if anyone has any ideas?
  13. Hi, im build a Maze generator with vex. But i went into an issue by setting up the right iterations. I developed the code in a solver sop because it was easy for me to understand whats happening. But now i want the code iterating till the maze is finished. So I want the iterations to be driven by a condition, for example (and not by frames). Does anybody know how to make a recursive version of the code, so i will be able to setup a condition? function int[] nunvisited(int inpoint){ int pushed[] = array(); foreach(int n; neighbours(0,inpoint)){ if(inpointgroup(0,"visited",n)!=1){ push(pushed,n); } } return pushed; } function void movefor(int cpoint){ int neighbours[] = nunvisited(cpoint); int randbour = int(rand(cpoint+25)*len(neighbours)); int npoint = neighbours[randbour]; //add point to visitedlist array int visitedlist[] = detail(0,"visitedlist"); push(visitedlist, npoint); setdetailattrib(0,"visitedlist",visitedlist,"set"); //enable visited group setpointgroup(0,"visited",npoint,1,"set"); //disable current group setpointgroup(0,"current",cpoint,0,"set"); //enable current group setpointgroup(0,"current",npoint,1,"set"); //color setpointattrib(0,"Cd",npoint, {0,0,1}, "set"); //add line int l = addprim(0,"polyline",cpoint,npoint); setprimgroup(0,"line",l,1,"set"); } function void moveback(int cpoint){ int list[] = detail(0,"visitedlist"); int lastindex = len(list)-2; int ppoint = list[lastindex]; //delete point from visitedlist array int visitedlist[] = detail(0,"visitedlist"); removeindex(visitedlist,len(list)-1); setdetailattrib(0,"visitedlist",visitedlist,"set"); //disable group setpointgroup(0,"current",cpoint,0,"set"); //enable group setpointgroup(0,"current",ppoint,1,"set"); setpointattrib(0,"Cd",ppoint, {1,0,0}, "set"); } if(len(nunvisited(@ptnum))<1){ moveback(@ptnum); }else{ movefor(@ptnum); }
  14. VEX

    Hey! my name is Abdulwadod I'm an FX student and i'm kind of new to houdini my question is how to get the same fallof that attribtransfer node had when using a distance threshold you know this bandwidth threshold param i'm trying to do the same thing in vex using wrangle node but it just give me a linear transition i wanna to just transfer a color so i wanna it to have a fallof when doing it using point cloud in vex.
  15. Does code in vex have better perfomance than use nodes? If yes, should I use vex as much as possilble?
  16. Hi. I try to controll bend stiffness_drop_off inside vellum contraint property. But when I turn on stiffness dropoff no changes appear during simulation. If I turn it on inside vellum cloth within bend properties It works but whener I make changes with vellum constraint properties nothing works. Any help?
  17. Hi I wonder if someone can explain why the following code won't work? Basically just trying to take an emitted particle and reposition it if it overlaps with existing geo. The code runs fine but doesn't reposition the point at all, wondering why. Thanks! v@ptemp = @P; int npts[] = nearpoints(1, @ptemp, @pscale); int lent = len(npts); float seed = 1; while(lent){ @Cd = {1, 0, 0}; @ptemp = set(random(seed), random(seed+1), random(seed+2)); seed++; } @P = @ptemp;
  18. Houdini.School | Attributes

    New Houdini class on Attributes. Enroll now: https://bit.ly/houdiniattributesclass Teaser: https://vimeo.com/714350608 Attributes are the heart and soul of Houdini. So many beginners and even intermediate users stumble over the importance of knowing the in and outs of Attributes. Understanding this topic is vital to getting the most out of Houdini itself. My goal is to give you a much deeper understanding of Attributes, so I have broken down this class into smaller topics. This way I can take you step by step from the core geometry component foundations, to common workflows, as well as reading & writing attributes from scratch. I'll also take you through examples of actual attribute implementations relating to RBD, FLIP, VELLUM, Crowd sim, and show some Viewport GL attributes. In session 1 you will be shown the core geometry components and how they relate to attributes. You'll also be given some clarity on confusing terminology, plus learn what attribute classes, and types you have available. Also covered will be a full explanation of the Geometry Spreadsheet, plus some tips on how you can sort through all of the data that it presents. I'll run you through what intrinisics are, how they can be accessed, and also explain what attributes are NOT, which is just as important as knowing what they are. In session 2 I will teach you the many different ways that attributes can be created, plus the the ways you can read those attributes back into your node streams. I will also take you through the world of Attributes versus variables, global versus local, and explain the reasoning and history of dollar sign versus the at symbol. In session 3, I'll focus solely on attribute usage in a variety of simulation setups. Showing you some implementation methods for simulation attributes. Houdini comes packed with a lot of native attributes already built in. I've gone ahead and collected together a massive list of well over 8,000 of them for you in PDF form. This course is aimed at getting beginners up and running with Attributes, but I will be taking you into intermediate territory fairly quickly as it's required to get a full understanding of Attributes. There WILL be discussions of VOPs, VEX, HScript, and Python in the second session. Don't worry though, because I will also be showing you many of the native SOP attribute nodes which simplify many common tasks for non-coders. I've packed a lot of information into this class, so even if you are an intermediate user to begin with, there is still plenty of good info for you as well. For more info and to enroll, head over to Houdini.School today.
  19. Escher Spiral Tesselation

    I am wondering if anyone can give me some advice, I found this awesome article about remapping rectangular grids to a spiral based grid. The article can be found here: https://isohedral.ca/escher-like-spiral-tilings/ and the part I am trying to recreate can be seen in the following Screenshot: I tried to implement the simplified version of this equation but the outcome looks nothing like the diagram above. If anyone could point me in the right direction it would be greatly appreciated. Many thanks, S EscherSpiral-01.hiplc
  20. Growing geometry

    Does anyone else know how the growth of geometry like the scales in this link can be done? Scale Generator : Houdini (reddit.com) The guy who did them wasn't specific about the process. All he said was "about 150 lines of vex and a poly extrude".
  21. Combining Modulus

    Help! I have some geometry distributed on a line by modulus of its ids. Well 2 modulus distributions which is where my issue is. Without using arrays (I will be eventually processing a large amount of geo), I want to rotate each "node" up the vertical line a progressive amount (say 10 degrees for for example) by combining the modulus calcs somehow. And I am pretty stuck! (This is a particle simulation so these lines are the result of this. So you can't just run over prims and rotate them in vertical order or anything so simple. It is simply setting up the initial directions, thus the need to combine the moduli).
  22. Trying to find a little trick to return random selection of two specific values (1 or -1) and hold it for a number of frames or i in a loop so it would be 1,1,1,-1,-1,-1,1,1,1,-1,-1,-1 or even better random ranges 1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1 something like this but with better control of the distribution for(int i=0; i<10; i++) { float test = fit(floor(fit01(rand(i),-1,1)),-1,0,-1,1); int np = addpoint(0, pos); setpointattrib(0, "test", np, test, "set"); {
  23. I created an infection solver to imitate the infection of fire spreading that is functional with a popnet as the source of the infection. I did it this way because the pyro spread node does not support pops as a source which is a different problem entirely. Everything works as it should however the infection solver only takes into effect after frame 9 which is strange because the pops should clearly be infecting from the very beginning. For some reason the solver doesn't take into account the beginning frames. Ive used this solver in other projects and has worked fine which leads me to believe it is a bug but if anyone could look over my project file and let me know if they see anything I don't? Thanks so much the file is setup so that you should press play and the problem be evident, the pops are red, wherever the infection is, is white and everything else i.e. the desk and papers should be black. After frame 9-10 the infection will begin although it should begin where ever the pops collide. InfectionSolver.hiplc with geos InfectionSolver.hiplc
  24. hello all, iam just dong a wall tool but i found that if my line is in curve shape i might get some gaps in-between the bricks. is there any way to fix these thing and i also found that some of the bricks are intersecting with each other. it will be a issue while doing RBD. is there any way to fix these things
  25. I attach a file where need to remove randomly a percentage of the points say for example 15%, whether using vex or not. I know I can reduce the number in the scatter, but that happens before further processing on the points, I'd like to keep the the point positions but just remove some of them. remove_randomly_pct_points_.hiplc