BlackSoftware

01-17-2004, 03:28 PM

I am attempting to find/create an algorithm in order to develop finite volume shadow rendering for any solid & for any number of lights. I wish to utilize the opengl matrix multiplications to optimize this process.

so far here is what I have devised.

make an orthoganal projection of the 3d object from the perspective of the light source.

perform a convex hull operation on this 2d projection.

take these resultant vertecies and compute the vectors between each and the light source.

based upon the brightness and attenuation of the light source determine the last relevent point on the projected vector.

form an edge from the two points on this vector (the one on the solid and the one projected) and combine them with the other computed edges to produce a solid.

use a collision detection algorithm to determine which other objects the shadow volume intersects and where they intersect on those objects.

construct a polygon of the same color as the object to paste over the intersected surface. compute the lighting for this polygon as if the light source did not exist.

if it is a point light source the shadows will be sharp but if the light source has a surface area the edges will be soft and of a varying degree of thikness depending on the surface area of the light source and the distance the object is from the light and the distance the object is from it's shadow.

once this operation is computed the resulting scene will fit into the pipeline until a change is made.

is this an acceptable algorithm for real time shadow mapping if it is selectivly computed for objects which take up more space in the scene than others?

do you have any Ideas on how I could make this algorithm fit into the pipline better?

thanks for your input.

-Collin Schroeder

so far here is what I have devised.

make an orthoganal projection of the 3d object from the perspective of the light source.

perform a convex hull operation on this 2d projection.

take these resultant vertecies and compute the vectors between each and the light source.

based upon the brightness and attenuation of the light source determine the last relevent point on the projected vector.

form an edge from the two points on this vector (the one on the solid and the one projected) and combine them with the other computed edges to produce a solid.

use a collision detection algorithm to determine which other objects the shadow volume intersects and where they intersect on those objects.

construct a polygon of the same color as the object to paste over the intersected surface. compute the lighting for this polygon as if the light source did not exist.

if it is a point light source the shadows will be sharp but if the light source has a surface area the edges will be soft and of a varying degree of thikness depending on the surface area of the light source and the distance the object is from the light and the distance the object is from it's shadow.

once this operation is computed the resulting scene will fit into the pipeline until a change is made.

is this an acceptable algorithm for real time shadow mapping if it is selectivly computed for objects which take up more space in the scene than others?

do you have any Ideas on how I could make this algorithm fit into the pipline better?

thanks for your input.

-Collin Schroeder