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

  1. 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!
  2. Fractal Flame

    Trying to recreate Scott Draves' algorithm in Houdini with VEX:
  3. 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;
  4. 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.
  5. 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?
  6. 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?
  7. 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
  8. 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
  9. 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.
  10. 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
  11. 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!
  12. SlimeFX

  13. 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
  14. 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.
  15. 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.
  16. 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
  17. 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
  18. 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
  19. Hello everyone. I have a long sequence where changes happen in the geometry, I have an attribute that changes to 1 whenever the geometry change happens. I would like to store which frames the attribute jumps to 1 in something like an array, does anyone know whether this is possible in VEX? and if so how? I hope I am clear enough in what I want.
  20. link two points with a curve in vex

    I have a grid or any geo and I need to join two points with a rounded curve is there a way to do this in vex ? Thanks hdni_vex_curve.hipnc
  21. Hello Everyone, I have just create tutorial of making nuclear cooling tower destruction using new features of constraint in Houdini 17.5 Check in here: https://www.cgcircuit.com/course/nuclear-cooling-tower-destruction Best Regards, NhanVo
  22. Hi For some reason, it is hard for me to understand multithreadness of VEX I mean, in most cases, the fact that my code works in parallel on each of the components messes my plans. So I usually make my code to be able to work on 'detail' and manually set all the processing loops. Everything was fine until yesterday when my wrangle was cooked for a solid eight hours.) So my questions are: Is there a way to make a point(primitive) wrangle to process elements in a specific order, or do I have to use detail_wrangle if the order is crucial? Can I somehow speed up a detail wrangle, like divide all the components in several batches or partitions to compute them in parallel? Can you suggest something to read about how to adjust both my mind and code to be parallel processing friendlier)
  23. 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
  24. Enforce Prototypes @ptnum

    Hello, So doing some clean up on my vex code in a wrangle and I turned on Enforce Prototypes to remove a bunch of the hacks to get the code setup. The one thing I can not find out a cleanup for is to replace @ptnum with a non @ function. Is the only way to declare it prior to the wrangle as another attribute? That just seems messy. Even declaring before hands means you need @ptnum to source that attribute. Thanks, -Ben
  25. how get attributes name?

    Hi odforce, i have a small problem,its confused me a few days.how can i get the attributes name use vex or python(vex is better,because im not familiar with python)? for example,i have a geometry with some point attirbutes like "v" "Cd" "mass" "aaa",and prim attributes like "prima" "primb".if i want create a new string attribute and store all the attributes,how do i achieve that?
×