2022 Developer Survey is open! Take survey.
14 votes
Accepted

How to make natural looking voxel

This is achieved by interpolating ramps between cubes of different height. When you have a scenery like this (seen from the side) # #### ## ############ ...
user avatar
  • 111k
10 votes
Accepted

Noisy edges, smoothing out edges between faces via fragment shader

Other answers here suggest using a texture. Here's a technique that doesn't use textures. You want the boundaries between hexagons to be interesting. It's easier to make interesting boundaries when ...
user avatar
  • 5,856
9 votes
Accepted

How can I smooth my voxels similar to 7 Days to Die?

It is not simply Marching Cubes With marching cubes, a block would expand into the surrounding ones. In fact, with the default configurations for the Marching Cubes algorithm the result is a ...
user avatar
  • 18.1k
8 votes
Accepted

On a 2D generated terrain what is the easiest way to pick tiles for the shoreline?

You can accomplish this with bitmasking. Each tile determines if it is an edge tile, based on its neighboring tiles. From the image above, we would assign a value to each neighbor. 1, 2, 4, or 8 ...
user avatar
  • 8,279
7 votes
Accepted

How can I implement a short-cut grass effect?

You might want to look into fur shading technique. This is what I would use for this type of grass, since the shorter the grass is the better the performance (less layers). Basically it works by ...
user avatar
6 votes
Accepted

How does Minecraft render chunks?

The bulk of Minecraft's chunk rendering goes through a vertex array. The world is split into 16x16x16-block render-chunks (which currently happen to be the same as storage-chunks, but it wasn't always ...
user avatar
6 votes

How to make natural looking voxel

There are two obstacles you need to deal with in order to achieve similar quality like the one in the image, the first is artistic and the second is technical (memory, processing). First I assume that ...
user avatar
  • 12.5k
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 ...
user avatar
6 votes

How to smooth terrain to lower polygon count?

If you select your terrain and go to the last tab which is settings you will see a slider called 'pixel error'. That determines the accuracy of the mapping between the terrain maps and generated ...
user avatar
  • 394
5 votes
Accepted

How do I avoid lag when dynamically loading a map chunk?

Start generation early; if a player gets within 3 screen widths of the edge of the generated map start generating more chunks on that edge 1 chunk at a time. Focus generation on the area the player ...
user avatar
4 votes
Accepted

Tiling perlin noise seamlessly, but without repeating to generate an infinite 3D world

Given credit to Alan Wolfe for what he said on "INFINITELY tile". A 2d perlin noise (or a 2d simple noise) will have no seam problem as far as you stay away from noise borders (defined by floatin ...
user avatar
3 votes
Accepted

How to achieve a layered terrain simlar to Godus

A hill like this could be created with the following algorithm: Start with a small circle in form of a regular n-gone (the mountain top). Create a larger "blob" on height 0 by taking the corner-...
user avatar
  • 111k
3 votes
Accepted

deformable terrain

I am going to go on a whim and say that you are using voxels, because you want to be able to dig holes and tunnels live. Storing a world whose state can forever change as a .obj would not be a good ...
user avatar
3 votes

How can I efficiently render a large, zoomable world map?

The search term you are looking for is "Level of Detail" or "LOD". It basically means that you adjust the level of detail of the map depending on the zoom factor. You can have a really high level of ...
user avatar
  • 111k
3 votes
Accepted

Can I render some vertices as an object instead?

The official answer from Shawn Hargreaves (one of the developers of XNA) is The XNA Model class doesn't do any optimization at runtime: that all happens at build time inside the ModelProcessor. ...
user avatar
  • 10.2k
3 votes

Loading chunks of the terrain relative to the player's position

Split the loading into sections (the white chunk is the one you are standing on). The above image shows the x and y axes, with the z axis left to your imagination. Begin by sending the white chunk (...
user avatar
  • 1,457
3 votes

Loading chunks of the terrain relative to the player's position

I would do something like this: ...
user avatar
3 votes
Accepted

terrain not properly rendering

Trying changing setModelBound(new BoundingBox()); to ...
user avatar
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 ...
user avatar
  • 18.1k
3 votes
Accepted

How to generate or smooth really large procedural terrain?

At the radius of the Earth, with the center at the origin, 32-bit floating point offers us about half-metre precision laterally, so that's not enough to position centimetre-level detail. So, our ...
user avatar
  • 112k
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 ...
user avatar
  • 2,592
3 votes

How to make procedurally generated terrain look realistic

First of all, note that Unity already has a very nice terrain system out-of-the-box. It gives you a lot of nice features for free like LOD, occlusion culling and a lot more. Also, it can look pretty ...
user avatar
  • 111k
3 votes
Accepted

How to draw grass sprites without using gameobjects?

Create a TileMap with 400x400 tiles for your grass tiles. Tiles on a TileMap aren't full-fledged gameObjects. They are very lightweight. A 400x400 tilemap is absolutely no problem. Then create one ...
user avatar
  • 111k
2 votes
Accepted

libgdx: How do you remove a cell from TiledMap?

first we make an instance of map layer that contain the tile that we want to remove for example: TiledMap map=new TiledMap(); //lets say we want to remove some tile from layer with index of 0 ...
user avatar
2 votes
Accepted

Quadtree vs multiple resolution grids for terrain rendering

For performance reasons I never frustum cull on the CPU -- I just distance cull as part of the LOD determination so I'm rendering everything in front of and behind the camera (let the GPU do the ...
user avatar
  • 444
2 votes

Unity3D: terrain object's textures flickering on long distances

What you are experiencing is commonly referred to as Z-figthing. That might help with finding some additional leads/ideas. And I would not call it a "bug", just a regular challenge in 3D ...
user avatar
2 votes

How can I make huge terrains in Unity?

We did implement huge terrains in Unity5 by processing SRTM data for the whole earth into height-maps for TerrainData objects with different Levels of Details[1]. ...
user avatar
  • 121
2 votes

How can I implement a short-cut grass effect?

It is most likely a shader that uses Parallax Occlusion Mapping, which uses normal map to "fake" depth and shadows in a texture. See HERE for examples. Edit: As @Leggy pointed out, it is perhaps ...
user avatar
  • 404
2 votes
Accepted

General Octree question: What do you actually store?

Octrees store data, indexed by a 3 dimensional position. That data could be a reference to an object, reference, bool, or whatever you need. Inserting items into an Octree is typically done from top ...
user avatar
  • 72.7k

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