Qbasicnews.com

Full Version: complex light and shading question (2.25D)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Suppose that you have an Xmax, Ymax map of some object. Each point is (0 to 255). This represents height. 0 = lowest, 255 = highest.

Now, suppose there's a plane of light (or perhaps more...) that is adjacent to this map. The plane of light is at angle A1 to the map. The planes is tilted, like this:

Code:
/
/_

...and that would be angle A2.

Now, given the height map, with Xmax and Ymax, angle A1, and angle A2, how would one go about creating a light map?

The light map would have the same range as the height map, except that 0 represents total darkness and 255 represents direct light coming from the plane.

Assume that there is some sort of refraction R (0 to 255) for all points on the map. (For extra smileys, assume there is an Xmax, Ymax refraction map)

The refraction value is multiplied by all points where light has hit (thus there are new rays from that point)

Refraction stops when the light of that particular point is at a threshold T (0 to 255).

:|
So...

What's the question?
how would one go about creating a light map?
I don't know much about this, but I think you have to obtain the value just using scalar product.
:|
Quote:how would one go about creating a light map?

Normals. ;*)
Code:
Normals. ;*)

Blarg. I suck at 3d math.