Plattar / gltf-exporter

Unity3D GLTF2 importer and exporter toolchain
Apache License 2.0
235 stars 31 forks source link

Lightmap export? #3

Closed fuzzy3d closed 4 years ago

fuzzy3d commented 4 years ago

How do I export 3D models from Unity, including lightmaps? Is it possible to export baked lighting?

I'm looking for a tool that allows you to burn lighting from a 3D scene and save it in glTF format - unfortunately 3DS MAX (with V-Ray) or Unity can calculate great lighting but do not have a glTF exporter ...

DavidArayan commented 4 years ago

Hello @fuzzy3d,

We do not currently support exporting lightmapped objects via the GLTF exporter. We found that you can get much better control over lightmapping in actual 3D modelling programs like 3DS MAX, MAYA, Cinema 4D etc..

The process we use is fairly straightforward. Perform the lightmapping in those programs and export the final FBX (with the maps baked in as textures). Import the FBX into Unity3D, re-attach the materials and export to GLTF. Our GLTF exporter should export all supported UV Channels for you.

Hope that helps!

fuzzy3d commented 4 years ago

Thanks for the reply. I thought that the lightmapping workflow in Unity creates a new set of UVW coordinates and new textures, so it is possible to export them to glTF. However, I will try the procedure you described.