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
4
votes
2 answers

How to intersect a Ray with a terrain model?

I am currently designing an RTS Game in XNA. So far I have a Terrain Model generated from a Heigthmap and some Units that are drawn on it. The next step would be to give the units commands on where to move. To do that I have to calculate the exact…
NiklasMM
  • 2,895
  • 2
  • 22
  • 26
4
votes
2 answers

Loading real terrain into three.js using free map data

Has anyone got any ideas on how to load real terrain data into a three.js scene. I would like to have a 3D model on a the actual terrain , i.e the elevations and overlayed satellite imagery . Create scene : ok Load and animate models : ok Terrain…
JonoD
  • 61
  • 1
  • 7
4
votes
3 answers

libGDX texture a 2d terrain

I work at a truck game with libgdx and box2d. In my game 1 meter = 100 pixels. My 2d terrain is generated by me, and is made by points. What I did, is made a polygonregion for the whole polygon and used texturewrap.repeat. The problem is that, my…
Boldijar Paul
  • 5,405
  • 9
  • 46
  • 94
4
votes
1 answer

How to get angles value of perspective camera in Three.js?

How can I get the value from each angle of my perspective camera in 3D scene. I'm using Three.js library. To be more accurate, I shall mark what I want to get known with the next sign: What coordinates I need to know: It's needed for me, because…
user2402179
4
votes
2 answers

Terrain/Mountain algorithm not working as intended

I want to create a terrain with a mountain on it, using a very basic principle, shown by this height mapping: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 1 2 3 2 1 0 0 0 0 0 1 2 3 4 3 2 1 0 0 0 0 0 1…
skiwi
  • 66,971
  • 31
  • 131
  • 216
4
votes
1 answer

Tweaking Heightmap Generation For Hexagon Grids

Currently I'm working on a little project just for a bit of fun. It is a C++, WinAPI application using OpenGL. I hope it will turn into a RTS Game played on a hexagon grid and when I get the basic game engine done, I have plans to expand it…
4
votes
2 answers

Terrain triangulation algorithm

I have a terrain presented by large set of points in 3D-space. What is the best way to triangulate it? I can just to project all points on 2D-space, than make Delaunay triangulation in time O(n * log(n)) and lift it back to the previous heigth. But…
Nelson Tatius
  • 7,693
  • 8
  • 47
  • 70
4
votes
1 answer

XNA Perlin Noise Planet

I want to make an procedural planet with XNA. I'm able to create an heightmap with Perlin Noise and load it in run-time, but how do I create additional seamless chunks and create a spherical planet? Thanks in advance, Giulio.
Giulio Zausa
  • 233
  • 4
  • 16
3
votes
2 answers

How to optimize my custom mapformat (Java)

I'm creating a 3D game where I have a large open world (200×200 kilometers), that uses a heightmap. I divide the heightmap in 200×200 = 40,000 regions of 1000×1000 meter, and those are again divided in 20×20 = 400 chunks of 50×50 meter. The…
Gmfreaky
  • 67
  • 6
3
votes
1 answer

3d Tiled terrain

I'm trying to create tiled terrain in 3D with XNA. I checked tutorials on how to doit(Riemers and Allens). Allens tutorial has an exact result I want to achieve, however I'm not sure about performance - it seems he is using single quadrilateral to…
Gabriel Davidian
  • 318
  • 2
  • 12
3
votes
1 answer

2D Terraria-style terrain generation in Cocos2d

I've been puzzling over this for a while. Basically, I am trying to, as the title says, generate a tile-based two-dimensional terrain like in Terraria. As of now, I'm basically just generating a bunch of random points that will eventually be the…
tallen11
  • 1,387
  • 2
  • 17
  • 33
3
votes
0 answers

Path computation on a terrain

I am pursuing a long term hobby project to develop a simple visual tool where a user will be able to perform a minimal 3D visualization of the terrain -- view portions of the terrain from different viewing positions, zoom etc -- and then select a…
3
votes
1 answer

Three.js global heightmap is not showing the expected result

I wanted to create a model of earth using a global 4k height map that I found online. I found this open source script that can do this. function createGeometryFromMap() { var depth = 512; var width = 512; var spacingX = 3; var…
Tejas Gupta
  • 496
  • 2
  • 8
3
votes
1 answer

Unity Terrain GameObject versus Custom Terrain

I was recently exploring and working through parts of Sebastian Lague's Procedural Landmass Generation series. Absolutely excellent series and I would recommend it to anyone looking to learn more about Unity and Terrain in general. Anyways, I ran…
Jee
  • 969
  • 1
  • 7
  • 26
3
votes
1 answer

How does OpenGL actually read indices?

I trying to figure out how to draw a flat terrain with triangle_strips, and while I was writing the loop for creating indices array I thought how does OpenGL know to parse the indices because so far I have seen everybody when creating indices write…