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

  1. 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); }
  2. 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.
  3. Does code in vex have better perfomance than use nodes? If yes, should I use vex as much as possilble?
  4. 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?
  5. 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;
  6. 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.
  7. 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
  8. 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".
  9. 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).
  10. 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"); {
  11. 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
  12. 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
  13. 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
  14. How can i get the ordered menu labels in VEX? I know how to do this in Python but what about VEX?
  15. Hi guys, I'm looking to get the best way to realise this kind of pic in a realistic way.. My scene is not bad but begin to be heavy.. maybe an other way?. https://www.istockphoto.com/fr/photo/cheveux-sous-microscope-gm497686734-79258025 Thank you for help Cheveux.hip
  16. Attached hip file, for a sphere with keyframed animation. In CHOPs, using a channel wrangle, I need to extract the distance travelled , in both cases: (1-green sphere) only tz is keyframed (2-red sphere) all channels are keyframed VEX_extract_distance_travelled.hiplc
  17. Hi all, I'm working with a character .fbx imported from another package, and need to extract the painted weights for a specific bone to a point attribute to use as a mask. Right now i'm using the labs Name from Capture Weight node, which unpacks the weights and saves the name of the bone that has the highest influence on a point to string attribute by just returning the first entry. Then I use the following vex to do a search for a particular bone(s) in that string attribute, something like "eyelidLower*": string term = chs("search_for"); int found = match(term, s@bone); @mask = found; that returns 1 for all the points that match the term so i can a linear mask, but I want to return and sum the actual weights - is this possible? Many thanks
  18. A simpe pscale VEX problem I can't solve

    Being quite new to Houdini and VERY new and completely out of my depth in VEX I have a problem which should be simple for anyone who is smart. So the setup is I have some popgrains spawning on an object that scale from 0.001 up to 0.025 using some VEX and then having those grains stick to the surface of the context geometry. Using the following code... @pscale += 0.001; @pscale = clamp(@pscale, 0, 0.025)*1.5; int pr; vector uv; float d = xyzdist(1,@P,pr,uv); @P = primuv(1,'P',pr,uv); This works fine and spawns particles that grow to all be a uniform size. My question is. What do I add or how do I change that code to add some randomness to the size that the grains scale up to. I have tried to wrap my head around the "rand" function inside the clamp function but ended up making everything explode into giant grains. I KNOW there is a simple solution to this but not having the brain for code just yet out of pure ignorance I don't know what to do. Could anyone help possibly? ALSO as a bonus for anyone who is super genius. Is there a way to define a determined number of sizes the pscale of grains can be? For example have 5 different sizes that a grain can be based on a seed or even better a probability so I can control how many of each sized grain could show up at spawn? ALSO ALSO if you could help me with this, Can I use VEX to assign Cd values to each size clone to have the ability to have different materials on different grains based upon their size. It seems like I'm asking a lot but I'm sure someone here is thinking "Pftt this is just 3 lines of code." And could help me work it out.
  19. Hi guys, I'm Aureole. I've been trying to wrap my head around Matrix and transformation stuffs lately, but there's still something intriguing to me that I can't figure out, especially pivot and vector cracktransform(int trs, int xyz, int c, vector pivot, matrix xform) function! For example: 1. Where is the "pivot" information stored in a 4*4 matrix ? 2. Apparently typing different "pivot" in the cracktransform function yields different results. Then is there a "correct" pivot to use in the cracktransfrom() function to get a meaningful result? 3. I know that the @pivot intrinsic attribute will be created when a packed prim is created, and this attribute might be the "correct" pivot information to use in the cracktransform function. However, for regular non-packed geometry, is {0,0,0} always the "correct" pivot information to use even if the geometry is not centered at origin?   I don't know if I've expressed myself clearly, pls let me know if you don't get me Many thanks!
  20. Hi all! I have a problem with attribstringedit to replace characters in a string. It works well with / but not with \ . Is there a workaround for this limitation ? Like doing it in Vex or using ascii code instead of the \ character ? If anyone could help me out that would be amazing ! I`ve included a sample scene. escapeCharacterReplace.hiplc
  21. Hello guys, I have this pop wrangle inside a vellum solver and I am trying to read from a primitive group and it doesn't work. Do I have to convert those groups into point group first or is my code just wrong? Cheers
  22. Under dop network I want to implement many node functions with wrangle Can this bypass the learning of nodes? I know it will involve a lot of vex code and attributes but it makes me excited
  23. why houdini's dihedral() needs vector as argument,even it means angle from two planes?
  24. I would like to find the narrowest areas of a piece of geometry and cut across them. It was suggested to do simplified raymarching using the SDF of the surface and find when the rays meet a ray of the opposite direction, but I'm not entirely sure how to set that up. Any help would be great thanks.
  25. Hello guys, I created an array in a point wrangle, then I tried to call its value in the next wrangle, but it fails! How can I fix it? Thanks for helping.