I am using the unity babylon exporter, using Unity 2019.3.14f1.
I bake the lightmaps in unity and they export fine, however the colours in Babylon look quite different. The lightmap texture looks fine.
Attached two images to show the difference, the Babylon lightmap always looks to have too much green, and never looks correct
Unity is set to Linear colour space as well.
If anyone has any ideas or suggestion?
I think it’s the real-time light contributions.
Is it mixed or fully baked lighting ???
Set use as shadow map to false
For mixed lighting
Set the directional light … lightmapmode to specular or shadow only
Also I recently started filtering meshes with lightmaps from the ambient light source as well… or set the ambient light source lightmap mode to specular or shadow only as well for those meshes with lightmaps only
I do all this for you in the new upcoming toolkit, but until then you will have to do this stuff yourself
Hi, thanks for the reply
Its mixed lighting, a bunch of area lights baked, then one directional set to mixed, and subtractive on mixed lighting setting.
You said to set direction light/lightmap mode to specular or shadow only, this is in unity? in the js file? ( im not a coder, just 3d )
In Babylon js…
Can you package up the project and send to me… I will try baking your scene
Hi Sorry for the long delay in replying, Yes we tried the suggestions and still the lightmap appears differntly in Unity vs Babylon.
The lightmap on its own looks almost correct but once the albedo is added it looks overexposed.
I will attach a package for you to test with
Thanks for the help
LightTest.zip (2.0 MB)
Using unity 2019.3.14f1
Normal render pipeline
unity left and Babylon right
What shaders are on the scene items in Unity… I just get purple missing shader color for everything ???
I had the same when i imported it to a new scene for some reason they went pink, but just set them to the standard material and it will be ok
We also tested the same scene with Unity WebGL and it came out looking correct, if that is of some use to you.
The global illumination looks a bit flat
Im afraid im loosing all the HDR ness from Unity .exr for the lightmap… I tonemap that HDR lightmap from a half float 32-bit per channel down to PNG 8-Bit per channel…
I already pack lightmaps as RGBD…
I gotta go over my Shader for exporting lightmap and double check i am not loosing too much HDR ness before i encode to RGBD
Babylon Scene So Far with the colored point lights totally baked (but flat looking):
Still workin on making lighting better
ok thanks for the update, at least we know its not something we were doing wrong. Let us know how it goes
Appreciate the time and help
Hi, another question for you.
Is there any way using the exported to export animations created in Unity ( using animator controller, clips ) and also to export blend shape animations?
We have a blend shape animation exported from blender direct to Babylon and this works fine, however when we export it to unity AND then export using your exporter to Babylon there is no animation. Just wanted to check if its supported or anyway we can resolve this?
That version does not do blend shapes.
The new version does
Thanks for the reply
Is there a way to get the new version or any idea when we can use it?
Yo @twhittingham … I think i finally got Total HDR Lighting working.
- Skybox Textures - Six Sided HDR Cubemap Face Textures (RGBD/PNG)
- Environment Textures - Prefiltered HDR Image Based Lighting (DDS/ENV)
- Lightmap Textures - Baked HDR Lightmap Textures (RGBD/PNG)
You Unity Scene Shot
Babylon Output With Baked HDR Lighting
The toolkit will be out soon… When Babylon 4.2 releases
Hello @MackeyK24 ,
Do you have any news for the new toolkit since babylonjs 4.2 was released?