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
0
votes
1 answer

XNA 4.0: terrain glitches caused by SpriteBatch

I'm trying to implement terrain collision in XNA so I've added some dynamic text that allows me to test whether calculations are correct. Everything was rendered just fine until I called: spriteBatch.Begin();…
thormond
  • 27
  • 5
0
votes
2 answers

OpenGL Terrain Texture3D Map

In OpenGL I am trying to map a terrain with 8 512x512 images using texture3D to get blended texture change. But OpenGL forces me to allocate 512x512x512 array instead of 512x512x8 What can be solution
Rakesh Malik
  • 607
  • 1
  • 6
  • 27
0
votes
2 answers

Antialias height map edge using Java 2D

I'm using Java 2D to render a terrain map. Terrain Map looks like this: You can see how the edges are rather jagged. I want to render the edge of the terrain smoothly, but turning on antialiasing with RenderingHints doesn't work because I render…
Leo Izen
  • 4,165
  • 7
  • 37
  • 56
0
votes
1 answer

customize terrain.js (three.js) Need to add lambert/wire material

I've recently started to play with three.js, and I am using terrain.js demo as a start for a design project I am working on. I will like to add a hybrid shader "wireframe/lambert" the default comes with wire shader only. This is the code from the…
Manuqc
  • 11
  • 5
0
votes
0 answers

Generating an block/voxel terrain efficiently without FPS drops?

I'm having a little trouble generating/displaying a terrain using Three.JS without major FPS drops. Here's the code I wrote to create each block and set the correct position: var TO_METERS = 10; var testOb = []; var blockGeometry = new…
Joey Morani
  • 25,431
  • 32
  • 84
  • 131
0
votes
3 answers

How do I generate a random 2D map for an iOS application?

I would like to be able to generate random terrain and store it in a file, but I'm not sure of the file type or how to generate it. I'm not really sure where to start and would appreciate any advice. I would not like to use any third party programs…
Jake Byman
  • 540
  • 12
  • 29
0
votes
1 answer

Sampler 2D Alpha Value Stays at 1

I create a texture for use in a 2D sampler as a displacement map for a mesh of tessellated terrain. Using the passed in vertex coordinates, I have a smooth interpolated value of the patch corners for subsequent vertices. When using the height value…
Behemyth
  • 195
  • 3
  • 13
0
votes
3 answers

artefacts during heightmap generation using plasma style fractal

I've spent a few hours today researching how random terrain generation tends to be done and after reading about the plasma fractal (midpoint displacement and diamond square algo's) I decided to try and have a go at implementing one. My result was…
David Burford
  • 791
  • 2
  • 8
  • 17
0
votes
0 answers

Terrain Generation and texturing

I need to texture my generated terrain for which i use the code below: ` private final int SIZE = 17; float[][] heightmap = new float[SIZE*2][SIZE]; private final int MAX_HEIGHT = 12; private final float[] MAX_COLOR_HEIGHTS = new float[] { …
mjanisz1
  • 1,478
  • 3
  • 17
  • 43
0
votes
1 answer

Loading terrains in Ogre and creating navigation mesh with Recast/Detour

I'm new to using Ogre and especially Recast/Detour, and I need a little help. I'm loading a terrain in Ogre and creating a navigation mesh over the top of it with Recast/Detour. I wanted to loaded more complex terrains because as of right now, I…
mpellegr
  • 3,072
  • 3
  • 22
  • 36
0
votes
1 answer

What is the term for this kind of "noise generation"?

I'm having a lot of trouble finding information on this, but as it can't be unexplored territory in programming, I'm assuming my troubles stem from missing some critical terminology. Basically, I want a type of 2d noise generation. I had been using…
theory
  • 3
  • 2
0
votes
1 answer

Weird order when painting triangle outlines using GL_LINE_STRIP

I'm developing an app for iOS-Plaftorms using OpenGL. Currently I'm having a weird issue when painting a plane (terrain) which consists of multiple subplanes, where each subplane consists of 2 triangles forming a rect. I'm painting this terrain as a…
RayDeeA
  • 271
  • 3
  • 12
0
votes
1 answer

Three.js - Edit plane geometry

So, I want to make a simple terrain editor. So, on mouseDown, I want the selected face to move up. The intersection works great, and I try to modify the geometry like so: var intersects2 = ray.intersectObjects([plane]); if…
David Menard
  • 2,261
  • 3
  • 43
  • 67
0
votes
1 answer

Optimizing memory for terrain rendering

im wondering (im pretty sure there is) if there is a better way to handle the data im filling into my vertex / index buffer. At the moment my struct for the vertices in the terrain looks like this: struct VertexType { D3DXVECTOR3…
puelo
  • 5,464
  • 2
  • 34
  • 62
0
votes
2 answers

XNA How can I get the color behind a sprite

I am currently working on a 2D project that generates random black terrain over a loaded background. I have a sprite that is loaded and controlled and am trying to find out what the best method for identifying the color behind the sprite to code…
Will Blew
  • 7
  • 2