terragen and directx

Started by
21 comments, last by jagguy2 16 years, 3 months ago
Hi, I have terragen 2 (free version) and 0.9. I want to create terrain to load into directx c++. To do this i see the terragen files are saved as .tdg and i believe i need it in RAW format. q)How to I get the terragen files in a format I can load into directx? q)I need to create a height map with terragen yes as directx can handle this?
Advertisement
I've never used terragen, so I can't tell you how to make it save the file in .raw format. I can tell you, however, that Direct3D doesn't know anything about heightmaps or terrain, so you'll have to implement that yourself. Here's one tutorial that will show you how.
Hi,

i have a directx book that says you need to create a height map saved in raw format. Directx can load this in.

I dont care what software can do this as i see terragen is popular but there may be better ones i dont know.
I dont want to create 10000 triangles by hand to represent the terrain and create textures for all so i look for software that can do this (for free initially)

i will check your website
hi,

you can import your terragen terrains into blender,
which is a freeware 3d editing software.

blender: http://www.blender.org
ter2blend: http://home.pacbell.net/c_keith/projects/blender/misc/Terragen.html

with blender, you can export them as .x file.

have phun, shrooms
hi,

Why would i do that as wouldnt i lose a lot of quality by importing terragen file into blender to make a .x file?

q) does terragen (or anything else)create the terrain with textures or color? for directx i need to know this information and how to get access to colors used or textures used. Just getting a RAW file doesnt tell me this information
you can only get the terrain model with this method,
as far as i know there is no way to export the textures.
is there a common way to render terrain? i was told to use a terrain app and export as RAW then load into directx? i have code on how to do this and a working program on such a method
i used terragen to export a landscape 8 bit raw file landscape and import this into directx. Th landscape is nothing like the one i created in terragen and even when i import the same raw file back in terragen it has completely changed and i am frustrated.

When people create terrain for games are they really creating the whole thing in photoshop or 3dsMax or no set method? I dont want to waste days on unproved techniques nobody uses.


q)do i create a RAW file or .x file with terrain? what is the difference?

terrain making seems to be a grey area (and greyscale)in gameplay with directx
The RAW file you're exporting is probably a grey scale height map of the terrain you created in Terragen.

What you have to do now is in directx, create a vertex buffer with a width and height equal to the width and height of your image. Then you manually adjust each vertex to the height that is saved in your height map.
You can have terregen export the heightmap data in their native *.ter file format, and create a simple parser for it. This is what I am currently doing, and it works quite well. The best benefit is that it isnt *.raw.

I can give you my current codec, if you like. PM me if you are interested. It is API independent.

If you would like more information, this should help.

Hope this helps!

This topic is closed to new replies.

Advertisement