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 / Confused with Default lighting and shadow mapping...

Author
Message
marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 23rd Feb 2009 15:17 Edited at: 23rd Feb 2009 15:24
I didn't create any lights but it seems to me that there is light.
I just noticed that in this pic..

there's a dark portion on this means which means no light hit it

while on this side

this part is lighted and the colors are there which means light has hit it.

But, i didn't create any light. How do i fix this?

Here's the code without the lighting..


I added SetShadowMappingOn(1) and I still see a lighted portion.

NewCode:


I added a red point light and i get this. There's a white portion that's supposed to be red.


I added a dbRgb(255,255,0) light with 30 range and i get that white portion.


I also noticed that by adding dbSetShadowShadingOn(1) that the triangle count increases from 232 to 2088. Is this natural?

When a person has nothing but a dream, can he dare to dream.
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 23rd Feb 2009 18:28
There is "light 0" if im not mistaken
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 23rd Feb 2009 18:39
Shadow Mapping will not affect the light intensity shading, only creates shadows.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 23rd Feb 2009 19:53
Light 0 is created automatically. Just modify that or turn it off.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 23rd Feb 2009 22:43
Also try messing around with Normalization commands.

marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 24th Feb 2009 11:35
Ahhh..There is light 0.That makes good sense..NO wonder I see the objects color even without light..
Thank you for the info..^__^

Quote: "Also try messing around with Normalization commands."


Sry but I cant find any normalization command..What do yah mean?


Quote: "Shadow Mapping will not affect the light intensity shading, only creates shadows. "


I also noticed that by adding dbSetShadowShadingOn(1) that the triangle count increases from 232 to 2088. Is this natural?

When a person has nothing but a dream, can he dare to dream.
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 24th Feb 2009 16:42
Quote: "Sry but I cant find any normalization command..What do yah mean?"


Its somewhere in help file.

Try turing on and off using dbSetNormalizationOff() & dbSetNormalizationOn() . You can also set the normalization intensity.

jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 24th Feb 2009 18:24
Quote: "I also noticed that by adding dbSetShadowShadingOn(1) that the triangle count increases from 232 to 2088. Is this natural?"

Yes, if that uses shadow volumes. Basics principle: Clone all objects. Extrude these objects away from light. When drawing, check if pixel is inside these new objects, and if it is, its shadowed. Although that value still seems quite large :S
marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 25th Feb 2009 07:00
Quote: "Try turing on and off using dbSetNormalizationOff() & dbSetNormalizationOn() . You can also set the normalization intensity."


Thanks ^__^

Quote: "Although that value still seems quite large :S"

It has its advantages and disadvantages. I hope I'll be able to put it into appropriate use and make a good game.

When a person has nothing but a dream, can he dare to dream.

Login to post a reply

Server time is: 2024-09-30 19:24:39
Your offset time is: 2024-09-30 19:24:39