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

  1. I've been learning a lot of vex over the past couple of months and this is my first real practical use trying to make a procedural tool. Let me know what you think! Next iteration is to add more curved lines using trigonometry instead of smooth. https://youtu.be/UsDpGrcrLhE
  2. Hello Community, I am stuck on a problem to get colors from multi-list parameter. I am trying to implement picking a color from a multi-list parameter randomly and I wrote this vex below. int seed = int(rand(@ptnum) * chf("colors")); v@Cd = chv(sprintf("./color%dr",seed+1)); For some reason, it gives me black or white only... And I couldn't figure out why is this happening. Could someone advise me about this? Thank you in advance! Harutabi.hiplc
  3. Using Arrays with no duplicated values

    Hello, i'm new houdini, new to vex and not done any programming for a long time (most of the forum sighs) Coming from a 3DS Max background I’m absolutely loving Houdini, and can really see the power VEX can have so trying to focus a good chunk of my learning time to get comfortable with it right from the start. I've been building a very simple point infection model to get familiar with the various bits and pieces. As part of this I’ve been storing point numbers to an array, using this in a solver and each frame more pt number get added. The only way i could see to do this was to take two arrays, combine them and then deduplicate, but this seemed a bit long winded and not very efficient. Searching around Stack overflow I noticed that in Javascript there was a find function and also this exists in VEX so instead have now used that to search the array and add any unique points on-the-fly. I guess my question is whether this is actually the best way to do this? It's little frustrating that find() isn’t listed on the https://www.sidefx.com/docs/houdini/vex/arrays.html page as I’d have probably tried it sooner. Which is why I’m wondering if there is a reason it's not on there? Sorry bit long winded and hope this makes sense These are the two options ive used: using Find() and only writing if not already in the array i[]@pointsArray1 = {0,2,7,8,10}; i[]@pointsArray2 = {0,3,5,7,8,11,15,16,10}; for (int i=0; i<len(i[]@pointsArray2);i++){ if (!(find(i[]@pointsArray1, i[]@pointsArray2[i])>=0)) { push(i[]@pointsArray1,i[]@pointsArray2[i]); } } De duplicating the array post i[]@pointsArray1 = {0,2,7,8,10}; i[]@pointsArray2 = {0,3,5,7,8,11,15,16,10}; i[]@newArray; foreach (int num; i[]@pointsArray1){ for(int i = 0; i<len(i[]@pointsArray2);i++){ if(num == i[]@pointsArray2[i]){ push(i[]@newArray,i[]@pointsArray2[i]); } } } push(i[]@pointsArray1,i[]@pointsArray2); for(int i = 0; i<len(i[]@newArray);i++){ removevalue(i[]@pointsArray1,i[]@newArray[i]); } thanks
  4. Hi folks, I am actually coding some basic operators like divergence, gradient in vex and python to demistify them and wanted to share the file with you. Feel free to update or correct the file since i might not be sure of some operators. it contains : - Divergence (voxel and points) - Gradient (voxel and points) - Curl (voxel) : the curl seems to not have the same order as vdb curl so still in wip - Laplacian (voxel) : The computed laplacian is somehow less precise than vdb laplacian - Covariance matrix and eigen vectors (points) : It works but the scale is normalize - Laplacian matrix of a mesh (python) - Bernstein polynomials basic_operators_001.hiplc
  5. random pick point with vex

    I just recently learn to use AttRandom to randomly pick point on a scattered field, how to I do it vex? random pick point.hipnc
  6. Hey guys! Ive recently been trying to code a basic path finder, for pipes on a building. I have tried writing it in a vex for loop, without much success. Did i just code it wrong, or is this even possible without using the solver node? I have a lot of buildings and i want to generate the pipes without running the timeline, any ideas? Thank for the help!
  7. Hi all, I'm trying to come up with some vex to use to kill particles in a sim when they have traveled a certain distance from their birth location. I have mother particles that last one frame and i'm using a pop replicate to spawn new splash particles from them. What i'd like to do is store the position of the mother particles and subtract it from the position of each replicated particle every frame to get the distance, then set them as dead once this has passed a given threshold. Extremely limited VEX experience here, so if anyone could give me some kind of starting hint/snippet that would be amazing Many thanks, H
  8. Kill particles by distance

    Hi all, I'm trying to come up with some vex to use to kill particles in a sim when they have traveled a certain distance from their birth location. I have mother particles that last one frame and i'm using a pop replicate to spawn new splash particles from them. What i'd like to do is store the position of the mother particles and subtract it from the position of each replicated particle every frame to get the distance, then set them as dead once this has passed a given threshold. Extremely limited VEX experience here, so if anyone could give me some kind of starting hint/snippet that would be amazing Many thanks, H
  9. Hi everyone, beginner Houdini user here, so sorry if it's an obvious question. My current finger exercise / idea is, to use a texture with areas in clear, distinct colors like (255,0,0) without anti aliasing. These are used to map the colors onto points which then are used to copy specific geometry onto them (buildings and city stuff in my example). This works for the most part, but to have more control over which color gets how many points I split my geometry into separate groups and use a separate scatter for each group (I tried the densitiy attribute before, but everything changing when I change one density value wasn't what I wanted) To achieve this I am using a partition SOP with group by Color. The weird thing is, that I'm not getting the expected number of groups (8 in my case as I'm using 8 colors) but more something around the lines of 200-700. Looking at the Cd values in the geometry spreadsheet shows me, that the values aren't all the correct values (they should be along the lines of 1,0,0 ) but there are interim values, small variations. This of course gets picked up by the partition node. Using an attribpaint SOP gives the expected result...but I would love to be able to draw the textures in external tools like Photoshop. Just nicer to edit the map. Does anyone have an idea how the interim values are created? I suppose it has something to do with the mapping / scaling of the texture / uv.. but I can't figure it out as everything I change, gives the same result (like the filter settings in the attribfrommap SOP). My node setup is like this: Grid -> size 16,9 (I tried different resolutions here too to no avail) UVProject -> Orthographic, 16,16 (and rotated so it has the rotation of the grid) attribfrommap -> Texturemap (a png, 3840 x 3840 px with the 16 by 9 area centered vertically on the map) partition SOP -> Group by Color For my easy test setup I added an attribute wrangle that checked the incoming color values against bordervalues and sets them to the closest correct value. f@lowLimit = .3; f@highLimit = .7; if(@Cd.r > 0 && @Cd.r < @lowLimit) @Cd.r = set(0); if(@Cd.r < 1 && @Cd.r > @highLimit) @Cd.r = set(1); if(@Cd.r < @highLimit && @Cd.r > @lowLimit) @Cd.r = set(.5); if(@Cd.g > 0 && @Cd.g < @lowLimit) @Cd.g = set(0);; if(@Cd.g < 1 && @Cd.g > @highLimit) @Cd.g = set(1);; if(@Cd.g < @highLimit && @Cd.g > @lowLimit) @Cd.g = set(0.5);; if(@Cd.b > 0 && @Cd.b < @lowLimit) @Cd.b = set(0); if(@Cd.b < 1 && @Cd.b > @highLimit) @Cd.b = set(1); if(@Cd.b < @highLimit && @Cd.b > @lowLimit) @Cd.b = set(0.5); This works for my simple case at the moment. But if I was to add more colors the rounding wouldn't work anymore with all the interim values created. Can anyone explain why I get interim values even though the texture itself is not antialiased and in the right aspect ratio? I guess it has something to do with the texture stretching/mapping in houdini but is there a way to fix the problem? Or a better way to achieve this result? I checked some posts in here but most of the proposed solutions I got to work for texture color to point color result in the same interim values Thanks a lot for your help! Cheers, Daniel
  10. Modeler 2020

    Product link: https://gum.co/KYCgR What's new: 1. The Modeler core has been completely rewritten. Performance, stability and UX are improved. 2. A hotkey system has been created. Hotkeys are now configured in a separate editor (Hotkeys shelf tool). The editor allows you to quickly configure keyboard and mouse shortcuts. Unlike other modeling programs, you can now associate any tool with any combination of keys or mouse actions. In a similar way, the mouse and keyboard are configured in Nevercenter Silo, but unlike Silo, there are no restrictions here. That is, you can assign absolutely any tool to the mouse. On the other hand, mouse tools such as interactive selection can also be assigned to keyboard shortcuts. Also, unlike the standard Houdini behavior in Modeler, you can use the additional two mouse keys X1 and X2 (Ctrl+X1, Shift+Ctrl+X2 etc). The Hotkeys editor has two default mouse layouts: 1. Standard - that works just like DM and the previous Modeler version - LMB to select items and MMB to drag them 2. Pro - which allows us to select geometry components with RMB and drag with LMB. MMB used to select invisible items too. 3. The interactive state system (add-on for Python States) has been rewritten from scratch. Many tools have become more interactive and have the ability to customize the node in the viewport. In addition, you can quickly create custom interactive python tools for your own HDAs. The mouse wheel now works more universally. In many nodes, the wheel allows you to change the Uniform Scale parameter. List of nodes that now use state tools: Soft Boolean, Insert Mesh, QPrimitive, Array, Hose, Bevel, Extrude, Bridge, Set Flow, Smooth Points, Thickness, View Deform. 4. Retopology tools (Topo category) have been redesigned. TopoDraw tool (Alt+A) allows you to quickly draw poly patches on the reference geometry. It has an ability to snap to existing geometry. Topo mode (Alt+T) now packs the reference model. This speeds up the entire process of retopology with millions of faces. The Push tool now works in the Topo mode, which allows you to get the desired result even faster. In addition, the Push tool has improved performance and stability. 5. The Insert Mesh SOP was redone from scratch. It has interactive tuning, better performance, and more accurate results thanks to improved normals. 6. The Deform menu was merged with the Align menu and renamed to Transform Menu (Z). 7. The Relax tool renamed to Smooth. The tool is completely redesigned and takes advantage of Python States. Using the Smooth tool, you can smooth points or polygons in a standard way. On the other hand, the edges are smoothed as separate curves. Combined with interactive enhancements, the tool allows you to quickly fix messy areas. 8. Tools that create modeling nodes were removed from the Modeler shelf. Only general tools are now on the shelf. Direct modeling tools are now called from the Modeler mode. Added shelf tools: Delete Node, Merge Nodes, Stash History, Pack History, Clean History и Delete Attribs 9. Added a new tool Repeat Node Parms that allows you to apply settings from previously created nodes of the current tree 10. ToolsPanel (spacebar) renamed to Launcher. Launcher tools have been re-sorted and have a new Mouse section for interactive tools like selection or dragging 11. For Bevel, Bridge, Extrude and Smooth tools separate nodes were created 12. Bevel, Extrude, Inset, Smooth, Thickness hotkeys can work as sticky keys. That is, the call of a hotkey, for example, of the Extrude tool, leads to an instant change of the extrusion value before releasing the key. 13. Added Inset tool that uses Extrude SOP. In contrast to the Extrude tool, the first time you start Inset, you can change the inset with LMB. 14. The Lattice tool removed. It is now replaced by improved View 4 and View 9 (View Deform) from the Transform menu (Z) 15. Tools for a quick preview of the subdivided geometry were created: Preview Subdivide (Alt+1) и Preview Subdivide Wire (Alt+2). Standard viewport subdivision and instance subdivision (Symmetrize Tool) ar assigned to Alt+3 и Alt+4 respectivelly. 16. Select By Normals mode (6) allows you to select components based on normals 17. Local transformation tools have been added to the Transform menu: Local Move, Local Rotate и Local Scale 18. An Extend (Y) tool. This add-on to the Extrude tool allows you to quickly extrude edges and polygons using handles. 19. The Bridge Connected tool returned from the DM package 20. Slice, Clip and Mirror tools have the ability to set the initial origin based on points selection center 21. On the next call, the Delete tool changes the node so that it deletes unselected geometry. 22. The KitBash tool now offers to automatically create a KitBash panel if it is not created 23. Shift+Double Click can now replace the geometry of the current Insert Mesh SOP with the geometry from the KitBash panel 24. Combine and Boolean now offer to select nodes at the object level if the tool was launched inside the SOP container 25. Set Flow creates more accurate geometry in unusual situations. 26. Added a Point Weld tool (Alt+W) for interactive point stitching 27. The Soft Boolean SOP can be configured interactively. It also has a slightly improved performance. 28. Collapse History (Left) renamed to Pack History 29. Many tools are assigned to new hotkeys. The ToggleCompass tool is now called with the Backspace key. 30. The Edit Mesh shelf tool now renamed to Modeler 31. Modeler now moved to the package Houdini system instead of using houdini.env
  11. Hi, I'd like to sample the UVs and texture from the models i intersect with but don't know how... Any advice ? Thanks Escherisation.hipnc
  12. vex return list of prims numbers inside radius

    Hi, I raytrace millions of points on a geometry with vex, I using the fonction intersect() for that and this return me the prim number of the hit surface, but I looking to find a way to find all primitives inside a radius for each point raytraced. their is way to find points inside radius with pcfind() and xyzdist() but I want to limit my search to prim for many reasons. Someone had solved this problem or have an idea ?
  13. Hi, Is it possible to set up the normals of these points procedurally using vex or python? I just set point attribute to every point with vex, but could I make it more procedural if I had more or less points, for example?
  14. Hey guys, I recently had some VRScenes made (a file type to save vray material, lights etc into a vray scene file) - however at the time I had setup materials on desktop. I have cleaned up my drive and moved everything to external SSD. Now I found out that my VRScene files do not find the textures I had created on desktop since they have been moved (obviously). I realised I can quickly edit the .VRScene files in a text editor and replace the file location in few places i.e. "C:\files\old_location" to "G:\files\new_location". I have maybe 5 or 6 VRScenes to do this with which is easy to manually do but I wanted to exercise some Houdini into this and wanted some directions on how I can procedurally edit a bunch of .VRScene or .txt files and replace certain string variables. Surely there is a way to automate this process!
  15. Modeler 1.0

    Modeler 1.0 for Houdini released! Free for all the DM 2.* users. $70 for the DM 1.* users. https://gum.co/xKBKM What's new: 1. DM now renamed to Modeler 1.0 2. new feature: the DM menu (Z hotkey) has been replaced with a new alignment menu where you can use tools for fast and accurate transformation. The menu includes the whole set of tools for working with a compass, geometry centring, quick flattening with gestures and many other transformation tools. Use the hotkeys for the tools of the old DM menu. 3. new feature: Deform Menu (N hotkey) with lots of interactive deformation tools including a new Lattice tool 4. new feature: MODELER_PICK_STYLE environment variable allows to override Modeler startup selection pick style. Add it to the houdini.env file. Use "Box", "Lasso", "Brush" or "Laser" values, then restart Houdini. 5. new feature: the hard and soft boolean tools are now combined in a new menu called Boolean (J hotkey) 6. new feature: a Fix Curves tool helps get rid of broken lines in open polygons. This helps when beveling corners of open polygons. 7. new feature: a Select Curves tool helps to select open polygons (curves) in the model 8. improvement: now some tools can create curves and process them. For example, the Extrude tool can produce lines from selected points. The Collapse tool can flatten open polygons (curves). The Connect tool can be used to cut a segment between two selected points or connect two open faces. The Push tool now properly moves points in open faces. 9. improvement: the RMB menu of the Push tool has a new item Toggle Connectivity, which allows you to move points, capturing the points of other closed pieces 10. improvement: the Push tool now works slightly faster 11. improvement: the Push tool can now slide point with Ctrl+MMB 12. improvement: the mouse and keyboard shortcuts of the Push tool have been completely redone 13. improvement: if nothing is selected, the Hose tool searches for all the curves in the current geometry 14. improvement: a Group parm added to the Hose Tool. Can be used in conjunction with a result of the Duplicate tool 15. improvement: Hose now creates straight edges tube if the Resample Curve set to zero value 16. improvement: Geometry Library renamed to KitBash and works only as the python panel 17. improvement: KitBash replace feature now doesn't update the item icon 18. improvement: Tools Panel now has a new category KitBash with tools for working with the library items. Now you can create, save, overwrite and update icons faster, without actually working in the KitBash panel 19. improvement: volatile edge sliding now does not require explicit movement of the mouse pointer to the edges 20. improvement: volatile edge sliding now can be used to slide points and faces 21. improvement: Fix Overlaps can now use face groups 22. improvement: Duplicate applied to edges now creates a curve in the current geometry object 23. improvement: the Resymmetry tool now works slightly better. The Tollerance parameter is no longer saved between nodes (). This allows you to not change the position of the seam points. 24. improvement: mouse wheel manipulation in various tools has been improved 25. improvement: new simple box type has been added to the QPrimitive HDA 26. improvement: Tools Panel now has a more logical structure for faster access to popular tools 27. improvement: the Modeler shelf was fully revisited 28. improvement: the Walk History Up and Walk History Down tools (Up and Down hotkeys) now work more interactively when traveling through nodes with more than one input or output. 29. improvement: the Select By Shells tools was replaced with a new Convert To Shells tool (Ctrl+1) 30. improvement: double-clicking with LMB in the viewport is completely revisited. Now you can jump to objects level by double-clicking LMB in an empty space. Clicking on a geometry allows you to quickly switch between objects. If you are in a certain state, double-clicking activates the selection mode. All these improvements speed up the modeling process. 31. improvement: the deformation tools (Size, Ramp, View) now have the fixed blend feature. The transition between the deformable points and the undeformable part looks more correct. 32. fix: Hose now orients rings copies correctly 33. fix: Slice, Mirror and Cut tools now set correct geometry center on tool activation 34. fix: JumpUp and JumpDown tools does not work when Compass is active 35. fix: QLight now works properly if you run it from the orthographic viewport 36. fix: sometimes camera movement with Alt did not work after a mouse click 37. Lots of tools have changed hotkeys. Look at Tools Panel for more details. 38. Python code has been revisited 39. Documentation has become more detailed 40. Overall speed improvement 41. Other improvements Works only in Houdini 18. Use build >= 18.0.346
  16. Creating VEX libraries

    Hi, I've tried to find information about this but it's hard to come by or maybe I'm not looking in the right spot. After all I'm an improvise programmer. I want to create VEX libraries of functions and possibly structs (but let's start with functions). You know, functions I would use often and that I would not have to copy paste from AttribWrangle to AttribWrangle nodes. These functions should be accessible using #include (I think). So here is a few questions to get me started... 1) How to structure the inside of the file? I don't want to compile them into an asset. For example if I put this straight into a .vfl file and compile it will it work or it needs a header? // Function to Round at specified intervals int roundToInterval(float val; int interval) { float new_val = ceil(val / interval) * interval; return int(new_val); } 2) How to compile those files? Seriously I don't understand any of the compiler stuff... Do I even have to compile them??? What is a .h and do I need to use it? 3) Where to put the files? I want a common location that is not inside any of Houdini folder structure. Where do you specify that Houdini should look in an external folder for these extra functions? You know like adding HOUDINI_OTLSCAN_PATH to the houdini.env file. Is there a HOUDINI_VEX_PATH that I could use??? 4) Finally, is using the files as simple as doing #include? It would be nice that this was written somewhere because some of us don't have the programming background necessary to understand these easily. Any help would be appreciated. Thx! Christian
  17. An expanded Merge SOP operation. Goes well with H18 "Copy to Points" to boot, but there's a lot of other small things that enables.
  18. Wavy HDA

    HI everyone! This HDA generates wavy patterns on a base geometry using a secondary source. Wave patterns depend on the shape and the point count of the secondary source. The HDA also generates color data depending on the source of the waves. Currently by default it outputs as curves/splines, if needed a polywire can be applied after the wave generation to give it 3D depth. I've attatched some renders that I have made with this tool. You can check it out over here: https://gumroad.com/l/R_wavy
  19. Hi, Iam doing a small vex RnD, i have some points with @active=0 and i make them @active=1 randomly by point number over time. lets say i have given them an attribute @temp =0, all i wanted to do is the value of @temp should increase from 0 to 1 gradually over frame when @active=1. for example, if the @active = 1 at frame number 30, the value of @temp of the same point should increase from 0 to 1 from frame 30. thanks in advance
  20. In the file I try to create the custom velocity with noise over time using normals. At first I did it with AttributeNoise, things go smoothly. Then I try to recreate it with Vop node, I can't have the normal distribute equally in all the direction like how I did with AttrNoise. Plus it move very fast over time, how do I reduce the movement of it. Also, can anyone show me how to do it in vex too. I add @Frame in vex, everything move in super speed. Thanks in advance. customVelocity.hip
  21. Hi, can I somehow get the type of a primitive? I need to separate "polylines" from "polys".
  22. setPointGroup behavior

    Hey, I have 2 scatter node with 30 points on each of them. I wired the two in a pointwrangle. I used this code and I am wondering why the setpointgroup is running only once and not as the doc suggest : "This node runs the snippet on the detail or every point/primitive/vertex (depending on the Class parameter) in the input geometry." This is probably something I missunderstood but I would be grateful if someone can explain me how it's really behave. Here is my code : @group_basePoints = 1; vector npos = point(1, "P", @ptnum); int newpt = addpoint(0, npos); setpointgroup(0, "basePoints", @ptnum+@numpt, 1);
  23. Hi everybody, I'm quite new to Houdini so I have a problem here. I have a group of points on a geometry. Now I want to find the center point of it so I can 'Copy to Point' a sphere. The geometry is an animated alembic cache. find centerPoint.hipnc BAZA_GUN.abc
  24. i@iterations = len(chs("../NETWORK_CONTROLLER/c2p_querstrbn")); s@myArray = chs("../NETWORK_CONTROLLER/c2p_querstrbn"); i[]@myintArray = {}; s[]@mystrArray = {}; //remove spaces from string array, get len() of string array if (i@iterations >2) { i@iterations += 1; i@iterations /= 2; } //create arrays from preselection int i; for(i=0; i < i@iterations*2; i++) { i@stringtointeger = atoi(s@myArray[i]); append(i@myintArray, i@stringtointeger); } // remove spaces from int Array i[]@cleanArray = i@myintArray[0::2]; // convert back to string to read in with copy to points target points later for(i=0; i < i@iterations; i++) { s@integertostring = itoa(s@mystrArray[i]); append(i@mystrArray, s@integertostring); } hey all, vex noob here. I am trying to append values from an integer array to a string array. looping over array entries with atoi works fine to extract the strings and append them to an int array. but the other way around using itoa gives me this error: Warning: Errors or warnings encountered during VEX compile: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53). Error: Error in VOP 'snippet1'. Warning: Errors or warnings encountered during VEX compile: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53). Error: Vex error: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53) i'll try to sum up the context quickly: I have a controller node where I can enter the points I want to copy objects to. now when I copy to point 0 1 2 3, another copy node should copy other objects to points 4 5 6 7. when I enter 0 1 2, the other copy should go to 3 4 5 etc.
  25. Help with porcedural building

    Hello I'm working on a procedural building and actually i'm stuck with something. I've tried many thing but it doesn't work. I'm trying to add or remove the number of the window when I change the size of the building. I've wrote this and i've tried to add an offset to keep a space between 2 windows but I didn't find how. vector mypt = getbbox_size("../box1")/getbbox_size("../box2"); //box2(window), box1(building) float dist = distance(@P, mypt); if(dist > ch("distance")){ removepoint(0, @ptnum); } if(dist < ch("distance")){ addpoint(0, @ptnum); } Is someone can help me with that Thank you https://youtu.be/iwNiS0YTCms
×