panbin 发表于 2014-3-31 12:12:22

osgearth 生成的地形如何映射到OSGEarth的三维地球上

我按照 osgdem --xx 10 --yy 10 -t ps_texture_16k.tif --xx 10 --yy 10 -d ps_height_16k.tif -l 6 -v 0.1 -o puget.ive -a pegout.osga
这个命令生成了三维地形数据,但是这个三维地形数据是平面的,如何将该数据映射到OSGEarth中所显示的三维地球的表面,求助

csu_zjh 发表于 2014-3-31 13:24:07

至少有如下两种方法供参考:
1)osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t land_shallow_topo_east.tif --geocentric -l 12 -o earth.ive
2)利用osgearth_package工具

panbin 发表于 2014-3-31 13:53:31

1)osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t land_shallow_topo_east.tif --geocentric -l 12 -o earth.ive
该命令是生成一个三维地球的模型啊,跟我的三维地形数据无关
2)利用osgearth_package工具
是生成tms格式的文件,我可以手动制作一个earth文件如下:

<map name="Virtual Planet Builder model" type="geocentric" version="2">

    <image name="imagery layer 0" driver="vpb">

      <url>E:\1\2\3D\Terrain.ive</url>   <!--改成本地文件-->
      <primary_split_level>5</primary_split_level>
      <secondary_split_level>11</secondary_split_level>
    </image>

    <heightfield name="dem" driver="vpb">
      <url>E:\1\2\3D\Terrain.ive</url>    <--!改成本地文件-->
      </heightfield>
   
    <options>
      <lighting>false</lighting>
      <cache_policy usage="no_cache"/>
    </options>

</map>

但是无法显示啊

csu_zjh 发表于 2014-3-31 14:55:03

本帖最后由 csu_zjh 于 2014-3-31 14:56 编辑

panbin 发表于 2014-3-31 13:53
1)osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t land_shallow_topo_eas ...

1)你可以参考http://bbs.osgchina.org/archiver/?tid-2714.html。我用osgdem生成过地球局部地形。肯定没有问题。

2)你earth文件里使用的driver不对,不是vpb,应该是tms才对
页: [1]
查看完整版本: osgearth 生成的地形如何映射到OSGEarth的三维地球上