Since #5077 emissive is now implemented (which is good) but there is a serious drawback. Several devs have an issue with their 3D model rendering looking brighter than before because of emissive information in their model files.
First of all, this change breaks in some way and i think it would be great to add something like this in CHANGES.MD (kind of migration guide) :
[1.9.9]
- Emissive texture and color are now implemented in the default 3D shader. 3D models files(g3d, gdb, obj)
may have unwanted emissive information and have to be migrated in order to look as before. In Blender, any material
with "shadeless" option, non-zero "Emit." value or "emit texture" will look brighter or totally white. If so, you
have to export them again without these emissive information. A workaround is to remove all emissive information
programmatically in your game : material.remove(ColorAttribute.Emissive).
I investigated and it appears that migration guide above is not enough. I'm pretty sure this is a bug related to fbx-conv. I'm posting here to centralize information and make it easily available to libgdx users. Here is what i found :
If fbx-conv has to be fixed, it would be great to add a note about it in changes.md or another appropriate place to inform users about fbx-conv / libgdx version compatibility.
N/A
Can confirm - I'm having this issue as well. I downloaded sources for FBX-conv, and changed the "emissive" property to always write to [0,0,0], which fixes the issue and makes models appear as they do in LibGDX v1.9.8. I can provide this .exe and will also try to see if multiplying the "emissive" property by the "emissive" factor before writing the .g3db/.g3dj file fixes the problem as well. I will submit a pull request with the corrected version over at the FBX-CONV repo when finished.
Nice issue, can confirm. Fbx-conv fix very welcome!
Thanks for issue! I was looking for solution for a few days. It would be nice if fbx-conv could ignore emissive values eg. with some parameter. In one of my models it even duplicates DIFFUSE texture as EMISSIVE texture.
@mgsx-dev @Tom-Ski @wajrou
Pull request with fix & option to disable here: https://github.com/libgdx/fbx-conv/pull/110
Fixed binary available here if desired: https://github.com/wdavies973/fbx-conv/releases
Anyone know why this is inadequate to solve it? I have a model for which I've lost the original Blender file. I only have the g3db.
for (Material material : myModel.materials){
material.remove(ColorAttribute.Emissive);
}
I ran this and inspected the model in the debugger and it no longer has an emissive color attribute.
I mean it would technically fix it, but then you can't use the emissive
property. So I guess it depends on if you want to use the emissive property
or not.
On Wed, Jun 19, 2019, 6:41 AM cypherdare notifications@github.com wrote:
Anyone know why this is inadequate to solve it? I have a model for which
I've lost the original Blender file. I only have the g3db.for (Material material : myModel.materials){
material.remove(ColorAttribute.Emissive);
}I ran this and inspected the model in the debugger and it no longer has an
emissive color attribute.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/libgdx/libgdx/issues/5529?email_source=notifications&email_token=ACZBMS4A4XXPMBIBXO4G7FLP3ILNJA5CNFSM4GRPTQIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBSY4Y#issuecomment-503524467,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACZBMS6LTDPD2R7PHSFMA43P3ILNJANCNFSM4GRPTQIA
.
Correct. Problem was resolved via fbx-conv PR.
Well they haven't actually merged it yet for some reason, but I do have a
fork running with the fix.
On Wed, Jun 19, 2019, 6:50 AM Tomski notifications@github.com wrote:
Correct. Problem was resolved via fbx-conv PR.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/libgdx/libgdx/issues/5529?email_source=notifications&email_token=ACZBMSYPSQZTUC7IIG26QMDP3IMRRA5CNFSM4GRPTQIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBTP4Q#issuecomment-503527410,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACZBMS2OHNXWOXTWJD3X2VLP3IMRRANCNFSM4GRPTQIA
.
I merged this PR (similar cleaner PR) a few weeks ago.
Got it, thanks.
On Wed, Jun 19, 2019, 6:55 AM Tomski notifications@github.com wrote:
I merged this PR (similar cleaner PR) a few weeks ago.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/libgdx/libgdx/issues/5529?email_source=notifications&email_token=ACZBMS2MMDBWL6R6I77WCEDP3INCBA5CNFSM4GRPTQIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBT2NA#issuecomment-503528756,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACZBMS57KUQRNA4BCMV32OTP3INCBANCNFSM4GRPTQIA
.
What I mean is, I ran that code and my model is still white. I tried your fbx-conv.exe but it can't find the dlls it needs even though I have VC++ Redist installed (2010 among several other later versions). Maybe I don't have the version corresponding to what you built with? I don't know if that matters--don't use VS hardly at all. Thanks.
as discussed elsewhere, this issue require a new fbx-conv release in order to be closed, @Tom-Ski i think it's in your hands :-) (no pressure).
Can discuss on that repo.
The binaries should all be built, so no release should be required as its on snapshot.
Oh OK, i didn't see that, thing is https://libgdx.badlogicgames.com/tools.html still link to the old one but that's surely something that will be addressed in the new website.
Most helpful comment
Can confirm - I'm having this issue as well. I downloaded sources for FBX-conv, and changed the "emissive" property to always write to [0,0,0], which fixes the issue and makes models appear as they do in LibGDX v1.9.8. I can provide this .exe and will also try to see if multiplying the "emissive" property by the "emissive" factor before writing the .g3db/.g3dj file fixes the problem as well. I will submit a pull request with the corrected version over at the FBX-CONV repo when finished.