Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

6 Neutral

About JJ FX

  • Rank

Personal Information

  • Name
    JJ FX
  1. Curve edge normals?

    Oh yeah, thanks!
  2. Hi, So when you have a curve and use Polyextrude SOP by default it uses prim/edge normals. So I've been thinking, maybe edge normals are precomputed already (you know, like normals in openGL even tho you don't have them as an attibute but you need them to draw properly in the viewport and render)? Or maybe it's just Polyextrude SOP that is computing that. Do you think I can somehow access the edge normals? I can recreate them myself, but maybe that would be futail, reinventing the wheel.
  3. Instantiate objects in Shader

    Yeah I tested that yesterday and also tried old Instantiate object. And both perform exactly the same. I guess packed prims are the fastest way these days
  4. Instantiate objects in Shader

    Thanks! I will look into this! Well... I need to instatiate geometry onto milions of points. Copying creates more expensive and slow cache. Example: grass
  5. Hi, So I want to instantiate objects in shader. There is a Point Instance Procedural VOP node. However I have no to little experience in shader builders in houdini. This node has geometry output, I'm not sure where this even should be plugged in to make it to work and just see anything. Any help would be super helpful!
  6. What did it do? Can you give an example? Removing edges from exterior does not make sense. Anyways groups ("outside" for exterior) are still there and you can use those to get what you want
  7. Hi guys, So recently I've been doing some really heavy math within wrangles. And I was disappointed when I checked the performances between a point a prim wrangle. They both have same calculation times. Usually my code goes like: int points[] = primpoints(0, @primnum) for (int i=1; i<len(points); i++) { // Do more stuff here // And even more for loops here } So if this is run in prim wrangle the calculations run per prim (because its a wrangle), and then per point (because of the loop). Switching to point wrangle it should be like (pseudocode): foreach point (because its a point wrangle) { int points[] = primpoints(0, @primnum) for (int i=1; i<len(points); i++) { // Do more stuff here // And even more for loops here } } So it would just create an additional loop, possibly causing some overriding of the values. However both methods performs exactly the same. I've tested it on 30mln points geometry many times. Can any1 explain me why?
  8. OMG THANK YOU, thank you, thank you!!! I didnt know this would be so straightforward
  9. Hi, So I baked out some kind of vector flow map on the character. The idea was to use it back in sops over deformed character. Ofcourse the bake is done in a single frame. So when those vectors are applied to a deformed mesh, they are constant to the world space, which completely make sense, but is useless for me. Since this is a vector map and its stored as a color map, there is some kind of "gradient" on the deformed mesh that could be computed as a change of the flow map? Do I make sense? For example you have a character where the flow always go from the shoulder to the hand. And once the character gets deformed (animated) I want the flow (vector) to always follow the rule "from the shoulder to the hand". And yeah my flow is a vector, not a float. And I need those vectors in sops. Dont know if I explained this good enough. Any1 any tips?
  10. Hi, Can I somehow create a logarithmic slider that goes from -X, 0, X? Where the function "slows" down both ways close to ZERO? Usually I just create additional switch, that will multiply the value by "-1". But in some areas you want to actually key the parameter, then give it some opposite value (what I mean is that its multiplied with -1). So you have to key the switch and the slider.
  11. Thank you for the example file, will look at that when Im back home!
  12. Ok I got it finally! So its: v@rotX; v@rotY; v@rotZ; // this is local axis, not some global like {0, 1, 0} float angle = this_is_my_angle; vector piv = my_nice_pivot; // Try in for loop with different pivots for each point, besically you can bend hair with that // Rotate by Z: matrix3 rotm = ident(); prerotate(rotm, angle, rotZ); // Now rotate other rotation axes, for X: matrix3 rotXm = ident(); rotate(rotXm, angle, rotYm); v@rotX += cracktransform(XFORM_TRS, XFORM_XYZ, 4, piv, rotXm); v@rotX = normalize(v@rotX); // And Y (its MINUS for some reason): matrix3 rotYm = ident(); rotate(rotYm, angle, rotXm); v@rotY -= cracktransform(XFORM_TRS, XFORM_XYZ, 4, piv, rotYm); v@rotY = normalize(v@rotY); // And just move the points: vector4 orient = quaternion(rotm); matrix m = instance(piv, 0, 1, 0, orient, piv); @P *= m; This took me some time This is visual copy paste, hope no big mistakes EDIT: Updated the expression there was one mistake, and rotations need to be normalized after rotating. But now working flowlessly. But still its a visual copy/paste. But you get the idea
  13. Lets say rot is a vector attribute I use to debug visually whats going on in the viewport. As well its more intuitive to use vector instead of @orient, especially that behaviours of the geo depends on the axes. So I actually have 3 different local attributes for rotations (rotX, rotY, roZ). If Im rotating around rotX, I need to adjust rotY and rotZ. But they are all perpendicular. But technically yeah, the rot I use stays the same. When applying rotation matrix to geo, this only moves the points, does not rotate attributes. So my rotations stay the same. Think something like FK in rigging. You rotate an arm, and the rotation for the forearm rotates as well. So when I do: vector r = cracktransform(XFORM_TRS, XFORM_XYZ, 4, piv, rotm); v@myOtherRot += r; I can see that the vector is rotating with proper degrees angle, but wrong axis. I tried to extract with different rotation order, but doesnt do much
  14. So Im rotating my geometry with: vector rot = my_normalized_axis; // this is local axis, not some global like {0, 1, 0} float angle = this_is_my_angle; vector piv = my_nice_pivot; matrix3 rotm = ident(); prerotate(rotm, angle, rot); vector4 orient = quaternion(rotm); matrix m = instance(piv, 0, 1, 0, orient, piv); @P *= m; And everything is nice and dandy, except that now I want for my vector rot to apply the rotation too. Because now it just stays as it is. So this sounds easy but I just cannot make it to work. I tried converting to quat and them qmultiply, extracting rotation from m with cracktransform. But the rotations are weird, not what I want. Closest where I got was with qmultiply, as one of the components of rot seemed to be doing its thing. But other were off. And since im not rotating with some global rotation axis like {0, 1, 0} I cannot just simply take just one component and discard others.
  15. Yeah unfortunately script editor has limit dimentions for size, I cannot go full screen. And it does not open as another tab so get annoying because it keeps going "behind" other windows.