Re: How to disabled Pprimitive Object Shadow?

116 views
Skip to first unread message
Message has been deleted

Sean Lilley

unread,
Nov 29, 2016, 7:11:01 PM11/29/16
to cesium-dev
You can try setting the lighting to flat:

new Cesium.EllipsoidSurfaceAppearance({
    material
: billboardviewer,
    flat
: true
})


You don't need to set 'castShadows' (which is now just called 'shadows') because by default primitive shadows are disabled.


On Sunday, November 27, 2016 at 10:41:08 PM UTC-6, 김도현 wrote:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
billboardviewer = new Cesium.Material({
    fabric : {
        type : 'AlphaMap',
            uniforms : {
                image : canvas.toDataURL("image/png"),
            },
             components : {
                 diffuse : 'texture2D(image, materialInput.st).rgb;',
                 shininess: '0.0'
            },
        },
});

Polygon = new Cesium.PolygonGeometry({
  polygonHierarchy : new Cesium.PolygonHierarchy(
    Cesium.Cartesian3.fromDegreesArray([
    89.9, 25,
    -90, 25,
    -90, -25,
    89.9, -25])
  ),
  height: 670000000,
  perPositionHeight : true,
  material : Cesium.Color.WHITE,
  outlineColor : Cesium.Color.WHITE
});

var geometry = Cesium.PolygonGeometry.createGeometry(Polygon);

var instance = new Cesium.GeometryInstance({
  geometry : geometry
});
dipoleObj = scene.primitives.add(new Cesium.Primitive({
geometryInstances : instance,
castShadows: false,
appearance : new Cesium.EllipsoidSurfaceAppearance({ 
material : billboardviewer,
  }),
}));
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sample image 
two area color is different 
it's because of lighting
How to disabled Primitive in shadow(lighting) instance?





김도현

unread,
Nov 30, 2016, 7:02:26 AM11/30/16
to cesium-dev

thank you freind

you are genius!

2016년 11월 30일 수요일 오전 9시 11분 1초 UTC+9, Sean Lilley 님의 말:
Reply all
Reply to author
Forward
0 new messages