Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Feature: Elevation Exaggeration / Scale #50

Closed
xwipeoutx opened this issue Apr 21, 2020 · 2 comments
Closed

Feature: Elevation Exaggeration / Scale #50

xwipeoutx opened this issue Apr 21, 2020 · 2 comments
Labels
feature request New feature or request

Comments

@xwipeoutx
Copy link

We're after the ability to exaggerate terrain, to make flat areas a little more interesting, and small hills more obvious.

I'd like to have an option on the map renderer to set the "elevation scale" - a number greater than 0 which describes how much to exaggerate elevation by.

This would affect terrain and also pin altitudes, and any calls to TransformLatLonAltToWorldPoint

I've done a lot of this manually myself, but the change to 0.6.1's collider volume broke it, and without access to the depth-writing logic for the collider volume, I can't get much further (well, yet).

My in-shader fix for the terrain was essentially multiplying _ElevationTexScaleAndOffset.w by my own _ElevationScale in calls to CalculateElevationOffset and FilterNormal, which I'm happy to share back (though I have a lot of other changes in my shader too)

@xwipeoutx xwipeoutx added the feature request New feature or request label Apr 21, 2020
@xwipeoutx
Copy link
Author

I've put up a hacky fix for this at
https://github.com/xwipeoutx/MapsSDK-Unity/tree/spike/elevation-exaggeration

The gist of it is

  • In the 2 render shaders (terrain, clipping volume), scale their Y value by the elevation scale
  • In the clipping distance shader, adjust the view matrix so that it doesn't clip terrain that's too high (I just guessed this one)

It's relatively low impact, when all is said and done - the clipping shader is the obvious hack, because I can't just change that matrix in the C# codes.

@kircher1
Copy link
Contributor

kircher1 commented May 4, 2020

Addressed in 0.7.0. Thanks!

@kircher1 kircher1 closed this as completed May 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants