Sky

Everything about development and the OpenMW source code.
Post Reply
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Sky

Post by jhooks1 »

Hey guys,
I just ran a test without caelum turned on, I am getting 180fps in Beshara, I normally get 120fps in the same area. I might try something else, maybe a basic skybox.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Sky

Post by raevol »

Does Caelum give us any features we want to take advantage of? What sort of features do we need to have to support all the 1.0 features we need? The sky in Morrowind was absolutely one of my favorite things about the game, I hope we can replicate it 100%!
User avatar
Rhys
Posts: 113
Joined: 06 Aug 2011, 01:51
Location: Australia

Re: Sky

Post by Rhys »

Wasn't the original sky quite simple render wise? Something like a huge dome with some sort of sun-sky-atmosphere shader applied.
Another dome/mix texture with stars-night sky texture. Then some(2?) smaller domes (possibly much shorter and varying heights vertically to have a different perspective) with animated uv coordinates and probably transitioning(different density) cloud textures. Plus the sun circle and moon?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Sky

Post by Zini »

The first part of improving the sky implementation would be to fire up MW and make a list of all features needed. Then it needs to be looked into, if Caelum can easily be modified to provide these features (for some values of "easily"). If the answer is yes, we should keep Caelum. If the answer is no, then we should replace it.

I don't see the point in simply replacing it for now without doing these steps first. it is obvious that OpenMW renders faster if we take out a major rendering element, but that doesn't do us any good.
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Re: Sky

Post by ElderTroll »

There is also skyx and hydrax (for ocean). They are absolutely gorgeous, but I don't know how they fit into the 1.0 (no new features). But for skyx I think you'd have to replace the moon with whatever number and types moons are in morrowind.

*edit this is the ogre page for skyx and hydrax http://www.ogre3d.org/tikiwiki/SkyX

http://www.google.com/url?sa=t&rct=j&q= ... b8kjbclV-Q

http://www.youtube.com/watch?v=Jl2SYryvoPo
Last edited by ElderTroll on 13 Feb 2012, 05:04, edited 1 time in total.
User avatar
pvdk
Posts: 528
Joined: 12 Aug 2011, 16:34

Re: Sky

Post by pvdk »

Why not use the sky of dungeonhack? It's a simple skybox which is similar to the sky in Morrowind.

Edit: http://www.youtube.com/watch?v=Qgoxf8_5JwU
Yacoby
Posts: 119
Joined: 30 Sep 2011, 09:42

Re: Sky

Post by Yacoby »

ElderTroll wrote:There is also skyx and hydrax (for ocean). They are absolutely gorgeous, but I don't know how they fit into the 1.0 (no new features). But for skyx I think you'd have to replace the moon with whatever number and types moons are in morrowind.

*edit this is the ogre page for skyx and hydrax http://www.ogre3d.org/tikiwiki/SkyX

http://www.google.com/url?sa=t&rct=j&q= ... b8kjbclV-Q

http://www.youtube.com/watch?v=Jl2SYryvoPo
The issue with this is they would have to be toggleable. They look really nice but you need the machine to go with it.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Sky

Post by Zini »

@Yacoby: Agreed. We shouldn't lock out people with lower spec boxes. These are things we can look into post 1.0 as an optional feature.

@Everyone: Well, we can discuss this back and forth. But what really is needed is someone firing up MW, starring at the sky for a good long while and make a complete and definite list of all features needed. I think we can all agree on that we need to replicate the MW sky as flawlessly as possible (it's just to gorgeous to slack here). Things to look for are obviously background, celestial bodies (and their movement, as well as their colour change (Bloodmoon)) and clouds.
Then also the MW files need to be searched for sky-related textures. We will probably need to reuse most of them, which may put some constraints on later design decisions.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Sky

Post by scrawl »

Zini wrote:But what really is needed is someone firing up MW, starring at the sky for a good long while and make a complete and definite list of all features needed.
Features we need:

Rendering (in order of importance):
1. several skydome meshes (at least one for atmosphere and one for clouds)
2. an UV scroll animation on the cloud dome to move the clouds
3. billboards (camera-faced quads) to render the sun and moons
4. modulate the vertex colour alpha of the domes near the horizon (bottom-most row of vertices), to make them blend with the fog colour
5. A weather transition effect (probably involves blending 2 different cloud textures together)
6. a Sun flare effect (to properly detect if it is visible or not, we either need a hardware occlusion query or a polygon raycast) [1]

Backend:
1. a backend that calculates color modulation for atmosphere and clouds, as well as the fog colour
2. a backend that calculates the position (and visibility) of the sun and the moons
3. a backend that calculates a weather setting, depending on region and time
4. calculate the moon phases (based on date)

Caelum and SkyX should be dropped because they have no support for different sky domes (and render them completely different anyway) and don't support 2 moons.

Project Aedra already has a quite complete atmosphere and cloud rendering (but no sun and moons, and no transitions), they also have formulas to calculate light and atmosphere colours.

Textures and meshes used by morrowind (this list should be quite complete, i grep'd for 'sky' 'sun' and 'moon' in Morrowind.bsa):

Domes:
- sky_night_01.nif
- sky_clouds_01_no_tex.nif
- sky_clouds_01.nif
- sky_atmosphere.nif

Moons:
- sky_moon_small.nif
- sky_moon_large.nif
- tx_mooncircle_full_m.dds
- tx_mooncircle_full_s.dds
- tx_mooncircle_half_wan_m.dds
- tx_mooncircle_half_wan_s.dds
- tx_mooncircle_half_wax_m.dds
- tx_mooncircle_half_wax_s.dds
- tx_mooncircle_one_wan_s.dds
- tx_mooncircle_one_wan_m.dds
- tx_mooncircle_one_wax_s.dds
- tx_mooncircle_one_wax_m.dds
- tx_mooncircle_three_wax_m.dds
- tx_mooncircle_three_wax_s.dds
- tx_mooncircle_three_wan_s.dds
- tx_mooncircle_three_wan_m.dds

Sun:
- tx_sun_05.dds (Main sun texture)
- tx_sun_flash_grey_05.dds (Sun glare)

Cloud textures:
- tx_sky_ashstorm.dds
- tx_sky_blight.dds
- tx_sky_clear.dds
- tx_sky_cloudy.dds
- tx_sky_foggy.dds
- tx_sky_overcast.dds
- tx_sky_rainy.dds
- tx_sky_stormy.dds
- tx_sky_thunder.dds

I've started with a new sky renderer (without Caelum) in my branch 'weather'. Right now I have a basic atmosphere, moving clouds and sun (see attached picture)

[1]
- Hardware occlusion query: http://http.developer.nvidia.com/GPUGem ... _ch29.html , http://www.ogre3d.org/tikiwiki/Hardware+Occlusion+Query
- Polygon raycast: http://www.ogre3d.org/tikiwiki/Raycasti ... ygon+level
Attachments
sky.jpg
User avatar
pvdk
Posts: 528
Joined: 12 Aug 2011, 16:34

Re: Sky

Post by pvdk »

Nice work scrawl, looks good already.

However, you missed some textures:

Moons:
  • tx_masser_full.dds
    tx_masser_half_wan.dds
    tx_masser_half_wax.dds
    tx_masser_one_wan.dds
    tx_masser_one_wax.dds
    tx_masser_three_wan.dds
    tx_masser_three_wax.dds
    tx_secunda_full.dds
    tx_secunda_half_wan.dds
    tx_secunda_half_wax.dds
    tx_secunda_one_wan.dds
    tx_secunda_one_wax.dds
    tx_secunda_three_wan.dds
    tx_secunda_three_wax.dds
Particles:
  • tx_ash_cloud.dds
    tx_ash_flake.dds
    tx_blight_cloud.dds
    tx_bm_blizzard_01.dds
    tx_bm_snowflakes_01.dds
    tx_raindrop_01.dds
Skies:
  • tx_bm_sky_blizzard.dds
    tx_bm_sky_snow.dds
    tx_stars.dds
    tx_stars_mage.dds
    tx_stars_thief.dds
    tx_stars_warrior.dds
And you missed a mesh:
  • raindrop.nif
I think that's all.
Post Reply