hi, anyone added model or structure build from kml. can you tell me how to do.
I builded flightgear ws osgearth by autobuild script buildFlightGearWin64. and run ok.
But i want to add model 3d, forest .. and i did follow:
1. and them in earth file:
- Code: Select all
<model name="trees" driver="feature_geom" enabled="true">
<!-- Feature data set to load. This is a set of polygons representing
the public parks in Washington DC -->
<features name="parks" driver="ogr">
<url>Data\shapefile\Rung\Rung.shp</url>
<build_spatial_index>true</build_spatial_index>
</features>
<!-- Instancing enables GL's "DrawInstanced" support. -->
<instancing>true</instancing>
<!-- Disables feature indexing, since the trees are not mapped 1-to-1 to
real features anyway. -->
<feature_indexing>false</feature_indexing>
<!-- Fade in new tiles over one second. -->
<fade_in_duration>1.0</fade_in_duration>
<layout>
<level max_range="7000" style="parks-1"/>
<level max_range="3000" style="parks-2"/>
<level max_range="1000" style="parks-3"/>
</layout>
<styles>
<style type="text/css">
parks-1 {
model: "Data/model/tree.ive";
model-placement: random;
model-density: 1000;
model-scale: 2.0;
altitude-clamping: terrain;
altitude-resolution: 0.001;
}
parks-2 {
model: "Data/model/tree.ive";
model-placement: random;
model-density: 2500;
model-scale: 2.5;
model-random-seed: 1;
altitude-clamping: terrain;
altitude-resolution: 0.001;
}
parks-3 {
model: "Data/model/tree.ive";
model-placement: random;
model-density: 5000;
model-scale: 1.0
model-random-seed: 2;
altitude-clamping: terrain;
altitude-resolution: 0.001;
}
</style>
</styles>
</model>
but it not found. im sure path mode "Data/model/tree.ive" is correct.
and i tested my earth file in osgearth_viewer run ok.
2. im using kml to add hose building.
im make mode 3d in sketup and export kmz then upzip it to kml and copy to folder KMLFiles in Scenery\Terrain\OsgEarth\KMLFiles
and my source file:
- Code: Select all
EARTH EarthFiles/myearth.earth
KML KMLFiles/doc.kml
in kml file i change file dae with ive file
but i dont found it in scene.
and i test my earth file and kml file in osgearth_viewer: osgearth_viewer myearth.earth --kml doc.kml it show ok
please help me.
thanks