{"id":1186,"date":"2013-01-27T19:36:07","date_gmt":"2013-01-27T19:36:07","guid":{"rendered":"http:\/\/www.s2powered.com\/?p=1186"},"modified":"2019-05-31T19:04:18","modified_gmt":"2019-05-31T19:04:18","slug":"quick-start-with-s2engine-hd-1-4-0-part-2","status":"publish","type":"post","link":"https:\/\/www.s2powered.com\/copiasito\/1186\/quick-start-with-s2engine-hd-1-4-0-part-2\/tutorials\/oldtut\/01\/2013\/","title":{"rendered":"Quick Start With S2ENGINE HD 1.4.0 &#8211; part 2"},"content":{"rendered":"<p>In the previous tutorial we showed how to create a new project from scratch, how to create a new scene in the project and how to start working with terrains.<br \/>\nIn this tutorial we&#8217;ll show how to manage texture resources and add base texture to our terrain.<\/p>\n<p><!--more--><br \/>\nAs you can note when you create a new project it doesn&#8217;t contain any resource except <strong>main.sc2<\/strong> script. So to start painting terrain first we have to import texture resources into the project.<br \/>\nWe can import textures into 2 ways.<br \/>\nLet&#8217;s start with the first.<br \/>\nGo to the texture resources browser and click right mouse button, a popup menu will appear, as showed in the following image:<br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs04.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"qs04\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs04.png\" width=\"398\" height=\"433\" align=\"left\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Click &#8220;Add&#8230;&#8221;, a file dialog will appear. It lets you to choose the texture to import and click on open button.<br \/>\n<strong><em>NOTE that the supported texture file formats are tga and dds.<\/em><\/strong><br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1195\" alt=\"qs11\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs11.png\" width=\"438\" height=\"545\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs11.png 438w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs11-241x300.png 241w\" sizes=\"auto, (max-width: 438px) 100vw, 438px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>This method lets you to import single texture files, but What if you want to import more textures in a single operation? Asset importing is what we need&#8230;<\/p>\n<p>Let&#8217;s go to the second method.<\/p>\n<p>Suppose you have a folder in which you have a bunch of textures, you can import into the project all the textures contained into this folder in a single operation.<br \/>\n<em><strong>NOTE that you can also import subfolders.<\/strong><\/em><br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1196\" alt=\"qs10\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs10.png\" width=\"416\" height=\"329\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs10.png 416w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs10-300x237.png 300w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Click on <em>Edit-&gt;Project-&gt;ImportAsset<\/em> as showed into the picture above.<br \/>\nA file dialog will appear: choose the folder in which you have the textures to import and click on open as showed in the following image.<br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs09.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1197\" alt=\"qs09\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs09.png\" width=\"399\" height=\"527\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs09.png 399w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs09-227x300.png 227w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>When textures are imported you see them inside the textures resource browser:<\/p>\n<p><a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1198\" alt=\"qs12\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs12.png\" width=\"332\" height=\"637\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs12.png 332w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs12-156x300.png 156w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Now that we have some textures to use, lets start to paint our terrain.<br \/>\nClick on the <strong>paint<\/strong> tab of the terrain tool. You will see something like that:<br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs031.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1199\" alt=\"qs03\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs031.png\" width=\"600\" height=\"448\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs031.png 879w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs031-600x448.png 600w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs031-300x224.png 300w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs031-550x410.png 550w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs031-390x290.png 390w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The terrain shader is composed by 4 <strong>texture layers<\/strong> (each composed by a diffuse and a normal texture). The <strong>first layer<\/strong> is also blended, basing on <strong>slope<\/strong> and <strong>height<\/strong>, by another texture that we call &#8220;<strong><em>Base Texture<\/em><\/strong>&#8220;.<br \/>\nGenerally Base texture is useful to easly and automatically obtain a simple grass\/sand (or something like that) layer upon rocks basing on terrain slope\/height.<br \/>\nClick on the <em>loadbasetex<\/em> button (showed above) and choose the texture you want to use as base. the result you will obtain will be something like this:<br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1200\" alt=\"qs13\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs13-e1359311589924.png\" width=\"600\" height=\"328\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs13-e1359311589924.png 600w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs13-e1359311589924-300x164.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><em>NOTE that added texture do not influence terrain in certain points where slope is high.<\/em><\/strong><br \/>\nYou can control this effect by playing with <em>Slope<\/em> and <em>Height<\/em> params of the base texture (see image below).<br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1204\" alt=\"qs14\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs14.png\" width=\"382\" height=\"211\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs14.png 382w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs14-300x165.png 300w\" sizes=\"auto, (max-width: 382px) 100vw, 382px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>As you can note the texture on the terrain has a too low resolution, you can control base texture titling by setting the <strong><em>Tiles<\/em> <\/strong>params:<br \/>\n<a href=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1201\" alt=\"qs08\" src=\"http:\/\/www.s2powered.com\/wp-content\/uploads\/2013\/01\/qs08.png\" width=\"600\" height=\"439\" srcset=\"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs08.png 862w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs08-600x438.png 600w, https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs08-300x219.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Now your base texture layer looks better.<\/p>\n<p>In the next tutorial we will show how to set the other terrain layers and how to paint them.<br \/>\nStay tuned guys!<\/p>\n<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\n\/\/ < ![CDATA[\nvar vglnk = { api_url: '\/\/api.viglink.com\/api', key: 'a187ca0f52aa99eb8b5c172d5d93c05b' };\n\/\/ ]]><\/script><script type=\"text\/javascript\" src=\"\/\/cdn.viglink.com\/api\/vglnk.js\" async=\"\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous tutorial we showed how to create a new project from scratch, how to create a new scene in the project and how to start working with terrains. In this tutorial we&#8217;ll show how to manage texture resources and add base texture to our terrain.<\/p>\n","protected":false},"author":1,"featured_media":1201,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[262],"tags":[],"class_list":["post-1186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldtut"],"jetpack_featured_media_url":"https:\/\/www.s2powered.com\/copiasito\/wp-content\/uploads\/2013\/01\/qs08.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/posts\/1186","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=1186"}],"version-history":[{"count":57,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/posts\/1186\/revisions"}],"predecessor-version":[{"id":2310,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/posts\/1186\/revisions\/2310"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/media\/1201"}],"wp:attachment":[{"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/media?parent=1186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/categories?post=1186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.s2powered.com\/copiasito\/wp-json\/wp\/v2\/tags?post=1186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}