Re: [osg-users] [Qt] Zbuffer errors while rotation
Loic Cayou wrote: Yeah ! I found the solution :D I don't know why, but the coordinate system was created with vector's values like 3000 :/ Maybe to fix a problem in ortho mode. It's wokrs now :) And surfaces doesn't blinking anyway ;) Glad you figured it out. :-) --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
Yeah ! I found the solution :D I don't know why, but the coordinate system was created with vector's values like 3000 :/ Maybe to fix a problem in ortho mode. It's wokrs now :) And surfaces doesn't blinking anyway ;) Thanks a lot. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16815#16815 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
Hum, I try to test the near and far values, with getProjectionMatrixAsPerspective and no setComputeNearFarMode. I have values like 1.29547e+08(Near) and 2.36171e+08(far). I think it's really strange, it isn't it? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16814#16814 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
I have seen on another forum: > > osg_viewer->getCamera()->setProjectionMatrixAsPerspective(90.0, 1.333, 0.001, > 100); > > the FOV and aspect ratio parameters are working, but no matter the values i > write in the last two parameters, the clip planes distance remains the same. > any idea? > > Try: > > osg_viewer->getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); > I didn't know that :o And if I try this, my coordinate system disappear whatever the values of near and far :/ Do you know why? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16812#16812 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
As I said it at the beginning, I didn't make the osg code, that explain maybe I have miss something. :-* How can I make sure that the camera position corresponds to my model? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16811#16811 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
Loic Cayou wrote: Hum, it's seems it works better ! My model disappear with setProjectionMatrixAsPerspective, but I also a coordinate system wich it's displayed. And with it, the mouse interactive works perfectly (I mean left, right and middle clic). I really don't know why my model isn't visible... Make sure your camera and object positions make sense (i.e.: make sure the camera is actually pointed at the model). It seems obvious, but that's usually the first thing you get wrong when you start writing an app :-) --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
Hum, it's seems it works better ! My model disappear with setProjectionMatrixAsPerspective, but I also a coordinate system wich it's displayed. And with it, the mouse interactive works perfectly (I mean left, right and middle clic). I really don't know why my model isn't visible... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16801#16801 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
Thanks for reply Jason Daly, I will try to use setProjectionMatrixAsPerspective with corrects values. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16799#16799 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
Loic Cayou wrote: Hi all, I'm a real beginner on OSG and I want use it with Qt 4.5 on Win32. I have to export an activeX based on OSG (dev. with VS) on a Qt application. The main purpose it's to display an osg model, and to interactive with it (mouse and keyboard). I already use the adapterWidget class, that I found on example/osgViewerQt source browser. If I just use this class, my application run properly, but, this example use setSceneData() and only this method. I must use setSceneData() and addChild/removeChild methods in my application because I need show/hide some part of osg model when the user will want it. There's no reason you can't use addChild/removeChild in that example. And if I use this method, I get some graphics bug when I rotate the model with mouse. Indeed, some surfaces disappear to the view, and if I rotate my model it gives an impression of blinking. Also some parts of my model are shown over other parts, while they shouldn't. It's seem to be a zBuffer problem (frustum?). I use setProjectionMatrixAsOrtho instead setProjectionMatrixAsFrustum. If I use frustum my model disappear... With setProjectionMatrixAsOrtho, I can change near & far values, but it doesn't change anything... You don't want to use Ortho or Ortho2D for this. It's completely the wrong approach for this kind of use case. Try using setProjectionMatrixAsPerspective instead, with a fov of 45.0 and the aspect ratio set appropriately. The viewer should handle setting the near/far planes for you, but you can use 0.01 and 1000.0 as starting values. --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Qt] Zbuffer errors while rotation
Anyone have a solution, just a start of thing? :-* -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16796#16796 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [Qt] Zbuffer errors while rotation
Hi all, I'm a real beginner on OSG and I want use it with Qt 4.5 on Win32. I have to export an activeX based on OSG (dev. with VS) on a Qt application. The main purpose it's to display an osg model, and to interactive with it (mouse and keyboard). I already use the adapterWidget class, that I found on example/osgViewerQt source browser. If I just use this class, my application run properly, but, this example use setSceneData() and only this method. I must use setSceneData() and addChild/removeChild methods in my application because I need show/hide some part of osg model when the user will want it. And if I use this method, I get some graphics bug when I rotate the model with mouse. Indeed, some surfaces disappear to the view, and if I rotate my model it gives an impression of blinking. Also some parts of my model are shown over other parts, while they shouldn't. It's seem to be a zBuffer problem (frustum?). I use setProjectionMatrixAsOrtho instead setProjectionMatrixAsFrustum. If I use frustum my model disappear... With setProjectionMatrixAsOrtho, I can change near & far values, but it doesn't change anything... I will put 3 screen-shots to show in picture my problem: [Image: http://www.monsterup.com/upload/1251290190840.png ] (http://www.monsterup.com) [Image: http://www.monsterup.com/upload/1251290190788.png ] (http://www.monsterup.com) [Image: http://www.monsterup.com/upload/1251290191958.png ] (http://www.monsterup.com) Thank in advance, and sorry for my English level, I'm French :| Cheers, cayou -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16772#16772 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org