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 / Really good question bout dbpro's new features.

Author
Message
Wayne
23
Years of Service
User Offline
Joined: 3rd Jan 2003
Location:
Posted: 28th Mar 2003 07:32
How come I can see real time shadows and reflections in commercial games, but not on the one's I create, does dbpro process these features differently than most other engines?

Wayne
Never stop in the perseverance of knowledge.
The Key to life's secrets is on that road.
BoB Vila
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United States
Posted: 28th Mar 2003 08:43
you can do that in DBP, you just have to do stuff like, set shadow mapping on and set reflections on.

Bobvila.com made me take off my avatar! (dunno how they found out)
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 28th Mar 2003 18:33 Edited at: 31st Mar 2003 06:05
As far as I can tell from the showcase example for the various mapping and shading commands, even though it's say "Available" for all of the different features, it appears that "Shadow Shading" DOESN'T actually work for me (Radeon 8500, DPPro patch 4). The rest seem to do something different at least, although I'm not convinced they are all creating an "expected result". This showccase is cool and all, but it'd be nice if there was just a demo to "make sure things work as expected" demo too.

I just ran across the shading example, so I didn't run it with patch 3 so I don't know if this is a patch 4 problem or not.

Wayne
23
Years of Service
User Offline
Joined: 3rd Jan 2003
Location:
Posted: 29th Mar 2003 20:28
Bob, I know the commands , but DBPro says they're unavailable. But I have games running on my comp that use these features and they work.

Never stop in the perseverance of knowledge.
The Key to life's secrets is on that road.
BoB Vila
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United States
Posted: 29th Mar 2003 21:13
Oh, I'm a tard.. I miss understood.

Bobvila.com made me take off my avatar! (dunno how they found out)
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Mar 2003 21:15
"but DBPro says they're unavailable. But I have games running on my comp that use these features and they work."

Some commands are disabled in the demo.

Current Project: Retro Compo. Entry.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 29th Mar 2003 22:03
he's asking why Commerical/Retail games (like say Splinter Cell) he can see projected shadows and reflections, but they don't work in DarkBasic Pro on the same system.

the answer is because right now all of these effects are DirectX Unoptimised Hardware effects... supported in most 4th generation cards - unfortunatly most people don't have 4th generation cards which makes them as good as useless.

To create your own reflections though is quite a simple enough task, you first setup a sphere UV Map of the object you wish to do the reflection on - grab a texture which is kinda chrome like, something like a small sphere which i could explain howto make in Paintshop quite easily if you wanted.
But you should have some in Quake3 or something.

you then blend the textures in a memblock based on the UV points, remembering to scroll as it were the reflection one... then its just a case of doing an adverage of the two colour values
and believe it or not it is ALOT less demanding on the system than the builtin version.

shadows is a trickier matter however and i've not figured out a way as of yet to do it thoughout the entire world - i mean i know how it should be done with projection mapping, however howto have it consistant throughout the world until i get the DBO information is something i can't figure out because the matrix work differently to everything else.

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Wayne
23
Years of Service
User Offline
Joined: 3rd Jan 2003
Location:
Posted: 31st Mar 2003 05:59
i have the full dark basic pro rob.

Never stop in the perseverance of knowledge.
The Key to life's secrets is on that road.
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 31st Mar 2003 06:31
It's a shame noone knows what a "DirectX Unoptimised Hardware effects" is, or it might be useful information.

Reflections - take a look at the DBPro demo called Sphere Map. It won't work unless you have hardware that supports (whatever DBPro needs for) reflection shading. It appears to work on my Radeon 8500, but not on my GF2Go.
As far as DirectX support for "reflection" goes, it's all "smoke and mirrors". It is done using a "fake" texture of the world around the object you want to reflect on, and it is applied to the object using what is referred to in the DX docs as "spherical environment mapping" (or simply a sphere mapping of our fake world texture). The real trick is to make the "world" texture as good as possible, but it typically doesn't include anything but the sky, and maybe some "off in the distance" things in the scene that don't really move relative to the object. And the key to make it mapped realistically, is to always keep the texture fixed relative to the world - i.e. you move the sphere map along with the object but you don't rotate it along with the object. I'm new to DBPro and haven't delved into the capabilities (still trying to get simple things to work as expected), so I can't offer exact details on how to accomplish it.

Shadows - it'd be nice if "SET SHADOW SHADING ON" actually did something on either of my systems with DBPro patch 4, but it doesn't. I'm not sure what it's supposed to do, or if it's even supposed to work in patch 4 (or patch 3 or has ever worked).

As far as I can find, the DirectX SDK docs don't have any section on creating shadows, so as far as hardware support for shadows, you'd have to look elsewhere. "Real" shadows are a huge computational problem, so any solution in even the most modern vid cards are probably "easy appoximations" at best. Depending on what kind of shadows you want to do, and how involved the the lighting is in your scene, there are always ways to cheat. If for example, you have 1 light (the Sun, and it's always straight up from the scene), then you can theoretically just make a shadow under each object with a flattened sphere object that is dark grey. You can even make it partially translucent so that some of the ground texture shows through the shadow. Again, I'm too new to have actually had time to really play with these features (I'm annoyed that noone else has bothered to actually get into some "usable" detail, sample code or whatever, but hey, it's free forum advice).

If you come across a good technique, then post it here! If you come across some information about what DBPro does/does not ACTUALLY support or how these shading commands ACTUALLY work, by trial and error, or "insider" information (there seems to be a lot of that sloshing around, but it seems to be incomplete at best, and pure, undisclaimered conjecture at worst), then PLEASE post a topic about it and enlight all us duffers with newfound wisdom.

Thanks,

Ed

Login to post a reply

Server time is: 2026-07-21 20:34:22
Your offset time is: 2026-07-21 20:34:22