You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
itowns is supposed to support RGBA-encoded elevation with ElevationLayer.
There is a option ELEVATION_MODES.RGBA but it's not possible to active this mode.
In shader, there is a method decode32 to decode rgba to float.
add ElevationLayer option to active ELEVATION_MODES.RGBA;
add example with ELEVATION_MODES.RGBA mode (you also need a server that provides such data);
replace decode32 by unpackRGBAToDepth from Three.js;
The text was updated successfully, but these errors were encountered:
For my tests, I've used TMSSource. I've removed from GlobeView.js the error threw when the elevation layer crs isn't in EPSG:4326 (for mapbox, it's in EPSG:3857).
I've had to set the option useRgbaTextureElevation of my elevation layer. I removed the triggered error in RasterTile.js.
Then I had to decode the RGB value to get the elevation.
To do that I've modified elevation_pars_vertex.glsl and implemented this formula https://blog.mapbox.com/global-elevation-data-6689f1d0ba65
I was able to load the elevation, however there is an issue with the camera culling. The tiles closest to the camera are not loaded. This seems to come from the missing zmin in the bounding box (Obb.js).
You can check my forked branch : https://github.com/AnthonyGlt/itowns/tree/terrain
Note: My html example is messy (still testing).
To generate the elevation data, I've used gdal to convert IGN data to a .tif, then, using rio-rgbify, I was able to obtain rgb encoded data. We can then convert the data to mbtiles using rio-rgbify or mb-util.
itowns is supposed to support RGBA-encoded elevation with
ElevationLayer
.There is a option
ELEVATION_MODES.RGBA
but it's not possible to active this mode.In shader, there is a method
decode32
to decodergba
tofloat
.ElevationLayer
option to activeELEVATION_MODES.RGBA
;ELEVATION_MODES.RGBA
mode (you also need a server that provides such data);decode32
byunpackRGBAToDepth
fromThree.js
;The text was updated successfully, but these errors were encountered: