Twinklebear / tobj

Tiny OBJ Loader in Rust
MIT License
235 stars 47 forks source link

Parse Ke coefficient in Material file #23

Closed alarsyo closed 4 years ago

alarsyo commented 4 years ago

Ke doesn't belong to the official MTL spec, but is used to specify light emission for a material (Wikipedia has more info)

I'd totally understand if you don't want to expand the scope of tobj beyond the base specification, but I happened to need this for a pathtracing project, so I'm putting it here in case it's useful to anyone :)

alarsyo commented 4 years ago

Well, while reading the failing CI tests I just realized tobj provided a unknown_param field exactly for this case, so, uh, I guess you can close this ? :D

Twinklebear commented 4 years ago

I was actually just going to recommend using the unknown params list @alarsyo . Thanks though!

It might be worth adding support for parsing those other PBR material extensions to tobj, though I haven't ever run into an OBJ file using them