-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to increase the brightness of material in 2D mode as well as in 3d mode? #8014
Comments
I think you need to turn off HDR to get the expected color, see #7966. For general questions like this, please post a thread in the Cesium forum (https://groups.google.com/forum/#!forum/cesium-dev). |
@OmarShehata |
Actually, it may be this issue: #5730 which means you'd need to try changing the time of day to set the sun position overhead. I also have other recommendations in this forum thread about how to control the sun position and other lighting factors @huochaimindy https://groups.google.com/d/msg/cesium-dev/XbeJ1fRlKAA/NhlUtL-CBAAJ |
It worked well by your suggestions. Thanks! @OmarShehata |
Can you tell me how you solved this problem? I have been troubled for several days and tried many methods. |
@hyman4hu have you tried the recommendations here #8014 (comment) ? If you're still having trouble please open a new topic in the Cesium community forum: https://community.cesium.com/ |
I want to load GeoJson file, when i load it in 3D mode, the brightness of material is ok. however, when i load it in 2D mode, the brightness of material is very low, how can i increase the brightness in 2D mode as well as in 3d mode?
following picture is in 2d mode, red color is very dark
following picture is in 2d mode, red color is ok
Here is my code in 3D:
<script> var viewer = new Cesium.Viewer('cesiumContainer', { sceneMode: 3 }); var promise = Cesium.GeoJsonDataSource.load('grid222.geojson', { clampToGround: true }); promise.then(function(dataSource) { viewer.dataSources.add(dataSource); var entities = dataSource.entities.values; for (var i = 0; i < entities.length; i++) { var entity = entities[i]; entity.polygon.height = 0.0; } }); viewer.flyTo(promise); </script>Here is my code in 2D:
<script> var viewer = new Cesium.Viewer('cesiumContainer', { sceneMode: 2 }); var promise = Cesium.GeoJsonDataSource.load('grid222.geojson', { clampToGround: true }); promise.then(function(dataSource) { viewer.dataSources.add(dataSource); var entities = dataSource.entities.values; for (var i = 0; i < entities.length; i++) { var entity = entities[i]; entity.polygon.height = 0.0; } }); viewer.flyTo(promise); </script>here is geoJson text:
{
"type" : "FeatureCollection",
"features" : [{
"type" : "Feature",
"geometry" : {
"coordinates" : [[[114.37999106868926, 36.0854368313549], [114.37999106868926, 36.087285894830124], [114.38214958987339, 36.087285894830124], [114.38214958987339, 36.0854368313549], [114.37999106868926, 36.0854368313549]]],
"type" : "Polygon"
},
"properties" : {
"fill" : "#FF0000",
"fill-opacity" : 1,
"stroke-width" : 1,
"stroke" : "#FF0000",
"stroke-opacity" : 1
}
}
]
}
The text was updated successfully, but these errors were encountered: