sipi Posted May 23, 2021 Share Posted May 23, 2021 Hey everyone, I'm trying to make a tree simulation. I'm using wire solver, but I can't figure out how to deform the tree geo with the simulated curves. I tried wire deform and point deform, but the result is strange. Do you have any idea? tree_deform.hiplc Quote Link to comment Share on other sites More sharing options...
Atom Posted May 23, 2021 Share Posted May 23, 2021 (edited) Play with the Capture settings on the pointdeform. Try a radius of 1.0. Edited May 23, 2021 by Atom Quote Link to comment Share on other sites More sharing options...
sipi Posted May 23, 2021 Author Share Posted May 23, 2021 (edited) 23 minutes ago, Atom said: Play with the Capture settings on the pointdeform. Try a a radius of 1.0. Not really working, it becomes wobbly. See this attachment. Also it wouldn't work with more dense branches. radius_1.mov Actually I discovered in the help that they don't recommend to use point deform for wire stuff. Edited May 23, 2021 by sipi Quote Link to comment Share on other sites More sharing options...
sipi Posted May 23, 2021 Author Share Posted May 23, 2021 I think I got it. tree_deform.hiplc Quote Link to comment Share on other sites More sharing options...
Atom Posted May 24, 2021 Share Posted May 24, 2021 (edited) I tried adding leaves, but the branch connectors dance around. I'm not sure if this set up will work with more branches. When I enabled the secondary branches, the bonecapturebiharmonic goes off into la-la land. You may want to come up with some overall mass concept for the tree and divide the branches into various weights. With more secondary branches, they weigh down the parent branch quickly. ap_tree_deform(1).hiplc Edited May 24, 2021 by Atom Quote Link to comment Share on other sites More sharing options...
sipi Posted May 24, 2021 Author Share Posted May 24, 2021 (edited) I think I fixed the leaf problem. Also I tried another method to deform the tree separately per branchlevel to prevent bonecapturebiharmonic from la la land. tree_deform.hiplc Edited May 24, 2021 by sipi Quote Link to comment Share on other sites More sharing options...
tamagochy Posted May 25, 2021 Share Posted May 25, 2021 To use curves for deform you need to create geometry using sweep from curves and then plug to point deform. Quote Link to comment Share on other sites More sharing options...
sipi Posted May 25, 2021 Author Share Posted May 25, 2021 14 minutes ago, tamagochy said: To use curves for deform you need to create geometry using sweep from curves and then plug to point deform. Oh indeed, it's a more simple and faster solution! Thank you! Quote Link to comment Share on other sites More sharing options...
sipi Posted May 26, 2021 Author Share Posted May 26, 2021 I wonder why the geometry is not aligning properly along the curves with the Sweep SOP? Any idea? tree_sweep.hiplc Quote Link to comment Share on other sites More sharing options...
Atom Posted May 26, 2021 Share Posted May 26, 2021 (edited) Ok, here is an attempt at tomogachy's suggestion. Sweep before the DOPNet, then point deform after. The scale along length doesn't really work right, because it needs to know the pscale of the point where the connection occurs, then use that value as the start of the taper. Also, some points just don't mesh well and seem stuck to neighbors? ap_tree_sweep.hiplc Edited May 26, 2021 by Atom Quote Link to comment Share on other sites More sharing options...
sipi Posted May 26, 2021 Author Share Posted May 26, 2021 (edited) I think tamagochy's suggestion was to put the Sweep after the Dopnet and use that geometry to deform the original tree geo using a Point Deform, and I think it would work well if the Sweep SOP would generate proper geo. I just can't figure it out what is the deal with the orient attribute... The "stuck to neighbors" issue can be solved with deforming the tree separatly by branch_level, or using a for-each with named primitive like this: Edited May 26, 2021 by sipi Quote Link to comment Share on other sites More sharing options...
tamagochy Posted May 26, 2021 Share Posted May 26, 2021 Sweep used normals along spline and up vector to orient shapes, by default after dopnet you have orient attribute you need to delete. Use foreach per branch to create shapes and then use it in point deform. In my vol3 tutorial you will find explanation of all aspects of the meshing. Quote Link to comment Share on other sites More sharing options...
sipi Posted June 14, 2021 Author Share Posted June 14, 2021 (edited) I did some progress on this, trying to create constraints, but now I just completely lost what is happening Anybody have any idea how to fix this annoying thing? tree_3.hiplc Edited June 14, 2021 by sipi Quote Link to comment Share on other sites More sharing options...
sipi Posted June 14, 2021 Author Share Posted June 14, 2021 (edited) Oh I just fixed the previous problem, but it's still far from a "good-looking" stuff. I want to figure out a stable setup, then start to tweak the sim. Feel free to check out. It seems to me that deformation, and constraints are working now... tree_4.hiplc Edited June 14, 2021 by sipi Quote Link to comment Share on other sites More sharing options...
sipi Posted June 15, 2021 Author Share Posted June 15, 2021 (edited) Now the wire sim is realtime, deforming is slower (around 3 fps), but it's getting stable. Still a lot to do... Also, I don't know if I'm overcomplicating it or not...? I'm just happy to find any usable solution. tree_5.hiplc Edited June 15, 2021 by sipi 1 Quote Link to comment Share on other sites More sharing options...
sipi Posted June 17, 2021 Author Share Posted June 17, 2021 Well, not long after I post it, I realized that the previous method in tree_5.hiplc is malfunctioning. I improved and simplified it and now it's almost okey! But I have difficulties with constraining the branches to each other. Right now I actually snap the root points of every branches to the closest point on the closest branch, and fuse them instead of constraining but sometimes the snapping flaws. Constrains would be better I guess, but I couldn't figure out how to do it. Way A is unreliable. Way B is almost good but with a high number of branches, it becomes unstable. Anybody could take a look and tell me what would be the bulletproof way? tree_9.hiplc Quote Link to comment Share on other sites More sharing options...
sipi Posted June 18, 2021 Author Share Posted June 18, 2021 Nevermind, I fixed the previous unconnected pieces issue. At last the skeleton preparing and deforming setup is working fine with as many branches as you want. I still use the fuse method, finally i managed to figure it out the way (unfortunately I couldn't make it with constrains ). Now it's time for the leaves! Any idea about the leaves? What's the best way to use the Labs Leaf Generator with a deforming tree? tree_10.hiplc Quote Link to comment Share on other sites More sharing options...
Popular Post sipi Posted June 21, 2021 Author Popular Post Share Posted June 21, 2021 (edited) Ok, I think I finished this. If anyone is interested, the hip file is available below. I hope it could be instructive for beginners. I added leaves, they can have a general motion (breeze), and you can add another wind based on the tree motion (length of averaged velocity). I discovered that Bone Deform is way faster than Point Deform (it was realtime for this tree), but Point Deform is more accurate. My setup includes both, I use Bone Deform for previewing, you can just switch. The wire sim is realtime as well, and cooking everything with leaves and with little branches was around 3 fps on my shy laptop without any pre-caching. (I think it's not that bad.) Actually the leaves part could be better, for example right now leaves don't orient themselfs according to the direction of the wind... so some controlling features like this still would be nice to have. Well, feel free to improve it I would say, theoreatically this setup should work with any tree, bush, plant, etc. created by the Labs Tree tools. The hipfile includes some notes as well, I tried to explain why am I doing what I'm doing. Also, I started an attempt to create a non-simulated tree motion, what I saw in nirfse3D's videos about his Simple Tree Tools. Not really impressive right now... I have no idea how he did it, this approach is getting really slow with more branches Anyway. Best wishes! tree_16.hiplc Edited June 21, 2021 by sipi 8 4 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.