[QUESTION] .btg rendering process in HW classic

I’ve been fiddling with HW1 classic trying to increase the view distance. However, it appears as though there’s a hard upper bound to this, apparently caused by the .btg file being mapped to a sphere centered on the player’s camera. No matter what tweaks you make to the rendering distance, if a ship is too far from the camera, it passes behind the background and disappears.
Does anyone know if there is a way to increase the size of the sphere being used to render the background?
The BG_RADIUS variable in tweaks.script does not appear to work.

Try variable CAMERA_CLIP_FAR in camera.script (notice that it’s also stored in saved games, so you need to start new game).

I tried that; it isn’t enough on its own. In fact, if you just use that you can cause your view to cut through the background and render the void behind it. But the background is still between you and the ships, so they don’t render.

HOWEVER! I found a solution, which is increasing the smDepthCueRadius and smDepthCueStartRadius in the .mission files!

@thewhitecrane, background sphere radius always equals to CAMERA_CLIP_FAR (see btgConvertAVert() function in src\Game\btg.c). Of course, it is need to use BG_RADIUS parameter, it even passed to the rndBackgroundRender() function, but don’t used at all.

smDepthCueRadius and smDepthCueStartRadius values seems also don’t used at all – they’re picked prom scripts, they’re saved to and loaded from saved games… and nothing more. I tried to set this to different values and don’t have any effect.

Also, when HW1 engine builds list of objects, that need to be rendered, it used parameters RENDER_VIEWABLE_DISTANCE_SQR (for standard objects) and RENDER_MAXVIEWABLE_DISTANCE_SQR (for large objects) in tweak.script to determine, include object in list or aren’t. Also there are parameters RENDER_LIMIT_* and RENDER_FADE_* for different ship classes, that used to calc fading coefficient of rendered ship (see rndFade() function in src\Win32\render.c).

But all these things not used when rendering background.