thisistherk / fast_obj

Fast C OBJ parser
MIT License
616 stars 46 forks source link

obj writer #22

Open xelatihy opened 3 years ago

xelatihy commented 3 years ago

fast_obj works quite well as a reader. For application that do rad/write of OBJ, it would be nice to be able to be able to save an in-memory obj to disk as a pair of OBJ/MTL files. An example of this is the cgltf project.

Any plans to add this in the future?

thisistherk commented 3 years ago

Not at the moment, mostly just cos it's not really something I'd use, but not opposed to someone else having a go if they want! Having said that, I also think the format is so simple that it's almost more complicated to use an API to write it than it is to just write directly. Suspect you might end up with more code building up a fastObjMesh structure in memory to then write via an API vs just doing all yourself. Could be persuaded otherwise though :)

xelatihy commented 3 years ago

Maybe I'll take a crack at it and see if you like it. Do not promise anything. I'll also check how hard it is to programmatically build the in-memory structure.