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

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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.
  6. 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); }
  7. 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
  8. 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?
  9. Hi) Can I somehow get the maximum(and the minimum) value of an attribute in VEX? I want to use them in a FIT function.
  10. Custom VEX function input type

    Hi there, I'm trying to wrap my head around custom vex functions, mainly from a theoretical point at this stage so not really addressing a specific use, just general knowledge. When I create a VEX function I believe that I have to specify exactly what type of data it is expecting from the arguments and exactly what type of data it will return. eg. function int my_function(float a){ return int(a); } in which case I have to feed it an INT argument and it will always return an INT value. My question is this, is there any way of creating a VEX function which can accept multiple arguments, but not fail if one or more of those arguments are absent when the function is called? Or better yet a way of taking a single argument with out specifying what type of data that argument should be? I'm guessing that this is somehow possible as most of the existing Houdini VEX functions work with multiple flavours of input. Thanks in advance. M
  11. Recently I started learning VEX, but now and then I hit a wall. In this case I can't find the answer on my own. What I'm trying so solve here, is to read the pscale from the closest point. //PSCALE @pscale = random(@P);; //NEARPOINT string me = itoa(@ptnum); i@near = nearpoint(0,'!'+me,@P); //READ PSCALE FROM NEARPOINT @npt_pscale = point(0, "pscale",@near); Getting an attribute with the point function works fine in most cases, like with the @P or @Cd, but with pscale it gives me a value of 0.0. Not sure I this is the best method, or maybe I'm overlooked something. I really can use some help. nearpoint_pscale.hip
  12. Array Function VEX

    Hi there, I'm playing around with creating some custom VEX functions and came across something a bit odd that I just can't seem to get working. If I want to create a custom function that returns an array, say a vector array I will need to declare the return type at the beginning, according to the docs the following should work // A function which returns an array of vectors vector[] rgb_array() { ... }; However if I run this in a wrangle I get a syntax error on line1. Is this a bug? Or am I declaring my function type incorrectly? Thanks in advance m
  13. Get, set, length of wire via VEX

    Trying to simulate a field of grass with wind. Using wires for each blade of grass. Problem is they elongate slightly when bending. How would you get, set the length of an individual wire via VEX?
  14. The Array Enigma 101

    So for the last view weeks I've been learning vex, great stuff. So now I want to turn my new awesome vex knowledge into practise. The goal of this operation is the measure the distance between each point to their closest neighbour. First, I use the pcfind function to grab the nearest point of each point number and put them in an array. Second, now I like to grab the values from the array and put them into a distance function. (BUT HOW?) I find array a bit of a vague concept. I get its a list of values, but I'm not really sure if the point numbers in the array also hold the position vector. Not sure if I'm doing this right, and probably there better way. If this method is right, pretty please help me out. kind regards, The new kid on the block measure_distance_nearpoint.hip
  15. Introduction to FX using Houdini - workshop

    Hey what's up guys, Only 1 week left to sign up for my fast-track Houdini workshop "Introduction to FX using Houdini". Limited student capacity! Over the course of 9 weeks and 33+ hours of tutorial content students learn how to do procedural modeling, particle-, RBD-, pyro-, FLIP- and whitewater simulations. On top of that we're going to talk about lighting, shading, rendering and we're going to dive deep into VEX scripting. I would love to answer any questions that you might have!!! Cheers, Manu Find the complete course syllabus here: https://www.cgmasteracademy.com/courses/16-intro-to-fx-using-houdini Also for more detailed information on the workshop, check out an interview that was done on 80.lv recently: https://80.lv/articles/making-first-steps-in-vfx-with-procedural-tools/ Here's a quick teaser:
  16. Move curve point with Vex

    Hello everybody, before anything I'm going to introduce myself. I am a Belgian Technical Artist working in the game/interactive software industry from some years now. I was more a environment artist after my studies, but moved to development with Unity, Unreal and native C#/C++ software development. I began to learn Houdini one year ago and having a developer background, it was more easy for me to understand how Vex is working. I now try to use Houdini at work to improve our production pipeline with Unity and Unreal. Mostly using Vex. And it is a wonderful tool. I am currently working on a river tool with heightfield and curves. I first put the curve on top of the terrain then resample the curve and project each point on the terrain with the intersect function. (I also remove points that are outside the terrain) @P.y = getbbox_max(1).y + 100; vector p, uvw; int isIntersecting = intersect(1, @P, {0,-10000,0}, p, uvw); if(isIntersecting == -1) removepoint(0, @ptnum); else { @N = @N; @P.y = p.y; } The problem is that a river always flow from top to bottom, but the projected curve on the terrain sometimes go up and down. To fix that I loop through each points and check if the current point height (@P.y) is higher that the previous point height. But it is not working as expected. First try with Point Wrangle Run Over Points if(@ptnum > 0) { vector lastPointPosition = point(0,"P", @ptnum-1); if(@P.y > lastPointPosition.y) @P.y = lastPointPosition.y; } Second try with Point Wrangle Run Over Detail(only once) int ptNumber = npoints(0); for(int pt=1;pt<ptNumber;pt++) { vector currentPoint = point(0, "P", pt); vector lastPoint = point(0, "P", pt-1); float currentHeight = currentPoint.y; //printf("%s %s\n", pt, pt-1); if(currentHeight > lastPoint.y) { vector newPos = set(currentPoint.x, lastPoint.y, currentPoint.z); setpointattrib(0, "P", pt, newPos, "set"); } } What am I doing wrong ?
  17. Hey guys, Somewhat of a newbie to Houdini here - please excuse this (hopefully) simple question... I'm trying to process a number of FBX models to establish a kind of "connectivity tree" for future animation operations. Essentially I want to divide my models into numbered visual chunks then tag them to associate them with a "parent chunk". This parent chunk would be the neighboring chunk they are primarily attached/grounded to. I plan to use this order to reveal the chunks one-by-one - so I never have a floating chunk (chunk #0 will be on the ground plane). I've got some way into this but am struggling with tying up the final stages. In the attached HIP example I divide the model into chunks with Connectivity SOP. Then I loop through the chunk pieces - for each one I make a padded bounding box and use it to group neighbor 'child' chunks that intersect its surface (feels a little hacky but seems to work). Next I'm trying to add a prim attribute to these grouped prims - basically the numerical ID of the 'parent' chunk I'm using to group them. When I run a single loop pass, things look somewhat OK but it falls apart on successive loops. I think the issue is perhaps how I'm accessing the parent chunk ID in the loop - or maybe my attrs are getting overwritten in subsequent loops? Any ideas much appreciated - if you have a better idea on general approach I'd love to hear it (I'm probably going about it all wrong) Thanks! stackTest_help.hip
  18. VEX Point Manipulation

    Hi everyone, I had put together this tutorial based on a n old experiment I had done. People kept asking about the build, but I had since lost the original project. Recently I had found an old backup, so decided to explain how I did things. You can view the article and video tutorial on ProVideoCoalition here: https://www.provideocoalition.com/houdini-vex-point-manipulation/ When I had originally made the project over a year ago, I was following along with Entagma's VEX geometry tutorial. I then ventured out on my own and starting modifying, adding my own stuff, and transforming it. Ended up creating a maze'esque grid pattern, a vertical stripe system with custom UI controls, and a nebula'esque looking design. Each build using the same geometry source object. It was a good learning exercise.
  19. Hi there, Lets say we have a bunch of packed primitives scattered in an area on the left side and a on the right side a geometry, like frustum. I want to detect all the packed primitives that even a small portion of their bounding box is intersecting with the geometry. I have one method of doing this but its not ideal, I was wondering if anyone knows an efficient and preferably with vex way to do this. Cheers, C
  20. Zahia Hadid Architechture

    Hi guys First post Ive been following a few tuts from entagma and would love any input on creating something closer to this. My Houdini experience has mainly been lighting for film but i want to branch out into more of the fun stuff. Any ideas? Damien
  21. POP Wrangle Group

    Hello, I want a second age ("myage") for particles, when they are in the group "active". Very simple? But it don't work
  22. One thing that I miss from Python(Try / Except) or XSI ICE (First Valid) is the ability to check if some code returns errors and if so, do something else that is safer. Is there a way to access the validity of something and if not do something else? Cheers
  23. Hello to all! I am currently writing a wrangle-thing in which I'm hoping to generate a random "hair" on every point and make it face the normal of said point. The way I planned it is as follows: 1. create the hair w/ random params on 0,0,0 2. rotate the hair to Normal of the point that it's "generated on" w/ rotate(matrix,angle,vertex) function 3. Move the hair to @P I'm not a hero with vector math, otherwise I'd generate the whole hair thing along a normal. I wonder if I somehow can construct a identity matrix, like one would do with the ident() function, and use that to transform the prim. Is there a way to simply rotate a primitive using something simpler than extreme vector math? sgamhar.hip
  24. Hi there. I’m having some trouble translating two parameter expressions in this tutorial using Houdini 14 to Houdini 16.5: https://player.vimeo.com/video/130386299 The first expression is for the Value parameter in a attribute create node (given the name “WIDTH”). It is meant to tapper the octopus tentacle geometry. The attribute was created as a Ramp Float (given the name “cross”), in a null node named “Cross_RAMP.” The expression looks like this: chramp(“../Cross_RAMP/cross”,$PT/$NPT,0) The second expression is meant to help centralize control for the Scale parameter in a sweep node. The expression look like this: point(“../WIDTH”,$PT,”width”,0) So the null where the ramp was created is being tapped in the attribute create node, which is being tapped by the sweep node. But it is not working. The errors I get for these offer some leads, but I’m too new to code expressions to sort it out on my own. Wading through the online documentation and trial and error has not yet proven fruitful. I could use some help. Would someone tell me the proper expression to write, either with a VEX snippet, or other such replacement code? Thanks in advance for time and efforts.
  25. I have 2 sets of points: 'parent' and 'child'. Both have the same number of points. I need each parent point to have a unique child assigned to it - no duplicates. I need to be able to animate in an active value for the parent points, so that they all become active in 3-4 frames. When a parent point becomes 'active', it needs to search for its nearest available animated point and set that animated point's id number as 'child_id'. An animated point is only 'available' if it doesn't already have a parent point, or in other words: if the child_id is currently unused. My issue comes from the VOP I've set up within a SOP solver. If there is more than one parent point becoming active on a single frame, I get multiple parent points assigned with the same child point. I need to be able to write to 'child_id' and read from it on the same frame, to make sure that I am not getting multiple parent points with the same child points (leaving some very lonely, parent-less child points ). Please take a look at my attached file. I've highlighted the important nodes, and the Find Attribute Value VOP in red is where the issue is originating. find_unique_child.hip
×