Questions tagged [terrain]

Terrain, or land relief, is the vertical and horizontal dimension of land surface. Terrain is used as a general term in physical geography, referring to the lie of the land. This is usually expressed in terms of the elevation, slope, and orientation of terrain features. In games, terrain is the "land" or "world" on which the game environment, roads, buildings, vehicles, characters are placed and interact with each other.

Terrain, or land relief, is the vertical and horizontal dimension of land surface. Terrain is used as a general term in physical geography, referring to the lie of the land. This is usually expressed in terms of the elevation, slope, and orientation of terrain features. In games, terrain is the "land" or "world" on which the game environment, roads, buildings, vehicles, characters are placed and interact with each other.

This tag is for question related to terrain, its properties, problems related to setting different properties, lighting, textures, simulating gravity, friction etc for use in games or simulations.

574 questions
6
votes
4 answers

Making the diamond square fractal algorithm infinite

I'm trying to generate an infinite map, as such. I'm doing this in Python, and I can't get the noise libraries to correctly work (they don't seem to ever find my VS2010, and doing it in raw Python would be way too slow). As such, I'm trying to use…
PrettyPrincessKitty FS
  • 6,117
  • 5
  • 36
  • 51
6
votes
1 answer

Procedural generation of a constrained landscape

I'd like to implement a procedural generation of a terrain. After a thorough research I came up with a conclusion that it should be implemented with one of the gradient (coherent) noise generation algorithms, for instance Perlin Noise…
JeB
  • 11,653
  • 10
  • 58
  • 87
6
votes
1 answer

How can I smooth out my terrain generator?

I am experimenting with a new algorithm for random landscape generation. This method was my idea, so it may turn out to be impossible. In the meantime, I'm trying to smooth this thing out. public static void generate(){ for(int x = -64; x <=…
Joe Johnson
  • 177
  • 1
  • 7
5
votes
3 answers

Algorithm to calculate 2D terrain from observed sunrises

A team of people in South America stand at points along the equator at an equiangular distance from each other (measured from the center of the earth). Due to mountainous terrain, they each stand at different altitudes. Our goal is to determine…
Phrogz
  • 296,393
  • 112
  • 651
  • 745
5
votes
2 answers

How to project a rectangle onto a Mesh/Terrain object, for use as a select marquee? (in three.js)

I have a terrain which was generated using the THREE.Terrain library. I'd like to be able to click and drag out a marquee and select objects that are on the surface of the Terrain Mesh. Currently I am detecting the start and end of the drag, and…
Tom
  • 3,324
  • 1
  • 31
  • 42
5
votes
1 answer

Efficiently providing geometry for terrain physics

I have been researching different approaches to terrain systems in game engines for a bit now, trying to familiarize myself with the work. A number of the details seem straightforward, but I am getting hung up on a single detail. For performance…
Mako_Energy
  • 352
  • 2
  • 19
5
votes
6 answers

OpenGl VBO technicalities in C++

I'm a little confused as to the proper usage of VBOs in an OpenGL program. I want to create a terrain paging algorithm, using a map called from a 4096x4096 greyscale heightmap as the "whole" map. From what I've read, each vertex stored in the VBO…
Brian
  • 331
  • 3
  • 12
5
votes
2 answers

Fractal noise terrain generating strange artefact lines

I have a terrain generated of a Perlin Fractal Noise pattern that generates quite remarkable terrain. The problem I'm having is some veird lines going across both X and Z coordinates, I'm thinking it has to do with the fractal generation but as I…
Patrick Dahlin
  • 286
  • 2
  • 5
  • 19
5
votes
2 answers

Estimate the gradient of an undefined surface

I want to estimate the gradient (slope and aspect) of an undefined surface (i.e., the function is unknown). To test my methods, here is the test data: require(raster); require(rasterVis) set.seed(123) x <- runif(100, min = 0, max = 1) y…
Scott
  • 161
  • 8
5
votes
2 answers

Create a Random 2D Concave Polygon Landscape JavaScript

I'm writing a simple lunar lander clone in JavaScript (http://www.isogenicengine.com/demos/1.1.0/lander/) and instead of a basic landscape that just has highs and lows, I'd like an algorithm to generate random cave-like spaces. Given a rectangular…
Rob Evans
  • 6,750
  • 4
  • 39
  • 56
5
votes
1 answer

Three.js - multiple material plane

I'm trying to have multiple materials on a single plane to make a simple terrain editor. So I create a couple of materials, and try to assign a material index to each vertex in my plane: var materials = []; materials.push(new THREE.MeshFaceMaterial(…
David Menard
  • 2,261
  • 3
  • 43
  • 67
4
votes
1 answer

Is there a raycasting library in C++ that is simple and open source?

I'm looking for a library that will let me cast a ray into a scene model (it happens to be a terrain model in our case) and return the point of intersection in the scene. It does not have to be super-efficient (although I'd rather it not be…
Alton Patrick
  • 235
  • 1
  • 4
  • 10
4
votes
2 answers

Help with using the perlin noise library libnoise

When I call libnoise's getvalue function with x, y, and z as integers I always get 0 back as a result. Is this normal? When I try 1.25, 0.75, 0.5 as in the tutorial http://libnoise.sourceforge.net/tutorials/tutorial2.html I get the expected result…
Xavier
  • 8,828
  • 13
  • 64
  • 98
4
votes
1 answer

random voxel terrain on the gpu (dc vs. cms)

I want to create a random fractal terrain on the gpu (with a compute shader). I've started with implementing marching cubes: Generating Complex Procedural Terrains Using the GPU, and it works really good: marching cubes on the gpu. However, marching…
sidit77
  • 49
  • 5
4
votes
2 answers

How to create a "scorched area" on a 3D terrain?

i'm experimenting a bit with C# and XNA. Going through the advanced "Riemers tutorials" helped me a lot, but i want to make my terrain even better. I have a simple game where player controls a tank and destroys other buildings and tanks. I would…
PeterK
  • 6,287
  • 5
  • 50
  • 86
1 2
3
38 39