{"id":247,"date":"2011-05-21T10:37:58","date_gmt":"2011-05-21T10:37:58","guid":{"rendered":"http:\/\/www.s2powered.com\/?p=247"},"modified":"2013-01-19T17:26:03","modified_gmt":"2013-01-19T17:26:03","slug":"faster-than-light","status":"publish","type":"post","link":"https:\/\/www.s2powered.com\/copiasito\/247\/faster-than-light\/profenix-news\/05\/2011\/","title":{"rendered":"FASTER THAN LIGHT!"},"content":{"rendered":"<p>In the last week I have worked night and day to a new frustrum culling system. I&#8217;ve radically changed my previous approach and the results are unbelievable! \u00a0The major problem of the previous method was the fact that when too many objects were in camera field of view (panoramic views) the frame rate drops in \u00a0an unacceptable way. <!--more--> The problem was in part reduced by using a relatively small terrain which let us to reduce the number of objects to pass to visibility system. But our purpose, in this new build, was enlarge playable area (terrain are now up to 4 kilometers X 4 Kilometers), so the new culling algorithm needed \u00a0to have less, but very less, complexity.<\/p>\n<p>We are proud to\u00a0declare that this purpose has been reached: we have reduced the algorithm complexity of an\u00a0order\u00a0of\u00a0magnitude!!<\/p>\n<p><a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2011\/05\/CullCompare03.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-248\" title=\"CullCompare03\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2011\/05\/CullCompare03-1024x384.jpg\" alt=\"\" width=\"620\" height=\"232\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare03-1024x384.jpg 1024w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare03-600x225.jpg 600w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare03-300x112.jpg 300w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare03.jpg 1600w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>As you can see from image while the previous algorithm takes about 15 ms to compute the panoramic frustrum culling, this new one takes about 1 ms!! In addiction we have speed-up objects setup and we have found a method to move the frustrum culling test to another thread, using the calculation results in the next frame without visible artifacts. This make the main game thread to have much time to make other things like AI, logic, etc&#8230;<\/p>\n<p>The following image show the use of the main thread (blue bar) and the auxiliary thread (yellow bar). Auxiliary thread is also used \u00a0for animation blending and particle systems (see the &#8220;after&#8221; side of the image).<\/p>\n<p><a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2011\/05\/CullCompare02.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-250\" title=\"CullCompare02\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2011\/05\/CullCompare02-1024x327.jpg\" alt=\"\" width=\"620\" height=\"197\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare02-1024x327.jpg 1024w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare02-600x191.jpg 600w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare02-300x95.jpg 300w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare02.jpg 1600w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>All the improvements made until now are related to the CPU. The next challenge, in the next week, \u00a0is to reduce computation time of the GPU which is striclty related to the number of poligons but\u00a0especially to the fill-rate, i.e. screen resolution. This means reducing the grey gap above the blue bar in the &#8220;after&#8221; side of the previous image. This means high framerate at higher resolutions.<\/p>\n<p>&nbsp;<\/p>\n<p>Another shot showing the results:<\/p>\n<p><a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2011\/05\/CullCompare01.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-252\" title=\"CullCompare01\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2011\/05\/CullCompare01-1024x327.jpg\" alt=\"\" width=\"620\" height=\"197\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare01-1024x327.jpg 1024w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare01-600x191.jpg 600w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare01-300x95.jpg 300w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/CullCompare01.jpg 1600w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>All tests showed have been made on the following system:<\/p>\n<p>&#8211; Dual core Athlon x64 2.8 Ghz<\/p>\n<p>&#8211; Geforce GTS 250 1 Gb<\/p>\n<p>&#8211; 2 Gb memory.<\/p>\n<p>&nbsp;<\/p>\n<p>Research continues&#8230;Next week we will show new results on the GPU side.<\/p>\n<p>Stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the last week I have worked night and day to a new frustrum culling system. I&#8217;ve radically changed my previous approach and the results are unbelievable! \u00a0The major problem of the previous method was the fact that when too many objects were in camera field of view (panoramic views) the frame rate drops in&nbsp;&hellip;<\/p>\n","protected":false},"author":1,"featured_media":254,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-247","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-profenix-news"],"jetpack_featured_media_url":"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2011\/05\/Cull04.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/comments?post=247"}],"version-history":[{"count":21,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/posts\/247\/revisions"}],"predecessor-version":[{"id":1167,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/posts\/247\/revisions\/1167"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/media\/254"}],"wp:attachment":[{"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/media?parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/categories?post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/tags?post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}