[About macOS Sequoia] (Updated October 22, 2024)
Live2D Cubism Editor 5.1.02 now supports macOS Sequoia.
Other Live2D Cubism products currently released are not guaranteed to work on macOS Sequoia.
Please refrain from upgrading macOS, as it may not operate properly.
csmVertexPositionsDidChange never resets Cubism3.0 Native
Hello,
I'm new to Live2d/Cubism programming and have a question regarding the Cubism 3.0 Core Native Development.
I integrated cubism to my project and implemented the rendering of moc3 files. Everything works fine but I got stuck at some point during the implementation of the animation system. I added the possibility to update the vertices if csmGetDrawableDynamicFlags has the flag csmVertexPositionsDidChange set. Unfortunately it is set each update frame. If I check the vertex data during debugging, everything looks unchanged (no animation is set yet). My character (and the vertex data) looks the same each frame but the dynamicFlag never gets a reset. I looked into the example from github and it is implemented like that:
// Update model.
csmUpdateModel(Sample.Model);
// Update renderer.
csmUpdateGlRenderer(Sample.Renderer);
// Reset dynamic drawable flags.
smResetDrawableDynamicFlags(Sample.Model);
// Draw.
csmGlDraw(Sample.Renderer, GetViewProjectionMatrix(), &Sample.Texture);
I implemented it the same way.
1. Call csmUpdateModel()
2. Update vertices if csmVertexPositionsDidChange is set (and more)
3. Call csmResetDrawableDynamicFlags for model
4. Render
If i do not call csmResetDrawableDynamicFlags alls flags for each drawable is 63 and it never changes (of course, because I do not call ResetDrawableDynamicFlag). If I call csmResetDrawableDynamicFlags after each update and before rendering the flags are always 33 and that tells me that the VertexPostionChanged flag is set all the time, even if I have no animations yet and the vertex data is the same. It is not a super critical problem because everything renders fine. But it is very slow because everything wants to update its vertex data each frame.
Did I miss something or am I doing it wrong?
Thank You.
Kind Regards
Nisi
0 ·
Comments
Thank you for your inquiry. We have our own Github page. It would be much appreciated if you could make a post on Github so that other users there can share this toppic!
https://live2d.github.io/
Thanks!