On Sun, Sep 11, 2011 at 7:47 AM, Thorsten Renk wrote: >> I'd really like the 3D cloud infrastructure to be used for all the >> clouds, so >> if there are features missing we should address them. >> >> Would it be possible to modify the 3D clouds so that they can be used for >> the rain texture as well? For example, I could provide a sprite >> distribution >> on the surface of a cylinder rather than a sphere if that would help. > > Just a short answer to this part: All these objects (rain textures, Cirrus > clouds,...) do not use the 3d cloud infrastructure because they are not 3d > clouds.
Thanks for the explanation. Doesn't look like there's much benefit from hacking the 3D clouds system to do something it's not intended to. So... that leaves fixing the underlying problem. The problem definitely seems to be that any other objects in the scenery with an alpha layer are rendered after the clouds, so are rendered in front of them, irrespective of the viewpoint and their relative positions. By removing the alpha layer from the texture of the stratosphere-tower in Las Vegas, I was able to work around the problem. Unfortunately, fixing this is going to require someone with more knowledge of OSG than I have. The problem is that the 3D clouds are in an earlier rendering bin from the scenery models with transparent textures, which means that the clouds are rendered first in their entirety, and then the scenery models, with no consideration of the relative position (i.e. depth) compare with the clouds. This was done for perf reasons. Putting the clouds in the same rendering bin (i.e. TRANSPARENT_BIN) halves the framerate on my system. I'm not sure there is a fix for this that doesn't massively impact performance, unless we add some of these objects to the CLOUDS_BIN and then depth-sort them within the cloud code itself which depth-sorts slowly across multiple frames to avoid exactly the performance hit from depth sorting the entire TRANSPARENT_BIN in each frame. Tim/Matthias - care to comment? Thorsten - FYI I've committed an update the README.3DClouds which documents the recent changes (z-scaling, changed defaults etc.) I've also got a merge request in to fix the flat field cloud placement bug. -Stuart ------------------------------------------------------------------------------ Using storage to extend the benefits of virtualization and iSCSI Virtualization increases hardware utilization and delivers a new level of agility. Learn what those decisions are and how to modernize your storage and backup environments for virtualization. http://www.accelacomm.com/jaw/sfnl/114/51434361/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel