Optimization: Be able to limit amount of emitted segments
Profiling for createBuffers
Handle missing material gracefully