Hi All,

I was hoping that I'd be able to provide a positive update on my work on 3-D 
clouds this weekend. 

Unfortunately, I've hit what appears to be an OSG issue that is beyond my 
knowledge to solve.

The problem I've hit relates to Impostors and Billboards. Impostors are used to 
reduce the impact of creating large billboarded clouds.

The combination of Impostors and Billboards appears to hit a resource limit on 
my graphics card (even though it is a NVidia 7600GS with 512MB of memory) and 
produces large numbers of X11 errors:

  Got an X11ErrorHandling call display=0x9a63a70 event=0xbfea0944
  BadAlloc (insufficient resources for operation)
  Major opcode: 80
  Minor opcode: 1b
  Error code: b
  Request serial: 14c8
  Current serial: 14c9
  ResourceID: 1a00003

(Often I get a Major opcode of 128 rather than 80)

I don't think this is (just) my bad coding, as I've repro'd this in the example 
osgimpostor application by replacing line 159 of 
examples/osgimpostor/osgimposter.cpp with the following and rotating the camera 
for a minute or so:

         //osg::Geode * geode = new osg::Geode();
        osg::Billboard * geode = new osg::Billboard();
        geode->setMode(osg::Billboard::POINT_ROT_EYE);
        geode->setNormal(osg::Vec3(0.0f,-1.0f,0.0f));

Due to other commitments I don't expect to have sufficient time in next 6-12 
months to be able to make any more progress on this, so I've uploaded my 
current patch to http://www.nanjika.co.uk/flightgear/clouds.tar.gz. There is a 
README file describing the patch within the tarball.

In addition to the major Impostor issue, there are a number of other bugs that 
I'm aware of (and probably many more I haven't discovered yet!):

1) On start-up 3-D clouds aren't be visible - you need to manually select a 
weather scenario to display them.
2) Currently 3-D clouds are always used if 3D clouds are enabled. The type of 
cloud used should depend on the cloud cover as well as the user's preference.
3) The cloud tiling code is bugged. Specifically, if you travel far enough in 
one direction, the clouds start getting lower. This is fairly minor - you'll 
get a METAR update before you hit this in most cases.
4) The clouds have no effect other than sprite display - visibility doesn't 
drop when you enter them, they don't appear on radar.
5) Billboards should be probably be replaced with a custom transform that stops 
billboarding when the camera gets close to the cloud and instead modifies the 
alpha value so the cloud disappears as the camera intersects it.

If someone with some OSG knowledge and sufficient time on their hands would 
like to pick it up, I'd be very grateful. 

I realize that this will be quite disappointing, especially given the rapid 
progress in OSG random objects and trees. Sadly, 3D clouds have turned out to 
be a lot harder to re-implement than I had expected.

-Stuart



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to