{"id":2352,"date":"2015-11-23T22:26:29","date_gmt":"2015-11-23T22:26:29","guid":{"rendered":"http:\/\/www.amzsaki.com\/?page_id=2352"},"modified":"2020-09-01T03:04:38","modified_gmt":"2020-09-01T03:04:38","slug":"synthesis-of-textures-and-bump-maps-of-tiled-surfaces-part-ii","status":"publish","type":"page","link":"https:\/\/www.amzsaki.com\/?page_id=2352","title":{"rendered":"Synthesis of textures and bump maps of tiled surfaces   &#8211;   Part II"},"content":{"rendered":"<h1><strong>Anisotropy &#8211; Stretching noise<\/strong><\/h1>\n<p style=\"text-align: justify;\">By specifying a rectangular region from which the noise function is sampled, a stretched noise effect can be achieved. For example, a rectangular tile with anisotropic noise sampling renders as seen in Figure 9.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise03_RENDERED.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-2354\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise03_RENDERED-1024x883.jpg\" alt=\"Image converted using ifftoany\" width=\"850\" height=\"539\"><\/a><br \/>\n<strong>Figure 9 Anisotropic tiles<\/strong><\/p>\n<p>The corresponding texture and bump maps are<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure10.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2356\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure10-1024x512.jpg\" alt=\"figure10\" width=\"625\" height=\"313\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure10-1024x512.jpg 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure10-300x150.jpg 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure10-624x312.jpg 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><strong>Figure 10 Anisotropic per tile noise on rectangular tiles<\/strong><\/p>\n<p style=\"text-align: justify;\">For the sake of completeness, the input file that was used to generate the images was<\/p>\n<pre><span style=\"color: #ffffff;\">outputFileName \/Users\/attilazsaki\/Desktop\/yellow_square_tile_localnoise04.tif\ntextureWidth 2048\ntextureHeight 2048\ntiledAreaWidth 10.0\ntiledAreaLength 10.0\ntileWidth 2.0\ntileLength 0.6\ngroutWidth 0.02\ntileColorGlobalColorType variable\ntileColorGlobalColorNoiseType perlin\ntileColorGlobalColor 1.0 0.94509803921569 0.57254901960784 1.0\ntileColorGlobalColorLowSide 1.0 0.92549019607843 0.42745098039216 1.0\ntileColorGlobalColorHighSide 1.0 0.96470588235294 0.56078431372549 1.0\ntileColorGlobalNoiseXMin 0.0 \ntileColorGlobalNoiseYMin 0.0 \ntileColorGlobalNoiseXMax 10.0 \ntileColorGlobalNoiseYMax 10.0\ngroutColorColorType variable\ngroutColorColorNoiseType random\ngroutColorColor 0.5 0.5 0.5 1.0\ngroutColorColorLowSide 0.4 0.4 0.4 1.0\ngroutColorColorHighSide 0.6 0.6 0.6 1.0\ntileColorLocalColorType variable\ntileColorLocalColorNoiseType perlin\ntileColorLocalColor 1.0 0.94509803921569 0.57254901960784 1.0\ntileColorLocalColorLowSide 1.0 0.92549019607843 0.42745098039216 1.0\ntileColorLocalColorHighSide 1.0 0.96470588235294 0.56078431372549 1.0\ntileColorLocalNoiseXMin 0.0 \ntileColorLocalNoiseYMin 0.0 \ntileColorLocalNoiseXMax 5.0 \ntileColorLocalNoiseYMax 20.0 \ntileColorLocalOctaves 8 \ntileColorLocalPersistence 1.0\ntileBumpNoiseAlternateColorType variable\ntileBumpNoiseAlternateColorNoiseType perlin \ntileBumpNoiseAlternateColor 1.0 1.0 1.0 1.0\ntileBumpNoiseAlternateColorLowSide 1.0 1.0 1.0 1.0\ntileBumpNoiseAlternateColorHighSide 1.0 1.0 1.0 1.0\ntileBumpNoiseAlternateNoiseXMin 0.0\ntileBumpNoiseAlternateNoiseYMin 0.0\ntileBumpNoiseAlternateNoiseXMax 2.0\ntileBumpNoiseAlternateNoiseYMax 2.0\ntileBumpNoiseAlternateOctaves 2\ntileBumpNoiseAlternatePersistence 0.25\nrandomTileOrientation false\nrandomTileNoiseStartPoint true \ngenerateBumpMap true\ntileBumpNoiseAlternate true\ntileDiscolorationMapGenerate false \nblurFinalImage false\nuseTileXOffset\ntileXOffset 1.01<\/span><\/pre>\n<p style=\"text-align: justify;\">In this example note that the tile size is rectangular and so is the tileColorLocalNoise sampling region. It is from 0,0 to 5,20. Also note that the tile offset was used to alternate the tile locations. The tile offset was calculated using half of the tile width (2.0*1\/2) plus half of the grout line width (0.02*1\/2) to get 1.01.<\/p>\n<h1><strong>Discoloration maps \u2013 grime, grunge and dirt<\/strong><\/h1>\n<p style=\"text-align: justify;\">So far our tiles were clean. However, it is easy to use noise again and overlay a noise map on top of our tile color texture. Ideally, this noise is a slowly varying one, with only parts of it showing, e.g. in some regions the original tile color shows through, while other parts are darkened with our grime color, as seen in Figure 11.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise04_RENDERED.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-2358\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise04_RENDERED-1024x892.jpg\" alt=\"Image converted using ifftoany\" width=\"625\" height=\"544\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise04_RENDERED-1024x892.jpg 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise04_RENDERED-300x261.jpg 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise04_RENDERED-624x543.jpg 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/yellow_tile_localnoise04_RENDERED.jpg 1764w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><strong>Figure 11 Discoloration map applied to the tiles<\/strong><\/p>\n<p style=\"text-align: justify;\">The input file is same as the previous example, but this time a section describing the discoloration map was added, as follows<\/p>\n<pre><span style=\"color: #ffffff;\">tileDiscolorationMapColorType variable\ntileDiscolorationMapColorNoiseType perlin\ntileDiscolorationMapColor 1.0 1.0 1.0 1.0\ntileDiscolorationMapColorLowSide 1.0 1.0 1.0 1.0\ntileDiscolorationMapColorHighSide 1.0 1.0 1.0 1.0\ntileDiscolorationMapNoiseXMin 1.0\ntileDiscolorationMapNoiseYMin 1.0\ntileDiscolorationMapNoiseXMax 1.15\ntileDiscolorationMapNoiseYMax 1.15\ntileDiscolorationMapOctaves 7\ntileDiscolorationMapPersistence 1.0\ntileDiscolorationMapThresholdLower 0.50\ntileDiscolorationMapThresholdUpper 1.0\ntileDiscolorationMapThresholdPercentReduction 10.0\ntileDiscolorationMapGenerate true<\/span><\/pre>\n<p style=\"text-align: justify;\">Note that the color descriptor has the same components as the previously presented ones, with the addition of a few new parameters; tileDiscolorationMapThresholdLower, tileDiscolorationMapThresholdUpper and tileDiscolorationMapThresholdPercentReduction. These three parameters establish a bound on the noise values, anything below the lower threshold or anything above the upper threshold will not affect the underlying tile color. Values within the threshold bounds are uniformly darkened by the specified percentage. The resulting color texture and bumps maps are<\/p>\n<p style=\"text-align: justify;\">&nbsp;<a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure12.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2361\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure12-1024x512.jpg\" alt=\"figure12\" width=\"625\" height=\"313\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure12-1024x512.jpg 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure12-300x150.jpg 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure12-624x312.jpg 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><strong>Figure 12 Discoloration or grime map applied to our tiles<\/strong><\/p>\n<h1><strong>Bumpy bump maps<\/strong><\/h1>\n<p style=\"text-align: justify;\">&nbsp;Thus far the bump maps were either different for each tile, yet constant within a tile or had only a smoothly varying noise, characteristic of a perhaps not-so-carefully-laid, unleveled tiles. If the noise is made more high frequency, resembling that of often found in natural stone, then bumpiness of the surface can be part of the visual appeal of a tile. Consider a large stone tile, for which the color of the tile is governed by a Perlin noise and so is the associated bump map, as shown on Figure 13. The base color of the tile varies from tile to tile and the local, per-tile color is varied as a high-frequency noise. Coupled with the bump map, the stone gives a pitted, rough surface.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/perlin_noise_RENDERED.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-2363\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/perlin_noise_RENDERED-1024x1024.jpg\" alt=\"Image converted using ifftoany\" width=\"625\" height=\"625\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/perlin_noise_RENDERED-1024x1024.jpg 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/perlin_noise_RENDERED-150x150.jpg 150w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/perlin_noise_RENDERED-300x300.jpg 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/perlin_noise_RENDERED-624x624.jpg 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/perlin_noise_RENDERED.jpg 2048w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><strong>Figure 13 Stone tiles with high-frequency noise for bump maps<\/strong><\/p>\n<p style=\"text-align: justify;\">The associated texture and bump map is shown on Figure 14. Note that the underlying noise function is the same for both the texture map and the bump map. The differences are the colors used in the interpolation of the final color. The texture map has more distinct black\/white bands, while the bump map varies smoothly.<\/p>\n<p style=\"text-align: justify;\">&nbsp;<a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure14.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2365\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure14-1024x512.jpg\" alt=\"figure14\" width=\"625\" height=\"313\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure14-1024x512.jpg 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure14-300x150.jpg 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2015\/11\/figure14-624x312.jpg 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><strong>Figure 14 Texture and bumps maps for Figure 13, showing a pitted, rough tile surface<\/strong><\/p>\n<p style=\"text-align: justify;\">The input file used in generating the maps in Figure 14 is as follows<\/p>\n<pre><span style=\"color: #ffffff;\">outputFileName \/Users\/amzs\/Desktop\/perlin_noise01.tif\ntextureWidth 2048\ntextureHeight 2048\ntiledAreaWidth 10.0\ntiledAreaLength 10.0\ntileWidth 2.5\ntileLength 2.5\ngroutWidth 0.02\ntileColorGlobalColorType variable\ntileColorGlobalColorNoiseType perlin\ntileColorGlobalColor 0.5 0.5 0.5 1.0\ntileColorGlobalColorLowSide 0.0 0.0 0.0 1.0\ntileColorGlobalColorHighSide 1.0 1.0 1.0 1.0\ntileColorGlobalNoiseXMin 0.0 \ntileColorGlobalNoiseYMin 0.0 \ntileColorGlobalNoiseXMax 10.0 \ntileColorGlobalNoiseYMax 10.0\ntileColorLocalOctaves 8 \ntileColorLocalPersistence 1.0\ngroutColorColorType variable\ngroutColorColorNoiseType random\ngroutColorColor 0.5 0.5 0.5 1.0\ngroutColorColorLowSide 0.4 0.4 0.4 1.0\ngroutColorColorHighSide 0.6 0.6 0.6 1.0\ntileColorLocalColorType solid\ntileColorLocalColorNoiseType perlin\ntileColorLocalColor 0.5 0.5 0.5 1.0\ntileColorLocalColorLowSide 0.0 0.0 0.0 1.0\ntileColorLocalColorHighSide 1.0 1.0 1.0 1.0\ntileColorLocalNoiseXMin 0.0 \ntileColorLocalNoiseYMin 0.0 \ntileColorLocalNoiseXMax 10.0 \ntileColorLocalNoiseYMax 10.0 \ntileColorLocalOctaves 8 \ntileColorLocalPersistence 1.0\ntileBumpNoiseAlternateColorType variable\ntileBumpNoiseAlternateColorNoiseType perlin \ntileBumpNoiseAlternateColor 1.0 1.0 1.0 1.0\ntileBumpNoiseAlternateColorLowSide 1.0 1.0 1.0 1.0\ntileBumpNoiseAlternateColorHighSide 1.0 1.0 1.0 1.0\ntileBumpNoiseAlternateNoiseXMin 0.0\ntileBumpNoiseAlternateNoiseYMin 0.0\ntileBumpNoiseAlternateNoiseXMax 2.0\ntileBumpNoiseAlternateNoiseYMax 2.0\ntileBumpNoiseAlternateOctaves 2\ntileBumpNoiseAlternatePersistence 0.25\nrandomTileOrientation false\nrandomTileNoiseStartPoint true\ngenerateBumpMap true\ntileBumpNoiseAlternate false\nblurFinalImage false<\/span><\/pre>\n<p>This concludes Part II of the article. Stay tuned for Part III!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Anisotropy &#8211; Stretching noise By specifying a rectangular region from which the noise function is sampled, a stretched noise effect<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/?page_id=2352\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">Synthesis of textures and bump maps of tiled surfaces   &#8211;   Part II<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":298,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2352","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/2352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2352"}],"version-history":[{"count":15,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/2352\/revisions"}],"predecessor-version":[{"id":3337,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/2352\/revisions\/3337"}],"up":[{"embeddable":true,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/298"}],"wp:attachment":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}