Subsurface visualisation - making specific region transparent.

494 views
Skip to first unread message

Dave

unread,
Mar 24, 2014, 2:54:40 AM3/24/14
to cesiu...@googlegroups.com
Hi,

I've been using Cesium and Nicta's ground push add-on to create a sub-surface visualisation prototype.

However, because we are also visualising the location of boreholes, we are required to display tiles on the surface in addition to the ones that have been ground-pushed, in which its transparency can be set by users.

I would like to ask whether it is possible to clone the tiles within a specific region and place it on top of the sub-surfaced region?

Or, can the texture maps of tiles within a specific region be cloned and applied onto a plane primitive?

If both of them are impossible, then if anyone can give a hint with regards to making a particular region/tiles transparent?

Thank you

Dave

Kevin Ring

unread,
Mar 25, 2014, 8:23:43 PM3/25/14
to cesiu...@googlegroups.com
Hi Dave,

There's nothing out-of-the-box in Cesium that will do what you want.  It's possible by writing some new code, of course.

As an experiment, I hacked up Cesium to render the entire terrain surface with an alpha value of 0.7.  You can see my experiment in the translucentTerrain branch:


Looking at that may give you a sense of some of the problems you'll face.  One problem is that regular alpha blending of translucent surfaces requires that the surfaces be rendered in back-to-front order, which is opposite the order that we usually render terrain.  It may be possible to leverage the work in the order-independent translucency (oit) branch to get correct translucency without sorting.  I'm not sure offhand what the costs would be for terrain rendering.

Another problem is that translucent terrain reveals the skirts that drop down from the edges of terrain tiles to hide small differences between adjacent levels-of-detail.  If the translucent surface has a relatively low alpha value, it may be reasonable to simply skip rendering the skirts.  Other, more complicated things are possible.

Beyond that, you have the problem of actually rendering two sets of geometry within the pushed region.  One approach is to simply make the existing terrain translucent within the pushed region instead of actually pushing it.  Then use a gltf model or something similar to render the underground geometry.  Again you have render order issues with the translucency, or you need to use order-independent techniques.

It's also possible, with some more work, to render two terrain surfaces.  We took some very small steps toward that in the tiledGeometry branch:


This probably isn't the easy answer you were hoping for, but I hope it helps!
Kevin





Dave

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

David Yu

unread,
Mar 25, 2014, 11:41:29 PM3/25/14
to cesiu...@googlegroups.com
Hi Kevin,

Any help I can get is great. Thank you Kevin.

With regards to making the pushed region transparent, I am wondering if this is even possible? It seems to me that the shader code does is to add a tinted colour overlay on top of  the pushed region.

Now it will be helpful if any shader experts can show me how to do transparency mask (not sure what is called - stencil shader perhaps or something else) in GLSL - a kind of image layer overlaid on top of a layer to set the transparency of the layer underneath.

Thank you.

Kind Regards,
David 


--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/-l80DLPwjWc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Kevin Ring

unread,
Mar 26, 2014, 9:40:07 AM3/26/14
to cesiu...@googlegroups.com
Hi David,

Making the surface translucent in the pushed region is doable.  Straightforward, even, I think, other than the gotchas I already mentioned.  The technique is basically the same as what I did in the translucentTerrain branch I mentioned before (here's a diff: https://github.com/AnalyticalGraphicsInc/cesium/compare/translucentTerrain), except you would only adjust the alpha value of gl_FragColor inside the pushed region.

That said, I don't want to lead you to believe it's going to be easy to achieve what you want here.  We're talking about a significant coding effort.

Kevin

Chris Cooper

unread,
Mar 26, 2014, 7:42:05 PM3/26/14
to cesiu...@googlegroups.com
Hi David,

W.r.t. your original post.  You suggest "Or, can the texture maps of tiles within a specific region be cloned and applied onto a plane primitive?".

This seems like a simple approach if it is sufficient.  e.g. Use the existing ground push as-is.  Allow the user to adjust the transparency of a poly representing the original surface.  Perhaps even a grid image, or a screen shot captured from the 2d map view in that region would be sufficient for mapping on as a texture, after all it will be semi-transparent.  You could do some tessellation and terrain sampling if elevation is important.

Chris

David Yu

unread,
Mar 26, 2014, 7:46:43 PM3/26/14
to cesiu...@googlegroups.com
Hi Chris,

The hard part we are trying to do for this method is to clone the bing map texture within the region and apply onto the plane primitive - so visually it looks better. I'm not sure is there any simple way for Cesium to support that?

Thank you.

Kind Regards,
David

Chris Cooper

unread,
Mar 26, 2014, 8:27:03 PM3/26/14
to cesiu...@googlegroups.com
As mentioned before, perhaps a 2d map screen capture might be a sufficient texture at least for prototyping.  Alternatively, if you know in advance the extent you're working in you could manually create flat geometry tiles in the area and map appropriate image tiles directly onto them via a Cesium material.

something like...

- choose an appropriate tile level
- for each x,y in the extent of interest
-   use tileXYToExtent from the tiling scheme to create an extent poly with appropriate extent
-   map on the appropriate imagery texture (e.g. from bing/osm etc) via a material.  Look at the imagery provider to work out how to form an appropriate request URL.

Note that this sort of solution could also be implemented via the work in progress tiledGeometry branch [1].


d...@aspingroup.com.au

unread,
Mar 30, 2014, 11:53:28 PM3/30/14
to cesiu...@googlegroups.com
Dear Chris,

Thank you. We have taken your suggestion and it works well. We applied an image captured from the Open Street Map as texture map, and applied to a plane that covers the ground-push area. One thing I've noticed is that the plane can get overly reflective when it is viewed from a certain angle, but tweaking the materials (specular, shininess, reflection, emission) doesn't seem to help.

After the demo, I will investigate the ImageryProvider in Cesium and see whether I can extract the texture's on the globe tiles and apply it onto the same plane. So it will look consistent with the rest of the globe.

I've also tested Kevin's code to make the globe transparent. It kind of works, but it'll still cuts off anything beneath the surface if they are set to have depthTest to true.

Kind Regards,
David

Chris Wang

unread,
Jan 17, 2016, 9:42:45 PM1/17/16
to cesium-dev, d...@aspingroup.com.au
Dear Dave

I'm trying to use ground-push plugin to visualize underground entity. 

But I don't know how to upgrade the plugin to the latest version of Cesium (1.17). Or Cesium 1.12.

I just want to know how to use it in new Cesium. Can you give me some help on it?

Thanks a lot.

Chris Wang

在 2014年3月24日星期一 UTC+8下午2:54:40,Dave写道:

2740...@qq.com

unread,
Mar 24, 2016, 10:35:19 PM3/24/16
to cesium-dev
在 2014年3月26日星期三 UTC+8上午8:23:43,Kevin Ring写道:
> Hi Dave,
>
>
> There's nothing out-of-the-box in Cesium that will do what you want.  It's possible by writing some new code, of course.
>
>
> As an experiment, I hacked up Cesium to render the entire terrain surface with an alpha value of 0.7.  You can see my experiment in the translucentTerrain branch:
>
> Hi
Where should i change the value 0.7 if i want to change translucent?

2740...@qq.com

unread,
Mar 25, 2016, 3:44:11 AM3/25/16
to cesium-dev, d...@aspingroup.com.au
在 2014年3月24日星期一 UTC+8下午2:54:40,Dave写道:
Do you solved this problem?

Reuben Reyes

unread,
Jul 20, 2016, 11:35:35 AM7/20/16
to cesium-dev, d...@aspingroup.com.au, 2740...@qq.com, Reuben Reyes
Here are some examples with global subsurface visualization that uses transparency and a video.
LINKS:

I hope the data sets and the Cesium examples will help you,
Reuben
Reply all
Reply to author
Forward
0 new messages