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.

196 questions
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

How to implement a simple height map to an Unity Shader

Let me start off by saying I know very little about shader programming. A lot of what I have here is stitched together from online resources and existing assets. I just need to know how to correctly integrate a height map into a unity shader. It…
Mike OD
  • 117
  • 1
  • 12
3
votes
1 answer

Finding height of point on height map triangles

This question has to exist somewhere, but I'm not sure what it would be called. Following a height map, a terrain exists of right angle triangles. Each point of each triangle takes its height (y) from the height map. If the character is at a…
3
votes
2 answers

Draw thick, feathered line with variable thickness in plane C#

I'm creating a heightmap painting tool which uses a spline to paint the heightmap with a value from 0 to 1. The spline consists of several points each of which has different thickness (size/width) and this gets interpolated. The tool paints a…
Footch
  • 129
  • 1
  • 10
3
votes
0 answers

Hydraulic heightmap erosion creating diagonal artifacts instead of desired result

Using this PDF as a base to model my own algorithms, the geological/geothermal erosion in the paper works fine: kr=0.25 ke=0.8 ks=1.5 kc=0.1 for(i=0;i
Lucas F
  • 39
  • 1
3
votes
2 answers

Drawing Road on Terrain Map

I have vertex Coordinates of Left and Right side of the road (Shown as green and black points). My terrain is an array which corners of squares represent a different height value. I was drawing my road by just giving interpolated heights to my each…
Berke Cagkan Toptas
  • 1,034
  • 3
  • 21
  • 31
3
votes
1 answer

PhysX Terrain - Heightfield vs TriangleMesh

I'm working on a project in which I need to create a terrain in my PhysX application. As input data I have dted file (elevation). Which is the better way for create a terrain in PhysX? I need to have a large terrain. I have try to create an…
DaxDeveloper
  • 138
  • 1
  • 13
3
votes
1 answer

OpenGL: optimal way to draw environment from height array?

So I am writing a openGL program with height-mapping to make a 3D out-door environment. As with all height-mapping each point is the same distance from its neighbor in the x&z axis, but the y axis differs for each vertex depending on the heightmap…
danglingPointer
  • 882
  • 8
  • 32
3
votes
1 answer

OpenGL glVertexPointer returning 1281 - Can't figure out why

I have created a class to load Terrain points from a heightmap file; but drawing them causes a crash. I have narrowed down the error to the glVertexPointer() function which returns 1281 (invalid value I am led to believe). I have been through the…
jProg2015
  • 1,098
  • 10
  • 40
3
votes
1 answer

OpenGL: Terrain not drawing (heightmap)

EDIT: I'm thinking the problem might be when I'm loading the vertices and indices. Maybe focus on that section :) I'm trying to load a heightmap from a bmp file and displaying it in OpenGL. As with most things I try, everything compiles and runs…
RaptorDotCpp
  • 1,425
  • 14
  • 26
3
votes
1 answer

Heightmap in Shader not working

I'm trying to implement GPU-based geometry clipmapping and have problems to apply a simple heightmap to my terrain. For the heightmap I use a simple texture with the surface format "single". I've taken the texture from Catalinz's XNA blog. What I'm…
CShark
  • 1,413
  • 15
  • 25
2
votes
2 answers

Mandelbrot set reaches to its limit way too soon

im calculating mandelbrot set, with the ability of zooming and printing it to the screen using OpenGL. as you know mandelbrot set is defined by a rectangle(top right point and bottom left point) and every time i 'zoom in' and 'zoom out' i change…
igal k
  • 1,883
  • 2
  • 28
  • 57
2
votes
2 answers

OpenGL Terrain Colission Detection

Okay, I have some procedurally generated terrain (based loosely on http://www.swiftless.com/terraintuts.html) Ive got a teapot "plane" which you can fly around in (third person camera) Basically, the aim is to fly through the valleys etc... without…
James Bennet
  • 603
  • 2
  • 10
  • 22
2
votes
1 answer

Landscape creation in UE4.27

I'm trying to create a landscape with Python Unreal API using unreal.EditorLevelLibrary.spawn_actor_from_class() to spawn a LandscapeProxy actor then alter its heightmap using landscape_import_heightmap_from_render_target() of the LandscapeProxy…
Spiros
  • 53
  • 6
2
votes
1 answer

How do you convert a 32bit RGB png with encoded height values to 16 bit png using browser side javascript?

I am trying to create a 16bit heightmap png from a 32bit Rgb encoded height value png. According to mapbox I can decode their png pixel values to height values in meters with this formula. height = -10000 + ((R * 256 * 256 + G * 256 + B) * 0.1) I…
dan
  • 2,857
  • 6
  • 34
  • 60
1
2
3
13 14