Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About c0y

  • Rank

Personal Information

  • Name
  • Location

Recent Profile Visitors

599 profile views
  1. Hi, I'm creating some tools in digital assets and I just want to know how to create a button to pop up the "preview window" on a specific node. I guess it's possible to do it within the callback script function in python... but I don't know python enough. If someone can help, it would be appreciated, thx !
  2. Vex_Question

    hi, another vex code here. First, fixing the 0-point tangent. Second, to get the real angle in the inside or outside, you need to subtract PI-angle (radians) dot_consecutive_pts_odf_v2.hipnc
  3. Dynamics on growing curves

    Hi guys and thanks a lot for your help ! I went over with Julian's technic because the problem with reconstructing the curves (I tried it before without any success) is the sliding points, which are moving over others. I don't know if it's the same on 16.0.745, (i'm on 16.0.671) but the curves are not "clean". I mean : the connections between points go back (due to sliding points), and it will cause problems for the meshing. Don't really know how to fix that while keeping the same point numbers. But your technique definitly work on a non-growing tree ! Whatever it be, thanks so much... i'm working on leaves know I'll post stuff later, ^^ thx
  4. In the wire radius, just put your @pscale attribute, this should work polywire_size_variation.hip
  5. Remove inside faces

    Hi, I guess what you want is deleteing the overlapping pairs of polygons. You can do that with a "clean SOP" : tick Consolidate Points, Fix overlaps, Delete Overlap Pairs and Remove Unused Points. This should delete the inside faces. remove_inside_faces_v01b.hipnc
  6. Dynamics on growing curves

    oh, I see now... the s@name in his setup correspond to the wireobject's name... thanks ! I didn't notice it. Yes, you're right about the floating points. The idea was : 1) I duplicate my root points and I get the sourceprim (which is my posprim attribute) and the sourceprimuv (which is my param_uv). 2) Create my constraint network between the root point of each branch and the floating point (which have the same position) 3) use a sop solver to put the floating point to their sourceprim and sourceprimuv (simulated) - i forgot to activate a wrangle in the sop solver 4) then the branches automatically snap to the "anchor" floating point... the strange thing is that the branches are falling down even if i'm using hard constraints... I don't know if this is the right way to do it. I guess that it's not possible to make loops in simulation dop ? for example : I have 3 levels of branches (0, 1 and 2). First run the simulation for level 0, then run the level 1 and snap the branches to their sourceprimuv, and so on. dynamic_tree_grow_help_03b.hip
  7. Dynamics on growing curves

    Hi guys, thx for your help files. @mestela : my second example setup is in the hip file It takes for each piece the nearest point on the parent branch, and then I create 2 array lists (in details spreadsheet). It's because i'm using the wireglueconstraint to glue points together (with constrained points list and goal points list). the node takes automatically each point of the 2 lists and constraint them (if you have "constraint points" = 0 50 100 and "goal points" = 92 505 32, then point 0 is linked to point 92, points 50 to 505, and so on). The problem is that it doesn't keep the initial offset, so on the setup, you should get the intersection point before. Thx Julian for your post-sim tricks to reposition. That's what I tried to do inside a sop solver in the dopnet. Because in my initial tree system I already have the parent (sourceprim) branch and the sourceprimuv. But right now the points don't snap properly to their goal points... So I ran into a different way, inspired by the Peter Quint's tutorial on the rope bridge : https://www.youtube.com/watch?v=zrLk8ks6xTU In his setup, he uses the shelf tool to create the wire solver and the constraints, and to connect the vertical lines to the horizontal one, he creates zero-length-lines (2 points with attributes to connect points together). I did the same setup, to create the constraint network system. But, I don't understand why my constraints don't work ! I don't know why... (I don't have any guide appearing). The only difference is that i'm working inside a dopnet, and in the tutorial Peter Quint is inside a AutoDopNetwork, outside the geometry node. I don't know if I missed something in the options... dynamic_tree_grow_help_03.rar
  8. Dynamics on growing curves

    Thx Matt for your example file. But your setup seems a bit difficult to adapt on mine. The L-system has all points fused together, so your constraints are "natural". In my setup, I have several branches onto a parent one, and the root is not aligned to a specific point. It only has parametric uvw coordinates. Moreover, my growing system is not a scaling effect. All the branches has moving points that are stacked at the beginning of the sim, and progressively move to their final position. I tried to create the intersect point on the curve, but since they are sliding on it, point number are always changing... impossible to constraint on it. I've got 2 setup... but i'm stuck on both... 1) On the first one, i'm creating a vector param_uv and a posprim (its the same as sourceprimuv and sourceprim). I was thinking of using it to constraint the branches to these primuv coords, but I don't know how... I tried Sop Solver, but it's not working for now. 2) On the second one, I used the nearest point of each root branch, and used it to constraint the branch. It's working but my problem in this setup is that the constraint are hard constraints : the branches doesn't keep the offset between them; they are snapped to the closest point. Is there a way to constraint my branch to the closest point and keep the initial offset ? if someone can help, here is a hip file with the incoming bgeo animation. Thx ! dynamic_tree_grow_help_01.rar
  9. Dynamics on growing curves

    Hi, i'm currently working on a growing tree system, and I'd like to have some advices on the way I could achieve dynamics on this one. 1) Which method is the best with animated curves ? Wire Solver ? POP Grain ? other ? 2) I started with Wire solver, but I can't get my animated curves. It takes the first frame to process. So all points are in 0 pos. Note : the way the tree grows is not poping points. It's moving points. All points are already created at the first frame, they're just stacking on top of each other and then move. 3) When I'm creating glue constraints, my target points and my goal points are not aligned (there is an offset). So when I start the animation, the points moves to the goal point's position. How can I keep this offset ? So, I don't know... I have attributes on each points and primitives such as group levels, growth value, width, parent prim, etc. I can already predict several problems : 1 : simulation with several points on top of each other. Maybe I can fix this by using my "growth_val" attribute (as long as my value is not equal to 1, it is excluded from dynamic, for example) 2 : dynamic simulation with animated curve length. May cause some issues on curve behavior with stiffness, etc. 3 : glue root points on a growing curve with dynamics... I need to do this procedurally, so I can't split the branches by level... Any help would be appreciated ! Thx !
  10. Well, I finally got it !! I needed to create a rotation matrix of the parent point to get the orientation (in the copy SOP). The offset was corrected with the invert matrix of the parent point at the first frame (with a TimeShift). So now, my sticking effect is working. I provide the file if someone is interested. By the way, I just ask : I'm using a polyframe to create the orthogonal axis, but it seems that the polyframe SOP doesn't work well on a straight line. It doesn't create the 3 orthogonal vectors. Do anybody know how to create a "polyframe-like" on straight curve ? in VOP or VEX ? And another question : When I create a Line (Up vector, {0,1,0}), when I add a Wrangle node with : v@x = {1,0,0}; v@y = {0,1,0}; v@z = {0,0,1}; if I put a transform node with random rotation, the vectors don't stay orthogonal, as if vectors were created in World Space. Should I create another matrix before ? or is there another way ? Thanks ! stick_to_parent_08_working.hip
  11. Hi, i've found this : but, I still have an offset. When I get the @orient and copy my branch to the point, it's not aligned to its initial position. But the transformations follow... If someone can help on this. Thx growth_help_004_rotations_06.hip
  12. centroid() instead of $CEX?

    No error for me as well, if you want to use centroid expression, try centroid("../foreach_begin1/", D_X) centroid("../foreach_begin1/", D_Y) centroid("../foreach_begin1/", D_Z)
  13. Ok, i've searched into all posts I could, and I finally found that solution for the second purpose : https://www.sidefx.com/forum/topic/43131/?page=1#post-193704 with point VOP and align node, I used qrotate to rotate my branches to the up vector from the trunk point parent Now, when I rotate while the bias = 1 (branches are up), the branches follow any transformations. But I need to make the standard initial position follow the trunk as well... Maybe if I calculate the angle between my up vector from the trunk and my up vector from the pivot point of the branch (which is pt 0)... but in the previous case, I transformed my branch at the world origin to make the rotation, and then move back to its position. But in that case, I don't know if it's gonna work... Any clue would be appreciated growth_help_004_rotations_02.hip
  14. Hi, I've got another problem concerning now rotations. I created a simple Hip file to discuss this, because my real setup is quite complicated, so it won't help. So, let's say we have 1 trunk curve which is the parent and 2 branches which are children. In my setup, I'm getting the full final tree skeleton and I'm starting from this. I cannot modify previous generation steps. In my file, I have a wrangle node the stick the branches to the trunk. But it's only positions. I can translate the trunk in X, Y or Z, the branches follow. But I don't have rotations on them. 1) So first of all, I want the branches to follow the rotations of the parent. How can I apply the relative rotations of the parent point onto all the points of the branches ? I've looked for this on the forum, but all the examples I found were working with copy sop... but in my case, I already have the result. I really don't understand matrix rotations. I tried to apply transformation matrix, but it's always from the world origin, and not from my pivot point. 2) The I want a slider to rotate all the branches to be parallel to the parent point orientation. For example, the 1st branch is sticked to the point 9 of the parent trunk. So when the slider is 0, the branch rotation is at initial position (no transformations), and when it's 1, it's aligned with the up vector of the point 9 ! It's exactly the same process Brian showed in his file, but if we transform the parent, the branches don't follow. Thx ! growth_help_004_rotations.hip
  15. well it seems to be a bug, but when I create a new attribcreate with @N.x, @N.y and @N.z it works... try delete your node and create a new one. If the error is still there, well, just put it in a point wrangle as Yon said : v@dir = @N;