Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Making terrain maps/

Author
Message
JohnA
13
Years of Service
User Offline
Joined: 20th Jul 2011
Location: The second star on the right
Posted: 10th Aug 2011 14:48
I know i need a texture and a diffuse map and a terrain height map. My question is how do i create these maps so that i can have a map object that is not generate random each compile. I want to create map for the unique final map and put in things like building and trees and grass. Please help.



John

Heres Johnny
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 10th Aug 2011 20:11 Edited at: 10th Aug 2011 20:12
how do you create random maps every compile? this is pretty hard, i don't really know what you're doing, but if you just follow the tutorial provided with DarkGDK, nothing is random, the images are on your hard drive, same images will give you same results, nothing random

JohnA
13
Years of Service
User Offline
Joined: 20th Jul 2011
Location: The second star on the right
Posted: 11th Aug 2011 07:12
thank for you help, i guess what i am asking is how do i make the files for terrain like the ones in the tutorial. They are already made and its not clear how to make the actualy files for my own map and texture files.

Heres Johnny
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 11th Aug 2011 14:14
use GIMP or paint or photoshop (if you own it) or any image editor, you basically create an image, and use it, how images are made is up to you, and depends on the used program, but keep in mind:

height map: monochrome image (black and white), brighter pixels represents crests and darker pixels represents troughs

detail map: i still really don't understand what is it exactly, or how it works, but probably any seamless noise image will work (though, i would really like to know if someone knows what it does exactly, im trying to implement detail maps in my engine but i don't know if they're blended with the texture or they're normal maps or whatever..)

color or diffuse map: texture of your terrain, colors

JohnA
13
Years of Service
User Offline
Joined: 20th Jul 2011
Location: The second star on the right
Posted: 11th Aug 2011 15:17
Thank you Hassan, your info was just what i needed. Cheers

Heres Johnny
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 11th Aug 2011 21:58 Edited at: 11th Aug 2011 22:01
I like to use L3DT to create the files in question.

Although I'm finding it to be a bit of a science, it will create the height-map, light-map, diffuse-map and a slew of other files that can be used with Terrains. I'm not sure if the other files are worth using in GDK, but they are generated non-the-less.



Regards,
JTK

Edit: Don't think that the version number signals an unstable release...
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 14th Aug 2011 00:35
If you want to make some random height maps, but don't want to store them, it can be done:
First thing you need to know is that there is no such thing as a random to a computer--it's psudo-random. I have a planet generator in one of my games that uses this concept. Each planet's terrain is generated on-the-fly. This would be a problem (going back to the same planet you just visited and the terrain has changed), but because a computer's random is a "seed" driven calculation, you can simply make the seed the same each time you go to that planet:

int TheSeedForThePlanet=123456;//*** whatever you want the seed to be
dbRandomize(TheSeedForThePlanet);
.... randomly generate the terrain.....

Each planet has it's own "TheSeedForThePlanet" number assigned, so when you orbit the planet it "seeds" the generator and will generate the same terrain for that planet EVERY TIME.


*** NOW FOR THE TERRAIN ********
You can use that same concept for generating some terrain in a game. You have to make a memblock for your height map do your random generator and write the info into your memblock. Make an image from the memblock and save the image to disk (I just use "map.jpg"). I assume you know how to make a terrain from the height map you just made.... Your ground texture can be done similarly except you don't have to save that image. The "detail" image is kinda generic, so I would have 1-5 (max) variations to use on your terrain. Keep in mind that your terrain cannot exceed 256x256 without some issues.

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-10-02 19:17:01
Your offset time is: 2024-10-02 19:17:01