Questions tagged [heightmap]

Heightmap is texture containing individual heights used to store terrain data.

Heightmaps textures are used to store geometric detail like terrain, object surface etc. It is used to simplify manipulation of such geometry and even speed up its rendering (if mesh generation moved into shaders).

In case the heightmap is stored in common raster image formats then for proper geometry restoration we need also additional info like: scale,position and orientation for such textures which are not stored in them. So those are usually stored in some separate config file, encoded into filename, or hardcoded into application that uses them.

180 questions
0
votes
1 answer

OpenGL Heightmap Loader

I checked for a LibGDX heightmap loader and found one, but I am not quite sure how the buildIndices() code works. I am also not sure why it only generates a heightmap chunk that is 128*x*128, anything bigger than 128 (eg. 1024) makes the loader mess…
Nik
  • 983
  • 2
  • 9
  • 28
0
votes
1 answer

Perlin Noise issue

I've created a Perlin noise function. My issue is when I generate a terrain map from the noise it ends up blocky, nothing like the cloudlike images I've seen. I'm curious on what I'm doing wrong (if anything). here's my code: main.cpp #include…
0
votes
1 answer

How to read height map values to generate a terrain?

I am trying to make a terrain using a height map image in OpenGL. As a experiment i use 4x4 pixel image. this is a zoomed screen shot. so you can see the pixels. This is a part of my code. ILubyte * image = ilGetData(); int bpp = …
shan
  • 1,084
  • 3
  • 13
  • 27
-1
votes
1 answer

how to import a height map in WebGL

I know that in theory you have to first find the coordinates on the height map like (x = width HM / width Terrain * x Terrain) and y coordinate (y = height HM / height Terrain * y Terrain) and after getting the location on the height map, we get the…
cosmo
  • 73
  • 1
  • 1
  • 7
-1
votes
1 answer

How can I create heightmap for QHeightMapSurfaceDataProxy from 2D array to show 2D Fourier transform results

I have the data - 2D discrete Fourier transform results. I want to gain heightmap but i dont know how to form heightmap. I need plot this data as surface in Q3DSurface through heightmap (not just 2D array).
penny
  • 55
  • 6
-1
votes
1 answer

How to sample height map which is stored in the alpha channel of the normal map?

error X3523: DX9-style intrinsics are disabled when not in dx9 compatibility mode how to use the tex2Dgrad() function in dx10?
Nico
  • 1
  • 1
-1
votes
1 answer

Calculation of normals on a bumped sphere shows strange diagonal shadow infront of light source

In the picture below you will see my current setup. I am rendering a sphere with heightmap information. The mesh is a square that is wrapped around a sphere. The source of light is located directly at the camera position. The problem that I have at…
-1
votes
1 answer

Terrain Generation with Realistic Height Map

I am having troubles finding out the best way to add realism to a terrain generator. At this point I have a flood fill that works perfectly, however if I want to add any sort of realism I will need to add in height variables. I have seen the…
Hunter B
  • 141
  • 1
  • 12
-1
votes
1 answer

Drawing triangle grid with glDrawArrays() - deformation of triangles

I am creating and storingthe position of the vertices of a 256*256 grid in a simple for loop like this: ind=0; for(i=0, i<256, i++){ for(j=0, j<256, j++){ vertexPosition[ind].x= i; vertexPosition[ind].y= 1.0; …
-1
votes
1 answer

Java: My height map generator only writes binary

So today I started with a new project. I want to make a simple heightmap generator in java, so I tried the following: import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import…
Siarl
  • 29
  • 7
-1
votes
2 answers

Threejs make a displaced mesh (terrain model)

So I have around 59k data points that I'm visualizing. Currently I'm making them into a texture, and then applying them to a plane geometry. Now the issue is that I need to show a heightmap, each datapoint has a height value, and I need to apply…
Keith M
  • 1,079
  • 14
  • 33
-1
votes
1 answer

is there a good tutorial on terrain editor?

I am new to 3D Game programming, now studying a lot on DirectX and OpenGL, on Windows. But I come up with making a terrain editor, But I cannot obtain any open tutorial or ideas on the web. is there a good tutorial or open source code for learning…
online.0227
  • 532
  • 3
  • 11
  • 27
-1
votes
1 answer

What are some good algorithms to generate a dynamic heightmap?

I want to research some algorithms for dynamic heightmap generation but I'm not familiar with any. Getting even more dynamic. Whats some theory on how multi-dimensional heightmaps work? i.e. Caves and overhangs. Should I use multiple heightmap…
Tyler Benzing
  • 1,086
  • 11
  • 24
-2
votes
1 answer

How to get hight (int16) value back to rgb form?

I have int16 * heights[width * height] array, that hold the terrain height, i load them form a file directly as int16 *. I need to write the heights into a bmp file. How do i get int16 back into rgb format considering they came form a bmp file (rgb…
Balan Narcis
  • 109
  • 1
  • 9
-3
votes
1 answer

glVertex3f take array as an argument?

I'm trying to implement a heightmap to my code, but the array I'm using seems to be wrong and the opengl vertex function cannot recognize it, can some one help me with it? float* Createheightmap(int sizex, int sizez) { float map[][] = new…
Leo Y
  • 1
  • 1
1 2 3
11
12