Apparently Blender .obj importing is a bit broken for emissive objects: it imports a [10,10,10] emission value as raw color (which should be in 0..1), while leaving the emission strength at zero (meaning the object does not, in fact, emit anything)
@lisyarus is this about emission per surface area vs emission per full area conversion maybe?
@breakin Hmm, I've never seen anybody use the latter!
Anyway, it doesn't look like that in this case either.
@lisyarus some older modeling software had you set the intensity and then if you scaled the lightsource it spread it out so it became softer, not stronger. Just a random guess! Maybe more applicable to area lights.
@breakin Ohh wow!
@breakin Btw I've already tracked the issue in code, look here if you're interested: https://projects.blender.org/blender/blender/issues/135073
@lisyarus Makes sense! Converting between material systems is a lossy and sometimes not fun exercise but good if it becomes better!.
@breakin @lisyarus I spotted the same issue in my own code ( https://avoyd.com/ ) yesterday when I added support for emissive factors > 1.0 in my non-texture based export pipeline for .obj. Many thanks for submitting an issue (you beat me to it)!
As you found, using a texture map for emission fixes this, and that's the main approach I use to export material parameters, but it's harder to edit so I still keep this option available.
@breakin @lisyarus As a work around I'm contemplating adding a option to my glTF exporter (based on https://github.com/syoyo/tinygltf/blob/release/examples/build-gltf/create_triangle_gltf.cpp) to produce separate materials instead of indexed texture parameters. The glTF importer in Blender seems to work pretty well.
@dougbinks @breakin Yeah, I'm writing a glTF exporter right now for the same reason
@lisyarus @breakin FYI somehow the link in the last post was wrong (bad copy), corrected now. glTF is pretty easy to write once you know it, so don't really need a library but I found it handy to help.
Did you consider exporting to .vox? If so you can render in MV or my Avoyd, though these likely aren't as ground truth as Blender, they both do volumes well and should be unbiased.
@dougbinks @breakin Yep, writing glTF is a bit verbose but basically you just follow the spec and fill out a straightforward JSON file.
I'm considering .vox, but afaik you can't really have different materials for voxels (i.e. diffuse/emissive), only colors? I can add a custom .vox chunk with material data, but it won't be interpreted by other software...
@lisyarus @breakin You can have material properties rather than just colour, these are explained in the reference https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox-extension.txt though there are some gotchas so I would refer to https://github.com/jpaver/opengametools/blob/master/src/ogt_vox.h which has the material parameters decoded somewhat.
There's also some discussion in the issues, and I can help if you need.
@dougbinks @breakin Ohh, thank you! I didn't find this spec previously, googling "vox file format" typically gives some garbage as output :(
@dougbinks @breakin I've just submitted a patch, hopefully this will be fixed in the next Blender version :)
@lisyarus @dougbinks @breakin out of curiosity, is there any kind of agreement what color space the mtl quantities are in? is emissive linear? are Kd/Ka linear? what about textures that don't advertise their color space?
(we're currently doing lightmap baking with user-provided .objs that are usually emitted from some adobe/autodesk product and I've been struggling to get the full-pipeline srgb story straight...)
@artificialmind @lisyarus @breakin I think colour values are linear but textures are expected to be sRGB.
@artificialmind @dougbinks @breakin I also wondered about this and sadly I didn't find a satisfying anwer. MTL itself doesn't seem to document that :(
Based on what Blender exporting/importing does, it seems that all these colors are linear RGB.
@lisyarus @artificialmind @dougbinks @breakin If you look in the OpenGL 1.x spec, it’ll give you the formulas for using them. OpenGL is based on the SGI library that MTL is from.
@lisyarus @dougbinks @breakin Looking into it!
@aras @dougbinks @breakin Thank you!
@lisyarus open source is really nice when it's working correctly