{"id":4629,"date":"2017-01-22T23:57:25","date_gmt":"2017-01-22T23:57:25","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4629"},"modified":"2017-01-23T00:10:37","modified_gmt":"2017-01-23T00:10:37","slug":"p0-p-172-part-94-procedural-content-planet-builder","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-94-procedural-content-planet-builder\/","title":{"rendered":"P0-P-172: Part 94: Procedural Content: Planet Builder"},"content":{"rendered":"<p>The concept for the object placement has gone quite well.<\/p>\n<p>The solution that I am using works as follows. The terrain system renders the terrain in chunks, I use a simple distance based calculation to grab the closest terrain chunk to the object that I am placing.<br \/>\nI then enable collision on that chunk (Only chunks that are very close to the player have collision enabled under normal circumstances).<br \/>\nI can then cast a ray from the object position to the terrain, get the rays impact position, and use that position to place the object.<br \/>\nI can then disable collision.<\/p>\n<p>This works well, but I have yet to test it in &#8220;real&#8221; conditions. The next objective is to create several thousand data points, spread out around the planet, and page them to the client and place them.<\/p>\n<figure id=\"attachment_4616\" aria-describedby=\"caption-attachment-4616\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-08_06_52-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4616\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-08_06_52-PM-300x163.jpg\" alt=\"Unity 20\/01\/2017 , 08:06:52 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-08_06_52-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-08_06_52-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-08_06_52-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-08_06_52-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4616\" class=\"wp-caption-text\">Unity<br \/>20\/01\/2017 , 08:06:52 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4617\" aria-describedby=\"caption-attachment-4617\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_14-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4617\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_14-PM-300x163.jpg\" alt=\"Unity 20\/01\/2017 , 09:41:14 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_14-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_14-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_14-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_14-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4617\" class=\"wp-caption-text\">Unity<br \/>20\/01\/2017 , 09:41:14 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4618\" aria-describedby=\"caption-attachment-4618\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_31-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4618\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_31-PM-300x163.jpg\" alt=\"Unity 20\/01\/2017 , 09:41:31 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_31-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_31-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_31-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-20_01_2017-09_41_31-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4618\" class=\"wp-caption-text\">Unity<br \/>20\/01\/2017 , 09:41:31 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4619\" aria-describedby=\"caption-attachment-4619\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-21_01_2017-12_32_05-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4619\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-21_01_2017-12_32_05-AM-300x163.jpg\" alt=\"Unity 21\/01\/2017 , 12:32:05 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-21_01_2017-12_32_05-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-21_01_2017-12_32_05-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-21_01_2017-12_32_05-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-21_01_2017-12_32_05-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4619\" class=\"wp-caption-text\">Unity<br \/>21\/01\/2017 , 12:32:05 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The concept for the object placement has gone quite well. The solution that I am using works as follows. The terrain system renders the terrain in chunks, I use a simple distance based calculation to grab the closest terrain chunk to the object that I am placing. I then enable collision on that chunk (Only [&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-4629","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\/4629"}],"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=4629"}],"version-history":[{"count":3,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4629\/revisions"}],"predecessor-version":[{"id":4638,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4629\/revisions\/4638"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}