Jump to content

  • Log In with Google      Sign In   
  • Create Account

spacerat

Member Since 26 Oct 2006
Offline Last Active May 18 2016 11:45 AM

Posts I've Made

In Topic: Planet Rendering: Spherical Level-of-Detail in less than 100 lines of C++

12 May 2016 - 09:32 AM

Update:

 

I added a textured version to Github (see screenshot). Its much faster than the previous version that calculates the terrain in the shader.

 

For the next version, I plan to generate the meshes and textures on GPU or CPU and stream them into the GPU for rendering, basically caching the tiles.

 

 


In Topic: Planet Rendering: Spherical Level-of-Detail in less than 100 lines of C++

27 April 2016 - 11:17 AM

Ok, just updated the code.

 

Here a brief summary

  • Changed to double on cpu side
  • Relative coords are used for close tiles
  • Speed and altitude are displayed in km
  • Movement is now via wsad 
  • Mousewheel adjusts the camera speed
  • Camera near/far is adjusted with regard to the camera altitude
  • The code is now split in two parts: simple (100 line version) and complex (patch based version) 

Left to do is to change to texture based heightmaps - hopefully this will improve the imprecision close up

 

https://github.com/sp4cerat/Planet-LOD


In Topic: Planet Rendering: Spherical Level-of-Detail in less than 100 lines of C++

23 April 2016 - 10:10 AM

yes, but even the geometry is unchanged, the view matrix is different each frame; so you need to transform all vertices every frame for the camera, no?


In Topic: Planet Rendering: Spherical Level-of-Detail in less than 100 lines of C++

23 April 2016 - 01:50 AM

Isnt that slow? There are around 300k to 600k vertices on the screen

In Topic: Planet Rendering: Spherical Level-of-Detail in less than 100 lines of C++

22 April 2016 - 01:05 AM

 

Basically it works nice, but once you go up close then float precision is not enough. What is the best solution to that other than splitting the frustum in near / far ?

Generally you can get away with having each vertex defined relative to the center of the patch which contains it, and rendering patches relative to the camera... Not necessarily ideal for a recursive implementation.

 

 

Thats basically what happens. I set 3 corner coords of a patch in the vertex shader, the rest is interpolated. Maybe I should first multiply the matrices to avoid a precision loss


PARTNERS