I am working on a little runner-game made with three; i already asked last week how to generate a procedural terrain, now I would like to “light” it.
I’ve got some problems that I think are more related to my still low understanding of how the lights work.
I’ve got scene with :
- Three water enlighted by the three sky “example” I can move and change with the GUI
- A plane modified using a noise where I added GUI to change the shape of the thing (and understand how it works), as in the following codepen Pisoner 849 sent to me (https://codepen.io/prisoner849/pen/xxwdGGz)
- A road mapped with a mp4 texture
- A car
- Procedural trees
More simply, it looks like that :
What i’d like to is to make water light and terrain light match :
I already tried it several times, the roughness property, and I also moved standardmaterials to physicalmaterials, in order to use reflectivity.
I used an organisation as in the codepen above, because functions are quite easy to find.
My three sky is in a function : is it possible that it won’t work because models and objects are in other functions - I didn’t manage to separate water from the skybox yet but I think It’s because I’m a newbie.
My question is the folowing : how to create properly a skybox that affects all my models ? Does the skybox affects the models, or are the models affected by the skybox ?
Where should I search ?
Here is my file : app.js (6.4 KB)
Thanks a lot by advance !