Does Cesium support custom shader?

1,088 views
Skip to first unread message

Karl Tian

unread,
Mar 28, 2019, 6:41:01 AM3/28/19
to cesium-dev

微信图片_20190328181045.png

Like this one, can we set custom shader to primitive?

How far does Cesium support of WebGL?

In fact, is there any chance to combine Cesium with other platform like three.js or babylon.js?

Thank you


Omar Shehata

unread,
Mar 28, 2019, 2:41:35 PM3/28/19
to cesium-dev
Cesium does support custom shaders and materials. Although there are less examples/documentation on it because it's less commonly used. There's some good examples in this unofficial repository:


This thread also some good resources:


There's been some experiments rendering Threejs and Cesium in the same scene but they're incomplete:



I've been wanting to see 3D Tiles in Threejs just to see what kind of applications would make use of that ecosystem. Is there something specific you're trying to do with Cesium/custom shaders here?

Karl Tian

unread,
Mar 29, 2019, 3:19:13 AM3/29/19
to cesium-dev
Hello Omar

Here in China, our customers are most often keen on very 'cool' appearance of delivered goods.
Like these:

微信图片_20190329143307.png

微信图片_20190329143315.png

And with all due respect, Cesium is a very good WebGIS platform,  but three.js or babylon.js is better making those scenes.Let's say we all have our own field of expertise.
So I need to build a scene of large scale of GIS data, buildings,roads, etc.maybe even BIM data, in a good looking way.
glTF is a possible solution, do hard work off line, just show models online, and keep all lights, shadows, animates. Still cost too much to load and render online, especially in massive numbers.So I definitely hope that 3d tiles could be more powerful
In conclude, I hope that Cesium could perhaps have a light and physical system, support more materials maybe PBR, and make big effort on Style and Symbol.

Thank you.






在 2019年3月29日星期五 UTC+8上午2:41:35,Omar Shehata写道:

Omar Shehata

unread,
Mar 29, 2019, 10:41:13 AM3/29/19
to cesium-dev
Thanks for sharing your thoughts Karl. I definitely agree with you. Those screenshots definitely look very cool! 

The goal of 3D Tiles as a format is to make it easy and fast to stream and render massive GIS data. Cesium does actually support PBR on 3D models:


So I think a b3dm could use it right out of the box, but it would be harder to do the effects you've shown without modifying the source a bit. 

I do know iTowns is a 3D Tiles viewer that's based on Threejs:


I haven't used it personally so I don't know how feature-complete it is, but if you do, I'd be curious to hear what your experience is with it.

cql...@gmail.com

unread,
Aug 12, 2019, 10:16:29 PM8/12/19
to cesium-dev
Have you solved your problem in cesium?

在 2019年3月28日星期四 UTC+8下午6:41:01,Karl Tian写道:

微信图片_20190328181045.png

像这样,我们可以将自定义着色器设置为原始吗?

Cesium对WebGL的支持程度如何?

事实上,有没有机会将Cesium与其他平台如three.js或babylon.js结合起来?

谢谢


Reply all
Reply to author
Forward
0 new messages