Shadows, Fog and Materials


This week I was looking into how to make my game more atmospheric. I practised implementing shadows and fog. First, I added fog. To do this I used an ambient light source and used the documentation on Three.js to guide me. This page was real help: https://threejs.org/docs/#api/en/scenes/Fog    I then saved this and used a new sketch to work on shadows. To implement the shadows I used directional light, I had to set boundaries in which the shadows could occur, and I had to rethink what materials I was using in the game, to use those than enabled shadows. https://threejs.org/docs/#api/en/lights/shadows/DirectionalLightShadow  

picture of cubes with fog

Experimenting with Fog

four boxes with shadows

Experimenting with Shadows