1 / 14

Terrains

Terrains. Creating an Island. Find a map that may contain an island. Zoom in on an island in a map. Paste it into GIMP. Crop & convert to grayscale. Duplicate the layer and work on the duplicate.

ctimmer
Download Presentation

Terrains

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Terrains Creating an Island

  2. Find a map that may contain an island.

  3. Zoom in on an island in a map.

  4. Paste it into GIMP.

  5. Crop & convert to grayscale.

  6. Duplicate the layer and work on the duplicate.

  7. Note water depth is actually a negative value. So we’ll set the land to be above sea level . . .

  8. . . . by setting it to 36 (+5 above the deepest water value of -31).

  9. But it’s difficult to distinguish between the values.

  10. So we’ll use 100 for sea level (to spread out the values).

  11. Make a table of values (using a linear relationship). But keep the gray values between [0..255] inclusive.

  12. Alternative: Creating binary terrains with Java • Use FileOutputStream for binary output. (System.out.println produces ASCII text output.) • Write a Java program that creates a file of 1000*1000 integer values in the range [0.255]. • Be creative. You may wish to use sin, cos, tan, pow, etc. • Load your file into GIMP. • Send and print your program and a screen dump of the result in GIMP to me.

  13. Extra: • Simply check your raw file in GIMP by creating a .pgm file. Add the following to your code right before you write out the raw bytes: • String s = “P5\n1000 1000\n255\n"; • Using the FileOutputStream, write out the above before you write any raw data.

  14. Bring your new Terrain into Unity • Terrain --> Create Terrain • Terrain --> Import Heightmap – Raw • Then proceed working on Chapter 2: Environments in Unity Game Development Essentials.

More Related