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

  1. In short, how can I calculate the transformation matrix, or just rotation similar to how a geometry constraint/rivet works, where you define a few points as reference to glue a geo to an animated one? Long one: I want to procedurally animate the preroll of some packed RBDs, by comparing frame 1 and 2 of the simulation and project the objects backwards in time using that offset. It's a pre-broken sphere, so for translation, I find the average position of all points for both frames to calculate the offset per frame, which works great. [@P -= offset * backwardFrame;] The rotation part isn't as accurate though. I believe multiplying a rotation matrix with a scalar [@P*= rotMatrix*time] doesn't produce the desired results, so I am trying to calculate an axis and a rotation value that describes the difference between these two frames. I am currently picking the positions of 1 random but similar point in both geometries relative to their center, which I cross to find the axis. Then I use an acos(dot()) to get the angle between these two vectors. It almost works, but not 100% and picking a different point changes the result a bit. I guess that's happening because I need to take in consideration more than 1 points into the two geometry. thank you
  2. create a name attribute (primitive) for each primitive group, name is the group name
  3. Switch if

    Hey up, Hope every one is well. Just a quick question regarding the switch if node. i want to switch based on the transform7 , ty value . is this possible ? if so any suggestions how i could script this ?
  4. Hi. I am a beginner. I understand myself that this is a stupid question, but I'm getting confused, so can someone please help me? I have created a point using the addpoint function. I would like to change the interval of it multiple times, what should I do? For example, I want 1~23 points to be spaced 1 meter apart, 24~86 points to be spaced 2.5 meters apart, 87~123 points to be spaced 5 meters apart, and so on. And those points are in a straight line. If anyone can help me with this, please let me know. Sorry if my English is bad. Thanks.
  5. Hello guys, Using VEX, how can I rotate a vector to another vector, by a blend value from zero to one (i.e 1=fully aligned, 0= not-aligned)? Thanks for helping.
  6. In the attached file I've calculated the Cd vector length which I was led to believe is the brightness, but then there is luminance function that's gives different values than the Cd length. Do you know why there is a difference? In part two of the code I'm trying to find the brightest and the darkest using max(luminance.. and min(luminance ... I don't know how to make it work to get just one value for the max and one value for the min (for all the points). VEX_luminance_vs_Cd_Length.hiplc
  7. removepoint problem

    I have a resampled line and I'm gonna delete some points on that, why removepoint does not remove primitive anymore in houdini 19?
  8. Hello guys, As you can see in the image below, in a bunch of points islands, I need these things, using VEX: 1) I want to apply random color to each point island (cluster). 2) I want to group each cluster’s (averaged) center points. I tried several ways without success . I would appreciate any ideas. Thanks for helping. Center_Of_Point_Clusters.hip
  9. Evenly-spaced streamlines

    I came across this paper while searching for a way to keep flowfields evenly spaced out. I can't work out what the actual formula is though? I understand they need to be kept at a set distance apart from one another but how do I implement that? Has anyone done something similar or fancy the challenge?
  10. Houdini to Magicavoxel

    Hi All, I've been working on the .vox exporter for a while. After some improvements I decided to publish it on github. The HDA generates .VOX Magicavoxel file from given inputs. If interested you can get it from here; https://github.com/caglarcomez/Houdini_to_Magicavoxel
  11. Hi, Is there a way I can add my own custom wrangles to the examples dropdown list? (Image attached for clarification)
  12. Incorrect @N size

    Hi all, I am in the process of trying to make a procedural building system and have seemed to encounter an error. I have a very small piece of vex code that is deleting top and bottom-facing prims by checking if their @N.y value is <0 or >0. vector ynorm = @N; if(ynorm.y > 0 || ynorm.y < 0){ removeprim(0,@primnum,1); } A few primitives which should have a @N.y of 0 value have incorrect values like -5.67663e-0 or -1.0457e-07. This is causing primitives that should not be deleted, to be deleted. How can I correct these normal values?
  13. Houdini.School | Noise

    Houdini.School | Noise My biggest teaching venture yet. Take your Houdini Noise making skills to a new level with my 3 session class coming December 21st, 2021. Overview video about the class can be viewed through this link. https://bit.ly/houdininoise
  14. I cannot seem to wrap my head around how to do this so I am asking here. Im looking for a way to "stack" values with VEX. If i simplify it I want to create a point and assign it a random value, then move it that value in the x direction. After that I want to create a second point, give it a new random value and move it that distance + the distance of the first point. The purpose is to create a point generator with random scale values that i can use with LOPs inside of an instancer to place books next to eachother at random scales. I made this in sops and it worked well on a smaller scale but I ended up doing a few thousand books and overloaded my ram. Currently what i have is this. int iter = chi("Iterations"); float minwidth = chf("Min_Width"); float maxwidth = chf("Max_Width"); for(int i = 0; i < iter; i++){ float currentwidth = fit01(rand(i), minwidth, maxwidth); float prevwidth = fit01(rand(i-1), minwidth, maxwidth); vector pos = set(prevwidth+currentwidth/2, 0, 0); int pt = addpoint(0, pos); } My thought process was to create a random value based on the iteration, this random number would be the book width scale value, which is just fitted so i dont get small values. Then to get the previous books width i would subtract the iteration by 1 which successfully returns the same value. Then i create a point and move it by the previous book width + the current book width/2 because i want the point to be centered. However this doesn't work at all because it can only access a single value back. Also i uploaded the sop book generator below if anyone was interested, its pretty flawed the more that i look at it i should have split it into separate HDAs and also you need to have your coordinates set to Z-up. Heres a demo of it through if anyones interested. jw_book_generator.1.0.hdanc
  15. Hi all, I'm running a simple topological vex function over a mesh, designed for topological symmetry. The function below is run in either a compiled for-loop or a SOP solver, I got the same performance from each: function int[] crawlmesh5(int geo; int basehedge; int reversedir; int baseindex; int foundpts[]; int foundprims[]; ){ int newhedges[]; // early out if prim has been processed int primfound = foundprims[hedge_prim(0, basehedge)]; if (primfound){ return newhedges; } //return newvtxes; int localiter = 0; int currenthedge = basehedge; int vtxpt, lookuptwin; do{ if(localiter > 10){ printf("failsafe-break_"); break; } vtxpt = hedge_dstpoint(0, currenthedge); lookuptwin = foundpts[vtxpt]; if(lookuptwin == -1){ setpointattrib(0, "twin", vtxpt, baseindex); //foundpts[vtxpt] = baseindex; baseindex++; } append(newhedges, hedge_nextequiv(0, currenthedge)); if (reversedir){ currenthedge = hedge_prev(0, currenthedge); } else{ currenthedge = hedge_next(0, currenthedge); } localiter++; }while (currenthedge != basehedge); setprimattrib(0, "found", hedge_prim(0, basehedge), 1); return newhedges; } Since wrangles would produce race conditions in the numbering of found points, I'm running this in a detail wrangle, in a manual loop over an array of half edges. foundprims and foundpts are passed by reference and used in place of setting component attributes, and both are saved to and loaded from detail attributes between iterations. When running this function on a grid of 500 points, I get the following performance: On iteration 7: On iteration 8: A slowdown of roughly %8000 . The size of the arrays are not changing across iterations, as far as I can tell nothing is changing other than their content. If anyone has any idea what I'm doing wrong, I will be extremely grateful. Thanks
  16. Hi guys, does vex intersect() not work with a point and a curve/line? it is not working unless i polyextrude my curve. I am trying to project where the point will be on the curve based on a given normal direction.
  17. vex group by range

    how can i create a group from a range of points based on point number. I can make a group with f@group_s1 = @ptnum<30; but how do i get 31 though 60? f@group_s2 = @ptnum>30&&<=60; does not work.
  18. Hi there, I'm still a newbie in Houdini but I realy enjoy learning it! Now I have a question which realy can make my life easier. Is there a way I can find the attribute name of specific node parameter easily? For example: I have a mountain SOP and wanted to change the "height" parameter via an attribute wrangle. I know that I can access this one by using @height in a wrangle, which I found via a google search. But is there a way I can find this out in Houdini itself? This would save me a lot of time. I hope I'm clear in my question.
  19. Hi everyone, Anyone knows how I could get the world position of the tip of a bend deformer handle? (see image)
  20. Hey everyone, I was wondering if anyone started playing with Karma's new procedurals. Namely the vex_intersect procedural. in houdini 19 there is a new folder in samples in $HFS/toolkit/samples/karma_procedurals/ In that folder are some examples of some vex code to use for the vex_intersect procedural. There is a sphere and a mandelbulb example. I've tried both and although it actually renders I get quite aggressive and serious artefacts. It seems its never the same buckets having the issue. I tried the other procedurals like the vex_curve and it works without render issues. I've played with all possible render settings and can't get a clean render. Setting the pixel samples way higher like at 2K gets a better result but it still looks very very wrong. Nows its just very very slow for a sphere. I was wondering if anyone had any ideas of what to do to get a clean render ? This is all off the shelf code from SideFX not my own yet. I wanted to start and play with this but if I can't get the official code to work properly no chance I can get my own FYI Here is what the sphere vex code looks like with the vex_intersect procedural : And the mandelbulb vex code is even worse : however the curves look clean
  21. What is wrong with my code

    Hello, I decided to finally start to learn vex. But I think now I rather suicide. Can you tell me what is wrong with this code? if (@P.y > 0){ v@Cd = set(0,1,0);}else { v@Cd = set(1,0,1);} if (v@Cd == set(0,1,0));{ v@N = 5;} So basically I what is above zero should be green. And what is green should be get a normal with value of 5. Thank you
  22. I cant get the nearpoint function to work inside of a dop network. it works perfectly in sops.. If someone could take a look at the file I would really appreciate it. This is the effect I'm trying to achieve - selfsorting.hiplc
  23. Z and Z Mini for Houdini

    Z allows you to simultaneously edit geometry in Houdini and ZBrush. The toolkit is designed for modeling and animation artists and divided into four parts: 1. Data exchange between programs without using files. The function may be of interest not only to Houdini users but also to ZBrush users who want to improve their workflow by an order of magnitude 2. Blend Shapes creation in Houdini and ZBrush. Tools optimized for high-poly animated geometry 3. Converting FiberMesh to Houdini Curves 4. Built-in remeshing with ZRemesher. Provides a convenient way for partial remeshing and clean mesh with smart relaxing Product link: https://alexeyvanzhula.gumroad.com/l/nuBwF Lightweight version: https://alexeyvanzhula.gumroad.com/l/RaNuJ
  24. New VEX functions in Houdini 19

    New VEX functions in Houdini 19 BSDFs chiang Returns a chiang BSDF. Crowds agentcollisionlayers Returns the names of an agent primitive’s collision layers. agentcurrentlayers Returns the names of an agent primitive’s current layers. setagentcollisionlayers Sets the collision layers of an agent primitive. setagentcurrentlayers Sets the current display layers of an agent primitive. Noise & Randomness mx_cellnoise MaterialX compatible cellnoise mx_perlin MaterialX compatible Perlin noise Strings decodeutf8 Decodes a UTF8 string into a series of codepoints. encodeutf8 Encodes a UTF8 string from a series of codepoints. replace Replaces occurrences of a substring. replace_match Replaces the matched string pattern with another pattern. USD usd_flattenediprimvar Reads the value of a flattened primvar directly from the USD primitive or from USD primitive’s ancestor. usd_flattenediprimvarelement Reads an element value of a flattened array primvar directly from the USD primitive or from its ancestor. usd_iprimvar Reads the value of a primvar directly from the USD primitive or from USD primitive’s ancestor. usd_iprimvarelement Reads the value of an element from the array primvar directly from the USD primitive or from USD primitive’s ancestor. usd_iprimvarelementsize Returns the element size of the primvar directly from the USD primitive or from USD primitive’s ancestor. usd_iprimvarindices Returns the index array of an indexed primvar directly on the USD primitive or on USD primitive’s ancestor. usd_iprimvarinterpolation Returns the element size of the primvar directly on the USD primitive or on USD primitive’s ancestor. usd_iprimvarlen Returns the length of the array primvar directly on the USD primitive or on USD primitive’s ancestor. usd_iprimvarnames Returns the names of the primvars available directly on the given USD primitive or on USD primitive’s ancestor. usd_iprimvarsize Returns the tuple size of the primvar directly on the USD primitive or on USD primitive’s ancestor. usd_iprimvartimesamples Returns the time codes at which the primvar values are authored directly on the given primitive or on its ancestor. usd_iprimvartypename Returns the name of the primvar type found on the given primitive or its ancestor. usd_isabstract Checks if the primitive is abstract. usd_isarrayiprimvar Checks if there is an array primvar directly on the USD primitive or on USD primitive’s ancestor. usd_isindexediprimvar Checks if there is an indexed primvar directly on the USD primitive or on USD primitive’s ancestor. usd_isiprimvar Checks if the primitive or its ancestor has a primvar of the given name. usd_ismodel Checks if the primitive is a model. usd_makevalidprimname Forces a string to conform to the rules for naming USD primitives. usd_makevalidprimpath Forces a string to conform to the rules for paths to USD primitives. usd_setvisibility Configures the primitive to be visible, invisible, or to inherit visibility from the parent. usd_specifier Returns the primitive’s specifier. Volume volumecubicsample Samples the volume primitive’s value. Values between voxels are evaluated with tri-cubic interpolation. volumecubicsamplev Samples the volume primitive’s value. Values between voxels are evaluated with tri-cubic interpolation. volumesmoothsample Samples the volume primitive’s value. Values between voxels are evaluated with smooth interpolation. volumesmoothsamplev Samples the volume primitive’s value. Values between voxels are evaluated with smooth interpolation.
  25. Hi, So, I following this tutorial and got stuck at the actual web shooting part which happens at 43:00. He did it with vops, is it possible to apply the same principle to achieve it with vex? Maybe by moving it back to rest position? I tried it with a carve node but the transformation isn't as smooth as the one in the video. I have attached the HIP file below for reference. and spider_web.hip
×