Support for realtime lights

Hi again !
I’ve seen that only realtime directional light are exported with Needle. Will realtime point lights (or spots eventually) be supported in the future ?

Original Post on Discord

by user 615280976855171083

My bad, it works now. I think was due to not having a lighting settings with “Realtime Global Illumination” enabled. :sweat_smile:

by user 615280976855171083

Hi, punctual lights should all be supported - point, spot, directional
Area lights are not supported (but of course you can bake them into Lightmaps before exporting)

Yes, I don’t know how but I got a test scene where all my lights were very very weak in the web export, even with basic material given to objects. But once I got back on your sandbox scene everything was working as expected.

by user 615280976855171083

I see
If you can repro / it happens again let us know please!

I’m having the same issue again… :sweat_smile: This time the scene is pretty basic and I didn’t play with random settings everywhere. But unfortunately, the Point and Spot lights are very very weak on the web compared to Unity.

by user 615280976855171083

by user 615280976855171083

Only the directional works correctly.

by user 615280976855171083

Interesting. You’re on URP + Linear lighting, right?

Linear yes, but not sure about URP or Built-in.

by user 615280976855171083

It’s weird because I have another scene in the same Unity project where the Point light working as expected, but the Spot light is slightly weaker.

by user 615280976855171083

I tried using the same shader/material as the sandbox “UnityGLTF/PBRGraph” but no difference.

by user 615280976855171083

URP isn’t installed, so I guess I’m in Built-in. However the CollaborativeSandbox sample is in the same configuration and doesn’t have light issues. :open_mouth:

by user 615280976855171083

Mind sending the bug report as zip?
image.png

Yes ! I was about to install URP to check, but I’ve only installed the package, not yet configured. I’ll send you the scene ZIP right now.

by user 615280976855171083

Is it a private or public channel here ? :eyes:

by user 615280976855171083

As in: Should I send you the ZIP here or by PM ?

by user 615280976855171083

This one here is public, feel free to DM :slightly_smiling_face:

Alright, so it seems that Needle Engine converts light values as if they were always from an URP rendering. Once converted from Built-in to URP, the lights are working properly (despite orange being a bit weird but both Three.js and Unity have their way to manage light and shadows).

by user 615280976855171083

In Built-in, the intensity values are often close to 1, whereas in URP we must crank up to 100.

by user 615280976855171083