- Home /
Amount of light at a point?
I have a scene with cubes and some lights. Basic.
Is there any way to get the "lightness" or darkness of a particular point in the scene (x,y,z)?
Answer by Bunny83 · Jun 20, 2012 at 02:15 PM
Usually not. The lighting is done by the GPU at render time.
You could calculate the distance to each lightsource and calculate based on their intensity and range how much light would be at a certain point. Keep in mind that doesn't take shaddows into account, since shaddows have to be generated artifically.
That's always the big difference between the real world and a virtual world: Things that are easy or happens automatically in one world are hard to do in the other ;)
Another way would be to use a shader that generates a lookup-map. This might require another render pass and probably Unity pro.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
FPS keep a loadout 0 Answers
Assigning variables to GameObjects 2 Answers
Help with GuiText flickering code. 1 Answer