Jump to content

  • Log In with Google      Sign In   
  • Create Account


pbobzebuilder

Member Since 25 Jul 2013
Offline Last Active May 23 2014 10:12 AM
-----

Posts I've Made

In Topic: Equivalent to D3DReflect for OpenGL

19 November 2013 - 05:50 AM

Thanks a lot !

 

glGetProgramResourceNameglGetActiveAttribglGetActiveUniform... will do the job. 


In Topic: GPU Normal Maps Artifacts on a Quadtree Terrain

15 August 2013 - 02:19 AM

Thanks to take the time helping me :)

 

I haven't tried to precompute values by the CPU but it could reduce the artifacts if precomputed using doubles.... I'll give it a try :)

 

My terrain is actually a 1:1 scale planet. My normals are computed in object space which explain the matrix (Used to transform my normals from planar heightmap to sphere).

 

Coordinates passed to my noise function are between -1, 1 at quadtree-depth = 0. May be I could try another scale to limit f32 precision issues.


In Topic: GPU Normal Maps Artifacts on a Quadtree Terrain

14 August 2013 - 02:10 AM

My problem comes much from where the heightmap comes from. I create an heightmap for each leaf of my quadtree. As I go deeper in the quadtree subdivision, I continuously create heightmap based on miscellanous noise functions. At a given depth (about 14 subdivs) the input coordinates for the noise are too small for a 32 bits float (I'm doing it with the GPU). This precision issue leads to really bad artifacts in the normal map.

 

Nothing strange about the way normals are computed. There's multiple ways to compute normals. Here I choose a fast and simple shortcut. I Could have used something like sobel filter but it takes more computations and more sampling from the heightmap. Instead, I only do the difference between the top and above Heights for one axis and the difference between left and right Heights for another axis. Given a Y axis = 2.0 for a quadtree depth of 0 I'll have Y=1 for Depth=1; Y=0.5 for Depth=2, Y=0.25 for Depth=3 and so on... (here is why the 1<<pTreeNode->GetDepth() is for.)


In Topic: Terrain Normal Map

30 July 2013 - 03:32 PM

For a terrain & if your normal map is computed from a heightmap, you can use world space normal maps. Your normalmap will only be used on the terrain (tangent space allow you to use your normal map on any geometry).


In Topic: GPU Normal Maps Artifacts on a Quadtree Terrain

30 July 2013 - 02:55 PM

Been trying all the day to get around the problem without any success.

I think I'll bypass the precision issue by setting the maximum quadtree-depth of the normal map to 14.

 

I'll be happy to discuss with anyone having similar problems.


PARTNERS