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 / Camera Range Skybox

Author
Message
Master Man Of Justice
18
Years of Service
User Offline
Joined: 13th Feb 2008
Location: Between Insanity and Intelligence
Posted: 23rd Feb 2011 02:27 Edited at: 23rd Feb 2011 03:18
Ok, so i have fog running, and without the Skybox, there is no fog in the air, only on my terrain.
[pic]
http://img1.uploadscreenshot.com/images/main/2/5220210549.jpg

I know this is due to camera range, but i want to have the fog hide the undrawn parts of terrain (done with setting camera range lower) but i also want to force the skybox to be shown in the camera that way the fog is everywhere within the skybox.

Also,
When i have the fog working properly (with camera range further) when i rotate and i look at the edges of the skybox, the skybox appears throughout the fog.
[pic of it buggy]
http://img1.uploadscreenshot.com/images/main/2/5221125128.jpg
[pic of it working]
http://img1.uploadscreenshot.com/images/main/2/5221152323.jpg

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Feb 2011 11:06
Not sure I understand exactly what you are after but if you want to see the skybox all the time just use "Set Object Fog" on the skybox object set to zero.

Master Man Of Justice
18
Years of Service
User Offline
Joined: 13th Feb 2008
Location: Between Insanity and Intelligence
Posted: 23rd Feb 2011 19:23 Edited at: 23rd Feb 2011 19:24
No, sorry i didnt explain right. I want the fog to be everywhere. Which works if:

A.) camera range is further then skybox
B.) Fog is *not* turned off on the skybox

But, i dont want the camera range to be that far, as fps gets decreased quite a bit. Also, when the camera range is that far and fog is on, if i look at a corner this happens http://img1.uploadscreenshot.com/images/main/2/5221125128.jpg which i fixed by rotating the skybox with the camera (bad solution but it works).

So how can i have fog in the skybox, without setting camera range that far.

[edit]
i have an idea, maybe if i have a big sphere, flip the normals, and put a completely transparent texture on it, and then set fog on in the sphere. or box.

Mr Bigger
21
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 23rd Feb 2011 20:00
Try increasing the number of poly's in your skybox.

If you want your camera range small you could try turning background on and color it the same as the fog.

AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Feb 2011 21:55
Yes you can use a skysphere to do this. Or you could edit the object "emmissive". Experiment with "Set Object Emissive".

Mr Bigger is right to an extent because fog doesn't work very well with low poly large objects.

You could also try using my Skybox/sphere maker "Enviroscope" to make skyboxes with fog already on them...
EnviroSCOPE

Rain Man
18
Years of Service
User Offline
Joined: 19th Nov 2007
Location:
Posted: 25th Feb 2011 06:35
Quote: "No, sorry i didnt explain right. I want the fog to be everywhere. Which works if:

A.) camera range is further then skybox
B.) Fog is *not* turned off on the skybox"


Why are you using a sky box? If you just want the fog color, why not just set the camera backdrop color to the fog color.

Ten minutes to Wapner.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Feb 2011 12:02
I was assuming that he was trying to make the sky less visible as the amount of fog increased at different points during his game.

Could be wrong though...

thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 25th Feb 2011 14:21
You should try simply coloring the backdrop the same color as the fog, and not having a skybox. If you did want to have a sky, you could disable fog on that object, and set the alpha to about 25 so it blends in with the backdrop. I think it is more realistic to not have a very obvious skybox if you're using fog, because in real life the sky would be completely obscured with fog. just my thoughts though, I'm really just guessing at how it would work.

Login to post a reply

Server time is: 2026-07-17 14:00:11
Your offset time is: 2026-07-17 14:00:11