Hi Julian,

Are the black areas the result of data being warped?  I had a similar
issue.  To get around it, you'll need to warp your data and then crop
the data out that doesn't have the black areas on the side using
gdal_translate or some other means.

Jason 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Julian Looser
Sent: Wednesday, September 20, 2006 4:01 P
To: osg users
Subject: Re: [osg-users] Black sections with osgdem

Hi Jason,

Thanks for your reply. However, it seems the default color option only 
effects the color of the geometry when no textures are provided. I had a

look at the DataSet source code, and the default color is only used if 
the stateset creation fails (which is where all the imagery is
generated).

My problem is that the black areas appear in the textures themselves.

Julian.

Jason Beverage wrote:
> Hi Julian,
>
> There is a setDefaultColor method exposed in DataSet.  If you are
using
> osgdem from the command line, pass in the --default_color r,g,b,a
> option.
>
> Jason
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Julian
Looser
> Sent: Wednesday, September 20, 2006 3:32 P
> To: [email protected]
> Subject: [osg-users] Black sections with osgdem
>
> Hello,
>
> I am using osgdem to generate terrains for a visualisation project. I 
> have a bunch of georefenced images and corresponding heightfields
which 
> I divide into logical sections based on a map grid. Most of the time 
> each grid cell contains 12 images arranged 4x3. These cells generate 
> really well and look great. However, when the cell has some missing 
> tiles (this happens on the coastline where empty ocean isn't mapped) I

> get black areas where there is missing data.
>
> I have tried a few ways to get rid of these black areas.
>
> I tried to generate each individual tile in cells where there was 
> missing data. The problem with this was that these tiles did not match

> up seamlessly when placed next to my other tiles. (A single tile 
> generated to level 4 doesn't seem to match up with 12 generated to
level
> 4).
>
> I tried to write a pixel shader that would hide the black parts. This 
> sort of worked but not consistently well and seems a nasty hack to me 
> anyway.
>
> So, I was wondering if there is a proper way to achieve this. I would
be
>
> satisfied with being able to change the color from black to another 
> color (all my missing tiles are in the ocean, so a suitable blue would

> be great). I looked in the osgTerrain::DataSet class to find where the

> images are created but I'm not sure what to change.
>
> Any help greatly appreciated,
> Julian.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>   

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to