c0y Posted September 23, 2017 Share Posted September 23, 2017 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 ! 1 Quote Link to comment Share on other sites More sharing options...
mestela Posted September 24, 2017 Share Posted September 24, 2017 I was playing today with an L-system tree and grains funnily enough, then read your post. Had a go at changing my setup to a simple grow anim (more just a scale up and bend really), kinda works. Give it a go with your setup: tree_grain_grow.hip 7 Quote Link to comment Share on other sites More sharing options...
c0y Posted October 1, 2017 Author Share Posted October 1, 2017 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 Quote Link to comment Share on other sites More sharing options...
mestela Posted October 3, 2017 Share Posted October 3, 2017 Tricky problem! had a closer look into wires, ran into many dead ends there, went back to grains. This latest attempt I went back to the rope example from my wiki, and tried to repurpose it for your tree. It looks up the roots for each curve, and finds the closest other prim and corresponding uv point. In the sim I use that to lookup the correct P for that root, and snap it there. Doesn't look as nice as your second example (how are you doing that? would love to know!), but here's what I have anyway, might give you some ideas. tree_grain_grow_v05_ropegrain.hipnc -matt 1 Quote Link to comment Share on other sites More sharing options...
julian johnson Posted October 4, 2017 Share Posted October 4, 2017 I tried this one, too, but could only come up with a post-simulation solution. I originally tried converting the constraints to polylines but that didn't give me any options for an offset. In the process of doing that I was experimenting with capturing sourceprim and sourceuv values on the constraint network. Ultimately, I used those attributes post simulation to offset the branches to the correct position. dynamic_tree_grow_help_01.hip 2 Quote Link to comment Share on other sites More sharing options...
c0y Posted October 5, 2017 Author Share Posted October 5, 2017 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 Quote Link to comment Share on other sites More sharing options...
julian johnson Posted October 5, 2017 Share Posted October 5, 2017 For wire constraints the name attribute on the points should match the name of the wire object in the DOP. To actually see the constraints in your network you need to rename the name attribute on the constraint points to something like 'wire' (instead of 'anchor' and 'root pts'). You then need to make sure the wire object in the DOPNET is also called 'wire'. Once you do that you'll see the constraint icons. However, I think you might have merged a load of lone points in your merge3 node. These are referenced later on as anchors but they look like free floating points (i.e.not part of any primitive) so they just sink with gravity. Has the animation changed since the first iteration? It looks like branches slide up crossing many anchor points now which might be tricky (I think in previous versions the branches were always anchored to a fixed point)... dynamic_tree_grow_help_03a.hip Quote Link to comment Share on other sites More sharing options...
c0y Posted October 5, 2017 Author Share Posted October 5, 2017 (edited) 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 Edited October 5, 2017 by c0y Quote Link to comment Share on other sites More sharing options...
julian johnson Posted October 6, 2017 Share Posted October 6, 2017 I think it's better to make the loops post sim and just offset and slide everything there. Here's a scene that shows how to do that. dynamic_tree_grow_help_03d.hipnc 1 1 Quote Link to comment Share on other sites More sharing options...
galagast Posted October 9, 2017 Share Posted October 9, 2017 I experimented with another method. The basic idea was to rebuild the curves and physically add anchor points. So far, this is what I ended up with: I used the file from your 2nd post. The only odd thing I'm noticing is that it seems to simulate much slower for some reason. I'll try and troubleshoot the next time I have time to sit on this. Houdini Indie 16.0.745 - dynamic_tree_grow_help_02_jeff.zip 3 Quote Link to comment Share on other sites More sharing options...
c0y Posted October 10, 2017 Author Share Posted October 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.