We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Launch animation of several objects

Home Forums General Questions Launch animation of several objects

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #13454
    scalare
    Customer

    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!

    #13466

    you can possibly use nested play animation puzzles to set up such a sequence?

    Chief 3D Verger | LinkedIn | Twitter

    #13516
    scalare
    Customer

    Thank 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!

    #13517
    Crunch
    Customer

    Scalare – 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 !

    #13518
    Crunch
    Customer

    screenshots.

    i tried to add the project files but think it might be too big 4.7 megs

    #13521
    Crunch
    Customer

    i used 7zip to get the app folder size crunched enough to put up here

    #13530

    @Crunch Thanks for helping out here! :good: Hopefully it would work for you @scalare.

    html, css, javascript, and now VERGE!

    thanks for such the high opinion of our creation :)

    Chief 3D Verger | LinkedIn | Twitter

    #13549
    scalare
    Customer

    Hi 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!

    #13578
    Crunch
    Customer

    scalare – did you deactivate the “auto start” animation and change the “loop mode” to Once in the objects panel in Blender for EACH drawer object?

    #13582
    scalare
    Customer

    Yes. 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?

    #13585
    Crunch
    Customer

    I 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.

    #13586
    scalare
    Customer

    Yes, that is the workflow. Thank you, Crunch. Hopefully Yuri will have some idea of what may be happening when importing from Autocad.

    #13590
    scalare
    Customer

    I’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. :wacko: 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és

    #13595

    Hi,

    Strange thing – I animated the default cube and renamed it Layer:Legno-Lettino.010 and the play animation puzzle could handle it as expected. Can you try a similar procedure just to make sure?

    Chief 3D Verger | LinkedIn | Twitter

    #13600
    scalare
    Customer

    It 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! :)

Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.