Pages

Normals maps into HemiMaxn

 I switched the normal maps from using euclidean xy to using hemi maxn, this is a hemispherical encoding I came up with that is somewhat similar to HemiOct.  


 

 

 

 

 

 This provides higher quality, with only a few extra instructions required to decode.

  

I also created a variant for a full spherical view, it is 2x as wide as it is tall.














Here is spherical maxn used for a skybox, this shows a 360 view.  I generate this by projecting the primary screen render onto the maxn view, then warping it forward as the player moves around. This is used as the basis for the environment map. It does get distorted if the player never turns their head, so I'll probably need to add a specific pass to render a low res version behind the player occasionally.

Camera with Signed Distance Field

 The camera uses the local SDF to guide itself, attempting to stay at least a fixed distance away from the nearest surface, while also avoiding obstructions that may be blocking the view of the players body.  

When moving away from a surface it uses the gradient of the SDF to determine the direction to move in. 

It also computes the lipchitz bounds to accommodate and correct for bad distance fields.

 The player also moves using (semi) camera relative controls, so the movement of the camera needs to be very smooth and predictable. 

  The design uses two virtual arms, one extending upward from the players body, and the 2nd, connected to the top of the first, extends backward. Left/right with mouse spins the first, while Up/Down moves the 2nd. It feels like a first person camera while actually being third person.

I apply temporal smoothing in a few places to prevent jittery behavior.