Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
shadowmaps with alpha transparency #205773
05/08/08 17:31
05/08/08 17:31
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline OP
Expert
Joey  Offline OP
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
hi!

has someone an idea how shadowmapping could support alpha transparent parts? for example the windows in a church, which should let pass red, green or differently coloured lights. i'd settle for transparency on overlay textures (without the coloured, half-shadowed light stuff)... so if anyone has an idea...

i don't need gamestudio related stuff, abstract papers are ok. but they should be suited for realtime applications.

joey.

Re: shadowmaps with alpha transparency [Re: Joey] #205860
05/09/08 07:45
05/09/08 07:45
Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
W
Wicht Offline
User
Wicht  Offline
User
W

Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
If you use Models with Lightmaps (Ventilator's MeshPlugin) then it's easy.
Every Rendering-Package should have a option like: "Ray Trace Shadows" and "Ray Trace Transparency".

Re: shadowmaps with alpha transparency [Re: Wicht] #205868
05/09/08 09:05
05/09/08 09:05
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
I think that you mean realtime shadowmapping. It should be possible depending of how many of those parts are behind each other and then rendering several depthmaps. One without transparency for all of them and then always without rendering the nearest one to the camera. You would also have to store the color and the transparency within a texture. Then it is just doing the depthcomparation for each and blending it all together. But I guess that the whole stuff will be quite slow :P

Re: shadowmaps with alpha transparency [Re: Slin] #205894
05/09/08 12:55
05/09/08 12:55
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline OP
Expert
Joey  Offline OP
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
it would indeed be quite slow to render multiple depth maps...

Re: shadowmaps with alpha transparency [Re: Joey] #206006
05/10/08 03:57
05/10/08 03:57
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
one potentially ugly but potentially good-enough way if you only want one depth-map (which is always best) is to render a colour map from the light as well, but render it all grey (or black) except where the glass is visible (render it in its original colour).

then, when rendering the shadows, each pixel's shadow-colour is interpolated between the colour map and plain grey (or black), by a factor calculated using the pixel's depth behind the shadow.

i hope this is clear enough what i mean. it won't be accurate, but if done properly you could have objects close to the glass getting that colour, and it fading as it moves away.

for example: a white ball close to a red back-lit window pane will have a red shadow cast on it, but as it moves further away from the window the shadow fades to grey.

it's not great, but that's just under the one-depth-map constraint.

i think the best way to do stain-glass windows would just be to use a projected texture for each window.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: shadowmaps with alpha transparency [Re: JibbSmart] #206715
05/15/08 08:52
05/15/08 08:52
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline OP
Expert
Joey  Offline OP
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
that's a good idea. i have to look into this. thanks julz.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1