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/

Reply via email to