Skip to content

As an observer of the map I see that some higher elevation prims are cut off at region crossings #19

Description

@kf6kjg

This is due to a filter that limits which prims will be drawn based upon their height above the terrain in OBBRenderer.cs near line 320:

if (
	// skip prim in non-finite position
	Single.IsNaN(pos.X) || Single.IsNaN(pos.Y) ||
	Single.IsInfinity(pos.X) || Single.IsInfinity(pos.Y) ||

	// skip prim Z at or above 256m above the terrain at that position, but only if actually above terrain.
	// BUG: will still cause discrepencies when the terrain changes height drastically between regions and the prim is in the high "iffy" area.
	(pos.X >= 0f && pos.X < 256f && pos.Y >= 0f && pos.Y < 256f && pos.Z >= (MathUtilities.GetBlendedHeight(heightMap, pos.X, pos.Y) + 256f)))
	return null;

As noted this will only happen if the prim is near the terrain+256m altitude limit, overlapping into an adjacent region, and the terrain height in the adjacent region has an altitude change enough to invalidate the prim in that region's space.

To solve this the region would have to know the adjacent region's terrain.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions