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 / "Flat" contrast in colors

Author
Message
Yodaman Jer
User Banned
Posted: 22nd Oct 2010 02:08 Edited at: 22nd Oct 2010 02:08
Hey everyone,

I was playing around the with the sliding demo of Sparky's (I LOVE that dll!), and I noticed this slight problem that's really pretty annoying. No matter what I do with lights, I cannot get blacks to look completely black at all, and the colors look HORRENDOUS. It's like everything is in a greyish fog. This is actually a universal problem and isn't related to this specific program in Sparky's examples at all.

Here's an example image of what I'm talking about:



Does anybody know what might be causing this?

gbark
20
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 22nd Oct 2010 03:56
I think it's the ambient light that's causing that - Try turning it off.

set ambient light 0

With this, any objects that are not being directly lit with an actual light will appear pitch black.
Yodaman Jer
User Banned
Posted: 22nd Oct 2010 04:38 Edited at: 22nd Oct 2010 04:39
Thanks! That had the desired result!

New screen shot:




I would have used my own Sparky's test program, but it doesn't work quite right for some reason.

Yodaman Jer
User Banned
Posted: 23rd Oct 2010 23:53
Sorry for the double post.

I'm just curious. Does anybody else have this problem with Ambient Light in DBPro? Or is it just me? And if it is just me, could it have something to do with my graphics chip (I'm using my HP laptop to program)?

Thanks y'all!

Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Oct 2010 02:34
The same thing happens to me with ambient light-- it's normal . I think the real problem lies in the COLOR OBJECT command. If you're using the COLOR OBJECT to color your objects, the color might appear "washed out" (in my experience, at least). I'd suggest loading (or creating) a completely black image and texturing your object with that instead. The same goes for all other colors.

Good luck!


Guns, cinematics, stealth, items and more!
Randomness 128
19
Years of Service
User Offline
Joined: 13th Feb 2007
Location:
Posted: 24th Oct 2010 03:16 Edited at: 24th Oct 2010 03:17
The problem is that COLOR OBJECT only changes the diffuse colour of the object. The object's ambience colour will still be the default 255, 255, 255, meaning that ambient light will add grey to the object. This will make it look washed out and remove all colour entirely where the object isn't lit directly. Use SET OBJECT AMBIENCE as well as COLOR OBJECT to fix this.

Yodaman Jer
User Banned
Posted: 24th Oct 2010 04:06
Thanks guys!

Using Randomness 128's suggestion, I was able to make everything look as it should:


Proper Colors by coffeecoder, on Flickr

I am going to start using textures though, as I seem to recall someone once saying that textures consumed less memory than the COLOR OBJECT command (this is back when I was still using DBC).

Login to post a reply

Server time is: 2026-07-22 03:50:51
Your offset time is: 2026-07-22 03:50:51