Looking for someone to help teach me lighting

blender also uses filmic tonemapping, in three that’s basically these two you’d always want to set:

gl.toneMapping = THREE.ACESFilmicToneMapping
gl.outputEncoding = THREE.sRGBEncoding

btw, if you have that gltf online somewhere i could take a look if you want.

2 Likes

is there a reason why rect area lights are so slow? can it be accelerated in any manageable way? and how do others fare, for instance babylon, is RAL for them also just something that is only feasible on the desktop?

I don’t know enough to fully answer these questions. What I do know:

  1. I don’t think Babylon has area lights at all (I searched the docs, couldn’t find them)
  2. I think Unity only allows them to be either baked or used in the deferred renderer (not the forward renderer, which is what three.js has). Again, not 100% sure about that.
  3. Unreal docs warn that rect light for moving objects is slow. Presumably if you set the light to non-moving only they will bake it.

Real-time area lights are not really area lights, they are just an approximation. But it’s still a lot of work. You can see the code three.js uses here

It’s a lot of extra code that runs in the fragment shader, i.e. for every pixel, every frame. Perhaps someone will come up with a faster approximation than this, but they will never be as fast as the other light classes.

I haven’t benchmarked just how slow they are, but in the meantime, I’ve internalized all of this as a heuristic: area lights are slow.

In terms of speeding them up, the obvious thing would be to a baking workflow. But that would only help with static scenes.

By the way @baze, sorry for slightly hijacking your thread here. I hope you’re still finding this info useful.

baking is something i will need to get into at some point. i hear it all the time and i see stunning examples, but no idea how i’d be able to pull it off. thanks for your explanations and sorry if i got carried away - it’s just so interesting to me!

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.