Hi

I'm writing a plug-in that is able to generate terrain on the fly on the GPU, 
which works with the paged-LOD system provided by osg. For it to work, I need 
my DEMs in their original raster formats (like tif), and I also need my DEMs to 
be 'subtiled' similar to how the textures are currently subtiled. My DEM 
geometry/terrain-tile data is no longer generated through osgdem but is instead 
generated on the fly from these subtiles (depending on distance from 
viewpoint). I need various resolutions of the DEM data in order to do this. My 
idea was that, since the DEMs are also images with a single color value per 
pixel (representing height), I could pass these DEMs as textures with the -t 
option and it would output a set of dds files which contain my DEM data at 
various resolutions. The co-ordinate system info and any other transformations 
to be applied on these dds files I would store in my scene graph which I output 
to the filesystem, but I wouldn't store the geometry itself.

When I try to do "osgdem -t " it is giving me a set of dds subtiles, but when 
viewing them in osgviewer they are totally white, which means none of the 
height data is stored in these dds files. How can I achieve this ?

Again, thanks for your time.

Renzil

> Date: Thu, 22 May 2008 09:00:08 +0100
> From: "Robert Osfield" 
> Subject: Re: [osg-users] How to subtile DEMs ?
> To: "OpenSceneGraph Users" 
> Message-ID:
>       
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Hi Renzil,
> 
> I don't really understand what you mean.  The database built by osgdem
> doesn't contain any DEMs, it's either just polygonal based or using
> osgTerrain::TerrainTile if you use the --terrain option.  osgdem
> builds the geometry data based on the DEMs it loads, but once the
> geometry is created the DEM data is just deallocated as there is no
> further use for it.
> 
> Robert.
> 
> On Wed, May 21, 2008 at 11:13 PM, renzil d'souza  wrote:
>>
>> Hi
>>
>> Currently osgdem (vpb-0.9.7) in paged-LOD mode generates various subtiles 
>> for textures which can be output as dds files. I need to subtile my DEM data 
>> in the same way as dds files, so I tried passing the DEM as a texture with 
>> "-t ". But the sub-tiles generated when viewed in OSG viewer are totally 
>> white. I have confirmed this through code that it is generating all the 
>> values as white. My DEM file format is tif and so are my textures, but my 
>> textures subtile correctly so why can't my DEMs ?
>>
>> I'm using SUSE Linux 10.3, OSG-2.4, gdal-1.5.1, and vpb-0.9.7. Thanks for 
>> your time.
>>
>> Renzil
>> _________________________________________________________________
>> No Harvard, No Oxford. We are here. Find out !!
>> http://ss1.richmedia.in/recurl.asp?pid=500
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> 
> 
_________________________________________________________________
Catch the latest fashion shows, get beauty tips and learn more on fashion and 
lifestyle.
http://video.msn.com/?mkt=en-in
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to