{"id":4351,"date":"2016-12-04T23:30:41","date_gmt":"2016-12-04T23:30:41","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4351"},"modified":"2016-12-04T23:30:41","modified_gmt":"2016-12-04T23:30:41","slug":"p0-p-172-part-57-see-multiple-terrain-textures-with-blending","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-57-see-multiple-terrain-textures-with-blending\/","title":{"rendered":"P0-P-172: Part 57: SEE: Multiple Terrain Textures with blending"},"content":{"rendered":"<p>One of the last difficult things that I need to do in MS1 is to add multiple terrain textures to the Space Exploration Engine terrain.<\/p>\n<p>I can add one texture easily, but it is, as I suspected, difficult to add the multiple textures and blending system that I was using with my own terrain project.<\/p>\n<p>The SEE already has a blending system in place, using simple vertex colours.<\/p>\n<p>I have two main obtions here. I can try to send the data from the existing vertex colour system (the terrain height for each pixel, or an value indicating which layer the current pixel is in) to the shader, and then simple assign it to its material there.<\/p>\n<p>The second option is to do what I did in my previous project, and send the center of the planet, and the min and max values of the terrain to the shader. I can then use these values to get the terrain height in the shader, and blend it.<\/p>\n<p>I am currently concentrating on option 1.<\/p>\n<p>I succeeded in applying multiple textures to the terrain using the shader, but I have just been experimenting with height values. The real challenge will be deciding what the terrain height of each pixel is.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_4329\" aria-describedby=\"caption-attachment-4329\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_21_28-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4329\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_21_28-PM-300x163.jpg\" alt=\"Unity 29\/11\/2016 , 08:21:28 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\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_21_28-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_21_28-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_21_28-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_21_28-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4329\" class=\"wp-caption-text\">Unity<br \/>29\/11\/2016 , 08:21:28 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone*<\/figcaption><\/figure>\n<figure id=\"attachment_4331\" aria-describedby=\"caption-attachment-4331\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_22_16-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4331\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_22_16-PM-300x163.jpg\" alt=\"Unity 29\/11\/2016 , 08:22:16 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\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_22_16-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_22_16-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_22_16-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_22_16-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4331\" class=\"wp-caption-text\">Unity<br \/>29\/11\/2016 , 08:22:16 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone*<\/figcaption><\/figure>\n<figure id=\"attachment_4332\" aria-describedby=\"caption-attachment-4332\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_25_51-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4332\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_25_51-PM-300x163.jpg\" alt=\"Unity 29\/11\/2016 , 08:25:51 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\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_25_51-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_25_51-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_25_51-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-08_25_51-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4332\" class=\"wp-caption-text\">Unity<br \/>29\/11\/2016 , 08:25:51 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone*<\/figcaption><\/figure>\n<figure id=\"attachment_4334\" aria-describedby=\"caption-attachment-4334\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-30_11_2016-01_06_36-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4334\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-30_11_2016-01_06_36-AM-300x163.jpg\" alt=\"Unity 30\/11\/2016 , 01:06:36 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\/2016\/12\/PhoenixGameDevelopment-30_11_2016-01_06_36-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-30_11_2016-01_06_36-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-30_11_2016-01_06_36-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-30_11_2016-01_06_36-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4334\" class=\"wp-caption-text\">Unity<br \/>30\/11\/2016 , 01:06:36 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4335\" aria-describedby=\"caption-attachment-4335\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-07_45_25-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4335\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-07_45_25-PM-300x163.jpg\" alt=\"Unity 01\/12\/2016 , 07:45:25 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\/2016\/12\/PhoenixGameDevelopment-01_12_2016-07_45_25-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-07_45_25-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-07_45_25-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-07_45_25-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4335\" class=\"wp-caption-text\">Unity<br \/>01\/12\/2016 , 07:45:25 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4337\" aria-describedby=\"caption-attachment-4337\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-10_31_02-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4337\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-10_31_02-PM-300x163.jpg\" alt=\"Unity 01\/12\/2016 , 10:31:02 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\/2016\/12\/PhoenixGameDevelopment-01_12_2016-10_31_02-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-10_31_02-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-10_31_02-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-10_31_02-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4337\" class=\"wp-caption-text\">Unity<br \/>01\/12\/2016 , 10:31:02 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone*<\/figcaption><\/figure>\n<figure id=\"attachment_4336\" aria-describedby=\"caption-attachment-4336\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-02_44_32-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4336\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-02_44_32-AM-300x163.jpg\" alt=\"Unity 01\/12\/2016 , 02:44:32 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\/2016\/12\/PhoenixGameDevelopment-01_12_2016-02_44_32-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-02_44_32-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-02_44_32-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-01_12_2016-02_44_32-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4336\" class=\"wp-caption-text\">Unity<br \/>01\/12\/2016 , 02:44:32 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>One of the last difficult things that I need to do in MS1 is to add multiple terrain textures to the Space Exploration Engine terrain. I can add one texture easily, but it is, as I suspected, difficult to add the multiple textures and blending system that I was using with my own terrain project. [&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-4351","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\/4351"}],"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=4351"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4351\/revisions"}],"predecessor-version":[{"id":4352,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4351\/revisions\/4352"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}