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

  1. Houdini Terrain Pipeline Vol 2

    Hey All! The first part of this tutorial has been available for almost a year now, but because of the sad news that hit CMI, I was unable to upload the 2nd "half" there. So instead I just made it available on Youtube for everyone, to make up for that I suppose. I'm considering putting the first part on there as well, if enough people want that. In this tutorial covers the following, using Houdini * Generating water meshes * Updating the terrain based on the water * Generate walking paths on the terrain * Create some basic instances * Build a flexible system using external files to place these instances. Built on Houdini 16.5, but should work on 16 too, or all the way back to H14 if you skip the heightfield part. Recommended specs: at least 16GB of RAM, reduce the terrain size if you have less. Disclaimer: Work files are as is, and do not contain the cached geometry to save on space, this may explain node errors on the various "File Cache" nodes. It does however also contain the work done in the first half of the tutorial, albeit mostly undocumented: https://tinyurl.com/y89egjvq Hopefully its of some use! Twan
  2. Hi, I making a small VEX code library and I was wondering if there are any good techniques to reduce the amount of code duplication. For example I have a function that works with or without inputs and with different variables. For simplified example: vector pointPos(const int pointid){ return point(0,"P",pointid); } vector pointPos(const int input; const int pointid){ return point(input,"P",pointid); } Could this be reduced to something like: vector pointPos(const int input = 0; const int pointid){ return point(input,"P",pointid); } Is there anything like auto type recognition, or decorators, or anything else (aside from structs) that has improved your vex code?
  3. Procedural Modelers at Zoox

    Zoox is expanding our Tech Art team and is looking for Houdini artists to help build out large procedural cities. Here's a link to the job description https://jobs.lever.co/zoox/67ccf836-fa7c-4d8c-9ff9-6eeb14c251b8 and here's an article talking a little bit about our company https://www.wired.com/story/zoox-self-driving-car-video-san-francisco/ Cheers, Doug
  4. Hello everyone, I am trying to recreate a volume trail node within an attribute wrangle (couple steps before, but the advection of the points is all within the wrangle) When I create new points in said attribute wrangle, I can't have access to their position within the for loop they were created. I am attaching the hip file. The attribute wrangle is highlighted in red. volume_trails_VEX.hip
  5. Hello! I defined a custom vex function in Attribute Wrangle node, and i can call it only from this node, when i call it from different Attribute Wrangle node i get Undefined Function error. Is there a way to declare a function in one node and to call it from the other node? The only way i found is to use external files with the #include filename.
  6. Lately I have been trying to wrap my head around transforming point positions with the use of matrices in VOPs. To do that, I tried the following: Lets assume I have 3 points with their position vectors A, B and C which come from an alembic and are constantly changing values. I use a time shift and set it to $F + 1, and extract the same points position vectors, which are now called D, E, F. Then I set A,B and C into a 3x3 matrix, transposing it (to get the vectors in columns instead of rows) and do the same with D, E, F. After all this, I multiplied the inverse of the matrix containing ABC with the one containing DEF (this was not inverted). The resulting matrix was multiplied with new Position inputs, but the resulting transformations didn't match the original ones... What am I doing wrong? Thank you.
  7. Custom struct as attribute

    I have a custom struct in VEX (Houdini 16.5). It's nothing special, just a few simple values combined (no arrays). Is it possible to create an attribute out of a custom Struct in vex? Is it possible to do that for an array of custom structs? I guess it's something like: adddetailattrib(0,"name","myStruct"); adddetailattrib(0,"name","myStruct[]"); setdetailattrib(0,"name",myStructObject,"set"); These kinda seem to succeed in creating an attribute, but I don't seem to be able to add values to those. Also I would like to be able to use the @ syntax for quickly defining attributes for custom structs. (Something like: myStruct@myAttribute;) Is that possible? (Note that I can create variables, with code like: myStruct myVariable = myStruct(1,2,3); and myStruct myArrayVariable[]; But I specifically am interested in creating attributes on the geometry that would persist between wrangle nodes and especially be visible in the geometry spreadsheet.)

    Hello dear forum, can someone explain why my vop noise in the end created nothing? Thanks in advance Ground_Study.hip
  9. Hi, I've been trying for a couple of hours to get my array points into a group. The idea is that I want to delete every face that is not colliding with a ray/line (first collision/one collision point per face). I used "intersectionanalysis", which gave me the points and faces I want to preserve but now I'm not able to group those array points or blast them any other way. Please let me know if you have an idea. Thanks raycollisionTest.hip
  10. Hello, friends! I`ve got some issues when started coding in vex with the default float type attribute creation, so i got a habit to always set the attribute type, even in calculations, to prevent the possibility of attribute type errors. Like this for example: v@direction = v@initial_position - v@P; It works fine, and i am really comfortable with it, but I wonder is it correct in the meaning of 1) Good programming style. 2) VEX language work under the hood - maybe VEX is re-declaring the attributes again, when they are used in this way. Thank you!
  11. Hi, can somebody provide a quick example of functional vex wrangle code that uses the expandedgegroup() vex function? I expect something like: i[]@display = expandedgegroup("edgez"); But the issue is that the "edgez" group is a group of edges and there is no edge context in attribwrangle. I am guessing my syntax is wrong, or am I missing a preparation step of some sort?
  12. Attached are two screen grabs. One is a vops set up that works to convert @N to @v. The other screen grab is my failed attempt to recreate this with vex. what is wrong with the vex? Thanks!
  13. Hello Odforce, I'm trying to create groups based on the @P.y attribute of a bunch of vertical lines I have. I am almost there, but I'm not exactly a Vexpert and can't figure out exactly how to assign multiple groups with different names. I'm able to create a string attribute with the correct name for the groups with s@test = sprintf("%f", @P.y); s@groupname = concat("group_", @test); I tried using setpointgroup(0, @groupname, @ptnum, 1, "set") after this, but it didn't do anything, now I'm just stumped on how to approach assigning this attribute as a group. Any input would be greatly appreciated! Thank you
  14. Growth Thingy Help!

    Hello! This is my first post on odforce, I feel I'm finally taking a step in the right direction! I'm new to houdini only been using it for 4-5 ish months now. Anyways, just happy try and be a part of the community. Are there any other places besides the discord server that houdini people hang out at? Anyways, to the point -- The thing I'm having trouble with, is orienting geometry to the direction of the normal of what it's getting copied to. I've been orienting my geometry in Z and using @orient.z = @N; and @P.z = @N; to attempt it, but it's not giving me exactly what I want. In the file, i'm using a for loop to run over each primitive and grabbing the centers, then blasting away everything but point 0, the instancing on 0. I'm using 0 because the for loop automatically sorts the points. (This is a different approach to Simon Holmedal's growth that he showed during his demo, I won't take credit.) Do i need another for loop inside of the one I currently have to orient the new geometry to the normal? I apologize if this is too vague, it's my first time posting a question, I can be more specific about things if needed. I appreciate your time! - Thanks triangleGrowth.hiplc
  15. New to houdini

    Hi my name is abhigyan and i just joined this forum. I am new to houdini for almost 3-4 months at max. I was learning c4d and after effects before that. I love programming as well(python, javascript). The thing is as much as I love houdini I get confused as to how I go about learning it. It feels so overwhelming. No matter how many tutorials I watch I am just not able to grasp some concepts. How do I go about it? I am sorry if I didnt follow some rules here since I am new.
  16. I'm making an effect very much like this one from Entagma: https://vimeo.com/194277211 I've adjusted it a little and I noticed that some of the curves that get created collapse onto each other. I think it even happens at the very first frame. You can see that by the white parts of the lines. Those are the last created points. When two white parts meet, it means the curves collapsed and continues as 1 curve. What the setup does is it has a bunch of points as the active searching points. Each of these find target points in front of them and saves those in an array. Then a random point from within the array gets chosen and used to make the polywire. Sometimes, mainly at the very beginning, the searching points are close enough together so that they might find the same target points. This is where I believe the issue lies. What I would like to achieve is that I can check between the arrays on each of the points to see if they have similar target points and if so, remove those from one of the arrays. Or that when points get targeted by one searching point, they instantly get marked so that they can't be found again before the end of the timestep/solve. At this moment, I'm still trying to figure that one out. Any tips for this are much appreciated. Eckhart ObjectMaterialize.v005_00.hip
  17. "opinput:1" to operator full path

    Hi One can use "opinput:1" or "opinput:-1" in functions with geometry argument to access the geometries connected on the ports or in spare inputs. My questions is how to convert that string to full path that those end up point to. opfullpath doesn't seem to do it. http://www.sidefx.com/docs/houdini/vex/functions/opfullpath.html I guess I'm looking for the equivalent of opinputpahth ? http://www.sidefx.com/docs/houdini/expressions/opinputpath.html Guess it doesn't exist, but just checking. Cheers
  18. Points follow points

    Hello everybody! I would like to simulate particles on top of pre-animated / pre-simulated (cached) points. So far I only managed to do the "transfer v attribute inside a sop solver" trick. Unfortunately it does not give me the result I imagine. Instead of inheriting only the velocity I would rather like the points to be attracted by the pre-animated points so they tumble around and follow them the animated ones. Basically I am trying to animate some points and then do a simulation on top of it to give it a more natural feel and to be able to art direct the simulation better. I would greatly appreciate if somebody could give me a hint or a solution on how to do that? Thank you! Here is my current progress (particles inherit v): pop_transfer_vel.hiplc
  19. remove geometry intersection

    Hey guys i was wondering im coping geometry and the geometry is intersecting im traying to solve this with the intersectionanalysis sop that yields a primitive number so i want to delete the connected geometry that the intersectionanalysis sop said theres interesection i connected the copy to a wrangle and the second the first input is the copy the second is from the intersectionanalysis sop im having truble with the vex code , i suck at it the copy sop yields group outputs so i thought to take an advatege out of it so my code looks like this now int list = point(1,"test" ,@ptnum); string groups[] = detailintrinsic(0, 'primitivegroups'); foreach (string g; groups) { if (inprimgroup(0,g,@primnum)>1) { removepoint(0,@primnum,0); } } list is the second of the numbers from the array that intersectionanalysis sop yields its not the whole of the array because i think i dont need all of it to be honest im really lost and one knows the solution
  20. Hi, I'm trying to find a couple of nearest points, the problem is I want to avoid duplicates - so let's say point no.1 finds their nearest points (lets say no. 17, and no. 39) I don't want them to be included into nearest search anymore. To be honest I can't tell what am I doing wrong ( I suspect some stupid error or groups not updating until code is finished). No matter what I do - I still have points included in my search. Here is my piece of code - that I use in "Detail Wrangle". Then it's used inside a for loop (node based) to control number of iterations (it simulates growth). Scene file also included. Any clues on that? int branches = 2; int seeds[] = expandpointgroup(0,"seed"); foreach( int seed; seeds) { setpointgroup(0,"seed", seed, 0); //remove point from seeds setpointgroup(0,"used", seed, 1); //mark point as used vector pos = pointattrib(0,"P",seed,1); //get seed position int nearpts[] = nearpoints(0,"!used !seed",pos,2,branches); //search within not used points, //this should prevent finding duplicates foreach (int nearpt; nearpts) { addprim(0,"polyline",seed,nearpt); //draw a line setpointgroup(0,"seed", nearpt, 1);//make new point as a seed } } duplicates.hipnc
  21. I'm found this point expression point("../instance1",instancepoint(),"Cd",0) to access the value of the first index of the Cd vector attribute. However i can't find any reference to this usage of the point expression in the help files. the help shows point(geometry, string attribute_name, int pointnumber) with the attrib string as the second parameter and the point as the third. When there are 4 parameters it appears that 2 and 3 are swapped. this makes sense but is this shown in the help? thanks
  22. 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.
  23. Hello houdini-community! I'm trying to create an outline filter using vex. You can find the code below, I copied it from the SideFX-Forum. I put the code in a vfl file and compiled it to a hda-file using vcc. Then, I imported the HDA into a simple project, got a Render compositing node and wired its output into my custom outline-node. As a result I just get a completely black image. I've looked into the components of the matrix3 that ninput returns and they are always just 0, although my render-output has almost no black pixels. Is there anyone who has an idea what I might be missing? Any help is highly appreciated! Edit: I fogot to mention that I tried to get the same result using a Convolve Compositing Node with the same kernel as used in the code. That works. However, this is just an experiment for me I really want to know how to implement such a filter using VEX. cop2 outlines(float effect = 1) { matrix3 kernel; matrix3 pixels; vector4 col; float result; int i, x, y; col = 0.0; // this builds a kernel with -1/8 in all elements but the center, which is // +1 (an edge detect kernel, sums to 0); for sharpen, use effect+1 // for the center pixel kernel = 0; for(x=0; x<3; x++) for(y=0; y<3; y++) setcomp(kernel, -effect/8, x,y); setcomp(kernel, effect, 1,1); // iterate over all components in the current plane (PL) for(i=0; i<4; i++) { pixels = ninput(0, PL, 0, i, IX, IY, FR); // sum the results of the kernel x pixels result = 0; for(x=0; x<3; x++) for(y=0; y<3; y++) result += getcomp(pixels,x,y) * getcomp(kernel,x,y); setcomp(col, result, i); } assign(Cr, Cg, Cb, C4, col); }
  24. Hi, So I came across a problem, I like to create a flight route for a plane, but I don't want the plane to crash into an object. I managed to create a curve (flight route) that can avoid a point, so the curve goes around the point...GREAT!!! (Check Screenshot 1) But if I want to avoid a large area, lets call it a "no-flight zone", the code has some sort of scaling limitation. (Check Screenshot 2) I've checked the code several times, but I can't find the solution, can somebody help me out? No_Flight_Zone.hip
  25. I created my vex function, ofcourse i can <include> it in wrangle. But can i compile and use it as intrinsic vex function? I tried to do this, but after all, function is still undefined. I compiled with this command: vcc.exe -c cvex --generate-intrinsic-lib myfunc.vfl After that i copied in houdini\vex\intrinsics directory What i did wrong? Or it's not possible?