Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please limit one question/topic per post.
Please provide the following details depending on types of question

▼ For question regarding Editor, please provide:
- Live2D Software Version: (e.g. Cubism Editor 3.1.02, Euclid Editor 1.2.02)
- OS & Version: (e.g. Windows 10, macOS HighSierra)
- PC Model: (e.g. MacBookPro 2017)
- Graphics Specifications: (e.g. GeForce GTX 950M)
- Memory: (e.g. 8GB)
- Illustration Software used: (e.g. Photoshop, ClipStudio, SAI)
- Attach screenshot or capture video to show your problem:
▼ For question regarding SDK, please provide:
- For us to reproduce the issue you wish to inquire about, please provide either a minimum project file which has the issue. or specific instructions on how to reproduce the issue.
- Types and version of Cubism SDK you are using.
▼ For question regarding Cubism Software License,
For issues related to purchasing, your order, license key, and subscription, please contact us via contact form:

csmVertexPositionsDidChange never resets Cubism3.0 Native

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.
// Update renderer.
// Reset dynamic drawable flags.
// 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


Sign In or Register to comment.