Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / My and my (fake) shadows ;-) Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Colas Schretter

March 02, 1999, 05:00 AM

The phantom !

i have seen your realy kick ass 3d engine.

about shadows:
i have the same idea about shadows : using projective texturing and
modify the lightmap on the fly.
but i have read in your docs that this technique will not work in some special case :-(

i dont understand why

does anyyone explain please ?

to know what i talk about :
d/l the source code package wich containt many kewls and easy to understand docs
wroten by The phantom.

best regard

Colas

 
Phantom

March 02, 1999, 05:57 AM

Colas Schretter wrote:
>>The phantom !

The Colas Dude! :)

>> I have seen your realy kick ass 3d engine.
>> about shadows:
>> I have the same idea about shadows : using projective
>> texturing and modify the lightmap on the fly.
>> But I have read in your docs that this technique will
>> not work in some special case :-(
>> I dont understand why?

Well, first, this technique will suck on hardware
accelerators due to the enormous amount of modified
lightmaps that you would send to the card.

The reason that this will not work in some cases is this:
Suppose you want an object to be self-shadowing. This
may not be neccessary for the average 3D studio object,
but it is neccessary for the static geometry like walls.
Now, if you encounter a polygon, you draw it on the
lightmap. Then, you draw a polygon that shares an edge
with the previous one. Now the shared edge will be
partially black (thin black line), even if the light
spot would be right on this edge. So, this technique
will only work good for separate objects. Or, you could
use something like a winged edge structure to handle
these cases.

 
Colas

March 02, 1999, 06:55 AM



Phantom wrote:

>>Well, first, this technique will suck on hardware
>>accelerators due to the enormous amount of modified
>>lightmaps that you would send to the card.
>>

yes you are right. maybe we can use downsampled maps and use the
bilinear to zoom them.
but i'm designing an soft demo oriented engine so this technique fit for me :-)

>>The reason that this will not work in some cases is this:
>>Suppose you want an object to be self-shadowing. This
>>may not be neccessary for the average 3D studio object,
>>but it is neccessary for the static geometry like walls.
>>Now, if you encounter a polygon, you draw it on the
>>lightmap. Then, you draw a polygon that shares an edge
>>with the previous one. Now the shared edge will be
>>partially black (thin black line), even if the light
>>spot would be right on this edge. So, this technique
>>will only work good for separate objects. Or, you could
>>use something like a winged edge structure to handle
>>these cases.
>>

ok, So the only limistation is a noisy little bug no more ?
maybe we can perform an blur on the edge of the polygon drawed on the lightmap
then the blwk line will be smoothed (we can doing fake soft shadows then :-)
of simply draw an polygon a little bit smaller ? (skip the firt and last point of
each horizontal scanline)

Colas

 
Jaap Suter

March 02, 1999, 07:24 AM

Isnt it possible to render a completely new poly as the shadow? I mean a completely black one and do an alpha blend? This would be ideal for hardware support. The only problem is finding the shape of that poly but that would be the same as the one you use for you lightmaps?

Off the record: "It's becoming an: "ask the Phantom" dicussion group over here but i
don't mind and i already told other people to come over here! It's a very fast dicusiion
board and with a nice layout."

 
Phantom

March 02, 1999, 07:45 AM

Colas wrote:
>> yes you are right. maybe we can use downsampled maps and use the
>> bilinear to zoom them.
>> but i'm designing an soft demo oriented engine so this technique
>> fit for me :-)

In that case... :) Go ahead man.

>> ok, So the only limistation is a noisy little bug no more ?
>> maybe we can perform an blur on the edge of the polygon drawed
>> on the lightmap then the blwk line will be smoothed (we can
>> doing fake soft shadows then :-) of simply draw an polygon a
>> little bit smaller ? (skip the firt and last point of
>> each horizontal scanline)

The noisy little bug might be quite disturbing... Why not implement
the winged edge thing? That would work perfect. I would like to
implement a hybrid technique myself, with shadow volume rendering
for the large scenery polygons, so that the projected lightmaps
get clipped the usual way, and with drawing detail objects directly
on the lightmap. That way you have accurate shadows for the large
occluders, and fast inaccurate shadows on the large occluders by
the detail objects. How about that?
>>Colas

 
Colas

March 03, 1999, 05:45 AM



Phantom wrote:


>>The noisy little bug might be quite disturbing... Why not implement
>>the winged edge thing? That would work perfect.

what is the winged edge thing ?


Colas

 
Phantom

March 03, 1999, 06:34 AM

Colas wrote:
>> Phantom wrote:
>>
>>>> The noisy little bug might be quite disturbing... Why not implement
>>>> the winged edge thing? That would work perfect.
>>
>> what is the winged edge thing ?

I made this a new subject. Check it there.

 
This thread contains 7 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.