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 / object behind object still lit with light

Author
Message
Maxentius
12
Years of Service
User Offline
Joined: 24th Oct 2012
Location:
Posted: 19th Mar 2014 20:47
how do I correct the issue where an object passes behind another object but is still illuminated by light? one example is a planet and moon illuminated by a sun with the moon passing behind the planet? I tried checking forums but maybe i'm searching the wrong questions, my DBPRO book doesn't explain the topic.

thanks
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 19th Mar 2014 22:29
try to change ambient light ("set ambient light value") or try "color light 0 rgb(0,0,0)"
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Mar 2014 23:04 Edited at: 19th Mar 2014 23:20
No, it's a shadowing problem. DBPro objects do not cast shadows by default - and it's quite hard to get them working correctly. There are various demos around.

You could have a look at the set shadow shading on command. Spooky posted a demo a few years back. I'll see if I can find it and post back.

Edit: Can't find Spooky's old demo - but here's another one. The code is in pcRaider's post:

shadow mapping demo



Powered by Free Banners
Maxentius
12
Years of Service
User Offline
Joined: 24th Oct 2012
Location:
Posted: 19th Mar 2014 23:26
thanks !

Login to post a reply

Server time is: 2025-05-14 01:02:02
Your offset time is: 2025-05-14 01:02:02