Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by ThomasPara

  1. VEX - foreach - I don't get it

    you can also put in a third argument in the foreach, the index you are running over. //run over primitives, use this on a polyline and you will get the order of the points int primpts[] = primpoints(0,@primnum); foreach(int index;int i;primpts){ setpointattrib(0,"index",i,index,"set"); }
  2. Commercial Fishing Net

    Heres a quick example of how it can be done. fishnet_01.hiplc
  3. Vector manipulation in VOPS

    Your fitting only clamps your values, instead of remapping them. Your random have a static seed, giving the same result to every point. It would be alot easier to use a zero-centered noise, adding that to your normal. And then normalize your normal instead of fitting it. In vex you can use the "sample_direction_cone" function.
  4. Alternatives to using promote to detail

    Heres a version thats faster than the for-each, its some more nodes to make that happen. The wrangles "minimize_search", "find_unique", "set_search", and "set_color" has a combined time of around 1 sec, while the foreach is around 13 sec. This runs over 5 mill points example_fix_02.hip
  5. Alternatives to using promote to detail

    just tested theese solutions, and none of them are faster than the for-each, think this needs a new iteration
  6. Alternatives to using promote to detail

    //set the wrangle to run over group1 int count = findattribvalcount(0,"point","id",i@id); //find how many points that have the same id for(int i = 0;i<count;i++){ //run over the points and set the color or any attribute of your likeing int found = findattribval(0,"point","id",i@id,i); vector color = set(1,0,0); setpointattrib(0,"Cd",found,color,"set"); } example_fix.hip
  7. Alternatives to using promote to detail

    do you have an example file?
  8. if you have several lines, you can run over primitives in a wrangle int primpts[] = primpoints(0,@primnum); setpointgroup(0,"last",primpts[len(primpts)-1],1,"set");
  9. Deleting points close to specific groups

    //set your wranglenode to run over group2 int nearpt = nearpoint(0,"group1",@P,chf("radius")); if(nearpt != -1){ removepoint(0,@ptnum); }
  10. Creating points vex

    its a handle to the new point, so you could ex set an attribute value to it, or add it to a primitive. vector position = set(0,0,0); vector color = set(1,0,0); int newprim = addprim(0,"polyline"); // create a primitive int newpoint = addpoint(0,position); // create a point addvertex(0,newprim,newpoint); // connect that point to the primtive setpointattrib(0,"Cd",newpoint,color,"set"); //set an attribute
  11. Color drops (flip)

    Nice, the next step would be to feed it into a dopnet and use it as a source. 42 projectors, thats kinda crazy! Does it involve mapping?
  12. Color drops (flip)

    Heres a version where it rains by the normal of the sphere, havent tested other geometries. ap_sphere_rain_04.hiplc
  13. Color drops (flip)

    The sim stuff might have more potential, i like the mood of the first clip you got. It seems like a fun challenge
  14. Color drops (flip)

    Better ripples, not realy any better explanation. Its basicly a combination of fitrange and modulo. rain_02.hiplc
  15. Color drops (flip)

    you "animation range" can be created by fitting @Time or @Frame to fit your beat. float range = fit(@Frame%50,0,50,0,1); //this will give you a cycle that repeat every 50 frame float range = fit(@Frame%50,25,50,0,1); // this will also give you a cycle every 50 frame, but your animation wont start until frame 25 float range = chramp("curve",range); // this will give you a ramp with some extra controll
  16. Color drops (flip)

    ill will try to make a more understandable setup when ill get some time, im happy that you liked it.
  17. Color drops (flip)

    Tried to make a version without a solver. rain_01.hiplc
  18. VEX selecting border edges

    What do you mean with border edges? In my opinion a cube doesnt have border-edges, while a grid has. The edges that isnt connected to any other geometry. But if you mean border edges like the hard angle, thats something different. Both are doable in vex, but different aproaches.
  19. Need help with loops and Foreach

    Yes its kinda cool. Played around with a similar setup a year ago, maybe i should try to find the files and give it another try. Easy way to kill your machine atleast
  20. PC falloff/ Attr transfer random

    The attribute transfer doesnt work because every "point-transfer" overwrites the last iteration combined with some hscript-expressions written wrong and your for-each was also setup to run over every point in the grid instead of your scatterpoints. So i went for a pcopen solution for you. PC_falloff_fix.hiplc
  21. the thing is that you only got one vector, from point 1 to point 2. You need atleast two vectors to get rid of the random flipping of your object. You can create a static vector like up to fix this, but it will flip when it crosses this static vector. Heres some solutions vector_fix.hipnc Red is dihedral, Green is with up, and blue is with solver without up
  22. Wire Solver for ropes

    Hard to say witch one is best, both needs some fiddeling. Wire solver isnt that good to interact with other solvers, same goes with vellum. Heres a basic setup comparing them. wire_vs_vellum_01.hip Vellum is blue and wire is red
  23. int primpts[] = primpoints(0,@primnum); i@pointcount = len(primpts); Will also work. In a curve each point will have one vertex, so they the count will match.
  24. Subdivision Sop Producing bad results

    Seems like the subdivide sop is doing the subdivide correct according to your pictures, is it the bevel sop that is the problem? (since the topic is that the subdivide is doing something wrong)
  25. vex function to read all the attributes of a point?

    string pointattribs[] = detailintrinsic(0,"pointattributes"); this gives you a list of pointattribs that allready exist, the problem is to create the attributes on your new point. The problem is that you dont know the attribtype (float,string,vector). You can somehow use attribsize combined with pointattribtype to check what it is. It becomes alot of if statements if you want it to be rock solid. Personaly i have ignored some types to make it simpler. void transferPoint(int input;int fromPoint ;int toPoint){ string pointattribs[] = detailintrinsic(input,"pointattributes"); foreach(string name;pointattribs){ int found = 0; int size = attribsize(input,"point",name); int type = pointattribtype(input,name); if(type == 0){ int attrib = pointattrib(input,name,fromPoint,found); setpointattrib(0,name,toPoint,attrib,"set"); } if(type == 1 && size == 1){ float attrib = pointattrib(input,name,fromPoint,found); setpointattrib(0,name,toPoint,attrib,"set"); } if(type == 2){ string attrib = pointattrib(input,name,fromPoint,found); setpointattrib(0,name,toPoint,attrib,"set"); } if(type == 1 && size >= 2){ if(size == 4){ vector4 attrib = pointattrib(input,name,fromPoint,found); setpointattrib(0,name,toPoint,attrib,"set"); } else{ vector attrib = pointattrib(input,name,fromPoint,found); setpointattrib(0,name,toPoint,attrib,"set"); } } } }