Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Realistic Dynamic Shadows

Author
Message
BlackStone
22
Years of Service
User Offline
Joined: 5th Sep 2003
Location:
Posted: 20th Nov 2003 07:00
I am considering Dark Basic Pro for my commercial stealth game, however, I need to know if it has Dynamic Stencil Shadowing. (ala Splinter Cell, Hitman 2, MetalGear Solid 2).

If DBPro does offer something like this, looks like they can expect a check from me but if Darkbasic is unable to perform stencil buffer operations (i'm mostly interested in the shadows) then I'm sorry to say i may not be using it.

That is all.

-Does Asberger Syndrome make a genious or is it coincidence that geniouses have Asberger?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Nov 2003 09:30
Yes ... http://darkbasicpro.thegamecreators.com/

You could have found out in 5 minutes instead of waiting for 2 and a half hours for an answer
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 20th Nov 2003 13:06
DBPro has stencil buffer shadows & reflections... I suggest that you download the trial version and play around with them before you leap ahead with ideas of making a commercial game. It is most certainly possible, but not a 5-minute task.

A few notes about DBPro shadows:
- They are cast by light 0, you need to set it to a point light first using SET POINT LIGHT
- You must not put the camera inside the shadow volume (ie. the area in darkness cast by the object) - Carmack's reverse isn't used.
- the shadow command is SET SHADOW SHADING ON
- Self-shadowing has some issues, be warned.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]
las6
23
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 20th Nov 2003 13:52
uh, what happens if the camera overlaps the shadow volume?

Keyboard not detected. Press F1 to continue.
sybixsus
23
Years of Service
User Offline
Joined: 23rd Jul 2003
Location:
Posted: 20th Nov 2003 15:17
Quote: "- Self-shadowing has some issues, be warned."


Forgive my ignorance, but what is self-shadowing? And what are the issues?

Quote: "- the shadow command is SET SHADOW SHADING ON"


That command implies that shaders are involved. Do shadows work on any videocard that has support for the stencil buffer, or do they only work if you have a GF3 or higher ( ie : a card that supports pixel shaders. )
BlackStone
22
Years of Service
User Offline
Joined: 5th Sep 2003
Location:
Posted: 20th Nov 2003 16:26
Quote: "That command implies that shaders are involved. Do shadows work on any videocard that has support for the stencil buffer, or do they only work if you have a GF3 or higher ( ie : a card that supports pixel shaders. )"


To my knowledge, yes. Any graphics card that has an accesible stencil buffer can perform dynamic shadows. I'm not sure if there is any card with a stencil buffer that cant perform shadows.

And yea.... i see the shadows in the list now. It's hard to find anything on the darkbasic site nowadays.

Be cheezy, Be a pizza.
sybixsus
23
Years of Service
User Offline
Joined: 23rd Jul 2003
Location:
Posted: 20th Nov 2003 20:41
Quote: "To my knowledge, yes. Any graphics card that has an accesible stencil buffer can perform dynamic shadows. I'm not sure if there is any card with a stencil buffer that cant perform shadows.
"


What I meant was.. can any card with a Stencil buffer perform dynamic shadows in DB Pro or does DB Pro require the uses of shaders to create it's shadows.
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 20th Nov 2003 21:12
Moreover, the shadows generated automatically by DBP look a bit crisp. Anyone thought of a way to get nice smooth ones?

Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.
BlackStone
22
Years of Service
User Offline
Joined: 5th Sep 2003
Location:
Posted: 21st Nov 2003 01:11
Good luck with that

Stencil buffering isn't an easy task, let alone antialias them. If you have a vid-card that supports it (like my fx5200) you can set it to antialias and it takes care of that issue.

Otherwise... it would make the framerate awful (software antialiasing)

Be cheezy, Be a pizza.
BlackStone
22
Years of Service
User Offline
Joined: 5th Sep 2003
Location:
Posted: 21st Nov 2003 03:53
Can i set the shadows to be cast by other lights as well or is it exclusive to light zero?

I.E. can I declare a light object on each "lightsource" and have it effect the light of the objects around it (characters) and have them cast shadows or do i have to swap the light zero around to every lightsource in the area that is visible?

Be cheezy, Be a pizza.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st Nov 2003 13:47
Quote: "uh, what happens if the camera overlaps the shadow volume?"


Light and dark in your 3D world are inverted! - Eg lit surfaces become black and vice versa.

Quote: "That command implies that shaders are involved. Do shadows work on any videocard that has support for the stencil buffer, or do they only work if you have a GF3 or higher ( ie : a card that supports pixel shaders. ) "


Shaders are not required - the command name is indeed very misleading. A 24-bit stencil is required though, most cards support this, but I found a Radeon 7000-series card which produced some really weird results due to only having an 8-bit stencil support.

Quote: "Can i set the shadows to be cast by other lights as well or is it exclusive to light zero?"


It is exclusive to light zero.

Quote: "I.E. can I declare a light object on each "lightsource" and have it effect the light of the objects around it (characters) and have them cast shadows or do i have to swap the light zero around to every lightsource in the area that is visible?"


The shadows are calculated for all objects with shadow shading enabled using light #0 as the casting light when you call the SYNC command. You cannot move the light around and have different objects' shadows cast at different angles. It does not matter if light 0's light actually reaches the object, you can have other lights influencing the object, but the position of light 0 is used in the generation of the shadow volume.


Quote: "Moreover, the shadows generated automatically by DBP look a bit crisp. Anyone thought of a way to get nice smooth ones?"


Stencil buffer shadows *can* be smoothed, but it isn't easy. Basically all the pixels of the screen which are in the shadow volume (the area in darkness created by an object) are made dark (one way of doing this is to turn all lights off, render the scene, turn them back on and then render all of the scene again except the pixels in shadow).

The easiest way I think of doing smoothed shadows would be lightmapping, with low-poly objects and a modern PC you can create low-res lightmaps (eg 128x128) for use as shadows in realtime. The edges of the shadows are a bit blocky but they are very smooth. Have a look in the code archives on the Blitz site, there is one there.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]

Login to post a reply

Server time is: 2026-07-26 15:30:06
Your offset time is: 2026-07-26 15:30:06