Jump to content

Search the Community

Showing results for tags 'addpoint'.



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

  1. I'm stumped here. Searched many threads with no joy. Why can i create newpoints, created with addpoint and correctly place these new points in space, but not be able to store these points as an attribute array on their respective prims? Create newpoints with addpoint() at positions a given mid distance along the half edges of all primitives . This works fine. I want to store the point numbers of these newpoints in an array and store that array as an attribute of the each prim. ..This doesn't work. Sounds simple enough but the code only repeats storing the newly created midpoints of the first prim only on all prims no matter what @primnum the wrangle is processing. in code below, The other polycnrs array and hedgeloop array store the correct, unique point numbers, that belong to each unique prim. I am guessing I must be making some extremely basic error. Really hope someone can set me straight. Thanks in advance vex masters. PS: Hip file Code snippet below : works with input 1 or more prims. example uses 2 (1 triangle, 1 pent). // test slightly more complicated example using half edges. // parameters ------------------ float ratio = chf("ratio"); //------------------------------ int midpts[]; int polycnrs[]; // ------------------------------------------ // get the first hedge of the primitive int hedge = primhedge(0, @primnum); // store initial value for loop below. int start = hedge; // TESTING ----- i@hedgestart = start; int hedgeloop[]; while(hedge != -1){ int src = hedge_srcpoint(0, hedge); // get sorce point number int dst = hedge_dstpoint(0, hedge); // get destination point number vector srcpos = point(0, "P", src); // get the src point postion vector dstpos = point(0, "P", dst); // get dest postion vector diredge1 = dstpos - srcpos; // dir vector from source to dest vector pos1 = srcpos + (diredge1 * ratio); // point from 1 end vector pos2 = dstpos - (diredge1 * ratio); // point from other end int pt1 = addpoint(0, pos1); int pt2 = addpoint(0, pos2); push(midpts, pt1); push(midpts, pt2); push(polycnrs, src); push(polycnrs, dst); // store the current hedge (just a data check) push(hedgeloop, hedge); //------ update to the next hedge before looping again. hedge = hedge_next(0, hedge); if(hedge == start){ // break when get full circle. break; } } //---------------------------- // write to attributes i[]@hedgeloop = hedgeloop; // WORKS i[]@midpts = midpts; // DOESNT WORK i[]@polycnrs = polycnrs; // WORKS
  2. Hello! Sory for my English I'm trying create geometry with AttribWrangle node in Detail mode. I use addpoint, addvertex and addprim nodes. When I created some points how could I get access to them into the node? For example, I created point pnt0 = {0,0,0,}. And now I want to create point pnt1 which is close to pnt0: int X = 3; int pnt0 = addpoint(0, set(0,0,0)); int pnt1 = addpoint(0, set()); - and here I want to get position of the first point and add X to each coordinates. Is it possible?
  3. Hi, is it possible to access the points I create in a wrangle with the addpoint function in the same wrangle? I have an attribute wrangle that only runs once. Within that wrangle I made a for loop where I create points. Then I want search for neigbouring points within the points I created so far in the same loop. I could store the positions in array and loop through the array of the positions I stored so far within the loop, but that can get pretty slow. I hope I explained this well anough. I there any way to do this or should I have another approach for this?
  4. Hello everybody! If we want to create geometry using VEX we can pipe a null node into an Attribute Wrangle and in the latest we can use functions such as addpoint() to birth geometry. One requirement is that we have to set it to run over Detail (only once). The problem comes when I want to do this using a .vfl file and compile into VEX and use a VEX node that points to the compiled file. Geometry won't be created. It is strange because I know VEX just work on points, not on Detail so I have two questions: 1. Why do we have to run the Attribute Wrangler in mode "run over Detail (only once)"? Why not points? 2. Is there a way to use a pragma flag or something to tell the vcc compiler that this code must run over Detail and only once? Thanks for your help in advance. Ramon.
×