Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (TipmyPip, AndrewAMD, Quad, aliswee, degenerate_762), 970 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Gallery
Next Gallery
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Twilight Box #388496
12/03/11 21:13
12/03/11 21:13
5 Images
Joined: Mar 2006
Posts: 2,252
Hummel Offline OP
Expert
Twilight Box

New graphics demo inspired by Superku´s 2d shadowing technique. Originaly planed as a small side project this took me about a week longer to finish than expected. But it was worth the effort I think. laugh
The demo is designed to run under shader model 2.0 (or higher) without the need for multible render targets or floating point render targets. There are still a few things missing I planed to implement in the beginning,
even some fundamental features like loading/saving a scene but I had to stop at some point. I´ll probably make a more complete version sometime.

Key features:
- soft shadows
- self-shadowing (was trickier than one might expect)
- ambient occlusion

You can/have to create occluders on your own and move the light around (duhh tongue ).
There is a new video on my Youtube Channel which shows how to organize the occluders the way that you prevent light-bleeding artifacts which can occur due to the approximation nature of the whole shadow rendering.

Credits:
- eye symbol design by Nintendo
- original eye symbol graphic by BlindedFan103 (http://blindedfan103.deviantart.com/)
- inspiration for making this demo by Superku

And here is the download link to the demo: Twilight Box
Have fun!
Last edited by Hummel; 07/21/15 23:34. Reason: updated download link (thx to HeelX)
30 Comments
Re: Twilight Box [Re: Joozey] #453203
07/11/15 20:44
07/11/15 20:44
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
diggin' up this 4 years old topic.. link is dead ;_;
I could use a reupload if that's possible smirk


POTATO-MAN saves the day! - Random
Re: Twilight Box [Re: Kartoffel] #453311
07/19/15 09:00
07/19/15 09:00
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Sorry to bump that again but Hummel seems to be rarely online these days and didn't see my PM, yet.
I'd greatly appreciate if someone who's still got the demo could upload it.

Re: Twilight Box [Re: Kartoffel] #453346
07/21/15 21:00
07/21/15 21:00
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I found it on my hard drive. Here you go: http://www.filedropper.com/twilightbox

Re: Twilight Box [Re: HeelX] #453347
07/21/15 21:32
07/21/15 21:32
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
I forgot to say that Hummel recieved my PM in the meanwhile and will reupload it after fixing some bugs ^^'

But I told him to take his time so.. great that you've found it and thanks for uploading laugh

Edit: Well.. I've got some graphics glitches:
https://dl.dropboxusercontent.com/u/105854633/tw_box%202015-07-21%2023-46-36-799.webm
Looks like some kind of overdraw/z-sorting bug.

...I'd understand if you don't really want to fix it, though.
I'm gonna look into it in the next couple of days.

Last edited by Kartoffel; 07/21/15 21:59.
Re: Twilight Box [Re: Kartoffel] #453348
07/21/15 23:32
07/21/15 23:32
Joined: Mar 2006
Posts: 2,252
Hummel Offline OP
Expert
Hummel  Offline OP
Expert

Joined: Mar 2006
Posts: 2,252
Oh cool, I actually haven't found a working version on my hard drive.
One thing worth noting is that the rendering isn't gamma correct but I added a pow-term to the shadows somewhere which is reason why the gradients of the penumbras look kinda correct (I think).

Re: Twilight Box [Re: Hummel] #453351
07/22/15 07:57
07/22/15 07:57
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Thanks for pointing that out.

Btw, you might wanna apply a sine falloff ( COS((x + 1) * pi) * 0.5 + 0.5 ) to smooth off the hard edges of the linear falloff wink


POTATO-MAN saves the day! - Random
Re: Twilight Box [Re: Kartoffel] #453386
07/23/15 23:34
07/23/15 23:34
Joined: Mar 2006
Posts: 2,252
Hummel Offline OP
Expert
Hummel  Offline OP
Expert

Joined: Mar 2006
Posts: 2,252
You usually use x*x*(3-2*x) for that (a bit faster). To keep it physically plausible you shouldn't do that to your shadows, though.

Re: Twilight Box [Re: Hummel] #453398
07/24/15 12:34
07/24/15 12:34
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
If you assume that the strength of the emitted light is evenly distributed across the light source, yes.
A sine falloff would be correct if you assume that the light source is some kind of luminescent gas you can see through - so it's not entirely wrong imo.

I find it visually more pleasing to have a smooth falloff in this case. Just a matter of personal preference, I guess.

Edit: oh and that sine falloff substitute is pretty neat. didn't know such an accurate approximation exists smirk

Last edited by Kartoffel; 07/24/15 12:43.
Re: Twilight Box [Re: Kartoffel] #453405
07/24/15 19:06
07/24/15 19:06
Joined: Mar 2006
Posts: 2,252
Hummel Offline OP
Expert
Hummel  Offline OP
Expert

Joined: Mar 2006
Posts: 2,252
Quote:
If you assume that the strength of the emitted light is evenly distributed across the light source, yes.
A sine falloff would be correct if you assume that the light source is some kind of luminescent gas you can see through - so it's not entirely wrong imo.
True. Would be interesting to figure out the exact emittance behavior for a given falloff.

Btw, don't do this: (x + 1) * pi, instead: x * pi + pi;// mad(x, pi, pi), one instruction instead of two. wink

Re: Twilight Box [Re: Hummel] #453406
07/24/15 20:24
07/24/15 20:24
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Originally Posted By: Hummel
Quote:
If you assume that the strength of the emitted light is evenly distributed across the light source, yes.
A sine falloff would be correct if you assume that the light source is some kind of luminescent gas you can see through - so it's not entirely wrong imo.
True. Would be interesting to figure out the exact emittance behavior for a given falloff.

Btw, don't do this: (x + 1) * pi, instead: x * pi + pi;// mad(x, pi, pi), one instruction instead of two. wink
thanks again. yep, MAD.. now I see it.
Haven't gotten into d3d assembler enough, I guess ;(


POTATO-MAN saves the day! - Random
Page 3 of 4 1 2 3 4

Moderated by  jcl, Realspawn, 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