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

  1. Fractal Flame

    Trying to recreate Scott Draves' algorithm in Houdini with VEX:
  2. Rotation matrix pivot point

    The rotation of each point occurs around the origin: matrix3 matrx = ident(); vector axis = {1, 0, 0}; float angle = 256; rotate ( matrx, angle, axis); @P *= matrx; How to define coordinates for rotation different from the origin?
  3. I need to fill 5 Edged Closed Primitive. But HOW???
  4. Hello, I'm trying to access a microsolver in the Dopnet. I would like to get e.g the disturbance parameter of the disturbance node, which has the parameter name: "dist_scale". With a Gasfieldwrangle node I can access e.g @vel, @density.. basically attributes.. which is working fine if I am changing them. But if I want to access the parameter and try to change it, nothing happens. I tried it with @dist_scale or relative/absolute channel reference. Thanks!
  5. Hi all So I have a question about the new versions of the For-Each node, particularly the Numbers one, I have been following a tutorial from Anastasia Opera, and during the tutorial she uses a For-Each subnetwork node now I understand what this node is doing collecting the data from the box_id, Anastasia also gave the node a stamp name which will be used a bit later on for a blast node to specifically target some points following the local path hence why the stamp name was given to the For-Each Subnetwork node in order to lead a path towards a node that contains specific points with a number that is less than 3 which I understand is the point number and can also see it infant of me.... but now here is where I get confused in the new version of Houdini 17 the Subnetwork node has been disabled and be re-enabled but instead I would like to understand what on earth is up with the new For-Each Numbers node, it has some weird dodgy layout that just throughs me right off!! I would not mind trying to re-create the tutorial using this new node but its proving to be a challenge as I have no idea where to place the nodes that help in set things up for procedural modelling which I have tried to place things in myself but ended up with nothing but more errors. if someone could please help that would really awesome and I would really appreciate it. Kindly Ahmet .B
  6. step function from glsl

    Hi everyone! In GLSL they use this function called "step" that generates a step function by comparing two values. Is there any alternatives in vex ?
  7. if in list (vex)

    Hello how can I query if an element is in a list or not? in python is " if element in list: " thanks you.
  8. Curl Noise functions in voplib.h

    Ahoy there!!! A quick question... I'm writing VEX noise functions but is a bit confused with Curl Noise functions. It's not like that I didnt get it. Of course I get it but is stuck in this weird functions in voplib.h. Here's what I'm stuck with.... Down below is the Code. why is xDiffNoise yDiffNoise and zDiffNoise there anyways. I couldnt find a function that's making use of it. Maybe I'm missing some. But please somebody explain it to me. Just to say... I'm writing a Curl Vex Function with all the Noise options. Thanks. noisevec = onoise(pos*freq - offset, turb, rough, atten) * amp; xDiffNoise = onoise(xDiff*freq - offset, turb, rough, atten) * amp; yDiffNoise = onoise(yDiff*freq - offset, turb, rough, atten) * amp; zDiffNoise = onoise(zDiff*freq - offset, turb, rough, atten) * amp;
  9. I'm probably doing something really simple and stupid here, but I can't for the life of me figure it out. I'm just trying to test out reading/writing attributes in vex, but it seems like I can't read a value out in the same node that I write it, which seems insane. Here is the test code I'm using: i@test_value = 1; int check_success = 0; i@get_value = primattrib(0, "test_value", @primnum, check_success); i@success = check_success; After this code runs, here are the values: @test_value = 1 @get_value = 0; @success = 0; So... even though I have literally just written the value into the 'test_value' attribute, I can't read it out. I noticed however that if I move the last three lines of code to another wrangle, then it works. For this tiny example, that would be fine, but for the larger piece of code I'm working with, I need to be able to write a value to an attribute in one part of the code, and then check what that value is in another part. What's going on here? Is this a bug, or a limitation of VEX?
  10. Hi guys! I have a problem that's been bothering me for a couple of days and I can't seem to wrap my head around to solve: I have a grid, with scattered points. And I have 3 objects hovering above the grid. With a colour shift on the grid (attribute transfer with an animated ball for now), I "activate" the points in a pop network, and I start adding forces on them, choreographing them, until they reach a certain age and start to move to the 3 objects above, like an attraction (point count is the same in both inputs for simplicity - also I have colour grouped which particles belong to which object for visualisation purposes). So far so good. The problem is that in theory, each $id should correspond in each point on the objects above - but alas, they seem to shift groups! So, instead of clean motion / attraction on each of the objects after a specific time, I get more of a random mass of particles moving back and forth the objects until the end where they stick on the objects. There sure is something wrong with my vex, but I cannot understand what! It should be easy: green goes to green, blue to blue and red to red.. Attached are some images to help understand the problem. the viewport describing the problem: the pop hierarchy: the wrangle to move the points to position after a certain amount of time in the "time_in_release": If anybody has any idea as to why this is happening, please, feel free to share! I would be more than grateful to hear your thoughts! Thank you so much for your time, G.
  11. Finding the Min/Max values in a field?

    I am trying to figure out how to get the converse of a field, mathematically. I am attempting to blur a Cd field in using a Gas Blur microsolver. I have some mixed results, but I want to get some finer control over the radius, namely that I want it to blur more as it slows down. I have used the gas analysis microsolver to get the speed field by taking the length of the velocity, but I can't figure out how to get larger values to be in the lower speed areas. Obviously I would love to use a fit to invert the values, but I am struggling with an elegant way to get the minimum and maximum values for a given field. I could easily just do a loop in a wrangle and get the min/max values that way, but that is going to be extremely slow as this is a very large, dense simulation. Is there a simple way I can get the min/max values in a field so I can use fit(@speed, min, max, max, min) in a Gas Field Wrangle node to get the converse of my field?
  12. Hi guys. I recently wacthed Fifty50 tutorial making a infection effect and now I'm trying to mesh the points but I couldn't achieve a better quality result. Btw I'm pretty new to houdini :{ My currently setup after points is Volume Rasterize Attributes> Vdb Smooth> ConvertVdb to polygons. Are there a better way to mesh those points? hip file attached, thank you in advance guys. RnD_Infection.v01.hip 001_Pedestal_high_poly.FBX
  13. Hi all ! I'm struggling with an addpoint function, I'd like to use a variable to declare a point but it seems that's not allowed… What is the proper way to do this ? My code in a pointwrangle : float height = fit(rand(@seed, @ptnum), 0, 1, 0.4, 0.55); addpoint(0, {0,height,0}); if I put a 1 instead of "height" it creates the point perfectly well :/ Thank you for your help !
  14. Pointers and struct children in vex

    Hi there, I am trying to define the shape of lightning using vex in a wrangle sop A lightning path has forks that split from any given path, creating other paths with almost identical properties to the main path. To that end I created a path struct but I can't figure out how to get it to store its 'forks'. The same issue would arise if I instead stored the parents instead of the children. I am defining a path of lightning as so: struct lPath { lPoint source; lPoint sink; float energy; lPath forks[]; void setSource(lPoint newSource) { source=newSource; } void setSink(lPoint newSink) { sink=newSink; } void setEnergy(float newEnergy) { energy=newEnergy; } void create() { addprim(0,"polyline",source.num,sink.num); } } my issue is that I can't include a reference to itself due to infinite recursion, which is why in c++ I would use a reference lPath * forks[]; Is there any way to solve this using vex? Kind Regards George
  15. Handling array in Vex

    Hi, In Python, we can create a "quick array" with conditions in a single line: a1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] a2 = [0, 2, 4, 6, 8] a3 = [i for i in a1 if i not in a2] >>>> a3 == [1, 3, 5, 7, 9] In vex, I know how to do it the long way: int a1[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; int a2[] = [0, 2, 4, 6, 8]; int a3; foreach( int i; a1 ){ if( find(a2, i) >= 0 ){ append(a3, i); } } >>>> a3 == [1, 3, 5, 7, 9] Is there a faster way to do this kind of things, maybe like in Python? Thanks!
  16. Sierpiński triangle with VEX

    Hi guys. How you would go about creating Sierpiński triangle with VEX? I've tried to do it myself, but failed. I've only started learning VEX, before i was only doing basic stuff with it.
  17. Hey! Does anyone know how I might be able to access the GDP of the wrangle from which my VEX command is running? I'm trying to make a VEX command kinda like nearpoint(int geomInput, vector2 P), which takes in an input index and can access the GDP of that input. I see GU_VexGeoInputs(), and VEX_GeoCommand, and a few others ... they're all i think close to the answer, but I haven't been able to crack this one yet. Anyone has any pointers to share? Thanks, Dhruva
  18. Hi guys, Im a little stumped on a vex issue im having whilst trying to utilize the nearpoints function when building an array. The idea is that i have multiple curves, each with different colour values, which i group the end points of and then run a function which gathers all the nearest points to each of these endpoints and assigns them to an array. (this is currently working as can be seen in my spreadsheet.) However, i then wish to take this array that has been created for each of the endpoints and run an if statement through it that says if the points in the array have a different colour value to the end point they belong to then add them to a group. Im then hoping to perform a nearpoint function using this group as a filter to get the nearest point that belongs to any curve other than itself. Im unfortunately having an issue with this if statement as it seems to only output points 0-9 regardless of the previous rules set in the code. Help is really appreciated as im truly stumped on this one. Thanks in advance guys! Nearest_Points_Array_Problem.hip
  19. SlimeFX

  20. Hello! Recently I need to clip each polygon in different direction, because the compile + foreach is a bit slow, and it will be more slower in a repeat loop block, so I tried to use VEX to clip polygons. And fortunately I found a VEX code to clip polygon : Clip in VEX But it can only clip the convex polygons, but not work on the concave polygons. See the follow image: I have no ability to solve it, could someone help me? Thanks.
  21. Genetic Algorithms in Houdini

    I am not sure if this is the appropriate forum. I recently wondered how hard it would be to implement genetic algorithms in SOPs. The particular example I was curious about was if I could turn a box into a sphere by optimizing for a target function that maintains volume but minimizes surface area. Overall, this was easier than I thought and did not involve all that much code. I ended up recording a video that explains this: The underlying motivation was to get this working in PDG but I figured I had to start with SOPs first. Let me know what you think.
  22. contrail deformation by spline

    Hey guys, I'm trying to deform a volume "contrail" by a spline with direct projection without the use of converting to points and back. I've tested this method on points and it seems to work, but am unable to get it working on volumes without major stepping. It relatively follows my curve, but I can't seem to figure out where the stepping is coming from - it works perfectly with points and conserves it's thickness, so I'm pretty stumped. I attached the project file and few screen grabs. Let me know if anyone has any ideas volumedeform_v03.hipnc
  23. in a primitive wrangle i have a bunch of line segments as input and i want to use the xyzdist function to find the nearest point on the closest geo. So starting with one line segment each time i want to test against all of the rest segments, so not including its self. The problem is xyzdist(0,@P) means 0 and @P could be the same line. how can i make a condition to avoid that? xyzdist.hip
  24. Add prims VEX

    i'm trying to connect each point with the next one and then the centroid what am i doing wrong? seems simple enough (maybe there is a node for that) ideally i want to make also edge loops after like concetric circles connect_to_center.hip
  25. Hi guys, I'm trying to learn a bit more about geometry creation and manipulation in vex. I've been attempting to create a simple grid with lines moving along in one direction. Once the line reach the end of the grid, it moves back to the other end. Like a treadmill. I've been able to create some stuff with addvertex and addprim in a for loop, but nothing nice and procedural. Anyone have an elegant solution to this? Thanks
×