Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by probiner

  1. Smooth direction to surface?

    @anim I threw everything and the kitchen sink at this one, from subdividing both meshes, to bluring the the direction from minpos(1,@P) - @P, from iterating (minpos + Smoothing)... Ultimately I knew this had to be made incredibly simple and fast and all of those were convoluted and didn't actually work. As for sub-diving the mesh; either I'm dealing with a NURBS surface or subdividing will only make the issues visible with minpos of a smaller resolution, not actually fix them. I really tried to grasp what would be the math to obtain the smooth ray dir or P'' from the available data, P, P', N', Prim P and N, PrimPoints P and N. But couldn't come up with something. The "extrusion" bit was definitely revealing. I'm sure there's a much more elegant way to go about it than actually having a primitive "extruded". I think you're right, it would be indeed nice to be able to use such functions on a SubD surface. RFE it! Cheers
  2. Trying to replicate something form XSI in Houdini but need to get the a direction from a point to a surface (not shortest direction). To illustrate here's a circle which points are being raycasted onto the blocky shape in the middle along the desired direction. Any easy way to calculate this? For comparison minpos() would produce this: The direction I'm after kind of reminded me, VDB gradient, but this is a wasteful and imprecise route, imo. Also reminds me of a the line between the point and a point sampled through the closest position on the surface and the corresponding location on the straight skeleton Dunno how to both calculate the straight skeleton and sample a corresponding position from surface->skeleton. Thanks
  3. Smooth direction to surface?

    Hello @AntoineSfx That's Softimage Closest Location: Closest Smoothed Surface in ICE. Very useful for cage deform. I think I nailed this one, by stop focusing on trying to compute the correct direction from on xyzdist/primuv resulting normal. I'm sure there's a way and I wish I could do it for simplicity but the math it's just not coming to me... So what I did was to loop for each point, select only the candidate prims from the reference mesh that could be the closest primitive, "extrude" them along their point normals until they are coplanar with the point. Then check which prim is the point inside of. If you already know the right prim, maybe the problem can be resumed by finding the ray direction from the primitive's point normals. What I did is on the right, extruded to make it coplanar, xyzdist() on the extruded prim, and applied the returned prim and uvw with primuv() on the original primitive. It's like I'm dividing the 3D space into extrusions of the reference mesh and see inside of which extrusion the point is in. The only advantage with this is that in the process of finding the correct prim, I also right away get the corresponding uvw, hence a complete "location". On the other hand a bunch of SOPS and Loop block are required. As for the initial shape it looks, like so: I added all this info to the RFE. Hopefully in the future we will just need to type a function in VEX. Would be cool since what I came up with is inherently slow for heave geo Scene file here: https://jmp.sh/bELWJdX Cheers
  4. Smooth direction to surface?

    Thanks for feedback guys While the example I gave is 2D, I was aiming to apply it in 3D. I already RFE this, but basically I'm after the third panel. But all the things you guys posted are quite interesting @Aizatulin, you went deep! That looks great! Sort of think it deserves attention and its own thread. Many thanks! @konstantin magnus basically I'm after the correct direction to use in intersect() like you did, but for 3D, there's no way yet to generate the straight skeleton for 3D, the same way Polyexpand does for 2D. Thanks. @Noobini Not the direction I'm after, but I learned from that scene, thanks! I found an issue with xyzdist to start with: It doesn't care about incidence to the prim it returns when there's several with same dist; just returns the one with the lowest index. Also REF'ed Cheers
  5. Lets consider the box to be a mesh with two states, open/close and I would like to pass those (or more) to something that rotates the flaps from one pose to the other while respecting their shape; unlike what happens with linear interpolation with blendspahes/morphs. Is there something I could use in Houdini for that end (not just for boxes) or a search term that deals with something similar? Thank you.
  6. Thanks for the feedback @amm I was wondering that maybe some dop solver could sort this out already, so checking before I roll up my sleeves and try to come up with something! Will take your comments into account, but yeah my idea was to get lazy, just feed A and B and magic... Just like I've done to curves. https://streamable.com/8d89a Thanks! If there's indeed a solver that can do it, lemme know
  7. A setup that finds the maximum pscale points can have, so the resulting spheres don't intersect. Scene at: https://jmp.sh/hEctEky
  8. multiple inputs in foreach

    Just a heads-up. That setup will create copies for each cut, not a single grid with multiple cuts. For that you need a loop with two begin blocks, one set to fetch feedback for the grid and another set to fetch piece for the curves. There's two ways that you can set it up, as in the image and attached scene file. Cheers PRB_PolySplitLoop.hiplc
  9. One thing that I miss from Python(Try / Except) or XSI ICE (First Valid) is the ability to check if some code returns errors and if so, do something else that is safer. Is there a way to access the validity of something and if not do something else? Cheers
  10. HDA | VOP | NormalBias

    Longest Axis, Octant, Boxify, Hexplanar Mapping
  11. Try Except in VEX alike in Python?

    I don't have issues with division by 0 and I get you remark about optimization- I was just wondering if there was some way of doing this that I was missing.. My main issue is with variable types and functions/nodes that might break due to have a bad evaluation. and as far I as know I can't do a check on the variable type, neither create a variable with auto, so I was just checking if I can assess it another way around, by letting it fail, but do something else when it fails. Take this example, float array[] = set(value) will work for all the non-array float composites, float, vector3, vector4, matrix3, matrix4. But... But... it doesn't work with Vector2 or Matrix2. Which is an alternative route already because something like matrix + 1 doesn't work (adding 1 to each component), so I decided to flatten all out into an array of floats and iterate over them. But even that doesn't work with all types :/ float floatval = 1.23 ; float floatarray[] = set(floatval) ; f[]@floatarray = floatarray ; vector vectorval = {4,5,6} ; float vectorarray[] = set(vectorval) ; f[]@vectorarray = vectorarray ; matrix3 matrix3val = matrix3(ident()) ; float matrix3array[] = set(matrix3val) ; f[]@matrix3array = matrix3array ; vector2 vector2val = set(7,8) ; float vector2array[] = set(vector2val) ; f[]@vector2array = vector2array ; matrix2 matrix2val = set({0,1}, {2,3}) ; float matrix2array[] = set(matrix2val) ; f[]@matrix2array = matrix2array ; If I could check for variable type I could do something else for vector2 and matrix2. This because I'm trying to build overload nodes. I also don't see a way to build a function with signatures, do I need to use HDK for that? I'm all over the place, but I'm trying to find the best way to go about maximizing an operation to the maximum number of data types... Cheers
  12. I add and subtract the same exponentiated coordinate and up to 6 is fine, but 7 and above it squashes with cube. code vector pos = set(pow(10,7),0,0) ; vector P = @P ; P -= pos ; P += pos ; @P = P ; Wondering if clamping is the only way to go... How do you deal with this sort of issue? Cheers
  13. Thanks for the extra explanation!
  14. Yup my follow up question was exactly that. I want to know the shortest and the longest value possible in VEX without losing precision. I would expect something like this: FLT_MIN = 1.175494e-38 FLT_MAX = 3.402823e+38 And that between those two descriptions precision is maintained. Now the question is, can I retrive these or I have to do some testing and ballpark it? Cheers!
  15. Cheers @3dome I think I found a way to deal with this but I need to know the minimum acceptable value and the maximum acceptable value in VEX. In Java there's `Float.MIN_VALUE` and `Float.MAX_VALUE`, or in C++ `FLT_MIN_EXP` and `FLT_MAX_EXP` Anyone one knows how to do this in VEX? Cheers
  16. HDA | VOP | NormalBias

    Orbolt link in the description of the video! I guess I should share them also when I post https://www.orbolt.com/asset/prb::NormalBias::1.00 Cheers
  17. HDA | VOP | Bend

    Multi-context Bend.
  18. I don't know what's with that word but several times I to spell it wrong, we may have made a scientific discovery
  19. Primitives soft selection

    Make a feature request https://www.sidefx.com/bugs/submit/
  20. Primitives soft selection

    If the primitives are connected it's a bit hard to grasp what to do on the points since those are the ones moving. I remember though once seeing a thing in other app where you could move the primitives centroids and the points would automatically move to keep the primiitive's normal direction of all neighbor primitives. Was pretty cool, but I can't remember the app. Almost looked like a boolean. almost looked like a boolean: Do you even have a depiction of what you're after?
  21. Hey Came to London to work for Crowd at MPC. Here's a summary of the challenges I responded to in Houdini: At the moment, I'm looking for the next thing to hop on. Most jobs for Houdini are VFX centric and I'm mostly a generalist leaning more towards geometry, rigging and motion processing side of things. Here's some public Orbolt Assets: https://orbolt.com/search/?q=probiner Building one right now to upload, to alike the matrix one, visualize arrays of vectors: https://i.imgur.com/ZPki1XN.png Let me know if there's something fit mid-term going be it for Houdini or XSI or even just if you're around and want to have a chat! Thanks
  22. Triangulate a non convex polygon

    Maybe this is solved by looking at how did you get to this point. Starting from this point though and looking like you have a U initial shape you could always intersect() from the primitive center to the U and if doesn't find a primitive is deleted with removeprim(). PRB_IntersectDelete.hiplc Cheers
  23. Crowd Look at bug?

    I found some issues with it as well but due to the pace I was running at I did not report it and just did my own. If you have a reasonably simple scene, report it. Cheers
  24. Oriented Bounding Box - Store as Attribute?

    Here's an example constructing a matrix from the bounding box points that can be later used. PRB_BoundCenterAndMatrix.hiplc You could request something like this was generated by the node itself. Cheers