Currently, I am immersed in a solar system project that involves the majestic display of planets and a rocketship orbiting gracefully around a radiant sun. Within this digital cosmos resides a main light source embedded within the following code:
// integrate subtle ambient lighting
var ambientLight = new THREE.AmbientLight(0x0c0c0c);
scene.add(ambientLight);
// introduce spotlight for shadow effects
var spotLight = new THREE.PointLight(0xffffff);
spotLight.position.set(-200, 50, 150);
spotLight.castShadow = true;
scene.add(spotLight);
An attempt has been made to imbue the sun object with an emissive property in order to illuminate the surrounding planets. While this endeavor succeeded in engendering a luminous aura around the planet, it did not quite transform the sun into a definitive light source. The code implemented for the creation of the sun object is illustrated below:
function createSunMesh(geom) {
var loader = new THREE.TextureLoader();
var planetSunTexture = loader.load("../assets/textures/planets/sun.jpg");
//var normalSunTexture = loader.load("../assets/textures/planets/moonbump.jpg");
var planetSunMaterial = new THREE.MeshLambertMaterial({map: planetSunTexture, emissive: 0xac3d25});
//bumpMap: normalMoonTexture
// fabricate a multimaterial entity
var planetSunMesh = THREE.SceneUtils.createMultiMaterialObject(geom, [planetSunMaterial]);
planetSunMesh.visible = false;
return planetSunMesh;
}
Hence, my inquiry pertains to the possibility of augmenting the strength of the emissive property of the light emitted by the sun, such that it exerts a more pronounced influence on the neighboring objects. Various attempts were made using both Lambert and Phong materials, yet the outcomes yielded similar effects across the board.