Advertisement

Modern Terrain and Water Geometry

Started by January 19, 2018 02:59 AM
12 comments, last by JoeJ 7 years ago

Hey guys

So I was wondering how modern terrain and water geometry works both with and without tesselation. Essentially:

1) Is Geoclipmapping still the best CPU tesselation technique?

2) Is Geoclipmapping still used with tesselation?

3) Is non-tesselated water just flat? Is there any other (reasonable) ways to simulate it? Do people use Geoclipmapping for that too?

Thanks!

The perfect answer still does not exist. It depends on your need, the nature of the terrain ( static / dynamic / large scale / small scale ), the complexity of the materials, does it support caves and cliffs, ...

 

LOD techniques are more needed than ever, because it is still impossible to blast thousands of millions of triangle a frame, and because GPU are not all mighty and can fall quickly on a terrain renderer if it is too brute force, especially the tesselation unit on AMD ( no, it is not an innocent example ! ).

 

You do not even have to render geometry anymore, what about raycasting/marching and rasterizing a terrain from a single screen aligned quad :)

 

 

Advertisement
8 hours ago, galop1n said:

You do not even have to render geometry anymore, what about raycasting/marching and rasterizing a terrain from a single screen aligned quad

Raymarching for terrain sounds pretty damn expensive, so I'll stick with actual geometry :P 

There is a technique called reprojected grid. It works by projecting a screen aligned grid to world space in the vertex shader, doing displacement mapping on it, and reprojecting it again to the screen. 

The nice thing about this is that you can get perfect vertex distribution, because the terrain/water is essentially in screen space. Unfortunately this will result in shimmering vertices on far away geometry when the displacement is high. The shimmering can be reduced either with denser vertex grid or instead of projecting from screen space to world space, you calculate the grid in polar coordinates around camera, then to world space, then project to screen, which I haven't tried yet.

Check out this blog to get a better idea.

@turanszkij I was actually considering checking your YouTube videos to see how you did the water hahaha

But regarding the reprojected grid, I see a few questions with this (I'll still check it out, though):

1) If I want to have the terrain blend with other meshes (caves, stones, etc), won't this be an issue?

2) I want to be able to have the actual terrain textures also have displacement maps. Could this be an issue?

3) Why isn't this a popular technique now?

4) Isn't this essentially ray-marching but with vertices? Surely this will be quite costly.

1,2,3) I wouldn't recommend this for terrain. With large displacement it is hard to eliminate vertex swimming. It doesn't support caves (at least not trivially). Other displacement maps, detail textures could be supported, you sample them as you would but in the vertex shader. For ocean water rendering, I would recommend this, as with water, the vertex swimming can be less jarring, or completely non-existent.

4) It's not ray marching, but ray tracing. And it is not costly at all because you only have to trace one for each vertex against a plane which is only two dot products (and a subtraction + division). The plane which you test against is the world space plane which would represent the terrain without any displacement.

P.S. I don't have a video about the reprojected grid water yet. :) 

Advertisement
19 minutes ago, turanszkij said:

P.S. I don't have a video about the reprojected grid water yet. :) 

Hahaha I was referring to an FFT water video series, but I realized that is from the OreonEngine YouTube channel :P My mistake! Either way I do follow your videos!

21 minutes ago, turanszkij said:

4) It's not ray marching, but ray tracing. And it is not costly at all because you only have to trace one for each vertex against a plane which is only two dot products (and a subtraction + division). The plane which you test against is the world space plane which would represent the terrain without any displacement.

For water it could be raytracing, but for terrain, as I thought the suggestion was for, it'd be ray-marching.

25 minutes ago, turanszkij said:

For ocean water rendering, I would recommend this

Also are you suggesting the reprojected grid water only for GPUs without tessellation, or including those with it? Are there benefits to the regular tessellation method aside from the shimmering? And if I do use regular tessellation, would geomipmapping make sense?

23 minutes ago, turanszkij said:

It doesn't support caves (at least not trivially)

I was referring to adding "holes" in the heightmap, and then doing the caves separately (whether voxel-based or mesh-based).

21 minutes ago, KarimIOAH said:

For water it could be raytracing, but for terrain, as I thought the suggestion was for, it'd be ray-marching.

You can do the whole thing in pixel shader in which case you need to do ray marching to have correct occlusion. If you do it in a vertex shader, you only need to trace the reference plane, then displace vertices and you get occlusion out of the box with the depth buffer after reprojecting onto the screen.

23 minutes ago, KarimIOAH said:

Also are you suggesting the reprojected grid water only for GPUs without tessellation, or including those with it? Are there benefits to the regular tessellation method aside from the shimmering? And if I do use regular tessellation, would geomipmapping make sense?

I wouldn't use any tessellation with this, you only have to use a vertex shader really. You can do any grid resolution you want and you get level of detail out of the box. Tessellation would make sense with geomipmapping.

28 minutes ago, KarimIOAH said:

I was referring to adding "holes" in the heightmap, and then doing the caves separately (whether voxel-based or mesh-based).

I guess you could discard holes if you use a geometry shader with the reprojected grid technique, though as I said for terrain rendering this technique might not be what you are looking for.

 

30 minutes ago, KarimIOAH said:

Hahaha I was referring to an FFT water video series, but I realized that is from the OreonEngine YouTube channel  My mistake! Either way I do follow your videos!

Thanks for following, I also added ocean rendering with FFT simulation and I am using the reprojected grid for it. Planning to make a larger video some time with ocean included. :) 

Thanks a lot! Looking forward to the next vids!

One more thing, how do Geoclipmapping and Chunked LOD / Quad-trees compare nowadays? Which is a better option?

This topic is closed to new replies.

Advertisement