patrikhuber / eos

A lightweight 3D Morphable Face Model library in modern C++
Apache License 2.0
1.89k stars 596 forks source link

Add error handling when a model doesn't have any texture coordinates #228

Open patrikhuber opened 5 years ago

patrikhuber commented 5 years ago

I've got a report that currently, when a model doesn't have any texture coordinates, eos::render::extract_texture just crashes. We should handle that a bit more gracefully.

patrikhuber commented 5 years ago

Yes indeed, and another user reported a segfault in #260 when trying to use extract_texture with the BFM, which obviously doesn't have texture coordinates.

patrikhuber commented 5 years ago

More people trying this and running into this crash/segfaults in #218 and #95.

It is quite clearly documented in the BFM2009 converter script though, and the BFM2017 converter script contains the same note. The part about "Note that eos only supports one uv-coordinate per vertex." is no longer true though, I guess I could remove that.