caskal Posted December 6, 2018 Share Posted December 6, 2018 (edited) Hey magicians, I was requested to create some cloth in motion assets, I'm working with vellum, but having troubles to loop it as client requested. So far I used a blend shapes with first and end frame at the end, but the loop is quite noticeable since it reverses the blend at the end to start again. Here's a sample of the asset I need to loop: Here's another idea I had, I'm going to test it now: 1) Having the initial frame with cloth shape 2) Group the edges of that 3) Pin constraint the edges to vellum 4) Animate the edges having first and last frame in same state Any tips to loop vellum? Thanks! Edited December 6, 2018 by caskal Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 6, 2018 Share Posted December 6, 2018 I did this in Max MCG: The point I wanna bring up is....surely you'd want to blend MORE than just first/last frames ? It has to be several frames so it's not soooooooo jarring. I blended the last 'few' frames so that say, the last 15 frames, they gradually 'morph' into the state of the 1st frame. 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted December 6, 2018 Share Posted December 6, 2018 This technique might work well for the cloth sim, I try it for my cloth and it looks fine. 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 6, 2018 Share Posted December 6, 2018 (edited) here's my proof of concept. - sim to see the NON LOOPING, obviously it is not looping. - then go to LOOPING: clamp(1 - ($FEND - $F)/15,0,0.9) the 15 is to blend the last 15 frames. The 0.9 is used instead of 1 is so that we don't have the 1st/last frames exactly the same. Now granted, you can still see the 'transition' during the last 15 frames...but it is not an instant jarring switch between 1st/last frames as in NON LOOPING case...(you'll have to spend time finding the sweetspot of blend duration) (the point SOP preset is Morph to 2nd Input) vu_loopvellum.hiplc Edited December 6, 2018 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
toadstorm Posted December 6, 2018 Share Posted December 6, 2018 did this on a job recently. here's the process more or less: split your cache about in half and timeshift / timewarp each half so that the first half becomes the second half, and vice versa. this means that the first and last frames are now identical and will loop. now you just have to blend the middle part. overlap each half of the cache in time so that you have some room to blend. keyframe a blendshape or the equivalent so that the caches blend from one to the other during this overlap period. to make this less jarring, you can animate a "blend" point attribute that wipes across the mesh from 0 to 1. then use a wrangle to blend your point positions from the retimed cache to the blend shaped positions: @P = lerp(@P, blended_P, @blendAttr); this works best if the wipe moves in the same direction as the prevailing ripples in the cloth. you might need to do a detangle afterwards, or do a secondary vellum sim during the blend shape animation in order to detangle parts that end up interpenetrating during the blend. totally depends on your original sim. 2 1 Quote Link to comment Share on other sites More sharing options...
caskal Posted December 7, 2018 Author Share Posted December 7, 2018 Hey @Noobini thanks a lot for the tips and the hip, I was trying to do that multiple frames blending using like 10 timeshifts with no luck then I analized your file, didn't know about that Stash node, pretty handy! Played with the Attribute expression using more than 15 frames and its giving me much better results than the method I used before (blending 2 frames only). I still have to play trying to have the initial and end state as close as possible. @kiryha thanks for the tutorial! I saw that in the past but didn't think about adapting to this, I'll give a shot. @toadstorm thanks for the detailed process, will check that one too and see wich adapts better to this loop. Cheers guys! 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted December 7, 2018 Share Posted December 7, 2018 That tutorial offers the same technique that @toadstorm describe. 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 7, 2018 Share Posted December 7, 2018 5 hours ago, caskal said: Hey @Noobini thanks a lot for the tips and the hip, I was trying to do that multiple frames blending using like 10 timeshifts with no luck then I analized your file, didn't know about that Stash node, pretty handy! Played with the Attribute expression using more than 15 frames and its giving me much better results than the method I used before (blending 2 frames only). I still have to play trying to have the initial and end state as close as possible. @kiryha thanks for the tutorial! I saw that in the past but didn't think about adapting to this, I'll give a shot. @toadstorm thanks for the detailed process, will check that one too and see wich adapts better to this loop. Cheers guys! my thoughts are these: - if you plan to blend the last 15 frames...then run a non-loop sim first, then pick the initial frame as somewhere about 15 frames from the end.....ie. it will not be DRASTICALLY different from the last frame. Of course, once you picked your initial frame and rerun the sim, you'll still have to pray hard that it turns out similar to your previous run. - I think toadstorm's approach is same as the Gamedev's shelf tool. To me if you spend a lot of time tweaking your sim, then you want to loop it and this will compromise your orig result because of blending....so I want to compromise the least amount...ie. some frames at one end rather than mirroring 2 ends and blend middle. But who knows, it may give you a better look, give the Gamedev one a go. - yeah the stash is great, you'll just have to get used to run some sim, scrub to where you like the 'shape', connect the result from bottom back up to stash, update stash, disconnect input of stash, rerun....rinse repeat....bit confusing at first...but great once you've grasped the workflow. 1 Quote Link to comment Share on other sites More sharing options...
caskal Posted December 7, 2018 Author Share Posted December 7, 2018 @Noobini yeah that was my main issue, praying so they don't look too different , agree on tweaking the sim too much. As for stash, I always used file cache or time shift but this is much better, I didn't understand how it worked when I opened your file so went to the help doc, this stash-sim-stash-sim workflow will come super handy to get cool results! Thanks again! Quote Link to comment Share on other sites More sharing options...
vinyvince Posted December 11, 2021 Share Posted December 11, 2021 (edited) @Noobini @toadstorm @Atom I m generating one variation for every frame, slow transformation mutation depending on time, so i using Frame and not a random Seed value in PDG. Now i also need a vellum sim for each mutation, so each frame. How could i force vellum to not try to read my input every frame. I thought the Quasistatic mode will do that, but not what i could see excepted if i dive inside and change to "timeless no history" but in the case , vellum doesn't do its job too... I looked the vellum brush network, it using some stash. Is there a way in python to dynamically stash a geo and unstash it after. Or do you have one solution ? Im sure it should have a simple one, just can't figure it out... i was thinking of using a trigger attribute with a switch ... Idea, illumination, suggestion , i take everything ! Edited December 11, 2021 by vinyvince 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.