gamedarwinia: digital sky - howto create similiar effect?

hello experts, do you know how to create this sky-effect from darwinia?
creating a texture with random bits and moving two/three quads with different speeds is no big deal, but how to create this blending / bleeding effect that looks like hdr rendering?
any idea? is it a sort of bloom? (and how do i do this?) help is appreciated!
regards, andre!

hmmm… when i first looked at the image, i thought you were going to ask how to fix the sky, not emulate it. perhaps the screenshot doesn’t do it justice.

bloom like this could be hacked with saturated additive blending or blurs of scene light emission. it depends on the target hardware how fancy you get.

cool bloom can be made by taking the image of the rendered sky or any other emissive objects, down-sampling it by 1/2 or so, then adding it back to the scene by way of a fullscreen quad, as a post-process effect.

you could also simple add little light-sprites of varying shapes and size to the cloud areas. clouds of additive blended sprites/particles can create some nice turbulent/bloom like light effects.

quad

thanks! i think i will have a try at additive blending!

why fix it? i found the effect to be cool! has a taste of retro feeling…

jepp, tried it:

glBlendFunc(GL_SRC_ALPHA, GL_ONE);

just does the job.

my first result:

pretty ugly :wink:

maybe i should a real skydome, like in this cool demo (from 2001!!)

http://www.gldomain.com/Programs/Terra3D.htm

>> why fix it? i found the effect to be cool! has a taste of retro feeling…

i didn’t mean any offense at all. i like the little village below, or whatever it is. i’m all kinds of into retro and all that :slight_smile:

cheers from the quad

>> pretty ugly :wink:

not really. the cloudy areas look cool, but the grid/lines make it look a bit busy… kinda cluttered… too much high frequency or something. maybe it’s just me…

actually, it looks like the first image is “fogged” to black in the distance, which tones this down quite a bit. perhaps that would help, a gentle fade to black or some dark background color in the distance, to even out the tones a bit. sometimes less is more.

yes, i want to do fogging!! but – i have problems with that… using

glFogCoordfEXT(0.0f);glTexCoord2f(0,0);glVertex3f(…);
glFogCoordfEXT(1.0f);glTexCoord2f(1,0);glVertex3f(…);
…etc

on the sky quads similiar to texturing seems to fix the fog effect to the quad orientation regardless on camera orientation/rotation… so if i rotate myself 180°, there will be no fog at the other end of the skyquad.

do i really have to calculate the value to glFogCoordfEXT every frame from the projection matrix?

No, just don’t use the fog coordinate. It is meant as an override to implement fog with variable density.

You shouldn’t put your camera transformation on the projection matrix. When you put it on the modelview matrix, fog works as expected without fog coordinates.

another problem with fog coords is that you need pretty good tessellation in your geometry to avoid some rather nasty visuals. if the eye is in the middle of 1 big quad, and you calculate the fog factor based on the vertex distance to the eye, it will be the same for all 4 vertices, so the entire quad will have a single constant fog factor, which is not very interesting imho. vertex based stuff usually needs decent subdivision.

if you do use the fog coord, remember to render the skyquad centered about the eye, so the eye relative fog factors remain fixed. the assumption here in that the sky is big enough and far enough away that you’d never really see it move anyway.

here is my current sky: i had to drop using fog, because fog simply does not work together with
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
except for completely dark backgrounds and black fog. in any other case the texture+fog does not blend to fog color in the distance.
so i decided to sudivide my big cloud quad into 10x10 quads and colored the quad vertices with decreasing alpha-values the farther the quad was away from the viewer. this works rather fine, as you can see in this screenshot. here i took a static skybox in combination with my moving texture clouds.
here is a demo file: 2006.04.24.sky.zip

here is my current sky: i had to drop using fog, because fog simply does not work together with
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
except for completely dark backgrounds and black fog. in any other case the texture+fog does not blend to fog color in the distance.
so i decided to sudivide my big cloud quad into 10x10 quads and colored the quad vertices with decreasing alpha-values the farther the quad was away from the viewer. this works rather fine, as you can see in this screenshot. here i took a static skybox in combination with my moving texture clouds.
here is a demo file: 2006.04.24.sky.zip

Nice job, Herc. That reminds me a lot of the sky in Unreal.

Another possibility is to use an alpha texture with a radial falloff instead of the subdivision. That’ll give you per pixel blendable alpha that you can modulate or replace in your texture combiner. You can use a texture “lightmap” for the coloring, too. But I’m not sure that’s what you’re after, and it might not really look any better.

@earthquad: yes! thanks for the advice! its finally time for me to try out multitexturing :slight_smile:
your method should speed up the rendering alot, i suppose, compared to subdividing into 100 quads?

i dunno about being any faster, 100 quads isn’t much these days. I’m rendering my sky/atmosphere with a skydome that has thousands of triangles in it. It really depends on what you’re doing and what kind of hardware you intend to use. Btw, what kind of hardware are you working with?

Textures can give you a bunch of extra “snaz” for very little effort. They can potentially make things a bit smoother for the gradient stuff, and they can give you some artistic freedom.

i’m using my laptop with a gforce 5600 running in energy safe mode - thats why there are only 20 fps in the screenshot :wink:

ah, that explains it :slight_smile: