Tagged: animateParam, puzzles
- This topic has 5 replies, 2 voices, and was last updated 2 months, 2 weeks ago by muhuzhongxun.
-
AuthorPosts
-
2024-08-20 at 6:34 am #76715muhuzhongxunParticipant
I need to perform certain operations at specific keyframes. I’m concerned that this issue could cause stuttering during the playback of my animations.
https://drive.google.com/file/d/1YnRFE7MBg0RXdJWwxflzCYi9tNJgjEKk/view
- This topic was modified 2 months, 2 weeks ago by muhuzhongxun. Reason: update tags
2024-08-20 at 6:39 pm #76726xeonCustomerHave you tested your theory?
Create a simple animation. Create a play animation puzzle to stop its playback after reaching a specific frame. Conduct your next animation and see what happens. You can do this with a simple text cube project….animated the cube in a given direction over a set number of frames.
Then create a v3d project. Use the play animation puzzle and select your cube animation.
Then create another puzzle like animate parameter and conduct another animation operation on it.If the animate parameter animation doesnt affect the position of the animation controlled in your keyframes…it should work very well and allow you to end your new animation sequence in a state that matches the postion in the key framed aniamtion.
However, if you have a key frame animation and you have to create another anim parameter at specific key frames… you will have to determine if at a specifc frame the key frame animation will stop or not and do you have to resume it when the new animation is done. If the answer is yes…then again you need to make sure your anim parameter aniamtion leaves the cube in the same location you started from so that you don’t get a “skip”.
Alternatively you could just do all this via key frames. Play animation frame 0-30 and then play animation frames 60-90 then when done go back to playing aniamation frame 0-30 etc.
There should be no stuttering unless you programmatically or key frame the stutter to ocurr.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-08-21 at 1:31 am #76728muhuzhongxunParticipantI will use onAnimationFrameDo to execute certain operations at specific keyframes during animation playback, such as moving the camera, showing or hiding objects, and highlighting items. While these actions can execute normally, I feel there’s some stuttering.
I suspect this might be due to the statement part of the onAnimationFrameDo puzzle being executed multiple times. Given the complexity of my animation, it can print up to 200,000 lines of information within just a few triggers.
Here are two tests I conducted: In the first test, the printed output doubled with each repeated trigger, leading to choppy animation playback. In the second test, I implemented a limit on the execution count, which helped to reduce the issue. However, the core DO portion of the code still triggers many times.
VCR:
https://drive.google.com/file/d/1M1r2OpqDuhRlxqg_Xan8PI60fIMNZAPA/view?usp=sharingYou can reproduce my recorded screen by simply disabling the automatic animation of the official model and using my puzzle instead.
- This reply was modified 2 months, 2 weeks ago by muhuzhongxun. Reason: add png
Attachments:
You must be logged in to view attached files.2024-08-21 at 1:37 am #76729muhuzhongxunParticipantOf course, if I segment the animation and use multiple animationParamFrame with whenFinishDo to replace the DO section of onAnimationFrameDo, I can avoid the issues mentioned earlier. I’m considering doing this.
2024-08-21 at 4:08 am #76732xeonCustomerHi there,
I believe based on your puzzles, you would be better off with a different approach. When you have an existing animation created you will want to trigger an event at a specific frame I would recommend using the “on animation frame” puzzle.
https://www.soft8soft.com/docs/manual/en/puzzles/Animation.html#on_animation_frame_doMy suggestion regarding the animate paramter puzzle is to use it for things that are not already keyframed that you are intending to animate via puzzles.
Keep in mind that you can animate things in Blender and although they share the same timeline in blender, you can initiate them on different timelines in Verge3D.
As an example you have a person swinging a bat. This can be animation 1 that runs from frame 0 to 100. You can have a ball that is traveling through the air towards the stick frame 0 to 30 (animation 2). You can trigger the ball to animate in a loop…and then have the bat swing based on a specific frame, user event, etc…without having to use the animate parameter puzzle. This way all your animations are easily triggered and played back based on your needs by frame number and timing without issues or hiccups.
- This reply was modified 2 months, 2 weeks ago by xeon.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-08-22 at 8:55 am #76908muhuzhongxunParticipantI believe I have identified the cause of the “animation stuttering.” It happened because I repeatedly activated animateParam without using stopParam promptly, mistakenly using stopAnimation instead. Now that I’ve utilized stopParam, the animation plays correctly.
I apologize for any inconvenience. Lastly, I’d like to inquire if the data stored in _pGlob.animTriggers is a bit redundant.
- This reply was modified 2 months, 2 weeks ago by muhuzhongxun.
-
AuthorPosts
- You must be logged in to reply to this topic.