View Full Version : How can I find the light intensity on a surface?
04-17-2001, 06:33 PM
This is my first post to this discussion group so I hope I'm in the right place! I am working on a simulation where a tree grows. The tree grows and branches when a branch is collection a certain amount of sun energy. I want to get this data by determining the intensity of the light hitting the leaf surface. If a leaf does not produce enough energy, its branch eventually dies. Considering this, I cannot just us the angle between the surface and the light source-- I need to consider if the sun is being blocked by other surfaces (branches, leaves, the ground, etc). Can anybody help with this? Thank you ahead of time.
04-17-2001, 06:52 PM
seems like you need a raytracer http://www.opengl.org/discussion_boards/ubb/smile.gif
There's no way that I know of to query OGL for light intensity, but if you're doing lighting by hand, the overall colour contribution could be considered the intensity. Will take some sweat, tweaking and plain old magic, but off the top of my head I think it just might work.
04-17-2001, 08:43 PM
A ray tracer isn't the best way to go about the problem. He needs something more like a radiosity engine. Unfortunately, I don't know where to get one.
Well, If you ask one of us who develope high fps games in realtime, the possible answer would be to try to approximate some nice guess-algorithms to produce a result that satisfy the eye, given some arbitrary environment variables such as sunlight.
Actually, for a simulator that only depends on the amount of light that a collection of leafs can allocate, expecting dead accurate results every time, this method might not work.
Although, there are some very nice mathematical theories on fractals and topography that can deduce possible solutions to a system using a basic tree with a basic branching system using only the positions and intensity of the light emitted, but its nothing that OpenGL can do for you.
Especially when using reflected and semi-absorbed frequencies of the light including what colors (frequenccies of light) will produce the most sugar (glukos) hence make the best branching of a tree giving a season bound movement of the light including environmental changes such as rain, fog, clouds, night and day etc..
Living things however, does not conjure up very well to suit an artificial algorithm using a finite set of inparameters.
It will always be the other way around because of the difference in flops and memory of a manmade computer and the reality we live in.
Skip the entire text written by me from the beginning of this post and start reading from here:
Search the web for mathematic algorithms using raytracing and organic simulation.
04-19-2001, 01:41 AM
Searching for Francois Sillion and Cyril Soler on the web gave some interesting links: http://www-imagis.imag.fr/SOLEIL/
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.