eos-model-viewer
eos-model-viewer copied to clipboard
Mesh gets updated twice on "Random face sample" button
This is best visible by loading the BFM2017, and then drawing random samples. The mesh updates twice. I think this is because it first draws it without the expression mean, and then in the next frame updates it with the expression mean (or the other way round). This was introduced when #5 was added. Also related: #7.
Investigated this a bit today. In case of the BFM: When the "Draw Sample" button is pressed, the shape_coefficients vector is of size 199. Subsequently passing through the rest of the code (i.e. the drawing of the "Coefficients" sliders), reduces that vector to a length of 30, draws a new sample with those coefficients, and displays that.
I don't have an idea for a "quick fix" immediately, ImGui forces a bit of a "spagghetti-code".