Skip to content
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

Generating client-side hillshade using Terrain RGB tiles? #16

Open
rumicuna opened this issue Nov 20, 2022 · 2 comments
Open

Generating client-side hillshade using Terrain RGB tiles? #16

rumicuna opened this issue Nov 20, 2022 · 2 comments

Comments

@rumicuna
Copy link

@davenquinn In your post:
https://community.cesium.com/t/hillshade-using-cesium-terrain/9590/2
you mention that you were able to generate client-side hillshade using Terrain RGB tiles.
I'm trying to do the same thing you are, but in my case I'd like to generate both a hillshare and also a high-res slope rendering from the rgb tiles. From your post I gather that you created a custom Cesium ImageryProvider and did not do it in the cesium-martini code. Is that effort something you have open sourced (I can't find it in your repo list) or plan on doing so at some point? If not, I would be so thankful if you could point me in the right direction as to what it took for you to code this?
Thank you!
-Martin

@davenquinn
Copy link
Owner

Hi Martin, sure —

The code right now is in another module: https://github.com/UW-Macrostrat/cesium-viewer/blob/master/src/layers/terrain/hillshade.ts. It works pretty well but it is relatively inflexible (e.g., it does not allow variation of the illumination angles and intensity). Slope etc. would be possible with relatively small changes to the approach I think. I'm also not good with WebGL (and probably won't become so anytime soon) so I'm sure I'm missing some ways to optimize and improve the approach.

I'd be happy to parse out this renderer into a separate module if you wanted to collaborate on a library.

@rumicuna
Copy link
Author

Awesome, thank you!
I'd love to collaborate on a library, I'll start playing with your code, hopefully I can make some improvements to share back with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants