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.

Working with Animation Actions/Clips per Track

Home Forums Programming Working with Animation Actions/Clips per Track

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #72802
    masj
    Participant

    Hello!

    Bit of an odd scenario:

    I have several keyframed value nodes driving animation in a few different materials all assigned to faces on the same mesh object, and controlling the looping of each via code. However, the nodes are meant to loop animation independently of each other (i.,e. one loops every 40 frames, another 72, another 300, etc.).
    In V3D, all the Animation Tracks are inside the same Animation Clip, which is in a single Animation Action (makes sense). However, that Animation Action’s methods for controlling playing, pausing, looping, etc. are controlling playback for all the Animation Tracks inside the clip.

    Wondering the best way to solve this.
    Considering creating a separate Action-Clip for each Track (“splitting” per track), but not sure if that’s even doable with the API?
    Or maybe someone smart here can see another to solve this problem.

    All input is appreciated, and thanks in advance!!

    • This topic was modified 6 months, 2 weeks ago by masj.
    #72817
    xeon
    Customer

    I wish everything that worked in Blender would work in Verge3D but thats not the case.
    AnimationActions/Clips in blender work great but not so much for V3D. V3D’s animation is based on objects, not animation actions or clips. If the AnimationAction/Clips contain their animation to one object it will work. If…not…wont work.

    So if you have Object A, Object B and Object C animating in frames 0-100. Object A loops from frame 0-25, Object B loops from 0-50 and Object C plays from 0-100. You will just key frame those specific animations in blender. You then use the play animation frame based on the objects. This way you can have Object B start its loop and on completion Object A starts, while C is always going. V3D keeps the animation separate and you can call them as needed via puzzles.

    Might help to think of each object you have as a separate timeline…and you will composite them and time them inside V3D.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #72827
    masj
    Participant

    Thank you for sharing your insights, xeon!

    I messed up on my description in the first post and edited it, specifically:

    I have several keyframed value nodes driving animation in a few different materials all assigned to faces on the same mesh object, and controlling the looping of each via code.

    I think your point still stands though. In V3D, the multi-material mesh object is split into a separate 3D Objects (with the “isMaterialGeneratedMesh” property on), but the animation tracks are all bound to the source object, I think, so the same animation controls affect them all, unfortunately. Having separate objects is the obv way around this, but rly want to see if there are no other options first. Generating a new clip per track via code would be ideal.

    #72841
    visualizer
    Customer

    This type of overlapping animations and actions were at several locations in robotic work I did in the recent past (especially the 6 axes robot virtual module). But the beauty of verge3D is you can trigger the individual animations as and when needed even all of them are on same time line range. You don’t really have to make each animation separately on timeline range.

    However the worst part is when you see that animation happening in Blender …its nightmare and totally confusing since multiple actions happening in a very short range of frames.

    Interesting example – We also tested once… a considerable lengthy action on just 5 frames in Blender and drastically slowing it down in verge with speed factor. it worked very smooth. That helped us to categorize & sort certain set of animations perfectly stretched OR compressed to specific frame range. For sake ease of handling.

    I hope at gross level this is helpful

    • This reply was modified 6 months, 2 weeks ago by visualizer.
    • This reply was modified 6 months, 2 weeks ago by visualizer.
    #72848
    visualizer
    Customer

    I gave robot example because I feel ….so far thats the most complex & loads of animation actions to be created and also to be baked completely . Since verge 3D or 3js readily doesn’t support Fk-Ik.
    Yuri had shared one example that, some smart developer has achieved Ik-Fk thing in coding.

    here it is – https://cdn.soft8soft.com/demo/examples/index.html?q=ik#webgl_animation_skinning_ik

    • This reply was modified 6 months, 1 week ago by visualizer.
    #73028
    masj
    Participant

    That’s cool and all, but not sure it’s relevant to this specific topic. Thanks for sharing your input and work, though!

    Uploaded a picture to help visualize.
    We see four tracks on four different materials (the materials have keyframed value nodes and each material was assigned to the same object prior to gltf export, and split in Verge3D automatically as “material-generated mesh” objects), but all tracks are being controlled by the same animation clip/action.
    Trying to find a way/the best way to control playback for each track independently through code (each track is meant to loop keyframe animation at different durations).

    Any and all insights appreciated!

    Attachments:
    You must be logged in to view attached files.
    #73562
    visualizer
    Customer

    it not perfectly match but sounded similar to this, so I just shared.

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