Lightmaps not bright enough

Hey, I am extremely new to Babylon and I found this thread when doing research on displaying residential units. Please forgive me if I am missing something obvious.
I am also not sure if I should ask this here or open a new thread :confused:

I have a question regarding the display of the used model. When comparing the output of: https://www.babylonjs-playground.com/#8EGGW2#2 and letā€™s say https://www.babylonjs-playground.com/#8EGGW2#9 the edges seem to be rounded (it all looks more natural). Does this all come from the use of Lightmaps or are there other tools/features being used to achieve that effect?
I tried to understand the Code from the Playgrounds but did not see where this ā€˜roundigā€™ effect is originating from.

Thank you in advance

Not really too sure what you mean by rounded, can you share a screenshot of both circling what you are looking into ?

By the way, Welcome to the community, we will find your answer ASAP !!!

1 Like

Hi there @sebavan

We have the very same problem with dark lightmaps.

Right now Iā€™m using Nuke in order to tonemap the lightmap to force it fit inside the 0-1 range of 8bit PNG files.

You mentioned that RGBD fancy thing and we would want to understand that magic. Investigating a bit, it seems the ā€œDā€ of that RGBD format is intended for depth, so personally I canā€™t understand how that would make PNG format to have broader luminance range.

Currently, the lightmap is generated in HDR file format, so we can do whatever is needed to it but to save it to PNG format and retain luminance values.

You wrote about that playground that converts HDR files into PNG RGBD format. But I canā€™t make it work.
Is there another way to create such wide range PNG formats?

Thanks in advance.

D stands for divisor and you can check the maths in our shaders:

Nope but would be great if you could provide a repro of it not working ?

Nevermind, I managed to make it work.
I wonder, though, if the resulting PNG can be converted to JPG as I donā€™t know if JPG supports RGBD formats. Because our converted PNG is like 20mb in size, and thatā€™s pretty much.

No, jpg canā€™t support RGBD because it does not support an alpha channel (and also because it is a lossy format).

1 Like

Unfortunately, my code guy says 20mb for a RGBD lightmap is way too much for downloading, so will stick to regular RGB format and JPG lossless.

Not sure why it is 20Mb as this would even be big for a full HDR file.

What size is it ?

The HDR file is like 30mb and the resulting PNG RGBD is ~20mb. Should it be more or less?

sorry I meant resolution of the png ?

It is 4k

yup pretty large and if there is a huge dynamicity the compression might not help much :frowning:

Well, Iā€™m completely new to lightmap generation (I come from offline rendering, so no need for them at all), but I thought ONE lightmap for everything in the scene would be appropriate, thatā€™s why I use one 4k file for it.

@sebavan Please excuse my late response. I looked at the scene again and came to the conclusion that the effect I was experiencing has to originate in the lightmaps that are used.

The original scene:

The scene with a Lightmap:

It seemed to me as if there was a bumpmap being used or something similar that changes the actual geometry of the mesh, but it is just the effects of the Lightmap tricking my brain

You should create a new topic to ask your question and link this page. Forum seems donā€™t notice reply or @someone if topic you visit is solved.

@joie ios only supports max 2k by 2k textures :frowning:

@Sarrus4x4 it looks more like you did not set an environment texture ???