- Joined
- Jan 7, 2008
- Messages
- 5,814
- Reaction score
- 869
- Points
- 203
- Location
- Earth
- Website
- orbides.org
- Preferred Pronouns
- she/her
I'm working on new atmospheric rendering for OGLAClient, attempting to get a nice airshaded aerial view.
The problem is, i have little idea what it looked like, and have no measured pictures.
Maybe someone know where i can get images of mountainous terrain with visible air shading and known camera parameters?
Or, just know the constants for Earth?
What i came up with is below, which ones looks better?
Or, if they all look like total crap, how should it look?
HFO, height fall off, as altitude at which the haze is zero
DNS, fog density, as distance at which the haze is full
Algorithm:
Current view Himalayas:
HFO=10000 DNS=5000:
HFO=20000 DNS=5000:
HFO=5000 DNS=5000:
HFO=10000 DNS=10000:
HFO=20000 DNS=10000:
HFO=5000 DNS=10000:
HFO=10000 DNS=20000:
HFO=20000 DNS=20000:
HFO=5000 DNS=20000:
The problem is, i have little idea what it looked like, and have no measured pictures.
Maybe someone know where i can get images of mountainous terrain with visible air shading and known camera parameters?
Or, just know the constants for Earth?
What i came up with is below, which ones looks better?
Or, if they all look like total crap, how should it look?
HFO, height fall off, as altitude at which the haze is zero
DNS, fog density, as distance at which the haze is full
Algorithm:
Code:
float cwp=length(verglobal+vec3(0,rad,0))-rad-alt;
float fog_distance=length(verscreen)*exp2(-hfo*alt);
if(abs(cwp)>0.01){
float t=hfo*cwp;
fog_distance*=(1.0-exp2(-t))/t;
}
float fog_factor=exp2(-abs(fogdensity*fog_distance));
clamp(fog_factor,0.0,1.0);
color=(1.0-fog_factor)*fogcolor+color*fog_factor;
Current view Himalayas:
HFO=10000 DNS=5000:
HFO=20000 DNS=5000:
HFO=5000 DNS=5000:
HFO=10000 DNS=10000:
HFO=20000 DNS=10000:
HFO=5000 DNS=10000:
HFO=10000 DNS=20000:
HFO=20000 DNS=20000:
HFO=5000 DNS=20000:
Last edited: