Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add support for THREE.HemisphereLight #26

Open
jaxry opened this issue Oct 2, 2019 · 2 comments
Open

Add support for THREE.HemisphereLight #26

jaxry opened this issue Oct 2, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jaxry
Copy link
Contributor

jaxry commented Oct 2, 2019

The renderer currently supports lighting in the form of our new HDRI EnvironmentLight, as well as Three's DirectionalLight. We'd like to continue extending this cross-compatibility with Three.js.

The most useful and straightforward to add would be Three's AmbientLight and HemisphereLight in the same way that we've implemented the DirectionalLight.

Inside envMapCreation.js we bake the various lights into an equirectangular texture that encompasses the entire scene. New code would specifically fit inside generateEnvMapFromSceneComponents

  • [FINISHED] Adding an AmbientLight would simply involve iterating over the entire texture and adding a constant color and intensity according to the AmbientLight.
  • HemisphereLight would be much the same, but you'd gradient the color across the y-axis as you iterate through the texture.

If you would like to take on this feature, let me know! I can help with any questions you may have.

@jaxry jaxry added enhancement New feature or request good first issue Good for newcomers labels Oct 2, 2019
@danielharvilik
Copy link

Hi, is this issue available?

@jaxry
Copy link
Contributor Author

jaxry commented Oct 4, 2019

Yes it is! Would you like to take a stab at it?

The relevant files include envMapCreation.js and the decomposeScene function. @lyonsno is currently refactoring parts of the file (#17), but most of the changes relate to directional lights, so merge conflicts should only be slight, if any.

@jaxry jaxry changed the title Add support for THREE.AmbientLight, THREE.HemisphereLight Add support for THREE.HemisphereLight Mar 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants