How to improve lighting/coloring?

Ok. Well, already I do not know about rotation for a dir light in BJS? Let’s assume it’s translated to direction… Remains the scaling which I find a bit odd looking at the values. I don’t see how from this position/direction these values can lit the right wall. Let’s just wait for the expert, will we? :wink:

EDIT: Just to make this clear. You have absolutely no other light in Play Canvas. Not even a default. Only this directional, correct?

1 Like

Yes, if i turn off the directional light and also set the environment lighting to 0 the scene is pitch black

EDIT: I know you are not used to PlayCanvas but I’ll post the Light settings of the editor anyway:


(none of the attributes down there have any influence on the discussed effects)

PS: I also asked the PlayCanvas forum for help/ideas

1 Like

I don’t think so, it’s probably the direction of the light.

@Sarrus4x4 Do you have a live link for the playcanvas scene?

To me, it’s a matter of light direction and intensity. I tried some values:

Babylon (https://playground.babylonjs.com/#WRBQCP#43):

3js glTF Viewer:

There might be more exposure in play canvas usually default to “1 / 0.6” in model viewer for instance with aces tone mapping

1 Like

Yes, using 1.66 for exposure and using the exact same light direction and intensity than in the glTF viewer seems to mostly do it:

Babylon (https://playground.babylonjs.com/#WRBQCP#48):

3js:

1 Like

As it seems i can only share the scene, not the editor:

The Scene without Environment Lighting

The Scene with Environment Lighting (In the end, I’d like to recreate a similar look in Babylon. I know that there are still different environments set, but we should now all know that this is not (the only) reason for the more pale appearance of the Babylon Scene)

So if anyone knows how to reach that goal, feel free to spitball a bit :heart:

Even if this would not solve my problem as you told me… is there a way to adjust the gamma correction for the entire scene in Babylon? I could not find an attribute or feature in the wiki and ChatGPT is hallucinating like crazy on this topic :smiley:

Nope adjusting gamma correction is not something we support as it is not a parameter that should be relied upon. We either have our fast 2.2 conversion or we do support the bigger formula.

Regarding your issue the tonemapping in use might be in cause.

Using the same as PlayCanvas: https://playground.babylonjs.com/#WRBQCP#47 we have the same “tones”.

Babylon:

PlayCanvas:

Thank you! This looks very promising!

I’ll play around with this and see if I am able to recreate the look when also using the environment :slight_smile:

But the wall to the right is still darker then the wall to the left (whereas in the gltf viewer it is inverted).
Same as you, I also think it’s an issue around the direction of the light or may be even not quite the same type of light.

Yes, but it’s easy to make it the other way around:

I have only updated light.direction.x from 0 to 0.04.

Well, of course. But then now the left wall is not lit. I mean I would probably be able to set-up light to come very close to the play canvas version in a matter of minutes. But it will have nothing to do with the values set in play canvas. Reason why I thought it could just be a different light. It already has rotation instead of direction, what else could be different? As I said I have no faen clue, I do not use it.

@mawa the tone mapping was fully different.

Oh, ok then. May be the tone mapping makes enough for the difference. Anyways, since yours are already two on the case I won’t bother… Yours are the experts, after all :smiley: Have (all) a great day :sunglasses:

nah, always love your input @mawa even more cause with lighting every little plays a big part :slight_smile:

1 Like

I did not really find the cause of this, but I am relatively sure it has to do with some settings of my playcanvas scene that i don’t know about. I tried the default PlayCanvas model viewer, and it looked quite a lot like Babylon. I guess I’ll look for the cause in the PlayCanvas settings, or just accept it as is.

I said I would not answer anymore (but then of course, I lied :face_with_hand_over_mouth:)
I really see no way the gamma or tone mapping alone could make one wall not lit at all as compared to the original ‘play canvas’ lighting. I also don’t see how a directional light from this position, distance, intensity and direction can possibly light the room in the same way of the original play canvas screenshot.
To me, these are just different lights or a different env. set-up (with a default lighting adding to the light).
And then yes, if you ask me, unless you need to have both the same for some reason (like making an editor with integration), I wouldn’t bother and would simply set my lights in the scene/in bjs.
Of course, my opinion only and meanwhile have a great day :sunglasses:

3 Likes