libgdx / fbx-conv

Command line utility using the FBX SDK to convert FBX/Collada/Obj files to a custom text/binary format for static, keyframed and skinned meshes.
Apache License 2.0
447 stars 116 forks source link

Emissive Property Fix #110

Closed widavies closed 5 years ago

widavies commented 5 years ago

LibGDX update 1.9.9 added support for loading the emissive property (not previously used) for 3D models. An issue with FBX-conv caused the emissive property to be set to the diffuse value or other random values and cause all models exported and loaded into LibGDX to appear white.

The bug is described in more detail here: https://github.com/libgdx/libgdx/issues/5529

This pull request contains a fix for the emissive property (by reading the emissive factor from FBX-SDK and multiplying it against each item in the emissive array) and an option to disable the emissive property all together if desired.

mgsx-dev commented 5 years ago

@wdavies973 is the disable emit option really necessary? If you don't want emissive, you just have to not set emissive in FBX materials.

Even if it's necessary, it'd be better to have a separate PR for this. Mixing a fix and a feature in the same commits/PR is not a good idea IMO.

Thanks for your contribution anyway :-)

widavies commented 5 years ago

I just added the disable emit option per a user's request in the issue thread. It's not required. Maybe the best option would be for users who want the disable option to just pull the binary from my fork for now.

I'll go ahead and submit a new pull request with just the emit fix.

You're welcome!