Re: [osg-users] OSG ActiveX + IFC - looking for developer
No I'm sorry I don't. -- Mathieu O ascii ribbon campaign - stop html mail - www.asciiribbon.org On 5 November 2010 13:58, Zdravko Clarion user.clar...@gmail.com wrote: Hi, Do you/your company have any clue about time when you will know something about distribution? Thank you! Cheers, Zdravko -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33517#33517 ___ 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] osgconv segfaults exporting to ac3d
Hi Peter, On Tue, Nov 9, 2010 at 2:48 AM, Peter Bear th3fly...@gmail.com wrote: I found what was causing it actually. For some reason, if the textures referenced by the model are not in the same folder as the OSG file you are converting, it segfaults. Once I figured that out however, and got it to stop segfaulting, it wound up scrambling the model in the AC3D file. Excellent, this should help pinpoint the problem, or at least the first of the problems... Do you have a stack trace for the crash? Could you try tweaking one of the OSG examples to see if you can reproduce the problem, i.e take cow.osg and then placing the image file in a new directory, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] To calculate normal vector use the osg::smoothingVisitor
Hi, How to calculate normal vector using the osg::smoothingVisitor ? Guide me by providing some example related to above question . I have to find normal for lightning effect. I have draw various model using triangle strip . Now i'm in need of finding normal. Here I'have attached some part of simple model of cube . Kindly help me what is the best way for me to finding normal here Some part of my code is : // front face of Cube { { osg::Geometry* pGeo = new osg::Geometry; // add 4 vertices creating a quad osg::Vec3Array* pVerts = new osg::Vec3Array(3); (*pVerts)[0].set((*points1)[0].x() ,(*points1)[0].y() , (*points1)[0].z()); (*pVerts)[1].set((*points1)[1].x() ,(*points1)[1].y() , (*points1)[1].z()); (*pVerts)[2].set((*points1)[2].x() ,(*points1)[2].y() , (*points1)[2].z()); pGeo-setVertexArray( pVerts ); // create a primitive set osg::DrawElementsUInt* pPrimitiveSet = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 ); pPrimitiveSet-push_back( 0 ); pPrimitiveSet-push_back( 1 ); pPrimitiveSet-push_back( 2 ); pGeo-addPrimitiveSet( pPrimitiveSet ); // create an arraw for texture coordinates osg::Vec2Array* pTexCoords = new osg::Vec2Array( 3 ); (*pTexCoords)[0].set( (*points2)[9].x() , (*points2)[9].y() ); (*pTexCoords)[1].set( (*points2)[8].x() , (*points2)[8].y() ); (*pTexCoords)[2].set( (*points2)[7].x() , (*points2)[7].y() ); pGeo-setTexCoordArray( 0, pTexCoords ); // create geometry node that will contain all our drawables geode-addDrawable( pGeo ); } { osg::Geometry* pGeo = new osg::Geometry; // add 4 vertices creating a quad osg::Vec3Array* pVerts = new osg::Vec3Array(3); (*pVerts)[0].set((*points1)[0].x() ,(*points1)[0].y() , (*points1)[0].z()); (*pVerts)[1].set((*points1)[2].x() ,(*points1)[2].y() , (*points1)[2].z()); (*pVerts)[2].set((*points1)[3].x() ,(*points1)[3].y() , (*points1)[3].z()); pGeo-setVertexArray( pVerts ); // create a primitive set osg::DrawElementsUInt* pPrimitiveSet = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 ); pPrimitiveSet-push_back( 0 ); pPrimitiveSet-push_back( 1 ); pPrimitiveSet-push_back( 2 ); pGeo-addPrimitiveSet( pPrimitiveSet ); // create an arraw for texture coordinates osg::Vec2Array* pTexCoords = new osg::Vec2Array( 3 ); (*pTexCoords)[0].set( (*points2)[9].x() , (*points2)[9].y() ); (*pTexCoords)[1].set( (*points2)[7].x() , (*points2)[7].y() ); (*pTexCoords)[2].set( (*points2)[10].x() , (*points2)[10].y() ); pGeo-setTexCoordArray( 0, pTexCoords ); // create geometry node that will contain all our drawables geode-addDrawable( pGeo ); } } //Side right face { { osg::Geometry* pGeo = new osg::Geometry; // add 4 vertices creating a quad osg::Vec3Array* pVerts = new osg::Vec3Array(3); (*pVerts)[0].set((*points1)[1].x() ,(*points1)[1].y() , (*points1)[1].z()); (*pVerts)[1].set((*points1)[5].x() ,(*points1)[5].y() , (*points1)[5].z()); (*pVerts)[2].set((*points1)[6].x() ,(*points1)[6].y() , (*points1)[6].z()); pGeo-setVertexArray( pVerts ); // create a primitive set osg::DrawElementsUInt* pPrimitiveSet = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 ); pPrimitiveSet-push_back( 0 ); pPrimitiveSet-push_back( 1 ); pPrimitiveSet-push_back( 2 ); pGeo-addPrimitiveSet( pPrimitiveSet ); // create an arraw for texture coordinates osg::Vec2Array* pTexCoords = new osg::Vec2Array( 3 ); (*pTexCoords)[0].set( (*points2)[6].x() , (*points2)[6].y() ); (*pTexCoords)[1].set( (*points2)[5].x() , (*points2)[5].y() ); (*pTexCoords)[2].set( (*points2)[4].x() , (*points2)[4].y() ); pGeo-setTexCoordArray( 0, pTexCoords ); // create geometry node that will contain all our drawables geode-addDrawable( pGeo ); } {
[osg-users] How can I use the Light?
Hello, I use osg long time ago, but I think I don't understand the light concept. Can everyone explain me the correct use of Light, LightSource and ShadowMap? In previous implementations I put the Light into the LightSource and the LightSource into my scene graph. Now my root node is a ShadowGroup. But the Shadow doesn't work. Musst I use a special order in the graph? Why there are a Light and a LightSource? Is the relative position of the shadow group to the light source important? Thanks Martin -- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] To calculate normal vector use the osg::smoothingVisitor
Hi Manish, I'm a bit confused a bit by your post, you seem to have included a lot of code for what is potentially just a very simple question, so it makes me wonder if you aren't asking something else... To use the smoothing visitor you simple do: osgUtil::SmoothingVisitor sv; node-accept(sv); Where node is your scene graph, be it one geode or a whole scene. Robert. On Tue, Nov 9, 2010 at 10:30 AM, manish Choudhary osgfo...@tevs.eu wrote: Hi, How to calculate normal vector using the osg::smoothingVisitor ? Guide me by providing some example related to above question . I have to find normal for lightning effect. I have draw various model using triangle strip . Now i'm in need of finding normal. Here I'have attached some part of simple model of cube . Kindly help me what is the best way for me to finding normal here Some part of my code is : // front face of Cube { { osg::Geometry* pGeo = new osg::Geometry; // add 4 vertices creating a quad osg::Vec3Array* pVerts = new osg::Vec3Array(3); (*pVerts)[0].set((*points1)[0].x() ,(*points1)[0].y() , (*points1)[0].z()); (*pVerts)[1].set((*points1)[1].x() ,(*points1)[1].y() , (*points1)[1].z()); (*pVerts)[2].set((*points1)[2].x() ,(*points1)[2].y() , (*points1)[2].z()); pGeo-setVertexArray( pVerts ); // create a primitive set osg::DrawElementsUInt* pPrimitiveSet = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 ); pPrimitiveSet-push_back( 0 ); pPrimitiveSet-push_back( 1 ); pPrimitiveSet-push_back( 2 ); pGeo-addPrimitiveSet( pPrimitiveSet ); // create an arraw for texture coordinates osg::Vec2Array* pTexCoords = new osg::Vec2Array( 3 ); (*pTexCoords)[0].set( (*points2)[9].x() , (*points2)[9].y() ); (*pTexCoords)[1].set( (*points2)[8].x() , (*points2)[8].y() ); (*pTexCoords)[2].set( (*points2)[7].x() , (*points2)[7].y() ); pGeo-setTexCoordArray( 0, pTexCoords ); // create geometry node that will contain all our drawables geode-addDrawable( pGeo ); } { osg::Geometry* pGeo = new osg::Geometry; // add 4 vertices creating a quad osg::Vec3Array* pVerts = new osg::Vec3Array(3); (*pVerts)[0].set((*points1)[0].x() ,(*points1)[0].y() , (*points1)[0].z()); (*pVerts)[1].set((*points1)[2].x() ,(*points1)[2].y() , (*points1)[2].z()); (*pVerts)[2].set((*points1)[3].x() ,(*points1)[3].y() , (*points1)[3].z()); pGeo-setVertexArray( pVerts ); // create a primitive set osg::DrawElementsUInt* pPrimitiveSet = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 ); pPrimitiveSet-push_back( 0 ); pPrimitiveSet-push_back( 1 ); pPrimitiveSet-push_back( 2 ); pGeo-addPrimitiveSet( pPrimitiveSet ); // create an arraw for texture coordinates osg::Vec2Array* pTexCoords = new osg::Vec2Array( 3 ); (*pTexCoords)[0].set( (*points2)[9].x() , (*points2)[9].y() ); (*pTexCoords)[1].set( (*points2)[7].x() , (*points2)[7].y() ); (*pTexCoords)[2].set( (*points2)[10].x() , (*points2)[10].y() ); pGeo-setTexCoordArray( 0, pTexCoords ); // create geometry node that will contain all our drawables geode-addDrawable( pGeo ); } } //Side right face { { osg::Geometry* pGeo = new osg::Geometry; // add 4 vertices creating a quad osg::Vec3Array* pVerts = new osg::Vec3Array(3); (*pVerts)[0].set((*points1)[1].x() ,(*points1)[1].y() , (*points1)[1].z()); (*pVerts)[1].set((*points1)[5].x() ,(*points1)[5].y() , (*points1)[5].z()); (*pVerts)[2].set((*points1)[6].x() ,(*points1)[6].y() , (*points1)[6].z()); pGeo-setVertexArray( pVerts ); // create a primitive set osg::DrawElementsUInt* pPrimitiveSet = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 ); pPrimitiveSet-push_back( 0 ); pPrimitiveSet-push_back( 1 ); pPrimitiveSet-push_back( 2 ); pGeo-addPrimitiveSet( pPrimitiveSet ); // create an arraw for texture coordinates osg::Vec2Array* pTexCoords = new osg::Vec2Array( 3 ); (*pTexCoords)[0].set( (*points2)[6].x() , (*points2)[6].y() ); (*pTexCoords)[1].set( (*points2)[5].x() ,
Re: [osg-users] OSG ActiveX + IFC - looking for developer
Mathieu MARACHE wrote: No I'm sorry I don't. Mathieu OK, when you know, please inform me. Thank you Zdravko -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33614#33614 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Editing osg::Image manualy
Hi, The idea is to edit a texture in real time. To do this, I get the texture coordinates where I clicked on the model and I try to update the image as follows ... Texture creation: Code: image = new osg::Image; image-allocateImage(tex_width, tex_height, 1, GL_RGBA, GL_UNSIGNED_BYTE); unsigned int r = 255; unsigned int g = 255; unsigned int b = 0; unsigned int a = 255; for(int i = 0 ; i tex_width*tex_height ; i++) { memcpy(image-data()+i*4 , r, 1); memcpy(image-data()+i*4+1, g, 1); memcpy(image-data()+i*4+2, b, 1); memcpy(image-data()+i*4+3, a, 1); } // attach pbo image-setPixelBufferObject(new osg::PixelBufferObject(image)); // push back the image to the texture textureRect-setImage(0, image); Update process: Code: float x = textCoord._v[0]*tex_width; float y = textCoord._v[1]*tex_height; osg::Vec4 color = textureRect-getImage(0)-getColor(x*y); float radio = 80.0; unsigned int r; unsigned int g; unsigned int b; unsigned int a = 255; for(int i = 0 ; i tex_height ; i++) { for(int j = 0 ; j tex_width ; j++){ osg::Vec2 t = osg::Vec2(x-j,y-i); float dist = sqrt((t.x()*t.x())+(t.y()*t.y())); if(dist(lower)radio){ r = 0; g = 255; b = 0; } else{ r = 255; g = 255; b = 255; } memcpy(textureRect-getImage(0)-data()+i*j*4 , r, 1); memcpy(textureRect-getImage(0)-data()+i*j*4+1, g, 1); memcpy(textureRect-getImage(0)-data()+i*j*4+2, b, 1); memcpy(textureRect-getImage(0)-data()+i*j*4+3, a, 1); } } textureRect-getImage(0)-dirty(); osgDB::writeImageFile(*image,sample.png); But the idea does not work ... How can I relate the texcoords with the rows and columns of the image? Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33609#33609 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] To calculate normal vector use the osg::smoothingVisitor
Hi, yes , now I'm getting normal effect on lightning by using osg::smoothingVisitor. thanks for help ... Thank you! Cheers, manish -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33607#33607 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering performance gain on 2 different Systems
Hi Felix, The Intel embedded graphics chipset is going to be limited by different things than NVidia graphics card. The Intel chipset will be limited far more by transform and fill than the graphics card so optimizations in the way the data is stored and passed to OpenGL will have less impact. The NVidia graphics card performs far better in transform and fill so you find the way you pass the data to the graphics card far more critical - so VBO's and appropriate batching of the data will be far more critical. Robert. On Tue, Nov 9, 2010 at 1:08 PM, Felix Engelmann efe+...@tu-chemnitz.eu wrote: Dear OSG Community, I'm developing visualization software, which involves rendering of large point clouds. I optimized the scene graph in order to get better frame rates. In particular I now use osg::Geometry instead of osg::ShapeDrawable. I tested it on 2 different machines and got different performance gains. System 1 (Notebook): Intel Pentium-M, 1.86GHz, 1GB RAM, Intel GMA900 Chipset, Windows XP System 2 (Desktop PC): Intel Core 2 DuoE8400, 3 GHz, 2GB RAM, GeForce 9500 GT, Windows XP On System 1 the rendering is about 40% faster with the optimizations. And on System 2 I got a 7x higher framerate ! Now, my question is: what can be the reasons for that dramatically differnet performance gain? I suppose, it is because of the different OpenGL implementations and graphics hardware, but I don't have a clue whats really going on here ... Who can give me some comprehensible explanations? Thank you! Cheers, Felix -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33610#33610 ___ 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] Rendering performance gain on 2 different Systems
On 11/9/2010 6:08 AM, Felix Engelmann wrote: System 1 (Notebook): Intel GMA900 Chipset Now, my question is: what can be the reasons for that dramatically differnet performance gain? I suppose, it is because of the different OpenGL implementations and graphics hardware, but I don't have a clue whats really going on here ... Who can give me some comprehensible explanations? The Intel GMA chipset is a very low-performance low-cost implementation. When you removed the software bottleneck, you soon hit the hardware limitations. On the GeForce, when you removed the software bottleneck, you can now hit the true available capability of your hardware. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Crowds rendering with OSG
On 11/8/2010 8:52 AM, Roberto Garrido wrote: Hi, We are looking for alternatives for crowd rendering with OSG. For the moment, we have only found academic information, not actual implementations using OSG. We have found out Geopostors, which seems to be a really promising approach. They render the entire geometry of the models for those which are close to the camera, and they switch to a billboard for those that are far away. On this billboard they render a 2D projection of the model, but having in mind the position and orientation of the camera (They use some pre-cached images taken from different points of view). So, do anybody know any implementation of any of these techniques that OSG users could use? Have you looked at the osg Imposters demo/example? Thank you! -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rendering performance gain on 2 different Systems
Dear OSG Community, I'm developing visualization software, which involves rendering of large point clouds. I optimized the scene graph in order to get better frame rates. In particular I now use osg::Geometry instead of osg::ShapeDrawable. I tested it on 2 different machines and got different performance gains. System 1 (Notebook): Intel Pentium-M, 1.86GHz, 1GB RAM, Intel GMA900 Chipset, Windows XP System 2 (Desktop PC): Intel Core 2 DuoE8400, 3 GHz, 2GB RAM, GeForce 9500 GT, Windows XP On System 1 the rendering is about 40% faster with the optimizations. And on System 2 I got a 7x higher framerate ! Now, my question is: what can be the reasons for that dramatically differnet performance gain? I suppose, it is because of the different OpenGL implementations and graphics hardware, but I don't have a clue whats really going on here ... Who can give me some comprehensible explanations? Thank you! Cheers, Felix -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33610#33610 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv segfaults exporting to ac3d
robertosfield wrote: Hi Peter, On Tue, Nov 9, 2010 at 2:48 AM, Peter Bear wrote: I found what was causing it actually. For some reason, if the textures referenced by the model are not in the same folder as the OSG file you are converting, it segfaults. Once I figured that out however, and got it to stop segfaulting, it wound up scrambling the model in the AC3D file. Excellent, this should help pinpoint the problem, or at least the first of the problems... Do you have a stack trace for the crash? Could you try tweaking one of the OSG examples to see if you can reproduce the problem, i.e take cow.osg and then placing the image file in a new directory, Robert. ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum I'll work on the example files, however for now, here's the file in question that gets scrambled, along with all the files it should depend on. I manged to get the authors permission to redistribute the work for non-commercial purposes only. The files in question: http://www.mediafire.com/?fwdctwndoc65el8 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33634#33634 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] 3D GUI Icon
Greetings, I'd like to create a 3D icon (in the shape of an arrow, or a plane) that sits in the lower left corner of the screen and shows the user the current orientation of the camera. I should be able to handle the dynamics of orienting the icon, but I'm wondering, is this something that should use some 3D GUI framework to accomplish? or is there a way to tell an OSG camera to always render this icon in the corner of the screen, never let any other object get between the icon and the camera, and never move the icon? Thanks. Matt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33635#33635 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3D GUI Icon
I found a solution for this task using a HUD: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/HudsAndText Although I do still have an issue. I am using the Cessna.osg model in the HUD but when I do Code: myPlaneTrans-setStateSet(hudStateSet); hudStateSet-setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); many of the triangles in the Cessna model are not rendered, or are rendered black. Unfortunately if I don't use that setMode() method, the Cessna sometimes appears behind other objects - so it seems I really need GL_DEPTH_TEST off, but I don't know why the Cessna mesh is being rendered incorrectly. Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33637#33637 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3D GUI Icon
Matt Caron wrote: I found a solution for this task using a HUD: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/HudsAndText Although I do still have an issue. I am using the Cessna.osg model in the HUD but when I do Code: myPlaneTrans-setStateSet(hudStateSet); hudStateSet-setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); many of the triangles in the Cessna model are not rendered, or are rendered black. Unfortunately if I don't use that setMode() method, the Cessna sometimes appears behind other objects - so it seems I really need GL_DEPTH_TEST off, but I don't know why the Cessna mesh is being rendered incorrectly. The HUD tutorial probably assumes you don't have true 3D objects on your HUD. To properly render anything 3D, you'll need the depth test on. One possible solution would be to clear the depth buffer (but not the color buffer) before drawing your HUD objects, but you'll have to make sure that your HUD objects are always drawn after the regular scene. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3D GUI Icon
Hi Matt, The osghud example should be a better starting point for you. Mourad On Tue, Nov 9, 2010 at 8:34 PM, Matt Caron mcindafi...@gmail.com wrote: I found a solution for this task using a HUD: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/HudsAndText Although I do still have an issue. I am using the Cessna.osg model in the HUD but when I do Code: myPlaneTrans-setStateSet(hudStateSet); hudStateSet-setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); many of the triangles in the Cessna model are not rendered, or are rendered black. Unfortunately if I don't use that setMode() method, the Cessna sometimes appears behind other objects - so it seems I really need GL_DEPTH_TEST off, but I don't know why the Cessna mesh is being rendered incorrectly. Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33637#33637 ___ 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] Editing osg::Image manualy
Hi Aitor, On 9/11/10 23:25 , Aitor Ardanza wrote: The idea is to edit a texture in real time. To do this, I get the texture coordinates where I clicked on the model and I try to update the image as follows ... ... float x = textCoord._v[0]*tex_width; float y = textCoord._v[1]*tex_height; ... But the idea does not work ... How can I relate the texcoords with the rows and columns of the image? Just an idea but since you appear to use a TextureRectangle the tex coords might be in image space already. Or they might be upside down. What does not work? /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org