{"id":4340,"date":"2012-10-21T09:19:27","date_gmt":"2012-10-21T14:19:27","guid":{"rendered":"https:\/\/spaceengine.org\/?p=4340"},"modified":"2022-08-17T09:29:31","modified_gmt":"2022-08-17T14:29:31","slug":"galaxy-rendering-update","status":"publish","type":"post","link":"https:\/\/spaceengine.org\/news\/blog121021\/","title":{"rendered":"Galaxy rendering update"},"content":{"rendered":"<p>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 twice smaller on the disk. 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.<\/p>\n<p>Here's the updated Milky Way. Amazing narrow details can be visible (first picture), but unfortunately the skybox makes them blurry (second picture):<\/p>\n\n\t\t\t\n\t<style type=\"text\/css\">\n\t\t.slider-info-4341.bafg-slider-info .bafg-slider-title {\n\t\t\t\t\t\t\tfont-size:\n\t\t\t\t\t22px\t\t\t\t;\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\n\t\t.slider-info-4341.bafg-slider-info .bafg-slider-description {\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\t\t\n\t\t\n\t\t.slider-info-4341.bafg-slider-info .bafg_slider_readmore_button {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttext-align: center;\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\n\t\t.slider-info-4341.bafg-slider-info .bafg_slider_readmore_button:hover {\n\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\t<\/style>\n\t\n\t\t\t<div class=\"bafg-twentytwenty-container slider-4341  \"\n\t\t\t\tbafg-orientation=\"horizontal\" bafg-default-offset=\"0.5\"\n\t\t\t\tbafg-before-label=\"1:1\"\n\t\t\t\tbafg-after-label=\"SKybox\" bafg-overlay=\"1\"\n\t\t\t\tbafg-move-slider-on-hover=\"\"\n\t\t\t\tbafg-click-to-move=\"\">\n\n\t\t\t\t\t\t\t\t<img class=\"skip-lazy\" data-skip-lazy\t\t\t\t\tsrc=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/8051305.jpg\" alt=\"\">\n\t\t\t\t<img class=\"skip-lazy\" data-skip-lazy\t\t\t\t\tsrc=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0929254.jpg\" alt=\"\">\n\n\t\t\t<\/div>\n\n\t\t\t\t<div class=\"bafg-slider-info-wraper\">\n\t\t<div style=\"\" class=\"slider-info-4341 bafg-slider-info\">\n\t\t\t\t\t<\/div>\n\t<\/div>\n\t\n\t\t\t<style type=\"text\/css\">\n\t\t\t\t\t\t\t\t\t\t\t<\/style>\n\t\t\t\n<p>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.<\/p>\n<p>The second screenshot above is made with TRSkyResolution 0.5 (i.e. skybox consumes 27Mb of VRAM). You may ask, why do we need the skybox at all? 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.<\/p>\n<p>PS: view on Milky Way from Earth at dawn (again with and without skybox)<\/p>\n\n\t\t\t\n\t<style type=\"text\/css\">\n\t\t.slider-info-4346.bafg-slider-info .bafg-slider-title {\n\t\t\t\t\t\t\tfont-size:\n\t\t\t\t\t22px\t\t\t\t;\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\n\t\t.slider-info-4346.bafg-slider-info .bafg-slider-description {\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\t\t\n\t\t\n\t\t.slider-info-4346.bafg-slider-info .bafg_slider_readmore_button {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttext-align: center;\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\n\t\t.slider-info-4346.bafg-slider-info .bafg_slider_readmore_button:hover {\n\n\t\t\t\n\t\t\t\n\t\t\t\t\t}\n\t<\/style>\n\t\n\t\t\t<div class=\"bafg-twentytwenty-container slider-4346  \"\n\t\t\t\tbafg-orientation=\"horizontal\" bafg-default-offset=\"0.5\"\n\t\t\t\tbafg-before-label=\"1:1\"\n\t\t\t\tbafg-after-label=\"Skybox\" bafg-overlay=\"1\"\n\t\t\t\tbafg-move-slider-on-hover=\"\"\n\t\t\t\tbafg-click-to-move=\"\">\n\n\t\t\t\t\t\t\t\t<img class=\"skip-lazy\" data-skip-lazy\t\t\t\t\tsrc=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/5565736.jpg\" alt=\"\">\n\t\t\t\t<img class=\"skip-lazy\" data-skip-lazy\t\t\t\t\tsrc=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/5435462.jpg\" alt=\"\">\n\n\t\t\t<\/div>\n\n\t\t\t\t<div class=\"bafg-slider-info-wraper\">\n\t\t<div style=\"\" class=\"slider-info-4346 bafg-slider-info\">\n\t\t\t\t\t<\/div>\n\t<\/div>\n\t\n\t\t\t<style type=\"text\/css\">\n\t\t\t\t\t\t\t\t\t\t\t<\/style>\n\t\t\t\n<p>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).<\/p>\n<p><a href=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619-1024x576.jpg\" alt=\"\" width=\"1024\" height=\"576\" class=\"aligncenter size-large wp-image-4348\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619-1024x576.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619-300x169.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619-768x432.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619-1536x864.jpg 1536w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619-700x394.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/0105619.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>PPPS: Finally achieved good looking results!<\/p>\n<p><a href=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033-1024x543.jpg\" alt=\"\" width=\"1024\" height=\"543\" class=\"aligncenter size-large wp-image-4347\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033-1024x543.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033-300x159.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033-768x407.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033-1536x814.jpg 1536w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033-700x371.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/6775033.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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...<\/p>\n","protected":false},"author":1,"featured_media":4347,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4340","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/4340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/comments?post=4340"}],"version-history":[{"count":3,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/4340\/revisions"}],"predecessor-version":[{"id":4351,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/4340\/revisions\/4351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/media\/4347"}],"wp:attachment":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/media?parent=4340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/categories?post=4340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/tags?post=4340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}