PDA

View Full Version : LOD level determination by using varying FOV?



Sword7
05-04-2016, 07:27 PM
Folks,

Does anyone know any algorithm about LOD level determination by using varying FOV for massive terrain mapping on procedural planet? For example, when FOV get narrower, LOD level will go down to get enough fine. Or when FOV get wider, LOD level go up. That's why I want LOD level determination by using varying FOV and distance and metric error from each tile for clipmapping, etc..

I was figuring out some LOD terrain implementation papers with some source codes but they are designed for fixed FOV view.

Thanks,
Tim

Aleksandar
05-05-2016, 05:40 AM
The metric for geometry clipmaps does use FOV to calculate the approximate screen-space triangle size (s):

s = 1.25 * W / (n * tan(phi/2)) [pix]

where W is the window width, n is the size of the levels in samples and phi is the horizontal FOV.

I'm using the following code to calculate the grid step:


h = m_pCamera->m_H - m_fTerrainHeight;
beta = 0.5 * m_pCamera->GetHFOV0();
grid_step = (h / (tan(beta) * _Rz)) / (m_nBlockSize-1);

where m_H is the altitude of the camera, m_fTerrainHeight is the height of the terrain below the camera, _Rz is an effective radius of the planet and m_nBlockSize is the size of the finest clipmap level in samples.