Re: [osg-users] Android Bug
Hi Jorge, Could you please post the crash log or explain better what problem are you experiencing? This may help others to see what is happening. Now I'm going for a trip so I cant probably help on this till next thursday. But I will check it building everything from scrath when I come back. Cheers El 14/03/2013 03:05, Jorge Izquierdo Ciges jori...@gmail.com escribió: I think we have missed a bug along the way. Yesterday a was checking the original examples and have gone totally awry crashing when Android is loading the library itself. This happens with all versions from r8a to r8d with the current thrunk. 3.0.1 instead it's still usable. Also, the latests developer releases crash in the same way that thrunk does. How it was missed? because it's something that you don't see if you don't execute the examples, and even so if you don't check twice that the project is clean you will probably end using whatever version you had already. I'll try to pinpoint the source of errors soon and i would like some feedback to changes. Thank you and please comment your thoughts. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
Ok, so I found this: http://www.openscenegraph.org/projects/osg/wiki/Support/OpenGL2OSGLookup So I am now doing this: Code: osg::ref_ptrosg::LightModel lightModel = new osg::LightModel; // http://www.glprogramming.com/red/chapter05.html // OpenGL reverses the surface normals for back-facing polygons; typically, this means that the surface // normals of visible back- and front-facing polygons face the viewer, rather than pointing away. // As a result, all polygons are illuminated correctly. However, these additional operations usually make // two-sided lighting perform more slowly than the default one-sided lighting. lightModel-setTwoSided(true); // http://www.opengl.org/sdk/docs/man2/xhtml/glLightModel.xml // GL_SINGLE_COLOR specifies that a single color is generated from the // lighting computation for a vertex. GL_SEPARATE_SPECULAR_COLOR // specifies that the specular color computation of lighting be stored // separately from the remainder of the lighting computation. The specular // color is summed into the generated fragment's color after the application // of texture mapping (if enabled). The initial value is GL_SINGLE_COLOR. lightModel-setColorControl(osg::LightModel::SINGLE_COLOR); // as of 2.9.9 this would be the default lightModel-setAmbientIntensity(osg::Vec4(0.2f,0.2f,0.2f,1.0f)); // http://www.glprogramming.com/red/chapter05.html // A local viewpoint tends to yield more realistic results, but since the direction has to be calculated for each vertex, // overall performance is decreased with a local viewpoint. By default, an infinite viewpoint is assumed. lightModel-setLocalViewer(false); modelNode-getOrCreateStateSet()-setAttributeAndModes(lightModel.get()); Question: Am I missing something? What about glMaterialfv ( GL_FRONT_AND_BACK, ...) I read about somewhere else? For my model, something along those lines does not seem necessary. If someone is interested, the performance impact is as follows: before 4.75 FPS after 2.9 FPS (so it may be best to fix the model in the long run) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53098#53098 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Struggling trying to convert geometry coordinates in PagedLOD
Hi Robert, 2013/3/14 Robert Osfield robert.osfi...@gmail.com Hi Olivier, On 13 March 2013 18:44, Olivier Tournaire olit...@gmail.com wrote: However, having a detailed look at the original data, I saw that (A PagedLOD has always a single Geode with a single Drawable): * PagedLOD center/radius is not the same as the Geode bound center/radius The PageLOD's coordinate frame is in world coordinates while the leaf nodes that sit below the MatrixTransform are in local coordinates so one should expect the values of the bounding volume and center/radius to be different. OK, but in the original data, there is no MatrixTransform between the PagedLOD and the Geode. So, do not understand why center/radius are different. In the current version of my code, I set the PagedLOD center as the new center computed from the coordinate transform, and set its radius according to the Geode bound radius after conversion. I tried, to update the PagedLOD raidus keeping the initial ratio, but the problem is still there. However, this might also be related to the PagedLOD center. Do you have any idea on how to update its value, taking into account the new and old Geode centers, the old PagedLOD center? The answer is above, the PagedLOD should be set up in world coordinates not local coordinates. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
@cbuchner1 Hmm, well I bet a lot of software relies on that feature... By the way I am using NVIDIA GeForce GTX 550 Ti and it works here. When I tried two sided lighting yesterday, I found that the back faces were lit, but not in the same way as the front faces. Well what I did was to make sure that LightModel::setAmbientIntensity() would get the same values where applied. Did not try it for surfaces with textures though. @ Paul thanks for the hint! Cheers, Florian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53101#53101 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
@cbuchner1 Hmm, well I bet a lot of software relies on that feature... I found threads by the Blender team who had to create workarounds because on some newer Geforce cards (4xx and 5xx series) suddenly the viewport update were orders of magnitude slower. http://blairwillems.com/2012/04/28/blender-improve-viewport-performance-on-geforce-4xx-5xx-cards/ http://projects.blender.org/tracker/index.php?func=detailaid=29724group_id=9atid=498 Also this issue has been mentioned in the nvidia forums: https://devtalk.nvidia.com/default/topic/529615/opengl/two-sided-lighting-on-geforce-cards/ So, ideally you would turn the two sided lighting feature off for anything but the simplest geometries, and perform a two sided lighting in a fragment shader. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Android Bug
The crash log is random and the last call depends on compilation. The error is a sigsegv when loading the library. I think i've pinpointed the error as a static initialzation. When i'm sure i'll write the conclussions. 2013/3/14 Jordi Torres jtorresfa...@gmail.com Hi Jorge, Could you please post the crash log or explain better what problem are you experiencing? This may help others to see what is happening. Now I'm going for a trip so I cant probably help on this till next thursday. But I will check it building everything from scrath when I come back. Cheers El 14/03/2013 03:05, Jorge Izquierdo Ciges jori...@gmail.com escribió: I think we have missed a bug along the way. Yesterday a was checking the original examples and have gone totally awry crashing when Android is loading the library itself. This happens with all versions from r8a to r8d with the current thrunk. 3.0.1 instead it's still usable. Also, the latests developer releases crash in the same way that thrunk does. How it was missed? because it's something that you don't see if you don't execute the examples, and even so if you don't check twice that the project is clean you will probably end using whatever version you had already. I'll try to pinpoint the source of errors soon and i would like some feedback to changes. Thank you and please comment your thoughts. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
On Thu, Mar 14, 2013 at 3:43 AM, Christian Buchner christian.buch...@gmail.com wrote: When I tried two sided lighting yesterday, I found that the back faces were lit, but not in the same way as the front faces. Are your front and back material colors set to the same values, or to different values? Two-sided lighting seems to work fine on my GeForce 650, no performance issue that I am aware of. Obviously the lighting computation needs to be done twice at each vertex, but if the model isn't vertex-limited this is not an issue. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [plugins] osgpdf build error
Hi there every one, I've been trying to build the pdf plugin but it seems to miss some poppler features during linking, is there any specific version of Poppler to build the plugin with? (currently using poppler 0.22.2 under windows - vs10) Thanks in advance! Best Regards Danilo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can I make a png image's background transparent?
Hi, I use powerpoint to erase the background Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53107#53107 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] changing a osgWidget::Box position
Hi, I don't understand the Jeremy answer... when you say call update() function, you are refering to osgWidget::Box update? I need to reposition some GUI box when the window is resized. If I call.. void HyperPatientVRGUI::resize(int w, int h) { _hyperLogoBox-setPosition(0.0f, h-500, 0.0f); _hyperLogoBox-update(); . } hyperLogoBox disapears... Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53108#53108 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
The front and back material properties were set to same values, it's just that when doing the calculations for the back side, the normal vector is not pointing towards the light source but away from it. I only looked at this issue briefly, and concluded that it would take some GLSL to fix it. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
If you enable two-sided lighting, the driver flips the lighting normals so that the back side of the polygon is lit correctly. There should be no need to do this in a shader (with OGL that supports fixed functionality...). -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christian Buchner Sent: Thursday, March 14, 2013 10:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] [forum] Rendering backface like front face The front and back material properties were set to same values, it's just that when doing the calculations for the back side, the normal vector is not pointing towards the light source but away from it. I only looked at this issue briefly, and concluded that it would take some GLSL to fix it. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
There are a couple different scenarios. If a surface is composed of triangles that all have a normal consistent with the winding order, but some of the triangles are facing the wrong way, then two-sided lighting will address the issue. That's why I asked the OP if he had tried this. If your surface has normals that are not consistent with vertex winding order, then you might be able to fix this in a shader by flipping the normal only when the dot product is negative, but I've never tried this. I've always just called it a modeling bug. :-) On Thu, Mar 14, 2013 at 12:27 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: If you enable two-sided lighting, the driver flips the lighting normals so that the back side of the polygon is lit correctly. There should be no need to do this in a shader (with OGL that supports fixed functionality...). -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christian Buchner Sent: Thursday, March 14, 2013 10:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] [forum] Rendering backface like front face The front and back material properties were set to same values, it's just that when doing the calculations for the back side, the normal vector is not pointing towards the light source but away from it. I only looked at this issue briefly, and concluded that it would take some GLSL to fix it. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Paul Martz Skew Matrix Software LLC ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom mouse hanlder interferes with TrackballManipulator
I'd really appreciate somehelp on this because I'm working on my degree thesis and this is the last thing I need to solve. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53113#53113 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom mouse hanlder interferes with TrackballManipulator
what is the problem? Nick On Thu, Mar 14, 2013 at 9:35 PM, Daniel Peraza danielper...@gmail.comwrote: I'd really appreciate somehelp on this because I'm working on my degree thesis and this is the last thing I need to solve. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53113#53113 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom mouse hanlder interferes with TrackballManipulator
I described the problem in a previous post under the same thread, maybe you are reading this through the email list system, please just locate the thread at the forums. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53115#53115 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom mouse hanlder interferes with TrackballManipulator
yes, I am on the list. Do you have the link handy? Recently I was into CameraManipulators so I might give some hints Nick On Thu, Mar 14, 2013 at 10:00 PM, Daniel Peraza danielper...@gmail.comwrote: I described the problem in a previous post under the same thread, maybe you are reading this through the email list system, please just locate the thread at the forums. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53115#53115 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can I make a png image's background transparent?
Lv, It sounds like you will need a better image manipulation program. Here are some you can get for free: http://www.gimp.org/ http://www.getpaint.net/ In these programs they should have an option to set the background as transparent, here are some tutorial links: http://graphicdesign.stackexchange.com/questions/6449/add-transparency-to-an-existing-png http://forums.getpaint.net/index.php?/topic/12196-making-backgrounds-of-images-transparent/ After the PNG file has the correct transparency set, it should work fine in OSG. -Nathan On Thu, Mar 14, 2013 at 8:41 AM, Lv Qing donlvq...@msn.com wrote: Hi, I use powerpoint to erase the background Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53107#53107 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
Paul, Thanks for pointing that out. I failed to mention the winding rule dependency... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Thursday, March 14, 2013 1:44 PM To: OpenSceneGraph Users Subject: Re: [osg-users] [forum] Rendering backface like front face There are a couple different scenarios. If a surface is composed of triangles that all have a normal consistent with the winding order, but some of the triangles are facing the wrong way, then two-sided lighting will address the issue. That's why I asked the OP if he had tried this. If your surface has normals that are not consistent with vertex winding order, then you might be able to fix this in a shader by flipping the normal only when the dot product is negative, but I've never tried this. I've always just called it a modeling bug. :-) On Thu, Mar 14, 2013 at 12:27 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: If you enable two-sided lighting, the driver flips the lighting normals so that the back side of the polygon is lit correctly. There should be no need to do this in a shader (with OGL that supports fixed functionality...). -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christian Buchner Sent: Thursday, March 14, 2013 10:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] [forum] Rendering backface like front face The front and back material properties were set to same values, it's just that when doing the calculations for the back side, the normal vector is not pointing towards the light source but away from it. I only looked at this issue briefly, and concluded that it would take some GLSL to fix it. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g -- Paul Martz Skew Matrix Software LLC ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget Frame borders
I am having this same problem here. Did anyone find a solution for it? Does anyone not have this problem? Thanks, Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53120#53120 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org