Is it possible?
Is there any way to apply custom shader(especially vertex shader) for terrains?
We have own terrain server in real scale and we display some isosurfaces above terrain.
The requirement is displaying terrain heights and isosurfaces vertically scaled in logarithmic scaling. My clients also want to adjust scale factor in realtime.
So I have to convert real heights into logarithmically scaled heights and it should be applied to terrains and isosurfaces.
Isosurfaces seems possible because they are rendered using custom shader, but terrains?
Is there any way to realize it?
(for now, I use Scene.verticalExaggeration to scale terrains and isosurface, but it only supports linear scaling)
below table is example of what things should be.
real height / scale factor that user adjust / displaying height
100 / 1 / 100
200 / 1 / 150
300 / 1 / 125
400 / 1 / 132.5
100 / 2 / 150
200 / 2 / 132.5
…
You described wanting the adjust the scale factor. Would this be to adjust the styling of the terrain/tiles via the custom shader or to exaggerate the terrain. If it is exaggeration, then as you pointed out Scene.verticalExaggeration is the only option offered. But extending the linear scaling feature to support logarithmic scaling would be an interesting topic to explore if you or anybody else in the community is interested.
I hope this information is helpful as you plan your project and please let us know if you have further questions.
Best,
Luke
It is about exaggeration, not about styling of terrain/3dtiles. The reason I mentioned custom shader on terrain is that If I can use vertex shader on terrain, I can calculate new terrain heights (at lease in my thought).
We are visualizing data that the terrain affects, so the scaling factor must be applied to both the terrain and isosurfaces in the same manner and ratio. and the elevations in the real data should be represented using a logarithmic scale.
as your suggestion, making terrain into 3d tiles can be an option. Thanks!