Re: [Flightgear-devel] Funny rendering bug?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan Seifert wrote: Melchior FRANZ wrote: * Curtis Olson -- Thursday 05 April 2007: It really looks like it might be some sort of osg bug (or possibly our usage of osg?) Yes. I can confirm the bug, even for KSFO: http://members.aon.at/mfranz/osg-rendering.jpg [20.0 kB] So far I could only reproduce if I banked an aircraft quickly. Runway textures are not the only problem. I noticed with different aircraft that when banking the terrain textures moved over the terrain. Nine Here's a patch. I suspect a bug in OSG, but it's possible that fgfs is breaking the graphics state attribute mechanism in some subtle way. The diff also includes the patch posted to the user mailing list to compile with the very latest OSG (should work with older versions too). Tim - -- Red Hat France SARL, 171 Avenue Georges Clemenceau 92024 Nanterre Cedex, France. Siret n° 421 199 464 00056 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFGFhsyeDhWHdXrDRURAjVfAJ9Yfzg9v1QQ5fSxjaO45XbArXNKnACgiZc3 WkBRSlqvtZc+PIC2zbe5w4M= =hAx8 -END PGP SIGNATURE- Index: Main/renderer.cxx === RCS file: /var/cvs/FlightGear-0.9/source/src/Main/renderer.cxx,v retrieving revision 1.77 diff -d -u -r1.77 renderer.cxx --- Main/renderer.cxx 1 Mar 2007 18:12:48 - 1.77 +++ Main/renderer.cxx 6 Apr 2007 09:59:57 - @@ -49,6 +49,7 @@ #include osg/PolygonMode #include osg/PolygonOffset #include osg/ShadeModel +#include osg/TexMat #include osg/TexEnv #include osgUtil/SceneView @@ -121,8 +122,9 @@ stateSet-setMode(GL_FOG, osg::StateAttribute::OFF); stateSet-setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); } - virtual void drawImplementation(osg::State state) const + virtual void drawImplementation(osg::RenderInfo renderInfo) const { +osg::State state = *renderInfo.getState(); state.pushStateSet(getStateSet()); state.apply(); state.setActiveTextureUnit(0); @@ -184,16 +186,17 @@ stateSet-setTextureAttribute(0, new osg::TexEnv(osg::TexEnv::MODULATE)); } - virtual void drawImplementation(osg::State state) const + virtual void drawImplementation(osg::RenderInfo renderInfo) const { -state.pushStateSet(getStateSet()); -state.apply(); +osg::State state = *renderInfo.getState(); +//state.pushStateSet(getStateSet()); +//state.apply(); state.setActiveTextureUnit(0); state.setClientActiveTextureUnit(0); state.disableAllVertexArrays(); -glPushAttrib(GL_ALL_ATTRIB_BITS); -glPushClientAttrib(~0u); +glPushAttrib(GL_ALL_ATTRIB_BITS); // XXX Redundant with osg::State +glPushClientAttrib(~0u); // XXX fgCockpitUpdate(state); @@ -211,10 +214,12 @@ glPopClientAttrib(); glPopAttrib(); -state.popStateSet(); +//state.popStateSet(); state.dirtyAllModes(); state.dirtyAllAttributes(); state.dirtyAllVertexArrays(); +// Restore the original state +state.apply(); } virtual osg::Object* cloneType() const { return new SGHUDAndPanelDrawable; } @@ -455,6 +460,11 @@ stateSet = sceneGroup-getOrCreateStateSet(); stateSet-setMode(GL_BLEND, osg::StateAttribute::ON); stateSet-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON); +// Set a default TexMat to prevent ground textures from sliding +// around. This shouldn't be necessary as the default global +// attribute has the same effect; either there's a bug in OSG or +// fgfs is bypassing the osg::State mechanism somewhere. +stateSet-setTextureAttribute(0, new osg::TexMat); // need to update the light on every frame osg::LightSource* lightSource = new osg::LightSource; Index: Model/panelnode.cxx === RCS file: /var/cvs/FlightGear-0.9/source/src/Model/panelnode.cxx,v retrieving revision 1.13 diff -d -u -r1.13 panelnode.cxx --- Model/panelnode.cxx 7 Jan 2007 19:00:25 - 1.13 +++ Model/panelnode.cxx 6 Apr 2007 09:59:57 - @@ -2,6 +2,7 @@ # include config.h #endif +#include osg/State #include simgear/compiler.h #include simgear/structure/exception.hxx @@ -120,8 +121,9 @@ } void -FGPanelNode::drawImplementation(osg::State state) const +FGPanelNode::drawImplementation(osg::RenderInfo renderInfo) const { + osg::State state = *renderInfo.getState(); osg::ref_ptrosg::RefMatrix mv = new osg::RefMatrix; mv-set(_xform*state.getModelViewMatrix()); state.applyModelViewMatrix(mv.get()); Index: Model/panelnode.hxx === RCS file: /var/cvs/FlightGear-0.9/source/src/Model/panelnode.hxx,v retrieving revision 1.6 diff -d -u -r1.6 panelnode.hxx --- Model/panelnode.hxx 7 Jan 2007 19:00:25 - 1.6 +++ Model/panelnode.hxx 6 Apr 2007 09:59:57 - @@
Re: [Flightgear-devel] Funny rendering bug?
On 4/5/07, Toth Gabor wrote: On Thursday 05 April 2007 04:34, Csaba Halász wrote: On 4/5/07, Gabor Toth wrote: Hi, I've found a funny rendering bug seen on the following pictures: http://fgfs.i-net.hu/downloads/fgfs-screen-054.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-055.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-056.jpg Airport: VHHH Aircraft: 747 For the benefit of the mailing list: I could reproduce this behaviour as well. After recompiling with SDL everything seems to work OK, however. Greets, Csaba Some additional info: This behavior occurs at other airports as well. Also I've found that this happens only when using any of the external views, but does not happen when using cockpit view. Bug occurs only when FG runs at 1024x768 or 1280x1024 resolution. There is no problem at 800x600. Other aircraft tested to be safe: 777-200, seahawk I've also uploaded a short mpg file to let you see the way how ground textures move depending on heading or banking of a/c and view angle. http://fgfs.i-net.hu/downloads/out.mpg Could this be related to the open-gl drivers? What video card and drivers are you running? Is this with the plib/ssg version of FlightGear or the osg version? Curt. -- Curtis Olson - University of Minnesota - FlightGear Project http://baron.flightgear.org/~curt/ http://www.humanfirst.umn.edu/ http://www.flightgear.org Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
Hi Curt, Thanx for the quick answer, the details from my first mail about this issue are: Config: AMD Athlon64 X2 4200, Geforce 6600 (Asus) OS: Fedore Core 5 Kernel: 2.6.20-1.2307.fc5smp nVidia driver version: 1.0-9755 OSG revision: 6398 SimGear, FlightGear version: CVS 2007/04/05 CFLAGS=-g -march=athlon-xp -O3 -fomit-frame-pointer -pipe CXXFLAGS=$CFLAGS gcc version 4.1.1 20070105 (Red Hat 4.1.1-51) Kindest regards, Gabor On Thursday 05 April 2007 14:01, Curtis Olson wrote: On 4/5/07, Toth Gabor wrote: On Thursday 05 April 2007 04:34, Csaba Halász wrote: On 4/5/07, Gabor Toth wrote: Hi, I've found a funny rendering bug seen on the following pictures: http://fgfs.i-net.hu/downloads/fgfs-screen-054.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-055.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-056.jpg Airport: VHHH Aircraft: 747 For the benefit of the mailing list: I could reproduce this behaviour as well. After recompiling with SDL everything seems to work OK, however. Greets, Csaba Some additional info: This behavior occurs at other airports as well. Also I've found that this happens only when using any of the external views, but does not happen when using cockpit view. Bug occurs only when FG runs at 1024x768 or 1280x1024 resolution. There is no problem at 800x600. Other aircraft tested to be safe: 777-200, seahawk I've also uploaded a short mpg file to let you see the way how ground textures move depending on heading or banking of a/c and view angle. http://fgfs.i-net.hu/downloads/out.mpg Could this be related to the open-gl drivers? What video card and drivers are you running? Is this with the plib/ssg version of FlightGear or the osg version? Curt. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
Oops, you are right, that information was all in your original message, just not in the quoted versions later. Sorry about that. It really looks like it might be some sort of osg bug (or possibly our usage of osg?) I've seen a similar issue using open flight models in our commercial driving sim software when the underlying textures aren't powers of two, but that doesn't necessarily have anything to do with the FlightGear software. I know our runway textures are sized in powers of two because I very carefully did that way back when Erik and I were putting them all together. Hopefully no one changed them in the meantime. :-) Perhaps there is some rendering effect that certain aircraft use, or that is used by some certain model near the affected airport that turns on, or changes some sort of opengl state (texture translation?) and then we aren't getting that turned off properly before rendering the next pass of the scene. I'm still completely lost in the world of OSG and how it does all it's state management, but maybe someone with better OSG knowledge could take a peek at some point. State management bugs (if that is what this is) can be really tough to track down though. Curt. On 4/5/07, Gabor Toth [EMAIL PROTECTED] wrote: Hi Curt, Thanx for the quick answer, the details from my first mail about this issue are: Config: AMD Athlon64 X2 4200, Geforce 6600 (Asus) OS: Fedore Core 5 Kernel: 2.6.20-1.2307.fc5smp nVidia driver version: 1.0-9755 OSG revision: 6398 SimGear, FlightGear version: CVS 2007/04/05 CFLAGS=-g -march=athlon-xp -O3 -fomit-frame-pointer -pipe CXXFLAGS=$CFLAGS gcc version 4.1.1 20070105 (Red Hat 4.1.1-51) Kindest regards, Gabor On Thursday 05 April 2007 14:01, Curtis Olson wrote: On 4/5/07, Toth Gabor wrote: On Thursday 05 April 2007 04:34, Csaba Halász wrote: On 4/5/07, Gabor Toth wrote: Hi, I've found a funny rendering bug seen on the following pictures: http://fgfs.i-net.hu/downloads/fgfs-screen-054.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-055.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-056.jpg Airport: VHHH Aircraft: 747 For the benefit of the mailing list: I could reproduce this behaviour as well. After recompiling with SDL everything seems to work OK, however. Greets, Csaba Some additional info: This behavior occurs at other airports as well. Also I've found that this happens only when using any of the external views, but does not happen when using cockpit view. Bug occurs only when FG runs at 1024x768 or 1280x1024 resolution. There is no problem at 800x600. Other aircraft tested to be safe: 777-200, seahawk I've also uploaded a short mpg file to let you see the way how ground textures move depending on heading or banking of a/c and view angle. http://fgfs.i-net.hu/downloads/out.mpg Could this be related to the open-gl drivers? What video card and drivers are you running? Is this with the plib/ssg version of FlightGear or the osg version? Curt. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Curtis Olson - University of Minnesota - FlightGear Project http://baron.flightgear.org/~curt/ http://www.humanfirst.umn.edu/ http://www.flightgear.org Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
* Curtis Olson -- Thursday 05 April 2007: It really looks like it might be some sort of osg bug (or possibly our usage of osg?) Yes. I can confirm the bug, even for KSFO: http://members.aon.at/mfranz/osg-rendering.jpg [20.0 kB] So far I could only reproduce if I banked an aircraft quickly. m. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
* Melchior FRANZ -- Thursday 05 April 2007: http://members.aon.at/mfranz/osg-rendering.jpg [20.0 kB] So far I could only reproduce if I banked an aircraft quickly. BTW: it seemed as if *all* textures on the airport rotated/sheared, even the grass texture. Your opengl state theory seems plausible to me. m. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
* Melchior FRANZ -- Thursday 05 April 2007: BTW: it seemed as if *all* textures on the airport rotated/sheared, even the grass texture. Your opengl state theory seems plausible to me. And another detail might be interesting: Gabor saw it on the 747, and I saw it on the bo105. Both aircraft use the texrotate animation. So our animations probably leak the OpenGL state. m. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Melchior FRANZ wrote: * Curtis Olson -- Thursday 05 April 2007: It really looks like it might be some sort of osg bug (or possibly our usage of osg?) Yes. I can confirm the bug, even for KSFO: http://members.aon.at/mfranz/osg-rendering.jpg [20.0 kB] So far I could only reproduce if I banked an aircraft quickly. Runway textures are not the only problem. I noticed with different aircraft that when banking the terrain textures moved over the terrain. Nine -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGFPHI1QuEJQQMVrgRAsI4AJsEXZCK2phG9yq3c4C33K5RScSL7wCdHFhK 5gwDN0uBq/edjAtLM2rL4fI= =JJvP -END PGP SIGNATURE- - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
On Thursday 05 April 2007 20:20:26 sydsandy wrote: Also if I look in certain directions everything goes white , and I can see the 'invisible' panel area defined in the animation file for hotspot and 2 d instrument arrangements it seems to appear if the center of the transparent polygon is at the edge of the screen but dont have the skills to fix it , I get this sometimes on MP, and it is caused by another aircraft having a funny texture that is not in CVS (or could be?) - it only happens when you sight it: osgDB ac3d reader: could not find texture efis.rgb etc. Nick - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] Funny rendering bug?
Hi, I've found a funny rendering bug seen on the following pictures: http://fgfs.i-net.hu/downloads/fgfs-screen-054.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-055.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-056.jpg Airport: VHHH Aircraft: 747 Config: AMD Athlon64 X2 4200, Geforce 6600 (Asus) OS: Fedore Core 5 Kernel: 2.6.20-1.2307.fc5smp nVidia driver version: 1.0-9755 OSG revision: 6398 SimGear, FlightGear version: CVS 2007/04/05 CFLAGS=-g -march=athlon-xp -O3 -fomit-frame-pointer -pipe CXXFLAGS=$CFLAGS gcc version 4.1.1 20070105 (Red Hat 4.1.1-51) With other aircraft (tested: c172p, Bravo, 737-300) this behaviour disappears. If I can provide any further info, or can help in testing different cases, please let me know. Regards, Gabor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Funny rendering bug?
On 4/5/07, Gabor Toth [EMAIL PROTECTED] wrote: Hi, I've found a funny rendering bug seen on the following pictures: http://fgfs.i-net.hu/downloads/fgfs-screen-054.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-055.jpg http://fgfs.i-net.hu/downloads/fgfs-screen-056.jpg Airport: VHHH Aircraft: 747 For the benefit of the mailing list: I could reproduce this behaviour as well. After recompiling with SDL everything seems to work OK, however. Greets, Csaba - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel