|
我现在使用osgearth_viewer 观察boston.earth是正常的,我将boston.earth拷贝到osg工程下,在一个简单的osg程序中加载boston.earth,结果出现如图的情况,请问:
1 是什么原因造成的,那些背景去哪里了?
2 拿boston.earth这个文件来说,有没有办法可以去掉它里面的地球,同时保留星空背景啊、太阳什么的?是要修改earth文件吗?请各位指点一二,不胜感激。
boston.earth的代码,需要的话,大概要改什么地方?- <!--
- osgEarth Sample.
- Demonstrates the use of a Resource Library in order to apply "typical" textures
- to extruded buildings.
- -->
- <map name="Boston Demo" type="geocentric" version="2">
-
- <image name="ReadyMap.org - Imagery" driver="tms">
- <url>http://readymap.org/readymap/tiles/1.0.0/22/</url>
- </image>
-
- <model name="buildings" driver="feature_geom">
-
- <features name="buildings" driver="ogr">
- <url>../data/boston_buildings_utm19.shp</url>
- <build_spatial_index>true</build_spatial_index>
- </features>
-
- <feature_indexing>true</feature_indexing>
-
- <fade_in_duration>1.0</fade_in_duration>
-
- <!--
- The "layout" element activates tiling and paging of the feature set. If you
- omit the layout element, the entire feature set will render as one pre-loaded
- model (no tiling or paging).
-
- Each "level" is a level of detail for features, and should select a style
- to use for that level. It also can specify min and max camera ranges,
- in meters.
-
- The "tile size factor" controls how a feature is tiled. The higher this factor,
- the smaller the tile size, and the more tiles will be used to render a given
- level of detail. The default is 15. (The renderer multiplies a tile's radius
- by the tile_size_factor to calculate the maximum suitable camera range for
- a given level of subdivision. It compares this to the feature level's max
- range to decide how many tiles to create.)
- -->
-
- <layout>
- <tile_size_factor>45</tile_size_factor>
- <level name="default" max_range="20000">
- <selector class="buildings"/>
- </level>
- </layout>
-
- <styles>
- <library name="us_resources">
- <url>../data/resources/textures_us/catalog.xml</url>
- </library>
-
- <style type="text/css">
- buildings {
- extrusion-height: 3.5 * max([story_ht_], 1);
- extrusion-flatten: true;
- extrusion-wall-style: building-wall;
- extrusion-wall-gradient: 0.8;
- extrusion-roof-style: building-rooftop;
- altitude-clamping: none;
- }
- building-wall {
- skin-library: us_resources;
- skin-tags: building;
- skin-random-seed: 1;
- fill: #ffffff;
- }
- building-rooftop {
- skin-library: us_resources;
- skin-tags: rooftop;
- skin-tiled: true;
- skin-random-seed: 1;
- fill: #ffffff;
- }
- </style>
- </styles>
- </model>
-
- <external>
- <viewpoints>
- <viewpoint name="Boston Overview" heading="24.261" height="0" lat="42.34425" long="-71.076262" pitch="-21.6" range="3450"/>
- <viewpoint name="Boston Downtown 1" heading="117" lat="42.3568" long="-71.0585" height="0" pitch="-20.4" range="1500" />
- <viewpoint name="Boston Downtown 2" heading="-128.5" lat="42.3582" long="-71.0546" height="0" pitch="-19" range="1620" />
- <viewpoint name="Boston Street Level" heading="-145.85" lat="42.36460" long="-71.053612" pitch="-10.1" range="85.034"/>
- </viewpoints>
- <sky hours="21.0"/>
- </external>
-
- </map>
复制代码 |
|