Jump to content

Blacklisted_Guy

Members
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Blacklisted_Guy

  • Rank
    Peon
  • Birthday March 22

Personal Information

  • Name
    Jonne Geven
  • Location
    Netherlands
  • Interests
    Procedural modeling, vfx and modeling

Recent Profile Visitors

577 profile views
  1. small exercises for beginners

    Thank you very much for sharing this! With all this I'll have more than enough to learn for the foreseeable future!
  2. I've been using houdini for a while now and have been going from project to project in school. Currently I've been doing doing the school projects but I've been wanting to do some small things to improve my skills. Would anyone have small exercises concerning vex, python or other houdini things in mind? thank you for help!
  3. Bevel corners on Voronoi Fracture

    //Find the neighbours of the current point and add the to an array int neighs[] = neighbours(0, @ptnum); //Initialize values to be used in the loop float lowest = 0; int lowestI = 0; //Initialize the loop to loop as often as there are items in the "neighs" array (usually two as the point has two neighbours) for(int i = 0; i < len(neighs); i++) { //Get the position of the currently looped neighoburs vector pos = point(0, "P", neighs[i]); //Figure out the distance between the current and neighbour point float len = distance(@P, pos); //If this is the first iteration of the loop, set the lowest distance to be the current distance if(i == 0) { lowest = len; } //If this isnt the first loop and the current distance is smaller than the lowest distance, make the current distance the new lowest. else { if(lowest > len) { lowest = len; lowestI = i; } } } //set the point scale to be the lowest distance f@pscale = lowest; /* The pscale attribute is used by the bevel as a multiplier to make the bevel bigger or smaller. Because this value is equal to the lowest edge length it will never be too big for the edges it is on */ Commented out every line, hopefully this helps!
  4. Bevel corners on Voronoi Fracture

    I think I might be a bit late to the party. This is how I'd solve it bevel_voronoi.hiplc
  5. OpenCL error

    kernel void kernelName( int P_length, global float * P ) { int idx = get_global_id(0); if (idx >= P_length) return; } This is the code I'm running. As of now it's just the generated kernel.
  6. OpenCL error

    Hello there, I've been trying to learn openCL and use it in houdini. To start I imported the position attribute and generated a kernel, but it keeps spitting out this error (without editing or adding things to the code) OpenCL Exception: clSetKernelArg (-51)
  7. Reading files from disk using vex

    Ah, too bad. Python it is then.
  8. Reading files from disk using vex

    Hello there! For a current project I'm needing to read files from disk and apply operations per line. I know python offers a way to read files. But since vex can be multi-threaded I wanted to see if there is a way to do it. Looking through some forums I found functions from houdini 14 that allowed for reading files, but these don't seem to be working anymore. Thank you for a reply, Jonne
  9. Closest point script not function

    thank you for the link, I'll be looking through it!
  10. Closest point script not function

    yes, the distanceToPoint function returns a vector with the 2D distance between the points and a 3D distance. So, what you'd suggest is running the script with a for loop in detail mode instead of in point mode? I'll try that one! Thank you for the advice!
  11. Closest point script not function

    Hello houdini wizards, I've been trying to make a script that makes a curve out of a bunch of points by finding the closest point. For some reason though, the points don't connect to their closest point File with the script in action as well as the script down below. //-----------------------------------------// // Find closest point V1 // // By Jonne Geven // //-----------------------------------------// //imported functions //returns: [0] = 2D distance. [1] = 3D distance vector2 distanceToPoint(int currentPoint; int targetPoint; int currentPointInput; int targetPointInput) { //importing user inputs int cp = currentPoint; int cpi = currentPointInput; int tp = targetPoint; int tpi = targetPointInput; //extracting point position vector cpp = point(cpi, "P", cp); vector tpp = point(tpi, "P", tp); //deltas float dx = tpp[0] - cpp[0]; float dy = tpp[1] - cpp[1]; float dz = tpp[2] - cpp[2]; //2d distance float DD2; DD2 = sqrt((dx * dx) + (dz * dz)); //3d distance float DD3; DD3 = sqrt((DD2 * DD2) + (dy * dy)); vector2 distances = set(DD2, DD3); return distances; } //closest point int closePoint(int currentPoint;int currentPointInput; int targetPointInput) { int tpc = npoints(targetPointInput); //this used to be user defined but that doesnt work since it needs to be the amount of points int cp = currentPoint; int cpi = currentPointInput; int tpi = targetPointInput; float C; float CP; int returnValue; for(int i = 0; i < tpc; i++) { //distance between points C = distanceToPoint(cp, i, cpi, tpi)[0]; //importing Z values vector zvalT = point(tpi, "P", i); vector zvalC = point(cpi, "P", cp); if(zvalT[2] < zvalC[2]) //comparing the target and current z position to make sure { //the curve has a direction //max search distance and making sure the processed point isn't selected. if(abs(C) < 19 && C != 0) { if(i != 0) { //comparing current distance to currently smallest distance if(C < CP) { CP = C; returnValue = i; } } //initializing CP value with first distance else if(i == 0) { CP = C; returnValue = 0; } } } } return returnValue; } //finding closestpoint i@target = closePoint(@ptnum, 0, 0); //This script is made with the general direction being -Z //vector pp0 = point(geoself(), "P", @ptnum); //vector pp1 = point(geoself(), "P", target); int line = addprim(0, "polyline"); addvertex(0, line, @ptnum); addvertex(0, line, @target); //-----------------------------------------// // For questions // // odforce: Blacklisted_Guy // //-----------------------------------------// closestPointNotFound.hiplc
  12. len function not working (vex)

    Hey there fellow scripters, I've run into an issue with the len function not returning the size but an error. For some reason it's expecting an identifier whilst I did input the right variables theProblem.hipnc
  13. Of statements not responding

    Hello everyone, I'm fairly new to vex and am currently working on adding normals to certain points. For this I'm using this script in a point wrangle node. int count = neighbourcount(0, @ptnum); float xpos = @P.x; if (count == 1){ setpointgroup(geoself(), "borderGroup", @ptnum, 1, "set"); if (xpos > 0){ addattrib(geoself(), "point", "N", {-1,0,0}); } if (xpos < 0){ addattrib(geoself(), "point", "N", {1,0,0}); } } But, for some reason unless the X value is 10 or -10 it always chooses the xn = 1. Not sure why. (The "xpos < 0" used to be an "else" but I changed it to check it it would work). A big thank you in advance!
  14. attribute not defined correctly

    that worked! Thank you so much
  15. attribute not defined correctly

    I started working on some vex practice and decided to use it for a switch and a bunch of statements I've wrote this script but the second if statement (rot =1 && flip = 0) doesn't seem to be giving the right value. int rotatetion= ch("rot"); int flipvalue= ch("flip"); @switch = 0; if ( (rotatetion == 0) && (flipvalue == 0)) { @switch = 1; } if ( (rotatetion == 1) && (flipvalue == 0)) { @switch = 1; } if ( (rotatetion == 0) && (flipvalue == 1)) { @switch = 0; } if ( (rotatetion == 1) && (flipvalue = 1)) { @switch = 0; } rot and flip are integer sliders on the attribute wrangle node itself.
×