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

  1. Hi All, sorry for the heading, Its a hard one to describe lol. I have a booleanfracture piece and want to process only the middle points , then with that create geo that knows the distance to top and bottom of its local position (as the slice fracture is not a flat plane, hopefully a picture helps). Im not sure the best approach, I would start with nearpoints in some way ,finding the top points and test down for a middle storing the lowest for distance checks?? lol, well its a tricky one
  2. I got an array of point numbers int searchPts[] = [0, 1, 2, 3] that I want to pass into the pcfind function as a ptgroup so it only operates on those points. How do I convert this to a string of "0 1 2 3"? Is this how I should even approach it? pcfind(<geometry>geometry, string ptgroup, string Pchannel, vector P, float radius, int maxpoints) Thanks!
  3. I'm trying to make a procedural bridge system and now creating a vertex in the surface below but it seems to detect the grid without the edit instead.
  4. Hi Superior brains, as I approach modelling methodologies, I've turn my attention towards VDB's In the below example I've used a grid (but this would be an arbitrary shape Convex/concave "2Shape") with a noise pattern to create heights for a later extrude; I then convert to VDB to "cleanup the geo" My question: is it possible to directly manipulate the VDB via VEX to do something similar without having to go through the conversion process (poly to VDB) One reason behind this is the shape I wish to extrude can be fairly complex and dense thus making the conversion process slow, so perhaps adding voxels or extruding/expanding/manipulating voxels is possible in some way? ( VDB Wrangle?), feels like this is not possible but never hurts to ask... unless its physical...;)
  5. pnoise: remapping output values

    I need a simple noise that loops over the course of five (or however many) seconds, moving the @P.x of the points on a line back and forth, and so I'm using pnoise. I would like to give it precise min and max values (I want things to be able to bump against each other but not intersect), which would be easy enough with a fit, but I haven't been able to find it's precise output values in any reference. Over the course of 120 frames the output appears to be 0.5-centric and it goes between 0.22398 and 0.800649, so it doesn't appear to be an even +/- any obvious value like 1 or 0.5. How can I find the actual minimum and maximum outputs for pnoise so I can make sure it hits zero (or 1) at its extremes? I've tried periodic noise in a point VOP but that seems very unwieldy. I know Unified noise can loop and is always 0 - 1, but it has a whole lot more to it than I need to deal with. (Plus I just want to know how to do these things in VEX). The only output value reference I've been able to find is that aanoise is -0.5 to 0.5 and unified noise is 0 - 1. If it makes any difference, here's what's tucked in my point wrangle (reference parameters on an outer master null): int offset = prim(0,"id",0); float roughness = ch("../MASTER/roughness",0); float frequency = ch("../MASTER/frequency",0); int period = ch("../MASTER/period",0); float noisemult = ch("../MASTER/outerNoiseMult"); float noiseval = pnoise((@Time*frequency)+offset, @P.z*roughness, frequency*period, 0); @P.x += (noiseval * noisemult)-(noisemult/2); //the noisemult/2 is to get them back to 0-centric Thanks!
  6. Noise type value visualization

    Hopefully this is helpful to others. Small snippet to visualize the different noise's. I have not put them all in, but if you feel inclined please add more and reply-post. You will need to create the menu (as this does not seem possible in VEX and has to be done via the parameter interface? and a 100x100 grid as input. // // Houdini Noise visulization - Curtis // int NoiseMenu = ch("NoiseMenu"); // Create a Ordered Menu "NoiseMenu", In the "Pram Interface", //Token, Lable ... // 0 vnoise // 1 wnoise // 3 flownoise // 4 curlnoise // 5 xnoise // 6 random // 7 alligator float frequency = ch("frequency"); float rough = ch("roughness"); float atten = ch("attenuation"); float jitter = ch("jitter"); int turbulence = ch("turbulence"); int flow = ch("flow"); int seed = ch("seed"); //Noise data vector vp0, vp1; float output1=0; float output2=0; //No Case stament in VEX ... elseif it is.. if ( NoiseMenu == 0 ){ //vnoise VEX function //Generates Voronoi (cellular) noise. vnoise(@P, set(jitter, jitter, jitter), seed, output1, output2, vp0, vp1); } else if ( NoiseMenu == 1){ //wnoise VEX function //Generates Worley (cellular) noise. wnoise(@P, @P.z*frequency, output1, output2); //general noise } else if ( NoiseMenu == 2){ //snoise VEX function //functions are similar to wnoise. output1 = snoise(@P, turbulence, rough, atten); } else if ( NoiseMenu == 3){ //flownoise VEX function (soft) //Generates 1D and 3D Perlin Flow Noise from 3D and 4D data. output1 = flownoise(@P*frequency, flow); } else if ( NoiseMenu == 4){ //curlnoise VEX function //Computes divergence free noise based on Perlin noise. output1 = curlnoise(@P*frequency); } else if ( NoiseMenu == 5){ //xnoise VEX function //Simplex noise is very close to Perlin noise output1 = xnoise(@P*frequency); } else if ( NoiseMenu == 6){ //random VEX function //Generate a random number based on the position in 1-4D space. output1 = random(@P*frequency); } else if ( NoiseMenu == 7){ //anoise VEX function //Generates "alligator" noise. output1 = anoise(@P*frequency,turbulence, rough, atten); } //Output to 100x100 grid as colour @Cd = output1;
  7. patreon.com/posts/38913618 Subdivision surfaces are piecewise parametric surfaces defined over meshes of arbitrary topology. It's an algorithm that maps from a surface to another more refined surface, where the surface is described as a set of points and a set of polygons with vertices at those points. The resulting surface will always consist of a mesh of quadrilaterals. The most iconic example is to start with a cube and converge to a spherical surface, but not a sphere. The limit Catmull-Clark surface of a cube can never approach an actual sphere, as it's bicubic interpolation and a sphere would be quadric. Catmull-Clark subdivision rules are based on OpenSubdiv with some improvements. It supports closed surfaces, open surfaces, boundaries by open edges or via sub-geometry, open polygons, open polygonal curves, mixed topology and non-manifold geometry. It can handle edge cases where OpenSubdiv fails, or produces undesirable results, i.e. creating gaps between the sub-geometry and the rest of the geometry. One of the biggest improvement over OpenSubdiv is, it preserves all boundaries of sub-geometry, so it doesn't introduce new holes into the input geometry, whereas OpenSubdiv will just break up the geometry, like blasting the sub-geometry, subdividing it and merging both geometries as is. Houdini Catmull-Clark also produces undesirable results in some cases, i.e. mixed topology, where it will either have some points misplaced or just crash Houdini due to the use of sub-geometry (bug pending). Another major improvement is for open polygonal curves, where it will produce a smoother curve, because the default Subdivide SOP will fix the points of the previous iteration in subsequent iterations which produces different results if you subdivide an open polygonal curve 2 times in a single node vs 1 time in 2 nodes, one after the other. This is not the case for polygonal surfaces. VEX Subdivide SOP will apply the same operation at each iteration regardless of topology. All numerical point attributes are interpolated using Catmull-Clark interpolation. Vertex attributes are interpolated using bilinear interpolation like OpenSubdiv. Houdini Catmull-Clark implicitly fuses vertex attributes to be interpolated just like point attributes. Primitive attributes are copied. All groups are preserved except edge groups for performance reasons. Combined VEX code is ~500 lines of code.
  8. hi all, This is a bread and butter problem, solved in many different ways....remove (cull) the outside piece primitives after a "Boolean Fracture". Ive been looking for a simple and fast VEX solution (not... for-each loop nodes) I found one that seems in the right direction as I love its simplicity. (was trying this in detail mode) If anyone has other or a more elegant VEX solution I would love to explore it, cheers int insides [] = expandprimgroup(0, "inside"); int outsides[] = expandprimgroup(0, "outside"); foreach(int inside; insides) { int success; string insideName = primattrib(0, "name", inside, success); foreach(int outside; outsides) { string outsideName = primattrib(0, "name", outside, success); if(insideName == outsideName) { setprimgroup(0, "inside", inside, 0, "set"); setprimgroup(0, "outside", inside, 1, "set"); setprimattrib(0,"Cd",outside,set(1,0,0),"set"); //small test using the colour break; } } } as usual any help appreciated.
  9. I'd like to make a bracelet on my wrist as shown in the picture above. No matter how the object moves or rotates, I want the bracelet to move and rotate accordingly. How can I make it? I tried to insert the circle by making the main axis of the object, but I failed.
  10. I have been studying VEX for a couple of months , trying to making sense of some concepts still. There's 2 functions that seem to do similar things but I can't understand much the difference. What is the difference between NEARPOINTS and NEIGHBOURS? After reading the manual, it didn't provide me much understanding. Cheers D
  11. recursive_division.hip I am trying to randomise a for each using vex and metadata.i only get 0 as a return. I made it work in another scenarios, but i am unable to find why it doesn't work in that specific case. I used all the different script without success: int i = detail("op:../meta","iteration"); or plugged-in int i = detail(1,"iteration"); See the file attached Thanks for the help.
  12. VEX Tutorial

    This is an older tutorial I had made, but it has recently moved to a new location, so I wanted to update everyone one on that. Houdini VEX point manipulation tutorial shows four different types of geometry point setups via VEX code . Project file is now available for download as well. Watch the tutorial at Fendra Fx: https://fendrafx.com/tutorial/houdini-vex-point-manipulation/
  13. unique ids in a continuous vellum simulation

    Hi. I'm new to vex and have a problem i can't get my head around. I created a little simulation where paper gets blown away every 6th frame. Now i want to give every page an unique id, but counting upwards. so my code is: f@idpage; if(@Frame%6 == 1){ @idpage+=1; } I@ know its not counting because every frame, the attrib is set back to 0. But how can i count my IDs in dops or on a global level? Paper_Wind_02.hiplc
  14. I need help I newly started with Houdini and doesn't know hot vops and vex works and I want to create a line where the normals are pointing in a different direction while keeping a 90-degree angle to the line. I fount a tutorial on the internet which only make the normals point in a random direction but not in the 90-degree angle I tried to set the normal direction to zero with floats and stuff but it always results in vex errors. @N = sample_direction_uniform(rand(@ptnum)); rand nomrals.hip
  15. Hi guys, I'm a little lost on how to calculate distance between successive points (picture) of my floor mesh. I guess i have to use a "for each point" in Vex. This distance will help me to creat wall with the exact scale between angles. Thank you for your help.
  16. Hi all, Im looking to control the colors on a grid ( YZPlane) in VEX to create a mask (will be used to create a group of the un-masked area), My approach is to use relpointbbox for the position and 3 chrand's for each side profile, Im looking to see if someone has done something similar. My current solution (and for those interested) is fairly simple but gives good control. vector bbox = relpointbbox(0,@P); float Right = chramp('RightRamp',bbox.y); float Left = chramp('LeftRamp',bbox.y); float Top = chramp('TopRamp',bbox.z); //Init to 0 v@Cd = 0; //Top Ramp if(bbox.y<Top ) @Cd.g=1; //Left Ramp if(bbox.z<Left/2+.5 && bbox.z>.5 ) @Cd.r=1; //Right Ramp if(bbox.z > (1-Right)/2 && bbox.z<.5 ) @Cd.b=1;
  17. simple vex function

    I am tring to write a simple vex, refer to the down pic, the goal is to set "visited" attr to be "true", but I can't get the vex code work, I am to new vex, please any help, thank . dfs.hipnc
  18. Primitive Center Rotate in VEX

    Thought I'd share a little primitive center rotation snippet, any comments welcome. Note: Requires connectivity node upstream set to primitive and attrib "class". //Rotate primitive around center and defined axis int points[] = primpoints(0, @primnum); vector axis = set(0,1,0); //define user axis //vector axis = normalize(@N); //if normal axis is required float angle = ch('angle'); matrix3 rotm = ident(); rotate(rotm, radians(angle), axis); //get center (requires connectivity node, set primitime and sttrib "class") string grp = '\@class='+itoa(i@class); vector CenterPivot = getbbox_center(0,grp); vector pos; // move points to origin, rotate, move back foreach(int pt; points) { pos = point(0,"P",pt); pos -= CenterPivot; pos *= rotm; pos += CenterPivot; setpointattrib(0,"P",pt,pos, "set"); }
  19. Hello wizards, i have a little problem, and im not able to understand why my code doesnt work. I have: -a couple of points, -each with a vector attrib "size". -some code in a wrangle to order the points one above/under(direction shouldnt matter because im taking the absolut value, right?) the other without modifying the first point (0): if(@ptnum > 0){ vector last_point_size = point(0, "size", @ptnum-1); vector last_point_pos = point(0, "P", @ptnum-1); @P.y += ( abs(last_point_size[1]) + abs(last_point_pos[1]) ); } Here before/after the wrangle. Tint in blue everything that doesnt change. What am i doing wrong? Thanks in advance for your time.
  20. Growth animations?

    Hi all, I’ve been able to make fairly random recursive growths but these are next level with the detailed precise in the ridges and expansion. in the comments of this last post for instance, the author suggests it’s the use of curveu & poly extrusion. Could anyone elaborate on this? Ideally I could read about VEX and curveU somewhere to understand better but I am yet to find a resource like this. I feel it might be easier to grasp these concepts through an example though, so if anyone could explain the above animations that would great! If not pointing me to something to read/watch would also be amazing! thanks in advance ODforce :-)
  21. vex precision problem

    hello, I am having a problem, but it almost seems more like a glitch. I have an attribute called "distance" on the curve. I am deleting points based on distance. The point's value that is circled is 0.087. I say to delete anything greater then 0.087, but for some reason that point gets deleted too. It's acting like I said equal to or greater than. I am also including a photo from my actual scene. If I set the value to 0.088 instead of 0.087 some how it works. Any help is welcomed (hip at bottom) curve.hiplc
  22. Hi, I am trying to make a cellular automata sim a la John Conway. The vex version works fine and I think it is true to the original; it runs the same each time for a given set of initial conditions, as you would expect. However, when I try to use the code in openCL there is some variation, from the first frame or whenever I 'Reset Simulation'. I can't work out where this variation comes from and why the algorithm doesn't run as you would expect. I have tried using int, and float for the parameters with 32 bit and 64 bit precision, this doesn't fix the problem. Is there some kind of rounding which happens in Open CL but not vex? Ideally I would like the VEX and Open CL versions to be the same - is that possible? Please see attached hip. Thanks so much. GOL_openCL_vex.hipnc
  23. Local Variables

    A quick Question about SequenceBlend, TimeBlend and BlendShape SOP. I have an attribute that changes from 0 to 1 per point randomly in 100 points. How can I assign it to these SOPs??? Im trying Position blending of Points. THANKS..
  24. Control forces by conditions

    Hey I had this come up a few times today and I was wondering what was the best way to tackle it. I am doing a melting sim of an object thats floating in space. I am using temperature to heat the FLIP and start the melting process. if use gravity then the whole thing starts moving from the start and not just the heated parts. I was thinking if I could just apply the forces based on temperature then that would would be ideal. I tried something like this in the pop wrange but its giving me erratic results. float hot = @temperature; if (hot>1) {@v *= 3;}; Also whats the equivalent of the the geometry spreadsheet in dops, if I wanted to see the values of the temperature or any attribute. I can visualize as color but would be nice to get some numbers. Cheers!
  25. How to add color gradient through velocity plus collision to influence color velocity? to influence the color such as this one here: https://vimeo.com/59024762 how did he do, but he used xsi softimage. if possible to make a Houdini?