OpenH2 icon indicating copy to clipboard operation
OpenH2 copied to clipboard

Implment Skybox as real object in world

Open ronbrogan opened this issue 4 years ago • 3 comments

In H2, the skybox is an actual object in the world. This can be observed by glitches where you can project an object into the sky by getting it inside the skybox.

https://www.youtube.com/watch?v=TPaiQ0bBbAw https://www.youtube.com/watch?v=zsXKV8e9cuI

Current implementation is done by rendering the skybox at the position of the camera first, then rendering everything else after.

ronbrogan avatar Jul 06 '20 05:07 ronbrogan

There's something wrong, I remember playing hugeass ( halo CE ) and as big the map is, the far plane clips geometry and the skybox gets rendered instead. This is more as having three render targets:

  1. Sky
  2. Far-Near view
  3. First person

Sky never clips. What I see in those videos look more a broken matrix, it is FAR and yet gets clipped and has LODs.

marcospampi avatar Mar 13 '21 13:03 marcospampi

Yeah, this matches with my understanding as well. The current skybox implementation creates the skybox 'around' the camera and simply renders it before everything else The real game seems to have a skybox object somwhere in the world, roughly the size of a spartan. The camera is effectively moved into that skybox and rendered first

Both of these methods won't clip on the far plane since the geometry is actually very close to the camera, just rendered first to appear behind everything (and, importantly, writing depth information is disabled)

ronbrogan avatar Mar 13 '21 17:03 ronbrogan

No I haven't ever noticed anything like that, the skybox is just a huge dome-like projection, draw in a certain order, with some quads acting like sprites, I recall most of the far geometries on Halo CE, say the desert in The Maw, are part of the BSP. As I ever seen it, both BSP and Skybox are part of the current state of the level ( lightmap depends both on geometry, instanced static scenery such as light sources and skybox ), I think your current implementation isn't wrong, and the videos you linked describe all but bugs.

marcospampi avatar Mar 14 '21 00:03 marcospampi