Site menu
Login form

Our poll
What would you most like to see in the next version of SpaceEngine?
Total answers: 50596

Now on site:
Total online: 42
Guests: 41
Users: 1

Today visited:


Main » 2012 » October » 21 » Galaxy rendering update
Galaxy rendering update
Using Solaris's textures for dust sprites, I've upgraded galaxy rendering. Now the galaxies are using texture atlas with 8 tiles - 2 for emission sprites (glow) and 6 for absorption sprites (dust). I've also made some optimization, reduced the sprite vertex size twice, so now models of galaxies are almost less twice the disk space size. However, the galaxy models should be upgraded: reduce dust sprites size, making them more concentrated in the galactic plane, increasing model resolution (i.e. number of dust sprites), and making them follow inner edge of spiral arms, as it can be seen on Hubble's photos.

Here's the updated Milky Way. Amazing narrow details can be visible (first picture), but unfortunately the skybox makes them blurry (second picture):

The only way to save sharpness of the Milky Way is to ncrease resolution of skybox, but it will consume a huge amount of video memory. For Full-HD screen, it's resolution should be 1920*1920*6 = 22118400 pixels, and the floating point RGBA pixel is 4*4 bytes, so the skybox will consume 337.5 Mb. This is the reason why in 0.96 had a reduced resolution skybox, 33% of screen height, which for Full-HD is just 360*360*6, or just 12 Mb. This is controlled by parameter TRSkyResolution in main.cfg.

The second screenshot above is made with TRSkyResolution 0.5 (i.e. skybox consumes 27Mb of VRAM). You may ask, why not simply use a skybox? Well, take a look on FPS counter on the screenshots above. When skybox is disabled, my PC gives only 17 FPS, while when skybox is enabled, FPS is over 125. Transparency blending is a very expensive operation, that's why the galaxy renders so slowly, and that's why I should use skybox to improve performance. You can still disable skybox to take screenshots (even in 0.96, press Ctrl-M in the Debug Mode), but for normal interactive play it should be enabled.

PS: view on Milky Way from Earth at dawn (again with and without skybox)

PPS: Trying to simulate reddening of light from background caused by absorption by dust particles. Not a precise effect, some cheating involved (negative brightness of dust sprites instead of multiplying the background color on absorption color, as this is done for planetary atmosphere).

PPPS: Finally achieved good looking results!

Views: 589 | Added by: SpaceEngineer | Rating: 5.0/1
Total comments: 0
Only registered users can add comments.
[ Registration | Login ]