Jump to content

ThomasPara

Members
  • Content count

    126
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ThomasPara

  1. Propagating point creation with VEX

    Thats because your current_pos always get set to (0,0,0) Since you already have placed your point based on a vector, you dont need to "figure out" that vector again, it will only become the same vector. You can just offset with the same vector over and over again. You can then use the function "sample_direction_cone()" to vary your vector.
  2. Create rotation control for polywire

    The setup breaks if you move it outside of origo. Did some minor changes to it. orient_polywire_sweep_fix.hipnc
  3. Leaves on objects

    thanks, np
  4. Leaves on objects

    leaves_fix.hiplc
  5. Propagating point creation with VEX

    You cant import attributes from points that are created in the same wrangle, you will only get values from the wrangle above. And if you want to store attributes to a point you create you need to use the handle you have created. ex: setpointattrib(0,"attrib",newpoint,value,"set"); I think you might have been overthinking this one. vector up = set(0,1,0); vector this_pos = @P; int samples = chi("samples"); for(int i = 0;i<samples;i++){ this_pos += up*chf("lift"); int newpoint = addpoint(0,this_pos); } You can use this as base
  6. You can make new primitives based on the points you already have. Connect them all and then compare if you have duplicates. Sometimes you have to do operations over several wrangles. NoDuplicates_01.hip
  7. Custom Velocity for Fluids - Using Normals

    You can make the particle field yourself and then source that. PaintBlob_fix.hipnc
  8. Poly Carve SOP

    Yes i understand, its not an attack on the solution(s). Its more the idea of cutting a segment several times without adding points. Since both metodes shown here (from my understanding) only can cut once between two points.
  9. Poly Carve SOP

    Did an experiment with subsampling the curve instead of adding extreme amounts of points to get precision. The downside is that you cant predefine the cuts with your own attribute. clip_by_noise.hiplc
  10. What is the difference between npoints() and point()?

    npoints() gives you the number of points the input have. point() can give you an attribute value from a specific point. If you write the function in vex you can put your mouse over the function and hit f1, then a helpcard will tell you what it does.
  11. int primpts[] = primpoints(0,@primnum); matrix3 m = ident(); //here you could use your own base matrix foreach(int index;int i;primpts){ //create direction vector, can be replaced by a predefined vector int forward = 1; if(index == len(primpts)-1){ forward = -1; } vector this_pos = point(0,"P",i); vector next_pos = point(0,"P",primpts[index]+forward); vector dir = normalize(next_pos-this_pos)*forward; setpointattrib(0,"dir",i,dir,"set"); //align matrix vector matrix_z = set(getcomp(m,2,0),getcomp(m,2,1),getcomp(m,2,2)); matrix_z = normalize(matrix_z); float angle = acos(dot(matrix_z,dir)); vector axis = normalize(cross(matrix_z,dir)); rotate(m,angle,axis); //convert to orient vector4 orient = quaternion(m); setpointattrib(0,"orient",i,orient,"set"); } Put this code in a primitive wrangle and you will have parallel transport, you can evolve this into a bigger asset.
  12. Poly Carve SOP

    Interesting, do you use intrinsic uvs or do you create your own uv for the carve position? (or is this a question i have to pay for). Is it 10x faster than the carve sop if you dont want per primitive controll?
  13. Reverse ptnum on a prim

    Your vex solution doesnt work as intended. But a reverse sop should do the trick or you could use this. //run over primitives and just add the primitives you need to reverse to a group int primpts[] = primpoints(0,@primnum); primpts = reverse(primpts); foreach(int index;int i;primpts){ setprimvertex(0,@primnum,index,i); }
  14. Looping over Groups with only Points

    You can use the cluster id as a piece attribute in the foreach network, and then run over points.
  15. Rotation matrix pivot point

    its a bit more readable like this. @P -= pivot; @P *= matrix; @P += pivot;
  16. Dynamically rotate geometry via VEX

    matrix3 m = ident(); vector axis = set(0,1,0); float angle = radians(chf("angle")*360); rotate(m,angle,axis); @P *= m; @N *= m; When you rotate the @P you also need to rotate the @N, or else it will look like the light is baked.
  17. Issue with trail sop velocities

    I guess you can ask the course teacher for help on this one, and i guess your not allowed to publicly share that file. The alembic is missing anyway so there isnt mutch we can do.
  18. You mean if you only had a filecache with @P and points? The problem is the changing pointcount, you have no points to transfer to in the beginning and they are not located at the same position. Seems like any solution would be hacky at best.
  19. You need to ray each point through your original mesh, and see if that occludes. Because you can have normals pointing towards you that are occluded. pigray.hip
  20. box stacking no interpenetration

    np, happy you liked it
  21. how to create this effect please help

    Particles with offseted dragshape and dragcenter is perhaps the easiest solution, and werry fast. confetti_01.hiplc
  22. Heres a way to do it. pscaleID_v001_fix.hiplc
  23. Getting Objects to spawn on the Normal location

    Impossible to know what happens inside your delete-node and vop-node. And since its all merged, the screen doesnt realy help either.
  24. Exporting Transforms to Alembic

    You can build a hierarchy with a string attribute, and then set the alembic_rop to build one for you. In theory if you make the same structure you can layer this in. There is a primitive type called "AlembicRef", but i havent quite figured out how that works. https://www.sidefx.com/docs/houdini/vex/functions/addprim.html
×