Home › Forums › General Questions › Launch animation of several objects
- This topic has 19 replies, 5 voices, and was last updated 5 years, 8 months ago by gary.
-
AuthorPosts
-
2019-04-01 at 9:45 pm #13454scalareCustomer
Hello,
we have a piece of furniture that has 3 drawers. All these drawers are independent objects, that belong to a collection that includes some other objects. Each drawer will be animated in sequence, but not all of the elements in the collection will animate, just the drawers. First, the drawer at the left opens. When it is opened, the middle one will open, and then the one at the right. When they are all opened, they will stay that way for a second or so, and then they will close, again in sequence. (or we will add some button to control when they close, much like the open/close buttons in the scooter demo seat)
How can we make the whole set of animations get started from a puzzle? Ideally, we’d like to use the puzzle “play animation of / from / to”, but we need to refer to an object of a higher hierarchy to refer to, so that the individual animations of each of the drawers run in the right sequence.
How do we do that with Blender? Do we have to create an armature for this? Or can we create a collection inside the collection the drawers are in, just for the drawers, and refer to the second level collection instead, as in “play animation of -collection name- from … to …”?
Thank you!
2019-04-02 at 7:50 am #13466Yuri KovelenovStaff2019-04-03 at 2:04 am #13516scalareCustomerThank you, Yuri. That is a great idea. I’m having a problem though. I’m able to animate each of the drawers individually, and also add the nested puzzles. However, when I play the app in the App Manager, instead of seeing the drawers animate one by one, I see the full piece of furniture getting moved three times, jumping back a few units, and then moving forward again, but a bit moved to the right (the same amount of units that each drawers measures)
Why is it that it animates the full scene, and not just the drawers? Am I missing something?
Thank you!
2019-04-03 at 2:51 am #13517CrunchCustomerScalare – I am a noob at all of this but here is one method.
https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:10a8709e34/applications/drawer/drawer.html
In the demo above, you need to click on the “start” plane object to trigger the animation sequence. I have a 60 frame animation of each of the 3 cubes with time delays between each sequence.. then another time delay before I begin the reverse animations to ‘close’ the drawers.
I have attached a screen shot of my puzzles
You could also put an “after x seconds” puzzle to start the sequence instead of a click on object puzzle. However, if you set it to 5 secs, and say, it takes your app 8 secs to load, then that might cause problems. It could also be triggered by a variety of other methods like hover over (using the ‘all objects selector’ might help there)
What I am learning about Verge3d apps is basically there isn’t anything you can’t do. If you can imagine it, there is likely a way to make it happen. Verge is the final 4th wheel the web needed (html, css, javascript, and now VERGE!)
I am attaching a zip of the source files.
Notes: my camera in scene is set to “no control”.
I click on the Object tab in Blender for each of my 3 cubes (which are animated) and turn “autostart animation” to OFF and set the “Loop” feature to “once”.
Hope this helps !2019-04-03 at 2:52 am #13518CrunchCustomerscreenshots.
i tried to add the project files but think it might be too big 4.7 megs
2019-04-03 at 3:24 am #13521CrunchCustomeri used 7zip to get the app folder size crunched enough to put up here
2019-04-03 at 7:58 am #13530Yuri KovelenovStaff2019-04-03 at 1:01 pm #13549scalareCustomerHi Crunch, thank you very much for your help! Unfortunately, that is exactly what I’m doing in my test, but for some reason, what gets animated is the whole scene, not the individual drawers. There must be something wrong about my blender file. I’ll start from scratch on a clean file and see what happens. Thanks again!
2019-04-03 at 4:58 pm #13578CrunchCustomerscalare – did you deactivate the “auto start” animation and change the “loop mode” to Once in the objects panel in Blender for EACH drawer object?
2019-04-03 at 5:46 pm #13582scalareCustomerYes. I did that too for all of the drawers. This is strange. The drawer objects (and the rest of the furniture) come from an import from Autocad. None of them get correctly animated. But if I add a cube that I create inside blender in the same scene where the rest of the objects are, I can control it correctly, and play the animation without problems with the puzzles.
Could it be that the import from Autocad could have caused this strange behavior?
2019-04-03 at 8:57 pm #13585CrunchCustomerI have never used autocad so i am not much help here. So you import the model from autocad into blender then animate? or are the animations already ‘baked’ in? I would try some experiments with some very simple autocad models and see if you can get anything to work as expected. Sorry i can’t be of more help.
2019-04-03 at 9:34 pm #13586scalareCustomerYes, that is the workflow. Thank you, Crunch. Hopefully Yuri will have some idea of what may be happening when importing from Autocad.
2019-04-04 at 12:15 am #13590scalareCustomerI’ve found the problem!!!! Since the models were being imported from Autocad, the objects had names in the form of
Layer:Legno-Lettino.010
Yes, I know, horrible names to work with. We should have changed their names when we started working, right after importing, but we didn’t. And doing incremental tests, we reached a point where changing the names would require us to do a lot of testing again. We have been able to control almost anything through the puzzles with those meshes names (at least every puzzle we had tried so far was working). Hide/Show, enable outlines, hovers, clicks, names went through RunCode, lists, params, etc. All working.
But it seems that when you have a colon in the name, the “play animation” puzzle goes mad and does the things I had described above. That is why the cube animation was working on the same file, because its mesh was called just “Cube”.
I’ve tried different variants on the names: shorter names, names without the dots, and names without the colons. And the issue was the colon. Not sure if this was documented somewhere, I don’t think I’ve seen any of that anywhere, so I hope this helps someone in the future.
It would be great to know if a colon, or a semicolon in object names might cause trouble with other puzzles as well! In any case, try to stay out of them for the objects names!
Thanks a lot for the help!
Andrés2019-04-04 at 8:00 am #13595Yuri KovelenovStaff2019-04-04 at 9:16 am #13600scalareCustomerIt surely is strange. If I animate just the default cube with that name, it works. But if I add another mesh to the same scene, and the object I animate is the one with the colon in its name, then both get moved when I play the animation! :)
-
AuthorPosts
- You must be logged in to reply to this topic.