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.

Dark GDK / Obscuing Distance but not the Skybox

Author
Message
Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 15th May 2008 08:25
I have a large terrain, and by extension a large skybox, and I'd like to obscure (fog, blur, either one) objects and terrain some distance "d" from the camera's position but still be able to see the skybox. For example, anything more than 50 feet from the camera should blur say, but the background should be consistently detailed.

I looked at dbFog and apparently it isn't this kind of fogging. It seems to be a viewing range restricter. I'm curious how this kind of dilemma is commonly handled. Any advice would be appreciated!

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 15th May 2008 13:21
I'd try to use a very small skybox, only slighty larger than the camera minimum clipping distance.

Then texture this skybox with texture id=1 (lowest possible)

Then apply dbDisableObjectZRead on the skybox.

This should make that any other object, textured with higher IDs, to appear -in front-, that's ahead, of the skybox.

Haven't tried it with fog, but since the range of it will be much higher in distance than the size of the skybox, well, it shouldn't be affected by the fog.

Just talking by memory, I don't have full documentation at the moment.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th May 2008 16:39
This is a good technique however I too have had issues here, as you get the sky box to show.... (with dbObjectFogOff(skyboxobjid) I think... and then you want fog on terrain... so what happens make sense but is ugly.. and that is the fogged terrain "breaks through" the skybox as you travel. This is the same with Battlefield 1942 and the Battlefield Vietnam Redux... and .. it's not 100% ideal, but I have to say... by limiting camera range, accepting this "ugh" you can work toward keeping your frame rates up.

Now, I've tried some other tried and results vary... using things like a skydome hovering overhead, not half a sphere mind you, a flattened dome kinda... then the gap where its not "touching the ground" is just beyond the fog, and the colors coincide with my terrain fog and backdrop color... this is decent but depends on perpestive.. franky, in my REALLY large terrains, its weird, as the clouds follow you TOO much!

So, I have over time been more and more akin to sky sphere, (though I have a decent collection of sky boxes which would still work for my only feasible solution I thought of...) because of the ability to spin them etc... day/night whatever.

The idea of mine is not new... I am starting to its the only way for LARGE LARGE terrains... MAJOR MAJOR LOD implementations so the camera range can envelope a lot of realestate.... without killing your frame rates so much. To me, its seems to be this, or a modification of this maybe mapping terrain to have earth curvature to terrain rolls "down" out of view sorta on the horizon...

I know the best screenies I've been able to attain using skyboxes and skyspheres, was when I had an island that was totally visible within the skybox, and the horizon blended into the skybox... kinda far away.

So.. its a quandry, but the solutions very application to application... and one solution for game might not be right for another... so that's my 2cents.

Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 16th May 2008 00:14
I guess I still am a bit of a Dark GDK newb haha. I wasn't aware of fog on a per-object basis. I'll give Morcilla's suggestion a shot. One question Jason: LOD? That's not an acronym I'm familiar with. Does it stand for "Load On Demand?"

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 16th May 2008 00:24 Edited at: 16th May 2008 00:28
level of detail

edit:

decided I shouldnt let the wine win and should try to be a bit more helpful than that, telling you what the acronym stands for doesnt really tell you what it "is"

level of detail occlusion is a technique to improve frame rates by only showing geometry in detail depending on its distance. Objects far away can be removed completely, simple distance culling. Then when you get near enough to see it, but are still far away, you show a low-poly version of the geometry/object. Nice and fast to render because low poly, but the lack of detail doesnt show because you are too far away to inspect closely.

As the camera gets nearer and nearer you swap the object with more high detail versions so that someone right next to it will see intricate detail where they will notice - but those far away will be looking at a low poly model because its all they need

Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 16th May 2008 05:13
Many thanks for the definition. That makes Jason's explanation much clearer.

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris

Login to post a reply

Server time is: 2024-11-20 11:25:49
Your offset time is: 2024-11-20 11:25:49