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.

Dark GDK / dbSetShadingOff': identifier not found

Author
Message
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 16th Jul 2007 17:51 Edited at: 16th Jul 2007 22:32
So I see dbSetShadingOff does not exist, but stated in the help file. dbSetShadowShadingOFF does exist but does not work. So If a person wanted to turn of shading on a sky box, how would they go about doing so?

and why is the help file for dbSetShadowShadingOn mmissing the other 3 parameters?



also

I see that if I light my scene all faces facing the light are effected. So turning on shadows would make this look better. Say I have a simple maze mesh..



would turning on shadows for that mesh not be the way to have only the parts with the light look lit?

so my ending result would be..



goda love ansi art...


Attached is my test elf dude with a spot light facing away from the cam.

set up spot of (45,10)
a range of 500
a color of (255,255,100)

why is the back wall partly lit, and the top not. Seems I see the tri's when casting a light. But the mesh is not bent.

Attachments

Login to view attachments
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 16th Jul 2007 21:34 Edited at: 16th Jul 2007 22:38
also I wanted to attach this. All lights including the main light are off, yet a shadow exists. To make it even better there are two shadows. One for each mesh, even though one mesh is over the other.


Could any one explain to me why Dark GDK, needs "hardware specifically designed for this feature" (not sure what that really is) were others and most game engines do this with little effort? I'm sure there is a perfectly good reason for this, I'm just curious. I'm hopping I get to use shadows in my game, with out this feature it wont be very impressive. And I'm only talking about walls here. 300 polly's surly cant be that intensive.

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 17th Jul 2007 11:33
dbSetShadowShadingOff does not work? Uh, I haven't noticed that. You can always use dbSetGlobalShadowsOff to deactivate shadows.

The help file has missing the dbSetShadowShadingOn parameters because they are an improvement made after release. I'm sure they are explained at the DBPro forum.

Quote: ""...with a spot light facing away from the cam""

Be aware that only light 0 casts shadows. So perhaps you are getting the shadows from a source light (light 0) positioned somewhere else.

Quote: ""All lights including the main light are off""

Off? Watch out also because light 0 cannot be turned off, although it can be hided.

Quote: "...why Dark GDK, needs "hardware specifically designed for this feature""

Well, the graphic card must be able to manage a stencil buffer. Despite the different existing techniques for casting shadows, the most consolidated and spreaded one is the 'stencil buffer'. So any shadow casted with that algorithm needs a capable hardware. I don't know of any engine doing it effortless, but for sure there can be better and less better implementations.
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 17th Jul 2007 15:34 Edited at: 17th Jul 2007 15:37
Quote: "dbSetShadowShadingOff does not work? Uh, I haven't noticed that. You can always use dbSetGlobalShadowsOff to deactivate shadows."



dbSetShadowShadingOff didn't work on a piece of geometry I had in the scene. It still had shadows. The global option would not work, since I want to extract a few items from being casted upon.

Quote: "Be aware that only light 0 casts shadows. So perhaps you are getting the shadows from a source light (light 0) positioned somewhere else."
- I was not aware of that thx, Must have missed that in the help file. Currently my shadows are off, since the engine runs much like a 8086 with shadows on.

Will hiding the main light turn it off though? I get a dark scene but its not totally dark.

Yes 'stencil buffering' was what I used previously and it did handle it rather well. If I could turn off shadows on certain objects (not working), or cast them in one dirrection only, then I would be set.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 18th Jul 2007 11:47
If you don't want an object to cast shadows, then don't turn it on for that object.
If you really need to have them on and then off you can delete the object and re-load or have a dummy object that cast the shadow and have it deleted.

If you see that there is still light and all lights are hidden, then you are seeing ambient light.
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 18th Jul 2007 16:14 Edited at: 19th Jul 2007 16:05
Quote: "If you don't want an object to cast shadows, then don't turn it on for that object. "
- but it casts on all objects?? is this not correct. Oh would that rock.. but is so, why would it cast on ever thing I have?

Quote: "If you see that there is still light and all lights are hidden, then you are seeing ambient light."
- thx.

Quote: "If you really need to have them on and then off you can delete the object and re-load or have a dummy object that cast the shadow and have it deleted."
I may try this. Or possibly bake them a head of time and bled the shadow layer with my texture.


Another thing, since there is no documenting available yet.

does

dbSetGlobalShadowsOff();

turn off a GlobalShadow function or does it kill all shadows.

so if I did

dbSetGlobalShadowsOff();
then set this
dbSetShadowShadingOn (m_ship_01.getID());

is that the idea? Seems dbSetGlobalShadowsOff(); kills shadows permanently.

turning dbSetGlobalShadowsOn(); on does nothing to the scene.

another option that would work is set range. Looks like the dbSetShadowShadingOn has 3 hidden parameters but none work?

dbSetShadowShadingOn (34,0,0,0) the range (second param) is 0 but still casts shadows?

Do I need a certain type of light? I set the main to

dbSetDirectionalLight (0,0,0,0);
dbPositionLight (0,0,3000,0);

what exactingly is dbSetShadowPosition? There is no object to reference it by, so position to what?


Also attached is a question I was wondering if any one had an answer to. If I have a wall and it is two tri's I get this (see image)

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-29 01:17:51
Your offset time is: 2024-09-29 01:17:51