eos-model-viewer icon indicating copy to clipboard operation
eos-model-viewer copied to clipboard

Mesh gets updated twice on "Random face sample" button

Open patrikhuber opened this issue 6 years ago • 1 comments

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.

patrikhuber avatar Apr 01 '18 16:04 patrikhuber

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".

patrikhuber avatar Dec 04 '18 15:12 patrikhuber