Skip to main content
45 votes

How can I reduce the performance impact of rendering trees?

There are couple of things you can do to increase drawing performance. You said they were pretty far away. You could use LOD to decrease the vertex count of those trees, and thus decreasing time ...
Lasse's user avatar
  • 3,241
41 votes

Procedurally generate regions on island

In the real world, those provincial borders will often be following geological features like rivers. So maybe a good approach would be to model the geology of the island and have the borders fall out ...
Bram's user avatar
  • 3,719
28 votes

Procedurally generate regions on island

I would solve this problem with two passes of Voronoi diagrams: First Pass: Region Partitioning The first pass would use a somewhat sparse distribution of points (i.e. the distance between the points ...
Pikalek's user avatar
  • 12.4k
13 votes
Accepted

How can I reduce the performance impact of rendering trees?

Ok, so the problem was simply that I wasn't using pre-computed realtime GI. I check that on a little while ago but it didn't have an immediate effect so I left it and forgot about it, and the lighting ...
mr-matt's user avatar
  • 2,759
6 votes
Accepted

Is there an existing algorithm to find suitable locations to place a town on a heightmap?

Here's one (relatively exhaustive) method you can try: Take your terrain heighmap (left) Mask the areas that are too steep to build on (orange, center) Propagate a distance field from the too-steep ...
DMGregory's user avatar
  • 135k
6 votes

Making Cave system in Unity 5

I have little experience using Unity directly, but I've been a level designer for years and a much easier approach rather than worrying about cutting holes into your terrain is to simply build up a C ...
TorQue MoD's user avatar
6 votes
Accepted

Does anyone know what terrain generation algorithm is used here?

In addition to what Pikalek said, it's also known as the Midpoint Displacement algorithm (because you perturb the midpoints of each edge) or Diamond-Square algorithm when working with a square instead ...
user1118321's user avatar
  • 2,632
6 votes

How do I store destructible terrain that characters can walk on?

Storage of destructible terrain For the terrain I would recommend looking at the quadtree data structure. It provides an efficient way to store destructible terrain. For an excellent, in-depth ...
Jelle van Campen's user avatar
5 votes
Accepted

Terrain for MMORPG

Your problem lies in the fact that its almost impossible to load an entire 20x20 km map fully into memory. You mentioned LOD (I will talk about it later), but for now let's ignore it. Consider a game ...
Ivelate's user avatar
  • 383
5 votes

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 ...
Stephane Hockenhull's user avatar
5 votes

Terrain not rendering underneath

This is due to Back-Face Culling. You'll have to create a shader and set "Cull Off" in the SubShader section: See Unity Documentation on shaders. Be warned that the normals will be inverted on the ...
Stephane Hockenhull's user avatar
5 votes
Accepted

How can I generate terrain like SimCity 3000 does?

Sim city uses a an XY grid, and the heights are discrete. In addition to this, the slopes seem to be limited to one "step" up or down. So just handle all possible cases for a grid-cell. Each cell ...
Bram's user avatar
  • 3,719
5 votes

Scan for water in 2D procedural terrain locale

This is a maximum subarray problem in disguise! It's a popular interview question. Instead of finding subarray sums, we're finding terrain that can hold water, and instead of finding the biggest ...
congusbongus's user avatar
  • 14.8k
5 votes

Procedurally generate regions on island

MineCraft does this nicely, and its world generation algorithm has been analyzed and documented thoroughly. There are various descriptions of the algorithm, one of them here: https://github.com/...
Guntram Blohm's user avatar
4 votes

How can I make caves with Unity's terrain creator?

Starting from Unity 2019.3, you can properly cut holes in terrain surface (see https://blogs.unity3d.com/2019/08/27/unity-2019-3-beta-is-now-available/#attachment_82836) However, this won't create the ...
Casto's user avatar
  • 141
4 votes

Generate cave like Terrain in 2D

You could generate, analyse and discard random noise fields. Just generate thousands of them, and keep the ones that have a fully enclosing wall on the outside. For generation, I would use Simplex ...
Bram's user avatar
  • 3,719
4 votes

Unity: Create large Terrain with accurate raycast detection?

(1) Notes on terrain systems Outdoor scenes are always a challenge to render and interact with, given viewing distance and subsequent complexity involved. This is just a reality of outdoor terrain. ...
Engineer's user avatar
  • 30k
4 votes
Accepted

Diamond Square Algorithm - How to fix horrible diamond shaped artefacts and spikes?

The main issue is your code for DiamondStep is the same as for SquareStep. As a result, it is populating the uninitialized target point using other uninitialized points. It should be using points in a ...
stewbasic's user avatar
  • 170
4 votes

Procedurally generate regions on island

A typical algorithm used, for example, by Azgaar (source code). Is roughly like this: split your landmass into smaller areas, e.g. through delauny triangulation or voronoi cells. determine (randomly ...
Tom's user avatar
  • 1,314
3 votes

How to make a road terrain for unity game?

You could concider making the terrain and road in blender and use those in unity. Blender has the power to generate heightmaps from objects, in case you dont want to use the object itself.
Dennis's user avatar
  • 411
3 votes

How to place grass on custom terrain mesh

This is an old topic, but it's still valid. There are a couple of ways you can handle grass outside of Unity's Terrain System. The simplest way is to create your own planar mesh and apply a shader ...
user3345048's user avatar
3 votes

How to blend biomes with procedural terrain

While this is an old question, I feel like I have something useful to contribute. The world generator I'm currently building uses two functions for each biome \$i\$: The classical heightmap-function \...
LukeG's user avatar
  • 1,547
3 votes
Accepted

One dimensional, bi-directional terrain generation

It sounds like what you may want is a hash function. With this you can feed in the "address" or index of a particular spot along your terrain, and get out a corresponding pseudorandom result value ...
DMGregory's user avatar
  • 135k
3 votes
Accepted

I added a terrain in Unity, but can't see it

I found an answer. I should just have turned the coordinate system the way it is on the screenshot below: So my terrain was just hiding in the z-plane.
Yaroslav's user avatar
  • 771
3 votes

rolling hills terrain generation

Looking at the image, it looks to me like you would want to use cylinders with hemispherical end caps on the top to produce something similar. It looks like the cylinders are x units wide and spaced 1/...
user1118321's user avatar
  • 2,632
3 votes

Generate cave like Terrain in 2D

I think you will get similar results if you do it like this. Start with some points in a circle around your cave area. Jitter the points by moving each one randomly from it's starting position. ...
Jay's user avatar
  • 810
3 votes
Accepted

Effective & Efficient Way to Simulate a Desert

Notes: I know this is about Egypt, but I will not make this specific to Egypt... because people coming here may find this question and its answers useful for other desert simulations. I am trying to ...
Theraot's user avatar
  • 27.2k
3 votes

How to avoid the cutoff of a Sprite when overlapping in a terrain?

You can force the sprite to render always on top by disabling the depth testing in the sprite's material. ...
Jay's user avatar
  • 810
3 votes

Midpoint displacement generating unsatisfactory terrain

The magnitude of your random displacement is not changing appropriately. For your initial points, you're using a random value between 0 and 10. But for the subdivisions you're only using a random ...
user1118321's user avatar
  • 2,632
3 votes

Procedurally generate regions on island

If you are interested in doing this in vectorial format rather than raster-based approaches, I have written a blog post a while ago about pretty much exactly this. http://blog.particracy.com/worlds-...
Wouter Lievens's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible