<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Tutorial%3AMapWithPOVRay%28Tinnut%29</id>
	<title>Tutorial:MapWithPOVRay(Tinnut) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Tutorial%3AMapWithPOVRay%28Tinnut%29"/>
	<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Tutorial:MapWithPOVRay(Tinnut)&amp;action=history"/>
	<updated>2026-04-21T02:03:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=Tutorial:MapWithPOVRay(Tinnut)&amp;diff=2455&amp;oldid=prev</id>
		<title>Qrow: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Tutorial:MapWithPOVRay(Tinnut)&amp;diff=2455&amp;oldid=prev"/>
		<updated>2026-03-04T00:17:42Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:17, 3 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Qrow</name></author>
	</entry>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=Tutorial:MapWithPOVRay(Tinnut)&amp;diff=2454&amp;oldid=prev</id>
		<title>intermapmaking&gt;Flozi: Flozi moved page Create map texture with povray to Tutorial:MapWithPOVRay(Tinnut)</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Tutorial:MapWithPOVRay(Tinnut)&amp;diff=2454&amp;oldid=prev"/>
		<updated>2014-10-18T21:57:53Z</updated>

		<summary type="html">&lt;p&gt;Flozi moved page &lt;a href=&quot;/wiki/index.php?title=Create_map_texture_with_povray&quot; class=&quot;mw-redirect&quot; title=&quot;Create map texture with povray&quot;&gt;Create map texture with povray&lt;/a&gt; to &lt;a href=&quot;/wiki/index.php?title=Tutorial:MapWithPOVRay(Tinnut)&quot; title=&quot;Tutorial:MapWithPOVRay(Tinnut)&quot;&gt;Tutorial:MapWithPOVRay(Tinnut)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Map_development|Map Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Howto ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create a map&amp;#039;s texture using Povray to generate the texture&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!! This is currently a work in progress and make take some time to complete. !!&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
This guide will take you through creating a texture for a Spring map using the freeware Povray program.  Povray is an excellent [http://en.wikipedia.org/wiki/Ray_tracing raytracing] application that generates &amp;quot;scene&amp;quot; images using a scene definition language in a text file.  We can use it to create a map&amp;#039;s texture by creating a heightfield object, putting our &amp;quot;camera&amp;quot; directly over the object, setting the camera to orthographic, and rendering a bitmap at our map&amp;#039;s dimension.  The steps below will give you an easy enough to follow process to generate a nice map, but if you want to create different maps you&amp;#039;ll need to learn Povray&amp;#039;s scene definition language.  This language is easy enough to follow, but depending on your tastes you could be better off using a tool that specialises in maps and map textures, such as the excellent [http://www.bundysoft.com/L3DT/ L3DT].  &lt;br /&gt;
&lt;br /&gt;
The guide does not cover other aspects of map creation (heighmaps, features, metal, compiling, etc), but there are a few excellent guides within the Wiki that already cover those steps.&lt;br /&gt;
&lt;br /&gt;
Povray is available for both Windows and Linux.  I have only tested these steps under Windows, but they should work under Linux.&lt;br /&gt;
&lt;br /&gt;
Please note that a lot of the maths used in the scene definition file has only been tested on a 16x16 map (8192x8192 pixels).&lt;br /&gt;
&lt;br /&gt;
Warning:  The base textures I use in this example are all mostly rubbish that I created in a couple of minutes.  I would suggest that you do not use them in your own maps :)&lt;br /&gt;
&lt;br /&gt;
=== Initial Steps ===&lt;br /&gt;
1) Download and install Povray: [http://www.povray.org/ Povray Site]&lt;br /&gt;
&lt;br /&gt;
2) Create a working folder for your map, for this example, we&amp;#039;ll make C:\PovMap&lt;br /&gt;
&lt;br /&gt;
3) Create a heightmap using whatever program (I like [http://www.gimp.org/ The GIMP], which is good, and it&amp;#039;s free).  Here is the one we&amp;#039;ll use for our map (I created this in a hurry and it was quite a mistake that it ended up so similar to Altered Divide):&lt;br /&gt;
&lt;br /&gt;
[http://img441.imageshack.us/my.php?image=povmapheightbp9.png http://img441.imageshack.us/img441/8862/povmapheightbp9.th.png]&lt;br /&gt;
&lt;br /&gt;
Your map will need to be named povmap_height.png, but if you want to use another name, just update the pov script below to use your heightmap&amp;#039;s actual name.&lt;br /&gt;
&lt;br /&gt;
4) For our example, we&amp;#039;ll be defining three different elevation levels for which there are different terrain textures, these will be (each at 512x512):&lt;br /&gt;
&lt;br /&gt;
4.1) Lowest elevation (low lying areas):&lt;br /&gt;
&lt;br /&gt;
[http://img176.imageshack.us/my.php?image=level1zd7.png http://img176.imageshack.us/img176/953/level1zd7.th.png]&lt;br /&gt;
&lt;br /&gt;
4.2) Middle elevation (main map surface):&lt;br /&gt;
&lt;br /&gt;
[http://img170.imageshack.us/my.php?image=level2pf6.png http://img170.imageshack.us/img170/6473/level2pf6.th.png]&lt;br /&gt;
&lt;br /&gt;
4.3) Highest elevation (mountains):&lt;br /&gt;
&lt;br /&gt;
[http://img176.imageshack.us/my.php?image=level3wv7.png http://img176.imageshack.us/img176/6159/level3wv7.th.png]&lt;br /&gt;
&lt;br /&gt;
5) Now also for our example, we&amp;#039;ll be defining two different textures to be used by sloping areas, one for slopes in the lower elevation areas of the map, and another for slopes in the higher elevations:&lt;br /&gt;
&lt;br /&gt;
5.1) Lower elevations:&lt;br /&gt;
&lt;br /&gt;
[http://img411.imageshack.us/my.php?image=slope1on6.png http://img411.imageshack.us/img411/2153/slope1on6.th.png]&lt;br /&gt;
&lt;br /&gt;
5.2) Higher elevations:&lt;br /&gt;
&lt;br /&gt;
[http://img411.imageshack.us/my.php?image=slope2fk7.png http://img411.imageshack.us/img411/8908/slope2fk7.th.png]&lt;br /&gt;
&lt;br /&gt;
6) Create an empty text file in your C:\Povmap folder named gen_pov_texture.pov&lt;br /&gt;
&lt;br /&gt;
7) Copy the following povray scene code into the above file:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-style:italic; font-size:90%; border:1px dashed white; background-color: rgb(56, 70, 79);&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Setup some parameters that we will use within the script&lt;br /&gt;
#declare MAP_WIDTH=8192;&lt;br /&gt;
#declare MAP_HEIGHT=8192;&lt;br /&gt;
#declare MAP_EL=600; // elevation&lt;br /&gt;
&lt;br /&gt;
global_settings { &lt;br /&gt;
  // ambient light level&lt;br /&gt;
  ambient_light rgb&amp;lt;1,1,1&amp;gt; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Set a directional light&lt;br /&gt;
light_source {&lt;br /&gt;
  &amp;lt;100,-100,100&amp;gt; * 20, color rgb 1&lt;br /&gt;
  parallel&lt;br /&gt;
  point_at &amp;lt;1, 0, 0&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Set the background colour&lt;br /&gt;
background {rgb&amp;lt;1,1,1&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
// Define our camera position, and set it to &amp;quot;orthographic&amp;quot; (important :)&lt;br /&gt;
camera {&lt;br /&gt;
  orthographic&lt;br /&gt;
  location &amp;lt;0,0,MAP_EL + 90&amp;gt;    // position &amp;amp; direction of view&lt;br /&gt;
  look_at  &amp;lt;0,0,0&amp;gt;&lt;br /&gt;
  right MAP_WIDTH*x            // horizontal size of view&lt;br /&gt;
  up MAP_HEIGHT*z               // vertical size of view&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ** Define our primary textures **&lt;br /&gt;
 &lt;br /&gt;
// lowest texture (512 x 512)&lt;br /&gt;
// Found in low lying areas of the heightfield&lt;br /&gt;
#declare level1_texture =&lt;br /&gt;
texture {&lt;br /&gt;
  pigment {&lt;br /&gt;
    image_map {&lt;br /&gt;
      png &amp;quot;level1.png&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  finish {ambient 1 diffuse 0}&lt;br /&gt;
  scale &amp;lt;512/MAP_WIDTH, 512/MAP_WIDTH, 512/MAP_WIDTH&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// middle texture (512 x 512)&lt;br /&gt;
// Found in the middle areas of the heightfield&lt;br /&gt;
#declare level2_texture =&lt;br /&gt;
texture {&lt;br /&gt;
  pigment {&lt;br /&gt;
    image_map {&lt;br /&gt;
      png &amp;quot;level2.png&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  finish {ambient 1 diffuse 0}&lt;br /&gt;
  scale &amp;lt;512/MAP_WIDTH, 512/MAP_WIDTH, 512/MAP_WIDTH&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// highest texture (512 x 512)&lt;br /&gt;
// Found in the peaks / hills / mountains of the heightfield&lt;br /&gt;
#declare level3_texture =&lt;br /&gt;
texture {&lt;br /&gt;
  pigment {&lt;br /&gt;
    image_map {&lt;br /&gt;
      png &amp;quot;level3.png&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  finish {ambient 1 diffuse 0}&lt;br /&gt;
  scale &amp;lt;512/MAP_WIDTH, 512/MAP_WIDTH, 512/MAP_WIDTH&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define a texture that blends from one level&amp;#039;s texture to the next, &lt;br /&gt;
// depending on elevation:&lt;br /&gt;
#declare levels_elevation_texture=&lt;br /&gt;
texture {&lt;br /&gt;
  gradient z&lt;br /&gt;
  &lt;br /&gt;
  texture_map {&lt;br /&gt;
    [0.00 level1_texture]  // from 0.0 to 0.1 we have just level1.png&lt;br /&gt;
    [0.10 level1_texture]&lt;br /&gt;
                    // from 0.1 to 0.2 we blend from level1.png to level2.png&lt;br /&gt;
    [0.30 level2_texture]  // from 0.2 to 0.5 we have just level2.png&lt;br /&gt;
    [0.40 level2_texture]&lt;br /&gt;
                    // from 0.5 to 0.6 we blend from level2.png to level3.png&lt;br /&gt;
    [0.60  level3_texture]  // from 0.6 to 1.0 we have just level2.png&lt;br /&gt;
    [1.00  level3_texture]&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// ** Define textures used on areas of slope&lt;br /&gt;
&lt;br /&gt;
// lower slope texture (512 x 512)&lt;br /&gt;
#declare slope1_texture =&lt;br /&gt;
texture {&lt;br /&gt;
  pigment {&lt;br /&gt;
    image_map {&lt;br /&gt;
      png &amp;quot;slope1.png&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  finish {ambient 1 diffuse 0}&lt;br /&gt;
  scale &amp;lt;512/MAP_WIDTH, 512/MAP_WIDTH, 512/MAP_WIDTH&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// upper slope texture (512 x 512)&lt;br /&gt;
#declare slope2_texture =&lt;br /&gt;
texture {&lt;br /&gt;
  pigment {&lt;br /&gt;
    image_map {&lt;br /&gt;
      png &amp;quot;slope2.png&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  finish {ambient 1 diffuse 0}&lt;br /&gt;
  scale &amp;lt;512/MAP_WIDTH, 512/MAP_WIDTH, 512/MAP_WIDTH&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define a texture that blends from one slope&amp;#039;s texture to the next, &lt;br /&gt;
// depending on elevation:&lt;br /&gt;
#declare slopes_elevation_texture=&lt;br /&gt;
texture {&lt;br /&gt;
  gradient z&lt;br /&gt;
  &lt;br /&gt;
  texture_map {&lt;br /&gt;
    [0.00 slope1_texture]&lt;br /&gt;
    [0.30 slope1_texture]&lt;br /&gt;
    &lt;br /&gt;
    [0.65  slope2_texture]&lt;br /&gt;
    [1.00  slope2_texture]&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ** Now define the final texture blending between the height textures &lt;br /&gt;
// and the slope textures:&lt;br /&gt;
#declare final_texture = &lt;br /&gt;
texture {&lt;br /&gt;
  slope {&lt;br /&gt;
    &amp;lt;0,0,-1&amp;gt;, 0, 0.5&lt;br /&gt;
  } &lt;br /&gt;
  texture_map {&lt;br /&gt;
    [0.00    levels_elevation_texture]&lt;br /&gt;
    [0.06    levels_elevation_texture]&lt;br /&gt;
    [0.40    slopes_elevation_texture]&lt;br /&gt;
    [1.00    slopes_elevation_texture]&lt;br /&gt;
  }&lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
// ***!! Now we declare our heightfield object that uses this texture&lt;br /&gt;
#declare primaryHF=&lt;br /&gt;
height_field {&lt;br /&gt;
  png &amp;quot;povmap_height.png&amp;quot;                                  &lt;br /&gt;
  smooth              // smooth the heightfield&lt;br /&gt;
  no_shadow           // you may want to remove this&lt;br /&gt;
  translate &amp;lt;-.5, -.5, -.5&amp;gt;&lt;br /&gt;
  rotate &amp;lt;90,0,0&amp;gt;     // rotate it so that the projection of the texture is correct&lt;br /&gt;
  scale &amp;lt;1,-1,1&amp;gt;      // invert the y axis&lt;br /&gt;
  translate &amp;lt;0.5, 0.5, 0.5&amp;gt;&lt;br /&gt;
  texture {&lt;br /&gt;
    final_texture&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  // now scale to the maps height x width&lt;br /&gt;
  scale &amp;lt;MAP_WIDTH, MAP_HEIGHT, MAP_EL&amp;gt;    &lt;br /&gt;
  // and center it for the camera&lt;br /&gt;
  translate &amp;lt;-MAP_WIDTH/2, -MAP_HEIGHT/2, -MAP_EL/2&amp;gt;   &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// ** If you&amp;#039;re going to add the metal placement stuff&lt;br /&gt;
// ** described below, you need to put it here!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
object {primaryHF}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
What we&amp;#039;re essentially doing above is:&lt;br /&gt;
&lt;br /&gt;
* Setting up scene parameters: lighting, the orthographic camera, etc.&lt;br /&gt;
&lt;br /&gt;
* Defining a set of textures to display at different elevations and different slopes; and&lt;br /&gt;
&lt;br /&gt;
* Defining a heightmap that uses our png image and applies our texture to this object&lt;br /&gt;
&lt;br /&gt;
8) Double click on your gen_pov_texture.pov file so that it opens up in Povray.&lt;br /&gt;
&lt;br /&gt;
9) Add a new render size (8192 x 8192):&lt;br /&gt;
&lt;br /&gt;
9.1)	Drop down menu &amp;quot;Render&amp;quot; &amp;gt; &amp;quot;Edit Settings/Render&amp;quot; &amp;gt; Click &amp;quot;Edit&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
9.2)	Add text at bottom of file:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-style:italic; font-size:90%; border:1px dashed white; background-color: rgb(56, 70, 79);&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[8192x8192, No AA  Spring]&lt;br /&gt;
Width=8192&lt;br /&gt;
Height=8192&lt;br /&gt;
Antialias=Off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
9.3) Save file&lt;br /&gt;
&lt;br /&gt;
10) Restart Povray so that it re-reads the ini-file&lt;br /&gt;
&lt;br /&gt;
11) Select your new render size and click Render.  This creates a bitmap file: gen_pov_texture.bmp&lt;br /&gt;
&lt;br /&gt;
12) Convert to gen_pov_texture.bmp to a png file if you&amp;#039;re using the new mapconv (it doesn&amp;#039;t seem to like bitmaps).  I personally use [http://www.imagemagick.org/ imagemagick] to do this as it has a simple command line program &amp;quot;convert.exe&amp;quot; that will convert an image from one format to another and it works well with the very large bitmap image that comes out of the above steps.&lt;br /&gt;
&lt;br /&gt;
13) Do all the other map stuff: metal placement bitmap, feature placement bitmap, smd file&lt;br /&gt;
&lt;br /&gt;
14) Compile your map with mapconv&lt;br /&gt;
&lt;br /&gt;
15) Test it :)&lt;br /&gt;
&lt;br /&gt;
== Advanced stuff ==&lt;br /&gt;
Check out your help file that came with Povray.  There is a LOT that you can do!&lt;br /&gt;
&lt;br /&gt;
=== Complex Texture Map Combinations ===&lt;br /&gt;
As you can see from the pov code above, a &amp;quot;texture&amp;quot; declaration can be an image (called an &amp;quot;image_map&amp;quot;), but it can also be a definition of a blend between any number of earlier defined textures (called a &amp;quot;texture_map&amp;quot;), which is based on a function.  In the above example, it uses the &amp;quot;gradient&amp;quot; function for changes in elevation, and the &amp;quot;slope&amp;quot; function for changes in slope.  It is possible to define much more complex sets of textures than those defined above, such as mixing different combination of slope mapings with combinations of elevation mapings.&lt;br /&gt;
&lt;br /&gt;
Our blend function could actually be an image if you wanted finer control of a map&amp;#039;s texture, by having sections of metal mixed with sections of wilderness, for example.  To do this, you would:&lt;br /&gt;
&lt;br /&gt;
1) Create a new png image the same size as your heightmap (although you could make it larger or smaller) and paint sections of the map that are to use your wilderness textures in white, and the sections that are to use your metal texture in black.  For effect you could do a slight blur on the image to create grey coloured transitions where the two sections meet.  For our example I created this:&lt;br /&gt;
&lt;br /&gt;
[http://img185.imageshack.us/my.php?image=texturedistributionpa8.png http://img185.imageshack.us/img185/2641/texturedistributionpa8.th.png]&lt;br /&gt;
&lt;br /&gt;
3) Change the &amp;quot;final_texture&amp;quot; texture name in your script to &amp;quot;final_nature_texture&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4) Define a set of textures in a similar manner that define your metal textures (based on heights and slopes), with the final blended metal texture named &amp;quot;final_metal_texture&amp;quot;.  Don&amp;#039;t forget to give them different names than the wilderness texture names are.&lt;br /&gt;
&lt;br /&gt;
5) Create a new &amp;quot;final_texture&amp;quot; that is:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-style:italic; font-size:90%; border:1px dashed white; background-color: rgb(56, 70, 79);&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#declare final_texture = &lt;br /&gt;
texture {&lt;br /&gt;
  image_pattern { png &amp;quot;texture_distribution.png&amp;quot; }&lt;br /&gt;
  texture_map {&lt;br /&gt;
    [0.00    final_metal_texture]&lt;br /&gt;
    [1.00    final_nature_texture]&lt;br /&gt;
  }&lt;br /&gt;
}  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here is a screen shot of our map using this:&lt;br /&gt;
&lt;br /&gt;
[http://img341.imageshack.us/my.php?image=screen000wd0.png http://img341.imageshack.us/img341/43/screen000wd0.th.png]&lt;br /&gt;
&lt;br /&gt;
=== Procedural Textures ===&lt;br /&gt;
It is also possible to use &amp;quot;procedural textures&amp;quot; instead of image_map textures.  These can be quite useful for areas on your map that have a high slope as they can create a better looking texture, including effects such as the layered rock textures - like &amp;quot;Painted Rock&amp;quot;.  Unfortunately these types of textures can result in larger map sizes, but if you just use them on the high slope areas of your map it should not be too bad.&lt;br /&gt;
&lt;br /&gt;
Some good examples used in terrains can be found at the [http://geomorph.sourceforge.net/povray/en/Geomorph%20-%20Predefined%20Povray%20Scripts.html Geomorph website].&lt;br /&gt;
&lt;br /&gt;
The povray install also includes a number of nice example procedural textures.&lt;br /&gt;
&lt;br /&gt;
=== Placing Metal Textures ===&lt;br /&gt;
There are quite a few posible ways to have Povray place metal textures for you.  One approach that I have used is:&lt;br /&gt;
&lt;br /&gt;
1) Define a function that will return the current metal locations in a pov kind of way:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-style:italic; font-size:90%; border:1px dashed white; background-color: rgb(56, 70, 79);&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #declare getMetal = function {&lt;br /&gt;
    pigment {&lt;br /&gt;
      image_map {&lt;br /&gt;
        png &amp;quot;metallocations.png&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
      scale &amp;lt;1,-1,1&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This function, when called for a given coordinate (0 to 1), returns a vector of the three colours for that point.&lt;br /&gt;
&lt;br /&gt;
2) We now define a texture that we&amp;#039;ll use for our metal (this is made up of a number of subcomponent textures):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-style:italic; font-size:90%; border:1px dashed white; background-color: rgb(56, 70, 79);&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// A transparent texture&lt;br /&gt;
#declare Transparent_Texture=&lt;br /&gt;
texture {&lt;br /&gt;
	pigment {color rgbt&amp;lt;0,0,0,1&amp;gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// A simple brownish texture&lt;br /&gt;
#declare dirt_Texture=&lt;br /&gt;
texture {&lt;br /&gt;
  pigment { rgb &amp;lt;0.75,0.55,0.35&amp;gt;*0.7 }&lt;br /&gt;
  normal {&lt;br /&gt;
    granite 0.5  // for use with normal{} (0...1 or more)&lt;br /&gt;
    //scale MAP_WIDTH&lt;br /&gt;
  }&lt;br /&gt;
  finish {&lt;br /&gt;
    ambient 0.5&lt;br /&gt;
    diffuse .9&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// A shiny metalish texture&lt;br /&gt;
#declare metal_TextureBase = &lt;br /&gt;
texture { &lt;br /&gt;
  pigment {&lt;br /&gt;
    rgb&amp;lt;1,1,1&amp;gt;    &lt;br /&gt;
  }&lt;br /&gt;
  normal {&lt;br /&gt;
      granite 0.9  // for use with normal{} (0...1 or more)&lt;br /&gt;
    scale 80/5&lt;br /&gt;
  }&lt;br /&gt;
  finish {&lt;br /&gt;
    ambient 0.6&lt;br /&gt;
    brilliance 4&lt;br /&gt;
    diffuse 1&lt;br /&gt;
    specular 0.90&lt;br /&gt;
    roughness 1/80&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// A combination of the metal_TextureBase, the dirt_Texture and the&lt;br /&gt;
// Transparent_Texture&lt;br /&gt;
#declare metal_Texture=&lt;br /&gt;
texture {&lt;br /&gt;
  bozo              // very smooth, random noise function&lt;br /&gt;
  turbulence 0.3  // turbulence often useful&lt;br /&gt;
&lt;br /&gt;
  texture_map {&lt;br /&gt;
    [0.0  metal_TextureBase]  //T_Silver_3B&lt;br /&gt;
    [0.42  metal_TextureBase]&lt;br /&gt;
    [0.47  dirt_Texture]&lt;br /&gt;
    [0.50  dirt_Texture]&lt;br /&gt;
    [0.55  Transparent_Texture]&lt;br /&gt;
    [1.0  Transparent_Texture]&lt;br /&gt;
  }&lt;br /&gt;
  //scale &amp;lt;16, 16, 16&amp;gt; //even&lt;br /&gt;
  scale &amp;lt;7, 32, 16&amp;gt; //stretched &lt;br /&gt;
  rotate z*40  //set it at an angle so it looks betterer ;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#declare blob_Texture=&lt;br /&gt;
texture {&lt;br /&gt;
  slope { z, 0.0, 0.5 }&lt;br /&gt;
  texture_map {&lt;br /&gt;
    [0.0  Transparent_Texture]&lt;br /&gt;
    [0.6  Transparent_Texture]&lt;br /&gt;
    [1.0  metal_Texture]&lt;br /&gt;
  }&lt;br /&gt;
}  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
3) Finally, we define a &amp;quot;blob&amp;quot; object that adds a sphere object to the master blob object for each point in the metal map: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-style:italic; font-size:90%; border:1px dashed white; background-color: rgb(56, 70, 79);&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;  #declare metalBlob=&lt;br /&gt;
  blob {&lt;br /&gt;
  #declare geos=0;&lt;br /&gt;
  #declare ix=4.0;&lt;br /&gt;
  #declare num=0;&lt;br /&gt;
  #while (ix &amp;lt; MAP_WIDTH)&lt;br /&gt;
    #declare iy=0.0;&lt;br /&gt;
    #while (iy &amp;lt; MAP_WIDTH)&lt;br /&gt;
      #declare metal=getMetal(ix/MAP_WIDTH, iy/MAP_WIDTH, 0);&lt;br /&gt;
      #if (metal.red)&lt;br /&gt;
        #declare Pos = trace(primaryHF,&amp;lt;ix-MAP_WIDTH/2, -iy+MAP_WIDTH/2, MAP_EL*2&amp;gt;,-z);&lt;br /&gt;
        sphere {&lt;br /&gt;
            //Pos-&amp;lt;0,0,5&amp;gt;, 8*6, 8  &lt;br /&gt;
            Pos-&amp;lt;0,0,5&amp;gt;, 8*2, 8  &lt;br /&gt;
        }&lt;br /&gt;
      #end &lt;br /&gt;
      #declare iy=iy+8;&lt;br /&gt;
    #end&lt;br /&gt;
    #declare ix=ix+8;&lt;br /&gt;
  #end&lt;br /&gt;
  &lt;br /&gt;
    texture {&lt;br /&gt;
      blob_Texture&lt;br /&gt;
    }&lt;br /&gt;
    scale &amp;lt;1,1,0.5&amp;gt;  &lt;br /&gt;
  }  //metalBlob&lt;br /&gt;
&lt;br /&gt;
  object {metalBlob}&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This all adds some time to the rendering time, but seems to work well enough (although it could be nicer).&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category: Map_making]]&lt;/div&gt;</summary>
		<author><name>intermapmaking&gt;Flozi</name></author>
	</entry>
</feed>