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 / problems with shadows - SET SHADOW SHADING ON object num

Author
Message
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Apr 2003 14:06
Hi everybody,

I'm testing the SET SHADOW SHADING ON command with a Radeon 9700 pro.

It works well with the example "basic3d6-example.dba.dbpro" that cames with DBPro, but I have two issues:

- I don't know why some objects don't produce any shadow, while others do. (I replace them in the example.)

- I have an 'skydome' object for the sky, but it dissapears (!) every time I turn on the effect on ANY object (and -in addition- the effect does not work, even with objects that did in the example).

Has anyone tested the command? Any suggestions?

Thanks in advance.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 28th Apr 2003 16:08
Morcilla, remember that the shadows are only cast by LIGHT number 0, not all your lights or ambient light. So if you want to "aim" your shadow, you must reposition this light, this works even if LIGHT 0 is hidden.

Current Project: Retro Compo. Entry.
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Apr 2003 18:50
Yep, I noticed that in the example and changed my code so, but I have identical results, thanks anyway for confirming me that Rob.

I use

set point light 0,sunx#,suny#,sunz#
position light 0,sunx#,suny#,sunz#
set light range 0, 100000

and it's my only light, along with ambient light, right? (I thought ambient and light 0 were the same)

I get no shadow, and the differences between objects issue and the sky dissapearing are still my problems.

I will do some more testing...

Any other idea please?
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 28th Apr 2003 19:38
"I thought ambient and light 0 were the same"

They aren't. You can have 8 lights in a scene (0-7) in addition to the ambient.

Current Project: Retro Compo. Entry.
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Apr 2003 22:23
well, some advance: the sky does not dissapear when I turn its ghosting off. However, I have some other ghosted objects in the scene and they remain unaltered...
Perhaps it is the order of loading or -when- do you activate ghosting.
Mmm.. still no idea.
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 29th Apr 2003 15:00
don't answer all at once! he he

Well, there is some conflict with having ghosted objects and shadowed objects in the scene at once:

Sometimes ghosted objects appear ghosted, sometimes not. No shadow anywhere... At least for my current project.

Thanks anyway
AtomR
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Portugal
Posted: 29th Apr 2003 18:09
Quote: "
Posted by Rob K
They aren't. You can have 8 lights in a scene (0-7) in addition to the ambient.
"


Is that still true to DBPro???

Take care
AtomR
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 29th Apr 2003 18:16
"Is that still true to DBPro???"

It's true of DirectX full-stop. That is where the limitation comes from.

Technically with DX you could have more than 8, but only so long as only 8 are turned on at once.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Apr 2003 18:55
"It's true of DirectX full-stop. That is where the limitation comes from."

Technically that it is not even a DirectX problem - the graphics cards cannot cope with more than 8 lights, or at least very few can. Lee has stated this many times, DBPro cannot make hardware magically appear.

Most lighting effects in games are faked if at all possible, scenery lights are done via lightmaps, which come in addition to the 8 lights. In racing games for example, your vehicles lights will be real but the ones on all the other vehicles will be fake.

Current Project: Retro Compo. Entry.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 29th Apr 2003 23:13
i still think DBpro should adopt point lights... i mean they're more annoying to manage per scene, might be a tad slower, and not have the same depth (be a lil buggy) as standard hardware lights. But would allow for alot more to be used per scene

once i finish my current project i'll be releasing a good few Vertex/Pixel Shader tutorials on howto construct them, howto use them in scenes and using multiple at the same time etc...
now that i've got my DBpro back up & running should make it easier to test them which is why i stopped for a while.

but the current tutorials i've almost completed are ->
- Point Lights
- Soft Shadows
- Rainbow/Cell/Membrane
- Raytracing
- Fur/Grass

have a few more i'm thinking about too... should be uploading the exe's for these demo's for testing on other systems relatively soon - but not within the next week cause i just have waay to much on

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?
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Apr 2003 01:26
"i still think DBpro should adopt point lights... i mean they're more annoying to manage per scene, might be a tad slower, and not have the same depth (be a lil buggy) as standard hardware lights. But would allow for alot more to be used per scene"

Raven, can you briefly explain what these are, all I know is that these are apparently used in Quake 3 maps and by the Quake 3 engine to do the various bountiful effects.

Current Project: Retro Compo. Entry.
The Wendigo
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 30th Apr 2003 01:42
Back to the main question: My luck only happens well with shadows if light 0 is a directional light. I then set its normals to 50,50,50 and have had no problems. This is probably a dumb question (like, is the power on type question) but you are using set shadow shading on for all the objects you want shadows. You don't need it on the objects that reflect the shadows (or whatever they do to show them)

<<Insert signature here>
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Apr 2003 02:49
"but you are using set shadow shading on for all the objects you want shadows. You don't need it on the objects that reflect the shadows (or whatever they do to show them)"

Only the objects that you want to cast shadows, you don't need to set shadowing on for objects to make them show up shadows cast by other objects, that happens automatically.

Current Project: Retro Compo. Entry.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 30th Apr 2003 04:15
point lights are just really software engine lights ... quake3 just uses a lightmap system with box projection to get the job done, where as DirectX 8.1/9.0 have these effects built in.

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?
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Apr 2003 17:01
TheWendigo, the example that cames with DBPro ("basic3d6-example.dba.dbpro") is using a point light, just what I want to use.

I haven't tried other kind of lights, but I suppose that they should work (Directional ones work for you).

Of course I only turn on the effect for the objects I want to see the shadow, but other ghosted objects are not ghosted anymore -some remain ghosted, don't know why-.

And how is that some objects cause shadow and others -with shadow also activated- do not.

In fact I've only seen the shadow substituting the loaded objects in the example, but the light configuration in my project is the same. And, as I said, some objects don't have shadow, even if I substitute them in the example.

I would appreciate any help. Thanks.

Login to post a reply

Server time is: 2026-07-12 00:07:50
Your offset time is: 2026-07-12 00:07:50