Jump to content

JJ FX

Members
  • Content count

    133
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

6 Neutral

About JJ FX

  • Rank
    Initiate

Personal Information

  • Name
    JJ FX
  1. 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?
  2. OMG THANK YOU, thank you, thank you!!! I didnt know this would be so straightforward
  3. 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?
  4. 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.
  5. Thank you for the example file, will look at that when Im back home!
  6. 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
  7. 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
  8. 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.
  9. 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.
  10. So, can I somehow increase the number of displayed code lines in a wrangle? Scrolling down has become frustrating...
  11. Hi, So this was a pain in the ass for me the whole time. But I though they changed it H17. What I just want is to know what Im selecting in UV view and perspective. The screen might explain the problem better In the perspective I have selection in Uv view nothing, and vice versa
  12. Hi, So Im testing this new owesome HS Scatter. Its great. However Ive found an issue I cannot solve in HS Scatter. Im not sure if thats a bug or maybe I just dont know how to make it to work properly. So besically when Im scattering using source points option, the new points scattered intersect the points from the inherited tag. This is barely visible when the density is low. But when the density goes high you can see that the new points just scatter inside the origin onces, no matter how high the removing rate is or the outer radius. For me its looks like the algorithm is not taking into the count that it can scatter the point too close to the points that is not the original "parent". So for every each point A is scattered few points B, and for this single group scattered from a single point, there is no intersection. But if there is a close point A2 to the origin A1,there might be some intersections for points B on A2. I attached a screen. Red is the source point tag. Green are new new points. Im usuing a tube with radius = 0.5, so the width is 1. Red to not intersect with red. Green do not intersect with green. But some green intersect with red. BTW This is even more visible when you dont do Match Normals With Terrain on a tarrain that is not flat. For example trees scattered on mountains I mean its still doing great, but it would be great to be able to remove any intersections at all HS_Issue.hiplc
  13. HDA: current displayed folder

    Hi, So I though about some cool feature that I could maybe utilize. For example the tool has 3 different folder tabs. Each is for different property of a tool. For example the first one is fior curves, the second for primitives and the next one... i dunno, maybe shader. Can I somehow detect which folder is currently selected (assuming they are of Tabs type) so I can connect the switch sop to the output? This way if you pick Curves Tab you can already see the curves you are working on, and so on, and so on. Ofcourse this might screw up the pipeline when someone leaves the hda on a wrong tab, but.... Is it possible?
  14. Ok, my bad. { toggle ==1 } works when the toggle name is actually "toggle". So everything is working fine!
  15. Hi, How can I make my parameters to hide/disable on a toggle. I know there is this expression { toggle ==1 } but itself like that it does not work, I have to tell which toggle in the UI Im talking about.
×