wiki.sine.space | sinespace

Gimp (8-bit)

From wiki.sine.space
Jump to: navigation, search
TerrainImport1.png

Without additional plugins, Gimp is limited to 8-bit accuracy. Depending on the desired altitude differences you may need to smooth the surface in Unity after import.

First, the dimension of the heightmap must be decided: the more detailed the more memory and processing power used. A reasonable choice could be roughly 1 point per 2 meters. The terrain size can be chosen freely, but the heightmap size must be one of the following: 33x33, 65x65, 129x129, 257x257, 513x513 1025x1025, 2049x2049 or 4097x4097.

1) In Gimp you create a new image with the chosen heightmap size, for example 513x513. In the extended adjustments choose gray scale instead of RGB colours.

TerrainImport2.png

2) Now, paint some structure and smooth it, or alternative you can import images from elsewhere. OpenSim for example can export terrain to .png graphics, which are understood by Gimp.

3) If a terrain heightmap is designed, you can export the result do the .data format. Gimp will show a dialog, in which you must switch from Standard (R,G,B) to Planar (RRR,GGG,BBB). The second selection remains on R,G,B (normal).

4) Unity understands only .raw images, so you must rename the .data output file into .raw file ending.

TerrainImport3.png

5) Now the import to unity follows. To reach the import dialog, enlarge the terrain section. In the right of the symbol bar a gear-wheel is shown. After selecting this, in the bottom of the shown details you find the button "Import Raw". That's near the place, where you surely already have chosen other region details like Terrain With, Length, Height, Detail resolution and so on. You select the file created by gimp, and after that a dialog box is shown. Here you can check if Unity has recognized the 8-bit data format and the dimensions of the heightmap. If not, here is the option to adjust it manually. Now, a checkmark must be set at "Flip vertically"! This is necessary, because the Y axis of Gimp points from up to down (into south direction), but in Unity the corresponding Z axis points into north direction.

That's it, after pressing the "Import" button the terrain should appear in the new structure.