The real3d pro-1000 has 4 possible level of detail models, and a table of values where these models fade in/out. It's supposed to be a distance table, or possible angle table, but I could never get the values to work exactly. They were always off by some factor. Currently we always render the highest poly models. But some games are using this table to do blending effects we currently don't support.
Anyway I had some sort of epiphany whilst thinking about other stuff. I did note before the blending seemed to change with the FOV of the camera, which kinda makes sense. If the FOV is narrowed you zoom in.
Anyway with a 45degree field of view, the ratio between the distance and the horizontal is the same. But if you narrow the FOV this ratio changes .. anyway there must be some formula to calculate distances for this.
And googling around I found this
https://digitalrune.github.io/DigitalRu ... 4cb032.htm
distancenormalized = distance * tan(fovY / 2)
where fovY is the camera's vertical field-of-view.
In other words, the view-normalized distance is the camera distance times a camera correction factor. The correction factor accounts for the camera field-of-view. The resulting value is inversely proportional to the screen size of the object and independent of the current field-of-view. It can be used to specify LOD distances or similar metrics.
Note that tan(fovY/2) is 1 if the fovY = 90°. This means that distance and view-normalized distance are identical for a camera with a vertical field-of-view of 90°. (This 90° FOV camera is the "reference camera".)
The view-normalized distance is only defined for cameras with perspective projections. The result is undefined for orthographic projections!
Anyway I might give this a go to see if it works
