{"id":2633,"date":"2016-04-08T22:41:27","date_gmt":"2016-04-08T21:41:27","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=2633"},"modified":"2016-04-08T22:47:20","modified_gmt":"2016-04-08T21:47:20","slug":"p-152-virtual-world-concept-update-105-fractal-terrain-texturing-part-2","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-105-fractal-terrain-texturing-part-2\/","title":{"rendered":"P-152: Virtual World Concept Update 105: Fractal Terrain Texturing Part 2"},"content":{"rendered":"<p>Before I began\u00a0fixing the texturing issues, I was rendering the low detail heightmap completely seperately from the quadtree system. Realistically, the performance difference between doing this, and using a quadtree for all distances and LOD&#8217;s, would be minimal, since the heightmap is only used at long distances. It turns out, however, that the way I was loading the verts for the heightfield was making it impossible to set the UV&#8217;s properly. This is because I was generating the points using two loops, and simply iterating from one side of the heightfield to the other, however I was rendering the points in quads, or groups of 4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2622\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-07_00_14-PM-300x195.png\" alt=\"PhoenixGameDevelopment - 08_04_2016 , 07_00_14 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-07_00_14-PM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-07_00_14-PM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-07_00_14-PM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-07_00_14-PM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2624\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_11-AM-300x195.png\" alt=\"PhoenixGameDevelopment - 08_04_2016 , 03_39_11 AM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_11-AM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_11-AM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_11-AM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_11-AM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>When I changed the system to use the quadtree for all LOD&#8217;s the texture issues seemed to be mostly resolved.<\/p>\n<p>I am still noticing frame rate issues at moderate to high detail, however, and I have noticed that the terrain is not square, as it should be. At a resolution of 64, the terrain is 7*9, rather than 8&#215;8.<\/p>\n<p>I am fairly confident that these issues can be fixed quickly however. The next goal will be some bug fixing, and adding support for multiple textures. At the moment, I just want to texture the terrain by height, which is the same thing that I was doing, except that this time, using materials, the results should be a lot better.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2635\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-09_24_36-PM-300x195.png\" alt=\"PhoenixGameDevelopment - 08_04_2016 , 09_24_36 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-09_24_36-PM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-09_24_36-PM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-09_24_36-PM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-09_24_36-PM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2636\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-300x195.jpg\" alt=\"P152_DEBUG 08\/04\/2016 , 03:39:04 AM Torque 3D MIT - P152\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2640\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_33_43-PM-300x195.jpg\" alt=\"PhoenixGameDevelopment - 08_04_2016 , 08_33_43 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_33_43-PM-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_33_43-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_33_43-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_33_43-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2636\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-300x195.jpg\" alt=\"P152_DEBUG 08\/04\/2016 , 03:39:04 AM Torque 3D MIT - P152\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-03_39_04-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2638\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_58-PM-300x195.jpg\" alt=\"PhoenixGameDevelopment - 08_04_2016 , 08_35_58 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_58-PM-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_58-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_58-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_58-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2639\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_12-PM-300x195.jpg\" alt=\"PhoenixGameDevelopment - 08_04_2016 , 08_35_12 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_12-PM-300x195.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_12-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_12-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-08_04_2016-08_35_12-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>I have also got some ideas on how to fix the issue with the seams. The seams are created by a single quad sharing a border with two smaller quads (Two Different LOD&#8217;s). There is an extra vertex created when the tier is subdivided, and this extra vertex is what is causing the seam (The corner points of the quads match for the two different LOD&#8217;s).<\/p>\n<p>This means that I\u00a0will basically need to create an additional polygon that fills the gap between the two LOD&#8217;s. This would be very easy to do, if I knew that a particular midpoint was on a border, since I had access to all of the points that I would need. The problem is determining if a midpoint is on a border or not. This is something I am still working on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before I began\u00a0fixing the texturing issues, I was rendering the low detail heightmap completely seperately from the quadtree system. Realistically, the performance difference between doing this, and using a quadtree for all distances and LOD&#8217;s, would be minimal, since the heightmap is only used at long distances. It turns out, however, that the way I [&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-2633","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\/2633"}],"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=2633"}],"version-history":[{"count":6,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2633\/revisions"}],"predecessor-version":[{"id":2645,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2633\/revisions\/2645"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=2633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=2633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=2633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}