{"id":2672,"date":"2016-04-14T16:34:05","date_gmt":"2016-04-14T15:34:05","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=2672"},"modified":"2016-04-14T16:34:05","modified_gmt":"2016-04-14T15:34:05","slug":"p-152-virtual-world-concept-update-108-fixing-seams-on-clod-terrain-part-2","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-108-fixing-seams-on-clod-terrain-part-2\/","title":{"rendered":"P-152: Virtual World Concept Update 108: Fixing Seams on CLOD Terrain: Part 2"},"content":{"rendered":"<p>I believe I have come up with a relatively decent solution to this problem.<\/p>\n<p>My original plan was to use essentially a distance based check to determine if a midpoint was on a border between two LOD&#8217;s. If it was, I intended to create a new polygon from that midpoint and the two corner points, and then add those polygons to the end of the renderlist, so that all of the terrain polys are rendered at once, from the same vertex and primitive buffers.<\/p>\n<p>Creating the extra poly didn&#8217;t seem to work well, as can be seen from the following screenshots.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2670\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-10_29_23-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 11_04_2016 , 10_29_23 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-10_29_23-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-10_29_23-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-10_29_23-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-10_29_23-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2663\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-09_57_30-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 11_04_2016 , 09_57_30 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-09_57_30-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-09_57_30-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-09_57_30-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-11_04_2016-09_57_30-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The new poly&#8217;s didn&#8217;t fill the gaps properly in most cases. I then changed to a more elegant solution where instead of creating a new polygon, I set the position of the midpoint to a point between the two corner nodes, so it was not offset from them. This seemed to produce very good looking results.<\/p>\n<p>These first images are from before the seams were fixed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2669\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_43_00-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 12_04_2016 , 06_43_00 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_43_00-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_43_00-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_43_00-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_43_00-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2664\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_14_09-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 12_04_2016 , 07_14_09 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_14_09-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_14_09-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_14_09-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_14_09-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2655\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-10_04_2016-02_09_32-AM-300x195.jpg\" alt=\"PhoenixGameDevelopment - 10_04_2016 , 02_09_32 AM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-10_04_2016-02_09_32-AM-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-10_04_2016-02_09_32-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-10_04_2016-02_09_32-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-10_04_2016-02_09_32-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>These images were taken after the seams were fixed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2668\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_46_14-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 12_04_2016 , 06_46_14 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_46_14-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_46_14-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_46_14-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_46_14-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2667\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_58_35-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 12_04_2016 , 06_58_35 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_58_35-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_58_35-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_58_35-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-06_58_35-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> \u00a0\u00a0\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2665\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_08_48-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 12_04_2016 , 07_08_48 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_08_48-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_08_48-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_08_48-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_08_48-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2666\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_04_57-PM-copy-300x195.jpg\" alt=\"PhoenixGameDevelopment - 12_04_2016 , 07_04_57 PM copy\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_04_57-PM-copy-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_04_57-PM-copy-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_04_57-PM-copy-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-12_04_2016-07_04_57-PM-copy.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The terrain clearly looks a lot better! There are still some issues with the seams, they are visible in some cases. I believe this is because the algorithm I am using to identify a border midpoint is not working in all cases. I will need to look at this again in the future.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I believe I have come up with a relatively decent solution to this problem. My original plan was to use essentially a distance based check to determine if a midpoint was on a border between two LOD&#8217;s. If it was, I intended to create a new polygon from that midpoint and the two corner points, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,10,11],"tags":[],"class_list":["post-2672","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-software-and-games","category-spiritus-astrum","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2672"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=2672"}],"version-history":[{"count":3,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2672\/revisions"}],"predecessor-version":[{"id":2688,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2672\/revisions\/2688"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=2672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=2672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=2672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}