TheDude123 Posted December 10, 2023 Share Posted December 10, 2023 Hi, I'm trying to attach non-simulated curves, to simulated curves via an RBD network. I have a wire sim with the main tree, but it's super slow when adding all the tiny twigs...so I decided to post-deform those (with an RBD sim). Problem is, when I constrain the twigs to the simulated branches, part of the constraints stay in one location and the twigs begin to drift from the branches. I have included a super basic set-up that illustrates the issue. Any help would be appreciated. Thanks! RBD_Constraints_Issue_v001.hip Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 11, 2023 Share Posted December 11, 2023 hope that gives an idea RBD_Constraints_Issue_v002.hip 1 Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 11, 2023 Author Share Posted December 11, 2023 Thanks so much. I'll take a look. Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 11, 2023 Author Share Posted December 11, 2023 (edited) Actually, the RBDdeformingtoanimated SOP works really well in this case. IN MY ORIGINAL SCENE: Just need to plug it in after the color2 SOP and before the ANIM GEO null (and remove the assemble...the rbddeformingtoanimated packs the geo for you). Edited December 11, 2023 by TheDude123 1 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 12, 2023 Share Posted December 12, 2023 rbd_constraint_geo_to_anim_geo_super_simple.hip simple_rbd.mp4 yes, also you can put it direclty to animanddeform in a seperate rbdpack node . maybe in your case thats even simpler 2 Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 12, 2023 Author Share Posted December 12, 2023 (edited) Thanks for the additional scene file . Hmmmm, I tried these methods with my actual geo and it does not work...not sure what's going on. I have uploaded 24 frames from my simulate tree, as well as the twigs I need to attach. Any idea what's going on here? Files: https://www.dropbox.com/scl/fo/jfndsoyo4rhnod2kbaiz7/h?rlkey=4fmo4shzf46pid93rohzsdewj&dl=0 Edited December 12, 2023 by TheDude123 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 13, 2023 Share Posted December 13, 2023 Maybe upload the scene with stash nodes here directly, than i can take a look. Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted December 13, 2023 Share Posted December 13, 2023 14 hours ago, TheDude123 said: Thanks for the additional scene file . Hmmmm, I tried these methods with my actual geo and it does not work...not sure what's going on. I have uploaded 24 frames from my simulate tree, as well as the twigs I need to attach. Any idea what's going on here? Files: https://www.dropbox.com/scl/fo/jfndsoyo4rhnod2kbaiz7/h?rlkey=4fmo4shzf46pid93rohzsdewj&dl=0 You have name and orient attrs on animated geo, use transform pieces sop. transform_pieces.hipnc 2 Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 13, 2023 Author Share Posted December 13, 2023 (edited) 4 hours ago, vicvvsh said: You have name and orient attrs on animated geo, use transform pieces sop. transform_pieces.hipnc 128.77 kB · 4 downloads Thanks! That does seem to work...however, I tried to duplicate that workflow onto the last level of twigs, and it breaks. They won't attach properly (BLUE curves in image bleow). Is that because the level before does not have an orient attribute (the level that was previously transformed in your scene above (YELLOW curves in image below)? Here is the geo for the smallest twigs I need to deform with sim. Any ideas on how to get that working? Thanks, again. https://www.dropbox.com/scl/fi/p08xn00qod8l3znvln7bt/TINY_TWIGS.bgeo.sc?rlkey=3j8nfesu29swkn7tyff2gtyhq&dl=0 PROBLEM: Edited December 13, 2023 by TheDude123 Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted December 13, 2023 Share Posted December 13, 2023 First merge all static twigs. Then transform them. For the first and second stage you can use the same technique. transform_pieces_02.hipnc 1 Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 13, 2023 Author Share Posted December 13, 2023 Ohhhh, man...that's looking good so far. Thanks, Victor! Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 14, 2023 Share Posted December 14, 2023 (edited) untitled.mp4 rbd_curves_constraint_to_anim_geo.hip Edited December 14, 2023 by hannes603 Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 14, 2023 Author Share Posted December 14, 2023 Oh, that's a nice variation! 1 Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 16, 2023 Author Share Posted December 16, 2023 (edited) On 12/13/2023 at 12:35 PM, vicvvsh said: First merge all static twigs. Then transform them. For the first and second stage you can use the same technique. transform_pieces_02.hipnc 178.86 kB · 3 downloads Hi Victor, Ok, I'm trying to apply this workflow to the actual tree geometry. I'm finding that point deforming the entire tree with the wire sim is pretty slow (16 seconds a frame). So, I'd like to sim the larger parts of the tree and just use your workflow for the last 3 levels of smaller twigs. However, I can't seem to get the twig geometry to line-up with the rest of the deforming geo sim. I added a connectivity (in place of the enumerate) to get the primid attribute onto the whole twig and changed the grouprange Start and End parameters...that helped, but still not quite there. I have included a file with my progress, as well as the relevant geometry and simulations (a wire sim and a deforming version of the tree geometry for comparison/checking alignment of twigs). Any additional help would be appreciate! Thanks! Files: https://www.dropbox.com/scl/fo/38a4x7o0cdnutuxd6nexu/h?rlkey=qtjsijctidvc8cxyizjw2vz26&dl=0 Edited December 16, 2023 by TheDude123 Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted December 16, 2023 Share Posted December 16, 2023 (edited) In case with geos instead of curves there is offset between v@pivot and new v@P. Plug in timeshift9 to third input of attribwrangle40 and past this code to that attribute wrangle sop: // get orient from sim @orient = primuv(1, "orient", i@prim, v@primuv); // find offset vector pos = primuv(2, "P", i@prim, v@primuv); vector offset = v@P - pos; // set pivot v@pivot = v@P; // set position v@P = primuv(1, "P", i@prim, v@primuv)+ offset; Edited December 16, 2023 by vicvvsh Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 16, 2023 Author Share Posted December 16, 2023 3 hours ago, vicvvsh said: In case with geos instead of curves there is offset between v@pivot and new v@P. Plug in timeshift9 to third input of attribwrangle40 and past this code to that attribute wrangle sop: // get orient from sim @orient = primuv(1, "orient", i@prim, v@primuv); // find offset vector pos = primuv(2, "P", i@prim, v@primuv); vector offset = v@P - pos; // set pivot v@pivot = v@P; // set position v@P = primuv(1, "P", i@prim, v@primuv)+ offset; Hi Victor, Thanks for the help! Hmmm, that almost works. It still looks like the twigs are not aligned properly (see image). File is (Deform_Geo_v003) I tried another approach to creating root point (creating a new point at base of each twig). However, it still wont align properly. In this case, I think it has something to do with how the extract centroid is creating the point. I've included this file if you are interested in checking it out (Deform_Geo_v004_My_Test) Thanks. Updated Files: https://www.dropbox.com/scl/fi/giywk33pkt8v7n5vj3gkz/Deform_Geo_v003.hip?rlkey=ab41c48zuecslanlhdm8hhxt4&dl=0 https://www.dropbox.com/scl/fi/ehwjs5ndwagzu6ttr63hl/Deform_Geo_v004_My_Test.hip?rlkey=7kn0hf443i1vxveek3ai3jebl&dl=0 IMAGE: Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted December 18, 2023 Share Posted December 18, 2023 (edited) I see here two problems: 1. Curve’s primitive consists of several segments and this primitive bends, squeezes and stretches while simulation. We define pivot and P on start frame then we take P each frame with primuv() but as primitive changes his form through simulation there is inconsistency between pivot and P. It can be avoiding by using copy to point instead of transform pieces, or using transform peaces but simulate curves where each segment is a primitive. But anyway these solutions help partly because it is not rbd simulation. 2. When you use curve for point deforming geometry in some places it deforms not accurately (see frame 24, camera 3) and it leads to others deviations. I doubt it helps achieve accuracy totally but I hope it improve a lot. Deform_Geo_v004_My_Test_02.hipnc Edited December 18, 2023 by vicvvsh 1 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 18, 2023 Share Posted December 18, 2023 (edited) maybe you should also look into vellum. it might be faster and easy with those 2 constraints. treeEx.mp4 LightTree_v02.mantra_ipr.mp4 Edited December 18, 2023 by hannes603 1 Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted December 18, 2023 Author Share Posted December 18, 2023 Thanks Victor and Hannes for the ideas! I'll take a look. 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.