Jump to content
  • Advertisement
Sign in to follow this  
jagguy2

terragen and directx

This topic is 3934 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
you can only get the terrain model with this method,
as far as i know there is no way to export the textures.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!