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 / Terain with Fog and blue Sky

Author
Message
Klaus R
17
Years of Service
User Offline
Joined: 10th Dec 2008
Location:
Posted: 28th Jul 2010 14:37
I'm using limited visibility and fog to obtain a decent frame rate while I'm moving through my large Terain. Is it possible to add a blue or cloudy Sky on top while you have fog all around you? Would Darkcloud extension make any difference?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Jul 2010 23:14
DarkClouds is great for a realistic sky and not heavy on the framerate although it takes a while to load your game...

Maybe a simple skybox would be enough for your requirements?

Check out my Work In Progress "EnviroSCOPE" it creates skybox images for you and is fairly easy to use (I think)... Oh, and it's free!

Also it uses some of the features of DarkClouds so you'll get an idea of loading times for your game if you are considering buying it...

Just click on my signature for the thread where you can download it

Rain Man
18
Years of Service
User Offline
Joined: 19th Nov 2007
Location:
Posted: 29th Jul 2010 06:48
Just remember to use set object fog ObjectNumber, 0 on your skybox.

Ten minutes to Wapner.
GeeBee
17
Years of Service
User Offline
Joined: 26th Aug 2008
Location:
Posted: 29th Jul 2010 15:51
Instead of a skyBOX, try a skyDOME (not sphere) - think of an upside down saucepan. Then adjust the fog distance settings as necessary. Ensure 'fog on' is applied to the dome. You will probably need to model the dome in a suitable application but is simple to do (ie flatten a sphere).

The skydome shape ensures the "sky" above the player is quite close, and less (or not at all) affected by the fog, whereas the fog density builds up gently and uniformly in all directions when the dome begins to slope down to meet the horizon.

This doesn't work with a skybox, as the linear distance to the corners of the box is greater than to the sides, creating a less pleasing effect.

The simplest misteaks are the hardest to spot.
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 29th Jul 2010 16:40
@GeeBee
Just disable fog and lighting on the sky box and it will work fine

[b]
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jul 2010 20:15
Quote: "Just disable fog and lighting on the sky box and it will work fine"


How can you get a fog effect on the skybox if you disable fog?

A demo would be nice.
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 29th Jul 2010 20:31
Having fog on a skybox defeats the point of the skybox. The texture should already have any affects such as fog and lighting applied as lighting and fog are meaningless, when every point on the skybox is theoretically an infinite distance from the viewer.

If you need to change the colour dynamically, then you should change the diffuse colour of the skybox.

[b]
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jul 2010 20:57
Er?

Quote: "If you need to change the colour dynamically, then you should change the diffuse colour of the skybox."


That won't work for the reasons given in GeeBee's post:

Quote: "The skydome shape ensures the "sky" above the player is quite close, and less (or not at all) affected by the fog, whereas the fog density builds up gently and uniformly in all directions when the dome begins to slope down to meet the horizon."
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 29th Jul 2010 23:15
@GG
Yeah, the transition from the normal sky to the fog colour should be already applied to the skybox texture

[b]
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jul 2010 23:40
How would you change it dynamically (without using messy image/bitmap/memblock/vertexdata commands)?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Jul 2010 00:06
Quote: "How would you change it dynamically "

At no point did Klaus R say he wanted to edit the background dynamically...

Mine and Diggsey's suggestions support what he wanted to achieve (I think), anyway EnviroSCOPE makes skyspheres too...

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Jul 2010 00:08
Quote: "How can you get a fog effect on the skybox if you disable fog?

A demo would be nice."


Granted... use EnviroSCOPE to create a skybox with fog already setup however you like...

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2010 00:13
I always assume that people need dynamic fog as well as dynamic lighting. That assumption is based on looking around outdoors once in a while.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Jul 2010 00:22
Never assume, it makes an ass of u and me...

You have provided some excellent ways of creating dynamic fog and lighting over the years so please don't be offended I just thought people were putting their own spin on the post and perhaps ruling out valid solutions to a far simpler question than they thought...

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2010 00:40
True.
Klaus R
17
Years of Service
User Offline
Joined: 10th Dec 2008
Location:
Posted: 30th Jul 2010 00:45
Thanks everybody for the great input. I will look into all those suggestions. I'm just trying to use a blue coloured objectplane that changes to the fog colour at the edges. Problem is that this plane has to move with the camera. I like the idea of the sphere and probably will try this next. Have anyone used Darkcloud with the fog effect before? I'm considering to buy this program but I'm afraid that it might not work well with fog.
Klaus R
17
Years of Service
User Offline
Joined: 10th Dec 2008
Location:
Posted: 30th Jul 2010 01:09
Probably there are many different ways doing the fog and blue Sky but it is a great learning experience to try out all those different thoughts.
GeeBee
17
Years of Service
User Offline
Joined: 26th Aug 2008
Location:
Posted: 30th Jul 2010 15:04
Klaus R

Quote: "it is a great learning experience to try out all those different thoughts"
.

Nicely summarised. If my contribution implied a single solution existed, then my apologies for poor wording.

The alternative solutions and individual contextual understanding of the question have both a. improved my own knowledge as well as b. reminded me of the difficulties of communication via text.

Thanks to all.

Sometimes a suggestion is just a suggestion, not an prelude to world domination...
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Aug 2010 11:27
Quote: "Have anyone used Darkcloud with the fog effect before?"

DarkClouds creates an image which is pasted as a background, it moves dynamically with the camera but is not affected by fog or lighting. I believe it might be possible to simulate a fog effect using the "DC Set Scattering" command but I haven't tried it yet...

Login to post a reply

Server time is: 2026-07-26 01:26:24
Your offset time is: 2026-07-26 01:26:24