Thursday, January 22, 2015

Creating or Customizing a Tool

Textures for Planets comes with three tools out of the box: crater, canyon, and volcano, but you can build your own or customize existing ones. You may notice above that the default crater I created looks a bit too perfect. For my purposes, smaller planets on a large starmap I found it showed better, but if you want more realism and randomization you can customize the tool as shown below. The same steps can be taken to create a new tool.

Heightmap

Each tool is based on a 100x100 pixels height map. This is a grayscale image that is applied over the terrain to raise or lower the land. Pixels coloured over 130, 130, 130 (RGB scale) raise the terrain and those lower than 120, 120, 120 depress the terrain. The darker the colour, the lower the terrain.

We're going to replace the default nicely round crater tool heightmap with the files below. A tool can have multiple heightmap images. Each time the tool is applied to the terrain Textures for Planets will randomly select one of the images to use.

The heightmap files must be named "heightmap#.png" all in lower cases where # is replaced by the image index 0, 1, 2, etc.






 

Putting it Together

In addition to your heightmaps you need a sample.png file and a tool.txt file.

The tool.txt file should contain content like this:
name=Improved Crater
defaultsize=5,25
defaultcount=50,150
author=<your name>
The default size represents the minimum and maximum degrees of latitude that the tool should span, and the default count is the minimum and maximum applications of the tool to a planet texture. These are used when a user creates a new tool step in their project.

The default sample.png for crater is below but you can use any 200x200 png file you like.


All your files together should look something like this:
  

 

Testing it Out

Zip up the heightmap, sample, and tool files into a single file called improvedcrater.zip and copy that into the Tools folder in your TexturesForPlanets home location. This is C:/Users/myname/TexturesForPlanets/Tools on my Windows 8 machine.

Launch Textures for Planets and select the default Martian or Rocky templates. Double click on the Crater step and click to change the tool. You should now be able to select your Improved Crater and try it out.


The completed zip can be downloaded here.

 

Share your Tools

If you create something that works out and you want to share, email it to me and I'll post it for others.



No comments:

Post a Comment