Currently, I am in the process of constructing a 3D hex grid and my goal is to integrate a fog of war feature.
This is a glimpse of what the grid looks like at present:
The lighting setup I have arranged is as follows:
// Setting up hemisphere light
var hemisphereLight = new THREE.HemisphereLight(0xffffff, 0.3);
scene.add(hemisphereLight);
// Configuring point light
var pointLight = new THREE.PointLight(0xffffff, 0.7);
pointLight.position = camera.position;
pointLight.rotation.y = Math.PI/2;
scene.add(pointLight);
I am aiming to create tiles within the fog of war that do not react to the pointLight
, instead only receiving the subtle illumination from the hemisphereLight
. However, I am encountering difficulty in achieving this. Modifying the tiles to utilize
MeshBasicMaterial</code, which disregards any form of lighting, is not an option because I desire the "fog of war" tiles to still reflect the lighting from the <code>hemisphereLight
.
I am open to suggestions on alternative approaches for implementing the fog of war concept.
UPDATE:
I managed to resolve the issue by utilizing a custom shader.