View Full Version : lighting problem

05-13-2004, 10:27 PM

my 3d game draw scene without GL_LIGHTING enabled. for my 3d meshes i'm using multitextures - color-maps and lightmaps (precalculated object's radiosity). for local lights there are used volumetric spheres, which light-up objects around. my problem is how can i volume light up or down for whole scene. for example i'd like to simulate night. may be will help some faked fog, but i'm not sure how to solve this problem.
any suggestions please?

(sorry for my english)

05-14-2004, 08:21 AM
You have to separate "ambient" or "radiosity" lighting from "diffuse" or "direct" lighting. Then your engine needs to be able to control the contribution of each of these kinds separately. In a texture-only engine, using the fixed function pipe, you'd probably do this by using the texture environmetn constant as a light modulator.

If you use volumetric texturing for point lights, how do you make it so that the point light doesn't illuminate back-sides of meshes? (triangles facing away from the light)