Skip to main content
GameDev.net gamedev.net
🔒 Locked

Terrain Engine in D3D

Started by mokhans Jul 5, 2004 at 10:47 PM 3 replies 1k views
Original Post
mokhans
mokhans
Hi, I'm building Terrain engine in D3D.I've made a mesh myself using Triangles,Infact a Grid.I was just thinking that is there anyother way to build the mesh like we specify some points,Let's say 6-8 points and it generates mesh for us.I've seen a topic in DXSDK named "High Order Primitives",Can we use it for making Terrain?.Thanks. Owais.
Muhammad Haggag
Muhammad Haggag
Procedural terrains are possible. There's a sample on Robert Dunlop's homepage that does fitting with catmull-rom splines (I think) in the shader (it's likely to be in his scrapyard).

I don't know about D3D's high-order primitives, but you have some D3DX helpers for splines that might be of use.

Supernat02
Supernat02
Is your question about a function that will create a grid of spaced vertices for you, allowing you to provide the spacing value? I don't believe so. That's fairly easy to write mathematically though.

However, for height issues, there are a lot of examples on height maps, which you may find to be a valid solution to your problem. You can also find information on perlin noise, midpoint displacement, and other fractal algorithms capable of randomly creating terrain heights. Once you have that under your belt, you can look into geomipmapping and ROAM algorithms for displaying your terrain efficiently.

Good luck,
Chris
Chris ByersMicrosoft DirectX MVP - 2005
d000hg
d000hg
If you have a grid of points, but much less detailed ie further apart than currently, you can use those points to build a curved surface for each 3x3(I think) subsection of the grid.
mokhans
mokhans
How can i use those points to build a curved surface for each 3x3 subsection of the grid.Please,tell me where can i get working examples on it? or on High Order Primitives.Thanks.

Topic Locked

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

Sign in to reply to this topic.