Share Your Experience: Take the 2024 Developer Survey

# Tag Info

Accepted

### Need simple 3D terrain render with big texture map

I have been able to do this using the 3d modeling software Blender. I used UV mapping to map the texture and the displacement modifier to apply the height map. If you need some form of XNA code for ...
• 358
Accepted

### Efficient algorithm to aggregate a heightmap to a lower resolution

Mipmapping is the way to do this. The algorithm already exists in hardware and it is extremely fast since GPUs are massively parallel devices. All you need to do is set up a 3D context in something ...
• 29.9k

### Procedurally generated terrain that has some caves

You'll probably want to do a 2nd pass and carve caves after doing the regular quick height-map generation pass. Find a steep slope in the low-frequency height map layer (if you use multiple ...
Accepted

### Linear Gradient with angle formula

It looks an introduction to linear algebra is in order, or more precisely the dot product: dot(a, b) = |a| |b| cos(Theta) Why is it helpful? Because of its ...
• 4,930
Accepted

### How to make a noise gradient?

Here are two different ways I might approach this problem, showing how they change as the effect intensity is cranked up & down. The outermost column on each side is just my gradient, computed as ...
• 135k
Accepted

### Calculating normal map from height map using Sobel operator

So it looks like my problem was in the float32 height(const std::vector<char>& data, const int width, const int height, uint32 x, uint32 z) function. ...
• 225
Accepted

### Deriving shadow position from a 2D heightmap

You can associate a "shadow height" with each cell on your map. This is the elevation something would need to have above 0 / "sea level" in order to rise out of the shadow and into ...
• 135k
Accepted

### The GameObject transform automatically sets to (0, 0, 0) when i apply Perlin Noise

You told it to set the scale to zero when you wrote textureRender.transform.localScale = new Vector3(); That's because a new Vector3 is initialized to (0,0,0). ...
• 161
Accepted

### Alternate approach to generating rivers in a procedurally generated world creates very boring rivers

I think your problem is mostly a matter of scale. Your height maps are way too undetailed to do anything but shoot straight out to sea. They are more like small islands than entire vast continents. ...
• 963

### My perlin noise height map doesn't have smooth transitions and goes directly from black to white

There is a bug in the final normalisation code, fortunately it’s easy to fix. You only need to change: map2[x][y] = map2[x][y] * mapMultiplier into: ...
• 23.9k

### HeightMap from a graph

TL;DR: Use bicubic interpolation or spline interpolation. So, you're looking for a method of two-dimensional interpolation. Unfortunately, this isn't a perfect two-dimensional grid (mathematically, it'...
• 211

I would suggest modifying the engine to expose the Landscape functions. Then add a button to the Landscape tool palette, to force a terrain rebuild after placing roads. Terraim rebuild routine could ...
• 299

### Diamond square texture: too-diamond-ish?

While this is an old question, it still ranks on google and the marked answer does not explain the artefacts seen in the output. I have just implemented this algorithm (for fun) in c# using linqpad ...
• 21
Accepted

### Diamond square texture: too-diamond-ish?

Your code cites the Wikipedia article, which in turn has a section called "Artifacts and Extensions" that observes a potential problem: The diamond-square algorithm was analyzed by Gavin S. P. ...
• 12.4k
Accepted

### Procedurally generated terrain that has some caves

A blog post at the accidental noise library addresses exactly this issue. It offers the solution of perturbing the xy values, and of a single-pass implicit solution that creates caves that narrow as ...
• 3,719
Accepted

### How many datapoints are there generally in terrain height maps?

There really isn't a specific standard for point density, for a few good reasons. However, in my experience, a descent density is about 3-7 points per m^2. The reason that there isn't a standard is ...
• 482
Accepted

### Creating terraced terrain

Does not seem to be as complicated as it looks like to implement the algorithm you suggested. The complexity of log(n) is also most likely an optimal one. In order to re-iterate: Find the lower ...
• 4,930

### How to get height from a mesh

The height of an object relative to an underlying terrain is the distance from its position ${P}$ (plus an optional offset $C$ of choice) and the position projection $P'$ onto the terrain: ...
• 4,831
1 vote

### SRTM data represented in 3D using Unity Terrain

i used an application called L3dt, which can import many format of heightmap and export in many including RAW free version here (you can also email request a free trial of the Pro Edition): http://...
• 1,407
1 vote

### Creating terraced terrain

As an analogy to your graph, I submit $$min(slope * mod(x, 1), 1) + \lfloor x\rfloor$$ http://www.wolframalpha.com/input/?i=plot+(min(5+*+mod(x,+1),+1)+%2B+floor(x))+from+x%3D-5+to+5
• 9,029
1 vote
Accepted

### Algorithm for "mipmapping" terrain vertex heights and normals

I've not dealt with LOD before. I will say, that I've always wondered if instead of averaging if you did some sort of minimum and maximum values for a group of vertices if that would produce better ...
• 2,632
1 vote
Accepted

### Height Maps for story driven terrain

A good introduction tutorial on procedural terrain can be found at the Red Blob Games blog. You will also find that at some point, height maps will not cut it any more. There will be no overhangs, no ...
• 3,719
1 vote

### How to make a noise gradient?

You could take a linear gradient between equator and poles ranging from min at the poles (y = 0 and y = 100) to max at the ...
1 vote

### How to make a noise gradient?

Just because you use noise as your data, doesn't mean you can "modulate" the result. To get a gradient overlay on top of noise, just multiply it with a factor that ranges from 0.8 at north pole, to 1....
• 3,719
1 vote
Accepted

### Applying Perlin Noise to Tiles

EUREKA! Introduction My initial question was about "How to Tiling with Perlin Noise" I had in mind creating a plane with tiles (kind of a grid) [width * height] and on those tiles i will paint ...
• 179
1 vote