Showing posts with label Terrain Rendering. Show all posts
Showing posts with label Terrain Rendering. Show all posts

Sunday, July 5, 2009

GPU Geometry Clipmaps DX9 1.5 WIP




Here is a new DX9 version of GPU geometry clipmaps.

It uses the new coordinate system from the DX10 version. Terrain is generated on CPU using Perlin's simplex noise & you can stream your own terrain. You can stream anything you need ( normals, textures, etc... ) the same way terrain is streamed.

Unfortunaltly, normal generation on GPU doesn't work yet so i removed it from this version. It is almost finished but i don't have much free time. I hope that i will release a full version before October 2009.

It also contains a few bug fixes.

GPU Geometry Clipmaps DX9 1.5 WIP

Sunday, July 20, 2008

GPU Geometry Clipmaps DX10 wip



It has been some months since I wanted to make a new GPUgc using DX10 features. Specially with the new instancing, texture arrays & new formats available. ( leaving geometry shader & instanced tesselation out of the equation until nvidia presentations at coming siggraph ).

One week ago, i started the project from scratch except the MxM & Mx3 blocks generation from the DX9 version. The toroidal update & coordinates system is brand new, much faster, much shorter & support loading from a heightmap or a mathematical functions. Best of all, toroidal update is fully functional (not yet optimized ). Any out of core streaming/compression system can be plug in, i hope.

With all the new features of DX10, new problems appeared. Problems that bring questions, questions that need answers, answers that need to be found :)

GPUgc Dx10 Wip source

Sunday, June 10, 2007

GPU Geometry Clipmaps 1.1



A small release with few improvements and bug fix :
- A update in the Z compression/ decompression process allow an higher Z Scale.
- Fix a bug in normal mapping by adding an offset of 0.5 / NormalSize.
- Support grids up to N = 1023 using 16 bits index.
- Use triangle lists instead of tristrip for Mx3 and MxM blocks for some FPS.
- Vertex buffer storage takes less than 1/12 of previous version.

Sunday, May 20, 2007

GPU Geometry Clipmaps v1.1 in progress




I am going to make a game demo and need GPUgc to manage terrain's demo. I notice that there is some bugs in my old version. First, the generation of normal maps that were too sharp. Now, I use another way to find normals and to use them while keeping the same memory usage. I also rewrite the system that let the user control max height and height scale so that it fully support the z encoding/decoding in the shader without artefacts. I plan to rewrite/correct more parts and add a "LoadFromBMP" function. Of course, i will release it once done :).

In the screenshot z goes from 0 to 1023 with a scale of 20.0 -> 20 * 1024 different values.

Sunday, March 25, 2007

GPU Geometry Clipmaps Source

Now, GPUgc only updates visible levels. When a level that was not rendered last frame is now visible it partially or fully update it.

GPU Geometry Clipmaps Demo 25.03.2007
GPU Geometry Clipmaps Source 25.03.2007

Edit : Updating visible levels only boost FPS during motion at high height. On a low height, there is less update calls but they have more work to do (GPU (synthetize)/ CPU (decompress)), the user might feel some freeze during motion on downmarket CPU/GPU. Updating all levels prevent freezes but it's slower when user is at high height. ( choice is yours ).

Note : if you want to try using normal maps size twice clipmap ones change
"TexNormalSize = TexClipSize * 1;" to "TexNormalSize = TexClipSize * 2;"
In GPUGeometryClipmap(). In ComputeNormals.fx change
"p_uv2 = floor(p_uv2 + 0.5);" to "p_uv2 = floor(p_uv2 + 0.25);".

Saturday, March 17, 2007

GPU Geometry Clipmaps Done








http://www.youtube.com/watch?v=qw-gomauW84

http://www.gamedev.net/community/forums/topic.asp?topic_id=439770

Demo

Finish ! Instead of normal maps size 512, i use 256 because it looks better. i also notice that this technique don't like much pikes ( RidgeMF ) but i think that's the way they compute the average of coarser level with only 2 tex fetch. On other terrains ( Turbulence ) morphing is hardly visible.

Saturday, March 10, 2007

GPU Geometry Clipmaps Normals

Normals done on render phase


Normals with normal maps and morphing


I tryed the suggestion of computing normals during the render phase without the help of normals map. Sometimes we can see transition regions because there is no morphing and there is a drop of FPS. In a high speed game this approach could be a good idea. With normals maps and morphing it's looks better but still hard to find a way to update normals maps.

Saturday, March 3, 2007

GPU Geometry Clipmaps WIP



i have optimized vertex cache hit of triangle strips and i got a boost of 10 Fps ( + 25 % ). I discovered pixel artefacts in the middle of grids ( not T-Junctions ) and post about it on gamedev for help, http://www.gamedev.net/community/forums/topic.asp?topic_id=437850. Normals update don't work yet, just a matter of time.



Edit : No more T-Junctions and pixel artefacts, those were Mipfilter artefacts. Normals are now correct but i will have to use the last row and column to get correct normals for clipmap n=255. Thinking about a way to manage this.

Friday, March 2, 2007

GPU Geometry Clipmaps WIP



I finish coding instancing, min clipmap level, outer degenerate triangles. I am working on normals but shading is ugly even with twice the resolution of clipmaps. I also saw some pixel problems, may be i don't remove T-junction correctly.






Edit : I correct T-Junctions 's problem and normals but shading seems blured. Not enough resolution i guess.

Tuesday, February 27, 2007

GPU Geometry Clipmaps WIP

I finished writing frustum culling and cleaned some c++ & shader code. Next step, generate normals on the fly, better terrain texturing, optimize a bit frustum culling and draw the outer degenerate triangles.



Grid Size 255, 8 Levels on a 6200 !

Sunday, February 25, 2007

GPU Geometry Clipmaps WIP

I made some progress, now the average of coarser works. I need to rewrite my update function because coordinates system is all messed up.



Edit : i finally finished coding GPU Geometry Clipmaps and it works !!! pfiouh ... Now it's polishing time.

Friday, February 23, 2007

GPU Geometry Clipmaps

I received a new 6200 with SM 3.0 and i just restarted working on my implementation of GPU geometry clipmaps "Terrain Rendering Using GPU-Based GeometryClipmaps". As you can see in the screenshot, i have problems during the update with the coordinates system and the average of the coarser elevation map. There is a lack of information in the paper, the shader code on the GPU gems II and the demo doesn't give explanations of how it works.


Edit : After a few tries, i almost fix it but i still get errors when uv coordinates cross the boundary of the texture.