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.

Newcomers DBPro Corner / Dbpro - setting lup fog with Dark clouds

Author
Message
Kezzla
16
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 20th Feb 2011 10:35
Hi,
Im using dark clouds in a project and would like to be able to reduce visibility when it is night time, but still have the sky visible.

I want to use the fog command to achieve this however I dont know how to exclude the dark clouds sky with the command,

does anyone know?

also does anyone know what sort of lighting dark clouds uses?

Ive tried setting my models and matrix light flags and ambient flags to 1



when the light fades in the sky the objects are still just as visible and even if i manually change the ambient light level, it darkens the textures on the models, which is good, but the matrix remains unchanged. what am I doing wrong there?

thankyou
kezzla

Sometimes I like to use words out of contents
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 20th Feb 2011 18:02
DarkClouds doesn't actually project any light. It just creates a texture for the backdrop. You have to calculate where the sunlight should be coming from yourself, and then place a light there (or pass that value to your shaders as the light position.)

What I've done is calculate an orbit for the light along the same axis as the sun position in DarkClouds. (the x axis in my case) Make the player's position the center of the orbit so it lines up with the sun from DarkClouds. The sunrise and sunset in DC are at 6 AM and 6 PM respectively. So I reduce the light level by adjusting the light color as the sun lowers. At the same time I gradually lower the ambient light to a level that will make everything reasonably dark without making it impossible to see. Then do the opposite for sunrise.

Also, don't forget to SET OBJECT LIGHT Obj, 1 so your objects will react to the light. SET OBJECT NORMALS Obj can also help if you have any trouble getting an object to react properly to light.

Login to post a reply

Server time is: 2024-11-23 02:56:17
Your offset time is: 2024-11-23 02:56:17