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

  1. Object Fold Unfold

    Hello, Looking to make a similar effect http://www.tokeru.com/cgwiki/?title=Houdini#Unfolding_polys However, currently the effects works on faces (per-face) Is it possible to achieve the same but on islands or name attribute instead of face? Basically, the desired effect would be to unfold based on the color marked islands/groups. any suggestions or help please. Ipad_Cut.hipnc
  2. primpoints hELP

    I have multiple lines, 25 primitives all containing a wide range of points. I want to append each point to a group depending on the primitive number. My initial code looks like this, int poop[] = primpoints(0,0) foreach(int i; poop) { i@group_primnum_0 = 1; } This function grabs all of my points, when I only want specific points for each primitive to create groups out of. How can I make this procedural to loop over all of my primitives and assign each array it's own group id? Thanks! Still new to vex >:{|
  3. Roll-up curve

    Hi there, here is my attempt to solve "Roll-up Curve" in single wrangle node scene file available on Patreon: https://www.patreon.com/mkgrafics RollnRoll_1_1_1.mp4 RollnRoll_3.mp4 parameters.mp4
  4. Orient noise pattern along vectors

    I aligned vector directions towards some curves (ie. outer edges). How would I orient a stretched noise pattern accordingly? oriented_noise.hiplc
  5. For each POINT in each GROUP

    Hello guys I am still quite new in VEX coding and I am all day fighting with set of gravitational rules based on a membership of the points in groups. I am emitting particles, the particles are sorted to groups by 3-6 nearest points. So after couple of frames of emitting particles I have 100 groups and each groups has 3-6 points. Now I need to set some gravitational rules for every group so the points in every group will be attracted to each other just inside the group. I got stuck here. If anyone has any idea how to solve this issue, it would be perfect. Many thanks in advance. ap_ParticleGravitationalAttraction_01.hipnc
  6. Change a curve basis in VEX?

    I'm dealing with curve sampling these days and one thing I would like to is to set curves' basis through vex. But seems such is not possible, if I'm seeing correctly that those prim intrinsics are not editable: I can use indeed the Basis SOP to read the current basis and then edit what I want, I guess I could even pass a detail attribute to this field with a string generated in VEX... But not the most procedural way and doesn't allow specification per primitive. Anyone else been through this? Cheers
  7. Hello guys ! I noticed that in vex, if you modify an attribute and then read it back using the point() function (or prim(), or anything not using the @ nomenclature), it will return the input value, not the modified one. See this code, running over Detail vector thePos = point(0, "P", 0); // Input point's pos is {0,0,0} thePos += {1,2,3}; setpointattrib(0, "P", 0, thePos); thePos = point(0, "P", 0); printf("%d ", thePos); // Prints {0,0,0} instead of {1,2,3} I mean, even this code doesn't work ! No input, running over Detail addpoint(0, {1,2,3}); vector thePos = point(0, "P", 0); printf("%d ", thePos); // Prints {0,0,0} instead of {1,2,3} But interestingly enough, when running over Points (or prim or whatever), this happens //Input is one point, at {0,0,0} @P += {1,2,3}; vector thePos = point(0, "P", 0); printf("Real pos : %d\n", @P); // Prints {1,2,3} printf("Problem pos : %d\n\n", thePos); //Still prints {0,0,0} Not sure what that means, but it can't be applied in my case, as I need to run over Detail. Just wanted to point it out. I need to be able to modify some point attributes (pos and others) and then read them back when running over Detail. How can I do that ? Is it possible ? Thanks in advance ! point_old_value.hip
  8. Add points to a primitive

    Hello ! Plz, anybody help me with this problem: I want add a point to a primitive ,but i dont want add it in world space only! How i can add points on a primitive surface by vex? Thx! P.S. In this image points was added by vex in world space ,but they dont belong to any primitive. sad.
  9. VEX and HOM in external editor

    Hi, Just thought in ask if anyone knows of an external editor with vex and HOM libraries in them. You know to lazily have autofill and nice colors in an external editor (visual studio maybe??) Just kind of hoping that more advanced programmers here will have a better set up than mine
  10. Hey magicians, excuse my VEXnorance but: How can I push the green colors while keeping red ones in original position? also tried to add a distance slider but it moves all the points. Lastly im thinking about how to add more density points on the green part, depending on z distance Thanks!
  11. Help! to vex

    hey i have a vex there turns the color of RBD object in to red on impact. but here comes my problem, i can't find a way to turn it green one frame after the object have turn to red. anyone there can help me with that. and here is the vex i am using. if (@hit_total == 0) { @Cd = set(0.10,0.0275 ,0); } else { @Cd = set((@hit_total+@id+5), 0, 0); }
  12. PolyExtrude in VEX

    Hi, I've been wondering if anyone tried to recreate the polyextrude sop in vex? I'm particularly interested in the inset function of the sop, and how one would go about recreating this in vex. Any ideas? Thanks in advance.
  13. Creating points vex

    Hello; I have been creating points in a attribute wrangle set to run over detail. I typed in addpoint(0,{0,0,0}); which simply adds a point at the origin. That's what I have been doing until today when I noticed in the entagma video they type in int pnt0 = addpoint(0,{0,0,0}); What is the benefit of creating a int first vs. the way I have been doing it? Thanks
  14. Hi Guys, For a tool i'm working on i need the radius of my metaball to be affected by the size of a painted region from a terrain, can anybody suggest how this would be done? It needs to change as the user paints but i'm getting stuck on the exact terminology of the code i would need to type into the region field on the metaball, this is what i currently have typed into the radius field on the metaball but it isn't working: getpointbbox_size(/obj/leaf_pile/"bound1", 0) Any suggestions would be greatly appreciated!
  15. I have an attribute wrangle SOP running over points, in which I need to read the value of a detail attribute for every point. This seems fairly straightforward using the supplied attribute functions, but I can't get the behavior I need. Below is a simplified version of my VEX code, with calls to printf for testing. The geometry it's running over has an integer detail attribute called "last_clean." printf( "last_clean=%d\n", int(detail( 0, "last_clean"))); printf( "ptnum=%d\n", @ptnum ); if( detail( 0, "last_clean" ) == @ptnum ){ printf( "test\n"); //do stuff in this loop } and here's the output: last_clean=0 ptnum=1 ptnum=2 ptnum=3 ptnum=4 ptnum=5 ptnum=6 ptnum=7 ptnum=8 ptnum=9 ptnum=10 Note the lack of "ptnum=0" or "test." The only rationale I can imagine for this is that the call to detail() turns the wrangle into a detail one for that iteration, thus making all references to @ptnnum basically meaningless (which still doesn't exactly explain why it only reads the detail attribute once). But I can't find anything in the documentation about this behavior of those functions or wrangles (what else is new...). Can this behavior be changed? Is there a stupid error I'm missing? The wrangle is in an orange for loop block if that's relevant. Thanks for your help!
  16. Manipulating points with noise (vex)

    Hey y'all, very new to Houdini here and I feel like i'm missing something obvious. So i'm trying to create a line of points to be later turned into a polyline. I'm not having to much trouble making a straight line, but i'm trying to manipulate the points with noise but it seems to only be changing the position of the points in a linear way. ie, they're only growing farther up, not really 'wandering' in other directions. Any help would be appreciated, thanks! VEX vector pos; //vector rand; vector growthpos = normalize(chv("growthposition")); int numsteps= chi("numsteps"); vector wander = (noise(pos+1)); float wandermag = chf("wandermag"); for(int i; i < numsteps; i++){ pos = growthpos * i; pos = pos * (wander * wandermag) ; addpoint(geoself(), pos); }
  17. Hey guys the original example from VEX_Sort is not working at least in my windows machine I change the code #include <UT/UT_DSOVersion.h> #include <UT/UT_Array.h> #include <UT/UT_Vector3.h> #include <UT/UT_Vector4.h> #include <UT/UT_Matrix3.h> #include <UT/UT_Matrix4.h> #include <UT/UT_Assert.h> #include <VEX/VEX_VexOp.h> using namespace UT::Literal; namespace HDK_Sample { template <typename T> int compareValues(const T *a, const T *b) { if (*a < *b) return -1; if (*a > *b) return 1; return 0; //Direct access to pointer value is not working in compare operator //return *a > *b; } template <> int compareValues<const char *>(const char * const *a, const char * const *b) { return strcmp(*a, *b); } template <> int compareValues<UT_Vector3>(const UT_Vector3 *a, const UT_Vector3 *b) { if (a->length2() < b->length2()) return -1; if (a->length2() > b->length2()) return 1; return 0; //Direct access to pointer value is not working in compare operator //return a->length2() > b->length2(); } template <> int compareValues<UT_Vector4>(const UT_Vector4 *a, const UT_Vector4 *b) { if (a->length2() < b->length2()) return -1; if (a->length2() > b->length2()) return 1; return 0; //Direct access to pointer value is not working in compare operator //return a->length2() > b->length2(); } template <> int compareValues<UT_Matrix3>(const UT_Matrix3 *a, const UT_Matrix3 *b) { if (a->determinant() < b->determinant()) return -1; if (a->determinant() > b->determinant()) return 1; return 0; //Direct access to pointer value is not working in compare operator //return a->determinant() > b->determinant(); } template <> int compareValues<UT_Matrix4>(const UT_Matrix4 *a, const UT_Matrix4 *b) { if (a->determinant() < b->determinant()) return -1; if (a->determinant() > b->determinant()) return 1; return 0; //Direct access to pointer value is not working in compare operator //return a->determinant() > b->determinant(); } template <typename T> static void sort(int argc, void *argv[], void *) { UT_Array<T> *arr = (UT_Array<T> *)argv[0]; // This will work with all types (including strings). Since no strings // are created or destroyed by this method, it's not necessary to call // VEX_VexOp::stringAlloc() or VEX_VexOp::stringFree() to free them - // the pointers are just reordered in the array. arr->sort(compareValues<T>); } static void decimate(int argc, void *argv[], void *) { const UT_Array<const char *> &src = *(UT_Array<const char *> *)argv[1]; UT_Array<const char *> &dst = *(UT_Array<const char *> *)argv[0]; UT_ASSERT(dst.entries() == 0); for (int i = 0; i < src.entries() / 2; i++) { // Acquire a new reference to the string for storage in the // destination array. const char *str = VEX_VexOp::stringAlloc(src(i * 2)); dst.append(str); } } } // // Installation function // using namespace HDK_Sample; void newVEXOp(void *) { // Sort the array by value for scalars, length for vectors, or // determinant for matrices. new VEX_VexOp("hdksort@*[I"_sh, // Signature sort<VEXint>); // Evaluator new VEX_VexOp("hdksort@*[F"_sh, // Signature sort<VEXfloat>); // Evaluator new VEX_VexOp("hdksort@*[S"_sh, // Signature sort<const char *>); // Evaluator new VEX_VexOp("hdksort@*[V"_sh, // Signature sort<VEXvec3>); // Evaluator new VEX_VexOp("hdksort@*[P"_sh, // Signature sort<VEXvec4>); // Evaluator new VEX_VexOp("hdksort@*[3"_sh, // Signature sort<VEXmat3>); // Evaluator new VEX_VexOp("hdksort@*[4"_sh, // Signature sort<VEXmat4>); // Evaluator // Remove every second string in the source array and store the result // in the destination. new VEX_VexOp("hdkdecimate@&[S[S"_sh, // Signature decimate); // Evaluator }
  18. Houdini face separate folding

    Hi, I am looking to achieve this kind of effect by Elisha Hung: I would be super grateful for anyone who can help me achieve it.
  19. Vex create group

    I wrote these lines to create a group frm my selection BBut the selection is ok but no group is created ?? I add a group sop and the group "truc" is not listed ? Can you help me please ? Thx untitled.hipnc
  20. sinus loop/cycle

    Hey everybody, I am trying to make a simple sinus animation loop in a seamless way. If I am not mistake it should somehow work with combining sin($F), $FPS and $FEND is that correct? Unfortunately I was not able to figure it out so far and it seams like it is not as easy as I thought!? Thank you!
  21. Hey everybody, I'm trying to make a simple setup that starts out with one point from an add node. Then in a solver, a point wrangle gets the position of the last point on the incoming geometry and creates a new point with the position of the last point, plus an offset. The problem is that points are always being created at the position of the first point plus the offset. Here is the code in the point wrangle (running over Detail). The "num" attrib will always has a value of zero, so it looks like the primpoints function is giving me an empty list, but I don't know why. int pts[] = primpoints(0, (@primnum)); vector endpos = point(0, "P", pts[-1]); vector off = {0,1,0}; int npt = addpoint(0, endpos+off); setpointattrib(0, "num", npt, len(pts)); Thanks for taking a look! pointCreate_01.hipnc
  22. Hello I just followed tutorial about Bendint Metal using hard constraint. (www.youtube.com/watch?v=38RhntxXcMI) and had some problems with setup hard constraint and need your help TT In my scene, I setup my hard constraint like left screenshot(red lines). and just like the tutorial, write vex codes for make hard constraint where middle of each constraints. This is guide geometry of constraints in dopnet. Left side is the tutorirals constraint one and right is mine. Modeling is different(I create my modeling my own), but I don't think It makes those difference in constraint. I set up Rest length option same with tutorial but what are those additional constraint points ?? I think those points causes difference with the tutorial so I need some helps to get rid of them. How can I get rid off them ? Sorry for my English TT
  23. Hi, I just want to do it for experimentation. What's the best way to break up the edges of a pyro sim post sim with or without rest fields, and avoid swimming noise? If I have dual rest fields, do you combine them using a Mix node where the connections are rest, rest2 fields and rest2_ratio as the bias? Because there is also rest_ratio attribute. After this, do you displace the density volume using velocity field, gradient of the density or gradient of the SDF converted from density? Also negate the direction? I read here some people advising to use gradient or velocity to the position of the noise for example. Lastly which noise is more suitable for this task? Thanks a lot
  24. instancepoint() is undefined - ?

    Hey all, Just starting my journey into Houdini after years doing Processing, Cinder, oF, trying to learn the basics and figure out certain things I was doing via code, but in Houdini. First thing I thought I'd try is instancing and I'm already off to a bit of a bad start ha. I have instances of my geometry all set up with and instance node and I'm trying to pass per-instance attributes to each instance. However, whenever I call `instancepoint` in an attribute wrangle, Houdini errors out and tells me `instancepoint` is undefined. Can someone point me in the right direction? As far as I can tell the function hasn't been deprecated or anything like that. Thanks!
  25. Hi I'm just stuyding Houdini and have some problems with VEX function named 'vertexindex'. as I understood, It makes 'a linear vertex' from primitive and its vertex. and so arguments need @prinnum and vertex number. But Look at this screenshot. Pink number on shot is primitive number and the number behind of it is return of vertex number 0. I wrote the VEX code as 'i@hi = vertexindex(0, @primnum, 0);' I put 0 in third argument and I expected the result as 1 in primitive 1. because It's No.0 vertex is 1. isn't it ? but the result was 4. I'm so confused with it T_T Help me wizards !!