-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(layer): add full support to scaling for elevation layers #1174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/Parser/XbilParser.js
Outdated
max = Math.max(max, val); | ||
min = Math.min(min, val); | ||
} | ||
max = Math.max(max, val); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this clamp was to handle the elevation error (with huge negative elevation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, but then the example won't work, as there is huge negative elevation, for example Marina trench at -11.000m, times the scale is way beyond the -10 authorized here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could add layer option to clamp the elevation?
4c4b444
to
13e4d74
Compare
Up to date and ready, I couldn't get to perfect bbox culling, so I'm living like it is now, as it is only for special case that this is visible (with great exageration of altitude). |
src/Renderer/LayeredMaterial.js
Outdated
@@ -253,6 +253,12 @@ class LayeredMaterial extends THREE.RawShaderMaterial { | |||
getElevationLayer() { | |||
return this.layers.find(l => l.id === this.elevationLayerIds[0]); | |||
} | |||
|
|||
setElevationScale(scale) { | |||
if (this.elevationLayerIds.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you replace by if (this.elevationLayerIds.length)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I push a fix on @gchoqueux / fix_geoid. Could you comment and test? |
It is better, thanks, but it is not perfect yet: I think it will be very difficult to have a perfect result here anyway. |
So I added your suggestion, and rebase it, now it should be good to go ! |
could you open folder gui, to see directly the scale slider? |
Done |
Changing the `scale` property of an `ElevationLayer` can changed the aspect of the visual, allowing exageration of the elevation of the globe, as in the tiff.html example. This is an up-to-date version of iTowns#511
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we've been waiting for this feature: Thanks!
Changing the
scale
property of anElevationLayer
can changed theaspect of the visual, allowing exageration of the elevation of the
globe, as in the tiff.html example.
This is an up-to-date version of #511