Jump to content

acey195

Members+
  • Content count

    475
  • Donations

    10.00 CAD 
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by acey195

  1. Boolean issue, non manifold edge...maybe

    Try disabling the de-triangulation feature on the first boolean SOP, or add a fuse, clean and divide sop between the first and the second one.
  2. no cross ?

    if you are doing more than one operation per line, always hard cast your variables, otherwise they will be considered as a float in some cases. This is especially true for functions that accept multiple data types. side topic, the {0,1,0} notation does not accept variables, so use set(0, x, 0) instead if you need to
  3. this was also a post of 2 years ago :P, a lot of us (including me) have already moved on to the new compilable-new-foreach-structure
  4. Dynamic Vex Variable Names?

    its possible with H14 and up using the http://www.sidefx.com/docs/houdini16.0/vex/functions/setprimattrib function along with http://www.sidefx.com/docs/houdini16.0/vex/functions/sprintf for example float angleVal; string attribName; for(int i = 0; i < 4; i++) { attribName = sprintf("angleDir_%d", i); angleVal = i; //do your math here setprimattrib(0, attribName, @primnum, angleVal); } in H13 and lower, the attributes have to exist before the setprimattrib or setpointattrib etc are used, with H14 and up, it will generate it for you or you can store them directly as an array attribute, but in some cases it may complain if the sizes of the array are not the same (at least in Python I think) in vex that would look something like this: float angleVals[], angleVal; string attribName; for(int i = 0; i < 4; i++) { angleVal = i; //do your math here append(angleVals, angleVal); } f[]@outAngles = angleVals;
  5. Houdini 17 Wishlist

    a toggle (or default) for the findshortestpath node, so when you do not output paths, that it does not delete the geometry when there are no points in the "Start Points" group, but instead sets the "Cost Attribute" value(s) to -1, like it does to all points it can normally not find a path to (when there is at least one point grouped as a start point) This behaviour is useful to do quick floodfill operations (to see if a certain point is connected by another point, while also taking into account directed primitives) Right now you have to add a: delete, switch and attribCreate node for every findShortest Path to do this safety check.
  6. Grid Subdivision Problem

    You can try overriding your crease value, and setting it to a high value (like 10) the other corners are fine, because they are convex corners, or they have split points I would think.
  7. about demo reels

    That depends on at least 2 things: what you mean by assets in this context? (models that are downloaded from online? Orbolt assets?) In both these cases its probably fine if you clearly say which parts you worked on yourself (and maybe give credit), and your own work clearly adds on top of the rest. what kind of job you are aiming for? If by assets you mean your own digital assets, then I would suggest showing them a little bit IF you are aiming for a technical job (tools/pipeline) for a more pure FX job, you can probably leave most of it out.
  8. [SOLVED]Make Fake Primitive Normal Real?

    wrangle over prims: ///// v@primNormal = prim_normal(0, @primnum, {0.5, 0.5, 0.5}); ///// then promote the attrib to points like you tried before
  9. Triangulate 3D

    concave shapes are not possible completely automatically, as you will need some control over how much how much concavity you will allow. maybe you could use a growing algorithm (not very fast unfortunately) to make sure a point only connects to the closest other point and then repeat that till all points are used. after that you'll have to convert your poly lines into closed polygons which is also not really straightforward, using stuff like intersection stitch maybe another way to go would be VDB from particle (taking the average distance between points as a radius), then convert it back to polygon and then morph the mesh to be flush with your input points again.
  10. Smooth Groups

    what I would usually do is cast it to an integer attribute and then use an iterative (feedback) loop; with 2 attribute promote nodes in there: one to convert from primitive to point, using mode (try different modes if you like) the other to convert back from point to primitive using mode and then just set it to use the amount of iterations about equal to the amount of subdivisions you use. edit: and finally of course cast it back to your group if you need.
  11. Sometimes when you are searching for something and you find a topic you visited a long time ago, but no new posts were made in the meantime.. I guess that is a call to action The following code outputs 2 vertex attributes related to distortion; one is the angle difference between uv and world, vertex corners the other gives the edgeLength ratio difference between the in and outgoing edge of every vertex. Afterwards you can of course use an attribute promote to get the average primitive or point distortions of course or you can merge the distortion into a single attribute by taking the maximum value for example //run over vertices: //get neighbouring verts int locVert = vertexprimindex(0, @vtxnum); int prNumVerts = primvertexcount(0, @primnum); int vtx0 = primvertex(0, @primnum, (locVert - 1) % prNumVerts); int vtx1 = primvertex(0, @primnum, (locVert + 1) % prNumVerts); //printf("%d - %d - %d\n", vtx0, @vtxnum, vtx1); //get world posData vector p0 = vertex(0, "P", vtx0); vector p1 = vertex(0, "P", vtx1); p0 = v@P - p0; //get position edges p1 = p1 - v@P; float posEdgeL0 = length(p0); //get position edge lens float posEdgeL1 = length(p1); p0 /= posEdgeL0; //normalize pos edges p1 /= posEdgeL1; //get uv posData vector uv0 = vertex(0, "uv", vtx0); vector uv1 = vertex(0, "uv", vtx1); uv0 = v@uv - uv0; //get uv edges uv1 = uv1 - v@uv; float uvEdgeL0 = length(uv0); //get uv edge lens float uvEdgeL1 = length(uv1); uv0 /= uvEdgeL0; //normalize uv edges uv1 /= uvEdgeL1; //get edgeRatios posEdgeL0 /= posEdgeL1; uvEdgeL0 /= uvEdgeL1; //compare world and uv data float worldDot = dot(p0, p1); float uvDot = dot(uv0, uv1); f@uvDistortAng = abs(worldDot - uvDot); //this value should be between 0 and 2 f@uvDistortLen = abs(posEdgeL0 - uvEdgeL0); //you may want to normalize this value in a different node later
  12. "Bind" two buttons together

    you can also do a right click copy parameter, paste relative parameter references, but this does not work with buttons directly, instead paste them on a dummy node on the same hierarchy level, and then copy the resulting hexpression. right click on the button, go to edit parameter expression and paste it there. in that way it should work too. also if you want multiple callbackscripts on one button, just add a ";" in between
  13. functions like removeprim() only get executed at the very end of the code, so the @primnum and @numprim values will not update during code execution. if you really want to build it like this, you have to store them in temporary variables and keep track of the current primitive number in that way
  14. Douglas-Peucker polygon simpification

    You may also try the facet node, with "remove inline points" enabled, this only works well on open polygons though.
  15. Houdini for Mathematicians

    Its probably a translation thingy, middle school equals high school in dutch for instance, I think in France as well. (High school equals college in my language also, just for context and extra confusion )
  16. Why does a part of this code runs only once in VEX ?

    I would say its a feature :P... whenever I use printf() without having a condition like: if(@ptnum == 0){printf("stuff");} I kinda want to punch myself because of the millions of prints it wants to do..
  17. Why does a part of this code runs only once in VEX ?

    both are in the points loop, but if the thing printed is exactly the same (and the calculation/memory needed is exactly the same) it will only do the print once, as VEX optimizes these things.
  18. New Year / New Showreel

    No Problem! yeah much better I would say, its still very flashy, probably not great for people affected by that, but at least now you can see from the start that you know what you are doing. So its not being mistaken for someone just making some frames in rudimentary image software as a joke
  19. New Year / New Showreel

    A lot of very cool stuff on your reel Not sure about your logo at the beginning and the end though, flashy raw rgb colors do feel very 90ies, especially at the start. Since it takes a little bit of time before the actual reel starts and I can imagine some people not seeing how you used that "ironically" and that would make you run a small risk of them turning off the video before it gets to all the good stuff. Later on in the video I would say its fine, as the bars match the video content so that's not too distracting. I admit being a bit hypocritical with my way-out-date/style website , still have to do that too at some point..
  20. I didn't say the solution would be perfect :P.. that said, you could convert every edge to a primitive (using the carve sop with internal breakpoints for example) after that you would be able to use an intersection analysis node and remove every primitive that has more than 1 intersection, to get rid of the edges marked by noobini.
  21. you can also promote all the primitive attributes to point attributes (after using a fuse set to unique), use: //run over primitives int pt = addpoint(0, primpoint(0, @primnum, 0)); setpointattrib(0, "P", pt, v@P);//set the point location to the center primitives this way the point should inherit at least all point attribs from the source. you also may want to try the "compute dual" function on a divide SOP to create lines between the prim centroids.
  22. you can use an up (vector) attribute as well ;), just point it in the direction that is up, for instance {0,1,0} for the world up
  23. Voxelised Fluid

    I'm guessing that is part of the aesthetic? looks cool
  24. in the transfer attributes table you can put stuff like "* ^up ^N" that should transfer everything except the ones prefaced with a ^ character
  25. @numpt vs npoints (VEX vs Hscript)

    @numpt is only available for the first input of the node, but there is alos a npoints(x) function in vex , where x is the input number. @ptnum%(@numpt-1)<1 does the following: it returns either 0 or 1, as at the end the left part is compared to smaller than 1 % (modulo) just returns the rest value of a fraction example: 0%3 returns 0 1%3 returns 1 2%3 returns 2 3%3 returns 0 4%3 returns 1 5%3 returns 2 etc. so @ptnum%(@numpt-1) basically returns the point number, as it will never be higher than total amount of points. so from the top of my head, that line only returns 1, if the pointnumber is 0
×