How to render the building outline in my 3dtile?

134 views
Skip to first unread message

12er...@gmail.com

unread,
Nov 15, 2019, 3:14:18 AM11/15/19
to cesium-dev
1. A concise explanation of the problem you're experiencing.
I  just  wante render building outline in Cesium3DTileset.Before set style, my module wall space is blank. Its terrible-looking. I change the alpha of color. But some unexpected white appear on overlay 3dtilefeature(entity).


2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var tileset = new Cesium.Cesium3DTileset({
    url: '/mwb/data/111/tileset.json'
});

var style = new Cesium.Cesium3DTileStyle();

tileset.readyPromise.then(function(tileset) {
    viewer.scene.primitives.add(tileset);
    viewer.zoomTo(tilesetnew Cesium.HeadingPitchRange(0.0, -0.5tileset.boundingSphere.radius * 2.0));
}).otherwise(function(error) {
    console.log(error);
});
style.color = 'rgba(204,255,255, 0.9)';
// style.anchorLineEnabled = true;
// style.anchorLineColor = 'color("blue")';
tileset.style = style;


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I just the wall look better than default. 

  • My model contains all the room shapes of the building.

  • I just need to render the outline of all the outer walls


1.png

The default load.

2.png

change aplha of color


4. The Cesium version you're using, your operating system and browser.
ceisum.js 1.63
windows 10
chrome 75.0.3770.142


12er...@gmail.com

unread,
Nov 15, 2019, 3:17:13 AM11/15/19
to cesium-dev
  • \Send the picture again

1.png
2.png

Omar Shehata

unread,
Nov 16, 2019, 2:54:03 PM11/16/19
to cesium-dev
Your best bet right now may be to use the 3D Tiles Styling language to color the buildings or change the opacity like in this example:


There's an issue here about improving this in CesiumJS: https://github.com/AnalyticalGraphicsInc/cesium/issues/7870

I posted a link to the discussion in this thread, but feel free to chime in there or follow that issue as well.

On Friday, November 15, 2019 at 3:17:13 AM UTC-5, 12er...@gmail.com wrote:
  • \Send the picture again

Reply all
Reply to author
Forward
0 new messages