Skip to main content
gamedev.net
🔒 Locked

Dynamic landscape

Started by PetrCBR 4 replies 1.4k views
Original Post
PetrCBR
PetrCBR
Hi. What is the best way, how to create landscape dynamically ? Is anybody from here with any ideas, how to make it, how to place textures into them (not the same texture to all landscape) etc. ? Petr
neneboricua19
neneboricua19
This is not really a DirectX question. You're looking more for an algorithm. While there might be some people here with experience rendering totally dynamic terrain, you would probably better off asking this question in the Game Programming forum or in the Graphics Programming and Theory forum. I have a little knowledge about dynamic terrain but not enough to where I could give you a good solution to the problem.

Terrain rendering is an important issue that many games must address and is therefor a common topic, especially in the Graphics Programming and Theory forum.

neneboricua
Sages
Sages
Quote:
Original post by PetrCBR
What is the best way, how to create landscape dynamically ?


There are several different algorithms for creating landscape geometry. The most common is to build your terrain geometry based on a height map generated using one of the many available algorithms. Below are some key words to search for:

Mid-Point Displacement
Fault Formation
Particle Deposition
Fluid Simulation

Quote:
Original post by PetrCBR
how to place textures into them (not the same texture to all landscape) etc. ?


Again, several methods. A common method that can be used to great effect is known as texture splatting. A good place to start with terrain rendering is www.vterrain.org

Hope this helps and don't hesitate to ask if you need further assistance.
Fahrenheit451
Fahrenheit451
I am working on a demo that does exactly what you're asking, and will incorporate those very algorithms Sages mentioned. Actually, it's still very much a test harness not a demo, but you can see four algorithms in action as of today - hill, fluid, fault, and the plasma mid-point (got those last two from the book by Trent Polak - Focus on 3D Terrain Programming - get that book if you're serious about working on terrains!). Since it's still a test harness there is no UI to control the parameters for the algorithms so you are stuck with the fixed settings I have in there at present, but you can get an idea of the terrains capable of being generated with those three algorithms, and also procedural texturing. Procedural Texturing is probably the starting point for texturing dynamic terrains. You can make a second pass using the Splatting technique to add extra detail. In my program I have developed my own "splatting" routine (B key enables/disables).

ProcDetTex.zip

Press the following key's : HQQQBRK and then take the camera down to have a look around. This is totally unoptimised code/routines - completely brute-force. At 64x64 though it should run ok on most systems. F1 for help menu. Probably lots of bugs also :) If you get a really spikey terrain, just hit the A key to smooth, then R to re-texture.

Let me know if it doesn't run or gives errors!

F451

EDIT : Just added in the fluid algorithm that Sages pointed out. Very nice.

[Edited by - Fahrenheit451 on January 16, 2005 7:00:34 AM]
Sages
Sages
Quote:
got those last two from the book by Trent Polak - Focus on 3D Terrain Programming - get that book if you're serious about working on terrains!

Trent (mittens) Polak's book is a nice introduction into the world of terrains. I would also recommend Snook's "Real-Time 3D Terrain Engines using C++ and DirectX 9". Aside from that there are several researches who find terrain rendering especially interesting. You can find several good links on my site's links page.

Quote:
Original post by Fahrenheit451
EDIT : Just added in the fluid algorithm that Sages pointed out. Very nice.

Congratulations! Happy I could be of some assistance.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.