{"id":24,"date":"2009-05-08T20:03:58","date_gmt":"2009-05-08T20:03:58","guid":{"rendered":"http:\/\/www.templarcreations.com\/?p=24"},"modified":"2009-05-08T20:03:58","modified_gmt":"2009-05-08T20:03:58","slug":"tutorial-2-repeat-offset","status":"publish","type":"post","link":"https:\/\/templarcreations.com\/?p=24","title":{"rendered":"Tutorial 2: Repeat, Offset"},"content":{"rendered":"<p>In the previous tutorial I gave you a guide to getting textures on to your prims. In this tutorial, I&#8217;ll show you how to change the appearance of the applied textures.<\/p>\n<p>Let&#8217;s start with the simplest, but most frequently-used options &#8212; the Repeat options. These allow you to set how many times the texture will repeat across each face (or the selected face) of the prim.<\/p>\n<p>Here are two boxes with the same texture, the first one with both repeats set to 1, and the second to 3 each. The most common use for this is where you have a simple, small texture which you want to use to cover a large area.<\/p>\n<figure style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" title=\"Simple Repeat\" src=\"http:\/\/www.templarcreations.com\/graphics\/textures_2_simplerepeat.png\" alt=\"Simple Repeat Example\" width=\"600\" height=\"300\" \/><figcaption class=\"wp-caption-text\">Simple Repeat Example<\/figcaption><\/figure>\n<p>What happens when you resize the prim that the texture is on? The answer depends on whether you have the &#8216;stretch textures&#8217; box ticked or not. If you tick this box, and then resize the prim, this is the result:<\/p>\n<figure style=\"width: 185px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" title=\"Stretch Example\" src=\"http:\/\/www.templarcreations.com\/graphics\/textures_2_stretch.png\" alt=\"Stretch Example\" width=\"185\" height=\"300\" \/><figcaption class=\"wp-caption-text\">Stretch Example<\/figcaption><\/figure>\n<p>If the &#8216;stretch textures&#8217; box is unticked, you get the following:<\/p>\n<figure style=\"width: 183px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" title=\"No-Stretch Example\" src=\"http:\/\/www.templarcreations.com\/graphics\/textures_2_nostretch.png\" alt=\"No-Stretch Example\" width=\"183\" height=\"300\" \/><figcaption class=\"wp-caption-text\">No-Stretch Example<\/figcaption><\/figure>\n<p>This might seem a surprising result. It is because textures are centered on the prim face, rather than being anchored to the top-left. However, this leads very neatly on to the next feature &#8212; Offset.<\/p>\n<p>The texture offset fields are near the bottom of the build dialog. The offset amount is a fraction of the size of the texture, so an offset of 1.00 will have not effect &#8212; the texture is moved by it&#8217;s complete width or height.<\/p>\n<p>Because textures are centered on prim faces, offsets should be thought of as offsets from the middle. In our example above, we want to shift the texture by half it&#8217;s height, to align it to the top of the prim, like so:<\/p>\n<figure style=\"width: 460px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" title=\"Simple Offset Example\" src=\"http:\/\/www.templarcreations.com\/graphics\/textures_2_offset.png\" alt=\"Simple Offset Example\" width=\"460\" height=\"300\" \/><figcaption class=\"wp-caption-text\">Simple Offset Example<\/figcaption><\/figure>\n<p>There is another way of setting the repeat for textures, which works in a slightly different way, and can sometimes be very useful. This is the &#8216;repeats per meter&#8217; setting.<\/p>\n<p>To show the effect, let&#8217;s have an example:<\/p>\n<p>This archway looks fine from the front, but the texture on the sides is wrong. This is because the texture is set to repeat 1 x 1 horizontally and vertically. The sides of the arch are narrower, so the texture gets &#8216;squashed&#8217;. Now, it would be possible to fix this by changing the repeats on the side (by selecting the side texture only &#8212; see the previous tutorial to find out about &#8216;select texture&#8217;).<\/p>\n<figure style=\"width: 400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" title=\"Squashed Texture Example\" src=\"http:\/\/www.templarcreations.com\/graphics\/textures_2_norepeat_archway.png\" alt=\"Squashed Texture Example\" width=\"400\" height=\"300\" \/><figcaption class=\"wp-caption-text\">Squashed Texture Example<\/figcaption><\/figure>\n<p>However, there is an easier way, using &#8216;repeats per meter&#8217;. Setting this to 1.0 (in this case), and then clicking the &#8216;Apply&#8217; button will size the texture so that it repeats every 1.0 meters. Because the prim in this case is 1m x 0.5m, the front and back will remain unchanged, but the texture on the sides will now display correctly:<\/p>\n<figure style=\"width: 400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" title=\"Repeats Per Meter Example\" src=\"http:\/\/www.templarcreations.com\/graphics\/textures_2_repeatspermeter.png\" alt=\"Repeats Per Meter Example\" width=\"400\" height=\"300\" \/><figcaption class=\"wp-caption-text\">Repeats Per Meter Example<\/figcaption><\/figure>\n<p>Ok, I think that will do for this tutorial. Happy texturing!<\/p>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In the previous tutorial I gave you a guide to getting textures on to your prims. In this tutorial, I&#8217;ll show you how to change the appearance of the applied textures. Let&#8217;s start with the simplest, but most frequently-used options &#8212; the Repeat options. These allow you to set how many times the texture will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[64,77,85,100,103],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-textures","category-tutorials","tag-offset","tag-repeat","tag-second-life","tag-textures","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/templarcreations.com\/index.php?rest_route=\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/templarcreations.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/templarcreations.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/templarcreations.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/templarcreations.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":0,"href":"https:\/\/templarcreations.com\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"https:\/\/templarcreations.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/templarcreations.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/templarcreations.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}