Outerra forum

Outerra Engine => Development screen shots and videos => Topic started by: cameni on July 12, 2011, 05:07:10 pm

Title: Alien planet Earth
Post by: cameni on July 12, 2011, 05:07:10 pm
Rendering our planet using a different set of basic materials for fractal mixer, with changed parameters of atmosphere, sun and water.

Scattering of light in the atmosphere determines both the color of sky and sunsets. We can see a blue sky because the blue light is more likely to bounce off the air molecules than the green and even more than the red components of sun light. As the light from sun travels through the atmosphere above us, some of it gets scattered away from the ray and towards our eyes. The same effect is responsible for red sunsets - as the sun sets, light from it has to travel a longer way through a denser layers of atmosphere. By the time it reaches us, most of the blue and green light gets scattered away from the ray, leaving only the most persistent red component.

This effect is simulated in Outerra, and so we are able to play with it. What if the atmosphere consisted of different gases and the scattering characteristic was different?

In the following video we are showing planet Earth that was "alienized". The atmosphere in it scatters the green light best, which you can see not only on the sky itself but also on the shaded parts that are not lighted by sun but only by a portion of the sky.
The sun has got an orange shade, which you can see mainly on the horizon (the sun itself is too bright so looking at it directly saturates the color to white).
The absorption of light in the water has been altered as well - normally, the red light gets only so far in the water, when it almost entirely disappears. Here, the medium absorbs the green and blue light instead, letting the red one to penetrate into depths. Of course, since the water surface largely reflects the sky at an angle, the ocean appears to be green in the distance.

At the end there's also a short sequence with a red-orange atmosphere.

Alien planet Earth (http://www.youtube.com/watch?v=kHz6XkYDhtg#ws)

Here are some screens showing it under various settings:

(http://www.outerra.com/shots/alien/alien1.jpg) (http://www.outerra.com/shots/alien/alien1.jpg)

Milk water & yellow skies:

(http://www.outerra.com/shots/alien/alien3.jpg) (http://www.outerra.com/shots/alien/alien3.jpg)

Violet atmosphere:

(http://www.outerra.com/shots/alien/alien4.jpg) (http://www.outerra.com/shots/alien/alien4.jpg)

No atmosphere (or no atmospheric scattering). This is what you'd get for example on the Moon:

(http://www.outerra.com/shots/alien/alien5.jpg) (http://www.outerra.com/shots/alien/alien5.jpg)
Title: Alien planet Earth
Post by: C. Shawn Smith on July 12, 2011, 06:58:44 pm
Man, that last picture is creepy accurate, except without the traditional "gray" of the moon surface.  Interesting that the shadows contain no colorization, just like the real moon.

The water in the video look pretty creepy too, and VERY realistic.

Very impressive!
Title: Alien planet Earth
Post by: Jagerbomber on July 12, 2011, 07:25:13 pm
Awesome, though I'm kind of wondering... is this still with the green grass texture?  Unless something is really strongly filtering the color of something, I don't get how the grass would be such a drastically different color (at least up close), especially on the no atmosphere one.  Of course if you try to explain it to me (again?), then I probably wouldn't understand it.  :lol:
Title: Alien planet Earth
Post by: RaikoRaufoss on July 12, 2011, 07:27:00 pm
I love the picture with the violet atmosphere.  And shawn, of course the moon doesn't look like its traditional grey yet-I imagine that's still a long way off.
Title: Alien planet Earth
Post by: ZeosPantera on July 13, 2011, 12:00:07 am
The video looks like a version of Outerra from 2003.. Still the waves look impressive all be it too shiny smooth on top.

The no atmo shot is awesome.


Also why make any screens smaller then 1920x1080?
Title: Alien planet Earth
Post by: cameni on July 13, 2011, 01:38:02 am
Quote from: Jagerbomber
Awesome, though I'm kind of wondering... is this still with the green grass texture?  Unless something is really strongly filtering the color of something, I don't get how the grass would be such a drastically different color (at least up close), especially on the no atmosphere one.  Of course if you try to explain it to me (again?), then I probably wouldn't understand it.  :lol:
I wrote that there is a different set of base materials used :)
I picked them semi-randomly from cgtextures.com (http://www.cgtextures.com/), they've added a great service recently by providing tiled versions of textures, and that was all we needed.
It would be no problem to make a grayish moon as well.

Still, without the vegetation the world looks smaller and somewhat bland, or so I understand Zeos' 2003 :)
Oh and why the screenshots are 1280x720, well, that's the standard (windowed) resolution we are using when developing and debugging, and when I see something interesting I simply hit F8 (built-in screen capture) and continue debugging, and usually that's the material I then have when publishing something in development screenshots and videos section. But I'll try better next time, I understand that for immersion you'd want to have a full-screen view.
Title: Alien planet Earth
Post by: PeterBitt on July 13, 2011, 02:00:59 am
great to see some other textures in outerra :D
Title: Alien planet Earth
Post by: necro on July 13, 2011, 04:57:05 am
cool, what would it look like for other settings like the uranus or mars? I guess you are controling the wavelength-absorption by the Kr-vector

//vec3 Kr = (0.247, 0.533333, 0.353);  //alien
//vec3 Kr = (0.271, 0.525, 0.890); // uranus
//vec3 Kr = vec3(0.666, 0.573, 0.282); //venus
//vec3 Kr = vec3(0.662, 0.509, 0.196); //mars
Title: Alien planet Earth
Post by: cameni on July 13, 2011, 05:03:57 am
The coefficients we use are of ß scattering, for Earth it's set to 5.8, 17.0, 41.0 (x10-³).
Should be equivalent to yours after recomputing using Earth's values.
Title: Alien planet Earth
Post by: necro on July 13, 2011, 05:14:50 am
aye, earth should be something like (0.15, 0.2, 0.55)
Title: Alien planet Earth
Post by: cameni on July 13, 2011, 06:07:36 am
Hmm, ratios between the individual components vary wildly there. Btw where did you get the numbers from?
Title: Alien planet Earth
Post by: necro on July 13, 2011, 06:53:51 am
i did some researches with webgl before and found this site:
http://codeflow.org/entries/2011/apr/11/advanced-webgl-part-1/

his shader was working with these values, and they fitted the expected result. Especially for the earth, the values should work
Title: Alien planet Earth
Post by: cameni on July 13, 2011, 08:06:12 am
That's O'Neil's scattering approximation. Not very accurate and requires a bit of tweaking to get the expected colors, you usually get them too dark first.
Anyway, the numbers for Mars don't seem to be right at all, it's got a blue atmosphere tinted green, but the values suggest it's red-orange. It's probably trying to match the color of horizon when there's a lot of dust dispersed in the air. That's why I was asking where the numbers are from, as the values for Earth can't be matched directly and thus recomputing the other values using the obtained coefficients would lead to even wilder results.
Title: Alien planet Earth
Post by: necro on July 13, 2011, 09:19:02 am
cool, thanks for that information. Yah, thats O'Neils approxmiation. So which one are you using? His Paper is the most reputated work in this area (til now, maybe you could change this anytimes :P) I'm curious wether and how Patrick Cozzi is teaching this part.
Title: Alien planet Earth
Post by: cameni on July 13, 2011, 09:29:53 am
You should check out Eric Bruneton (http://www-evasion.imag.fr/Membres/Eric.Bruneton/)'s work in this field. O'Neil's approximation was the first one usable on graphics hardware that really tried to make a physically based atmosphere.

We are using approach inspired by Eric's work. There was a comparison (http://www.outerra.com/forum/viewtopic.php?id=144) between the new and old model we used, that was based on O'Neils approach (and heavily tweaked).
Title: Alien planet Earth
Post by: necro on July 13, 2011, 09:49:53 am
yap, i saw the pictures some months before. Does erics shader decrease the performance significantly? Eric did also some other incredible stuff like water and vectorbased roads. It seems that you are using his techniques >_>
Title: Alien planet Earth
Post by: cameni on July 13, 2011, 10:14:02 am
The shaders are heavier, that's why I implemented it differently, sacrificing some minor effects. O'Neal's shaders had many difficult corner cases so I was constantly looking at how to make it better.

As for his other work, there can be only some generic similarities. Water is done differently; he can't do shore waves that way and I wanted them or nothing :)

Vector roads are entirely different implementation-wise from the ones in Outerra, but that mainly relates to different architectures. Later he also added some fractal refinement inspired by Outerra, so who knows maybe it's all converging into the same thing :)
Title: Alien planet Earth
Post by: necro on July 13, 2011, 10:29:29 am
You are right. I never saw such good waves before. Yours are excellent. Actually you should write a book :P I would buy it
I implemented O Neills shader in the blender game engine, and it was very laggy in blender2.5 - same code on 2.49 was very fast. But surely i would never reach performanceregions as outerra actual does.

I wonder how an orbit-lift would look like in your engine. I guess, quite cool :P Things which are tasting the lower orbit are still missed in every engine >_> Arent they attractive for you :P? (even because they could be produced generically)
Title: Alien planet Earth
Post by: cameni on July 13, 2011, 10:38:39 am
Hah, no time to write a book. I'm glad when I can write a blog, and frankly, I'm often using it as a reference when later fixing or changing stuff, grumbling why I didn't bother to go into more detail there :)

Do you mean a space elevator?
Title: Alien planet Earth
Post by: necro on July 13, 2011, 11:10:15 am
yap that was the word i was looking for. Space elevator.