Skip to main content
Share Your Experience: Take the 2024 Developer Survey
11 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 ...
amitp's user avatar
  • 6,046
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 ...
Theraot's user avatar
  • 27k
7 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 ...
jgallant's user avatar
  • 8,424
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

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 ...
n_plum's user avatar
  • 394
4 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 ...
Philipp's user avatar
  • 120k
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 ...
DMGregory's user avatar
  • 135k
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
  • 27k
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 ...
Philipp's user avatar
  • 120k
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

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 ...
Philipp's user avatar
  • 120k
2 votes

How can I implement a short-cut grass effect?

Rocket league is actually using long quads with texture that sways using vertex shader The trick itself is in the LOD, grass is rendered roughly 20meters ahead and the rest is just flat floor, the ...
Yossi2010's user avatar
2 votes

DirectX11 - Texturing Terrain Mesh with Shared Vertices

The best way I have found to do terrain texturing is using color maps to splat textures, with this method the only vertex info you need is a float3 for the vertex positon as there is no need to pass ...
Justin William Stanley Bryant's user avatar
2 votes

How to make this generated terrain flat-shaded?

This can be achieved in 2 ways. The first is very simple, and is how ThinMatrix did it in his game. When you pass the normal from the vertex shader to the fragment shader, apply the ...
Bálint's user avatar
  • 14.9k
2 votes

DirectX11 - Color Interpolation Along Quad Diagonal

You need per-fragment color interpolation rather than per vertex color interpolation. If you write the interpolation yourself in the fragment shader, you can make it work any way you'd like. ...
user1118321's user avatar
  • 2,632
2 votes
Accepted

Render moveable entities into 3D isometric world?

You need a container to hold a reference to each object in the current tile/block. If your map is made of tiles Each tile has a height (as in games like Roller Coaster Tycoon or Transport Tycoon). ...
Ferreira da Selva's user avatar
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 ...
House's user avatar
  • 73.3k
2 votes

Procedural terrain generation is very slow

I can see 2 possible reasons of bad performance: You have very big numbers in X and Y. Like 2000*1000. In this way you must lower that. You can make bigger areas to generate (like 10*10 squares ...
A. Denis's user avatar
  • 171
2 votes

How to create soft gradient texture

The gradients in the screenshot provided are probably not achieved by texturing in a different manner. It appears that the scene in the screenshot is making use of Global Illumination. This results in ...
Quintin Steiner's user avatar
2 votes

Unity Seamless Terrain

This question is quite old but here's an answer in case someone else is looking for a solution. You have to stitch terrains together by matching heightmap values on the edges. Below is a code that ...
Urso haha's user avatar
2 votes

Proper way to supply different textures and multiply matrices for thousand of terrain meshes

Without being able to modify your shader code.. you are not going to be able to leverage advanced techniques for this type of problem. The best you can do in your case is minify the matrix operations....
Ian Pilipski's user avatar
2 votes

How to best select a texture pair to use in height blending when using a splatmap shader

We can actually extend the height blending function to compute weights for all four terrain types at once. We'll take as input a packed 4-vector, whose RGBA channels are the 0-1 height values of each ...
DMGregory's user avatar
  • 135k
1 vote

Performance of delta force-esque voxel terrain

Rendering in a certain way, i.e. vertical scanline rendering, as in e.g. Voxlap, can be quite slow, because accessing pixels / fragments on modern GPUs is substantially different from the DMA on older ...
Engineer's user avatar
  • 29.9k
1 vote

Procedural terrain generation is very slow

I'm seeing get_noise2D() and tilemap_set() as potential problems here. You didn't write them (?), so you don't know what's ...
Engineer's user avatar
  • 29.9k
1 vote

SRTM data represented in 3D using Unity Terrain

I used terrain.party website to get the maps. It works pretty well. You feed it location coodinates and returns the maps. Gimp is a nice program to use to view and export the file to Raw. Then you ...
Justin Markwell's user avatar
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://...
Big T Larrity's user avatar
1 vote

Swapping out Vertex Buffer Necessary for Terrain LOD?

OK, I will address one specific point of our concern about swapping. Firstly, you may consider that the vertex buffer itself may contain the highest detail version of the terrain. And that each ...
ErnieDingo's user avatar
  • 1,150
1 vote

Infinite sidescrolling terrain in Unity

Keep a fixed-size array of line segments wide enough to accommodate your camera at max zoom. These are fed into your LineRenderer via ...
Engineer's user avatar
  • 29.9k

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