Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Contest Entry: Unlimited lights and God-ray sources, hair shader #284818
08/15/09 10:48
08/15/09 10:48
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
G'day!

Well it's my first showcase of a project since my transition from A5 Standard to A6 Extra laugh

This is my entry into the Shader Contest.
In the demo you can see soft particles (actually sprites, because we can't apply shaders to particles yet) and God-rays from unlimited sources (local or global), as well as a hair-shader (not as in "fuzzy" hair, as in Anisotropic lighting based on the direction of hair-flow). Now, I know there are hair-shaders around, but I've never seen one, so this is what I came up with and I think it looks pretty good laugh There's also basic normal-mapping (I have always had trouble with normal maps form blender; LC and I solved one part of it earlier, but somehow I never realised that the red-channel was the wrong way around as well!).

If you have MRT support (the demo will figure that out for you and let you know if you don't, but according to a recent poll which surprisingly few people voted in "everyone" should support it wink ), you also have unlimited dynamic lights, soft lights, and "darks" -- occluders that are basically lights that take away light.

These occluders are very useful for soft drop-shadows -- I know it's fairly easy to have a sprite sit underneath you that looks like a drop-shadow, but these will occlude light from nearby objects and behave much more realistically than a moving sprite. Also, since each light/dark is actually a sprite, drop shadows can be very small, thus taking up very little screen-space, and run very fast (in my demo I could have well ever 100 before going below 60 fps). Attach them to your character's feet for good-looking soft light occlusion.



You can download it here, or from the Acknex resources page when George puts up the contest entries.

There's no gameplay, but if you want to see how many lights you can fit on-screen before you go below 60fps, or just want to see some of the effects then go for it.

Controls:
Standard default functions (F5 change res, F6 take screenshot, alt+enter fullscreen),
WASD move camera
QE move camera in and out
Cursor keys rotate model
1,2 -+ light
3,4 -+ ball
5 hide head
6,7 -+ sunlight
8,9 -+ tonemapping
0 enable/disable God-rays
- temporary smoke emitter
= enable/disable soft particles

The hair shader can be seen on the balls, on some plants in the background, and the old man's hair and eyebrows, although because his hair doesn't go very high you can't see the hi-lights unless you roll him over (up-down cursor-keys).

Okay, there you go. I hope you check out all the contest entries and see what some of the users here can do with shaders laugh

Jibb

PS: I forgot to include in that .zip file the Lite-C sourcecode to make it all work. There's not much, but you won't get far using the shaders yourself without it. I'll upload it soon.

PPS: I'm looking for work wink Shaders, art, models, programming, whatever laugh I'll post up a Job-seeking thread later.

EDIT: Lite-C source included as well now. Same link.

Last edited by JulzMighty; 08/15/09 10:56. Reason: Slightly updated file.

Formerly known as JulzMighty.
I made KarBOOM!
Re: Contest Entry: Unlimited lights and God-ray sources, hair shader [Re: JibbSmart] #284819
08/15/09 10:50
08/15/09 10:50
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
They're so neat!
I'll download this project soon. laugh

Re: Contest Entry: Unlimited lights and God-ray sources, hair shader [Re: Cowabanga] #284826
08/15/09 11:32
08/15/09 11:32
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i just downloaded this, i didnt see a main.c however

Re: Contest Entry: Unlimited lights and God-ray sources, hair shader [Re: darkinferno] #284828
08/15/09 11:51
08/15/09 11:51
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
There isn't one. testLevel.c is the main one (I normally use the name "main.c", but this was my first time using GED, and it made a .c file of the same name as the level).

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Contest Entry: Unlimited lights and God-ray sources, hair shader [Re: JibbSmart] #284934
08/16/09 00:02
08/16/09 00:02
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
year, finally we got a shader for anisotropic-highlights!
good luck (but not too much :P)

Re: Contest Entry: Unlimited lights and God-ray sources, hair shader [Re: Hummel] #284936
08/16/09 00:38
08/16/09 00:38
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:
good luck (but not too much :P)
Ha! I know what that means! Good luck to you too laugh

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Contest Entry: Unlimited lights and God-ray sources, hair sh [Re: JibbSmart] #284987
08/16/09 14:14
08/16/09 14:14
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
For those who didn't read README.txt, if you go to fullscreen and appear to lose some of your effects, this is because changing to fullscreen can be quite slow and so the render targets get re-initialised too early. Hit the "M" key to force-re-initialise the targets and get your effects back.

Jibb

EDIT:I will soon upload a slightly updated version with different sky materials (since jcl has already released an update that fixes the sky-shader bug). It's not a big deal, and it doesn't change the final result when you look at it if you're not compiling it yourself with the new update, but on the other hand it'll be more complete and useful to you guys if it contains sky-shaders functioning as originally intended, integrated with the deferred shading.

But in order not to cause any confusion with the download version being different to the "official" contest entry, I'll put it up once voting in the shader contest has concluded.

Last edited by JulzMighty; 08/18/09 15:39. Reason: update, but not new-post worthy

Formerly known as JulzMighty.
I made KarBOOM!

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