PDA

View Full Version : lighting problem



lesni_bleble
05-13-2004, 11:27 PM
hello,

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)
lesni_bleble

jwatte
05-14-2004, 09: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)