Re: [osg-users] Unsupported wrapper class error?
Hi Glenn, I can't shed any light on the issue, but I can possible help dig down to find out what is wrong. Would it be possible for you to come up with a simple example that reproduces the problem? Robert. On Thu, Jun 10, 2010 at 8:03 PM, Glenn Waldron gwald...@gmail.com wrote: Hi folks, I'm reading and writing osgb streams. Every once and a while, I will see: InputStream::readObject(): Unsupported wrapper class osg::Image Can you shed some light on this? When it happens, it happens on my first attempt to read and then doesn't happen again during that run of the app. This is a recent trunk version of OSG. Thanks. Glenn Waldron : Pelican Mapping ___ 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] scene data and manipulator
Il 6/11/2010 10:37 AM, Gianni Ambrosio ha scritto: With this code I can see two problems. First of all the loaded object is not fitted in the viewer. Then using the mouse to rotate (leftmouse+move), translate (middle mouse+move) or zoom (right mouse+move), I just can see the effect of rotation, while the loaded objet does not move in the viewer in the other two cases. OK, the manipulator works now (don't ask me why). Now, which is the right way to fit the loaded object? Regards Gianni ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX texture export problem.
Hi Dario, if the file appears correctly in FBX QuickTime Viewer but not in the latest version of OpenSceneGraph then please send the file over to me in a .zip with associated textures, and I'll take a look. On 10 June 2010 21:09, Dario Minieri para...@cheapnet.it wrote: Hi, anyone has any other information about this problem? Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28796#28796 ___ 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] ffmpeg synchronisation
Hi Tanguy, thanks for the pointers, the timing code makes much more sense now. Sound does indeed make it a lot more problematic, seems I'll have to do some lateral thinking on this one :\ On 10 June 2010 13:52, Tanguy Fautre tang...@aristechnologies.com wrote: Hi Michael, It’s been a long time since I’ve touched the ffmpeg plugin, but here is how it was: 1/ when the video sound is being played, the video time is synchronized with the audio player (this tries to keep the video tightly synchronized with the audio track); 2/ when there is no video sound (or no audio player has been associated with this video), then the video used to be synchronized with an internal timer. Quickly looking at the code on SVN, it does not seem to have changed. Changing case 2 to be optionally synchronized with FrameStamp shouldn’t be too hard (but will require code changes in the plugin). Case 1 looks more problematic though. Tanguy *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Michael Platings *Sent:* 09 June 2010 3:31 PM *To:* OpenSceneGraph Users *Subject:* [osg-users] ffmpeg synchronisation I've been playing around with the ffmpeg plugin and I've been very impressed with how capable it is. The only problem I have with it is that its playback speed is decoupled from the timing of the main scene. Does anyone know of an easy way to ensure that the time of the ffmpeg video is consistent with the time of the FrameStamp? ___ 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] ffmpeg synchronisation
Hi, On 11/06/10 11:06, Michael Platings wrote: Hi Tanguy, thanks for the pointers, the timing code makes much more sense now. Sound does indeed make it a lot more problematic, seems I'll have to do some lateral thinking on this one :\ not a fix for your problem, but experiment with mplayer's scaletempo audio filter. Audio speed up/down without changing pitch. jp On 10 June 2010 13:52, Tanguy Fautre tang...@aristechnologies.com mailto:tang...@aristechnologies.com wrote: Hi Michael, It’s been a long time since I’ve touched the ffmpeg plugin, but here is how it was: 1/ when the video sound is being played, the video time is synchronized with the audio player (this tries to keep the video tightly synchronized with the audio track); 2/ when there is no video sound (or no audio player has been associated with this video), then the video used to be synchronized with an internal timer. Quickly looking at the code on SVN, it does not seem to have changed. Changing case 2 to be optionally synchronized with FrameStamp shouldn’t be too hard (but will require code changes in the plugin). Case 1 looks more problematic though. Tanguy *From:* osg-users-boun...@lists.openscenegraph.org mailto:osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org mailto:osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Michael Platings *Sent:* 09 June 2010 3:31 PM *To:* OpenSceneGraph Users *Subject:* [osg-users] ffmpeg synchronisation I've been playing around with the ffmpeg plugin and I've been very impressed with how capable it is. The only problem I have with it is that its playback speed is decoupled from the timing of the main scene. Does anyone know of an easy way to ensure that the time of the ffmpeg video is consistent with the time of the FrameStamp? ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto: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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] resuming vpb build, revisited :)
Hi all, a single osgdem build works flawlessly. Will keep an eye on the vpb issue with the next larger build we will have, but this will most likely be with the next version :) Thank you! Cheers, Felix -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28819#28819 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange error only in debug mode
Thank you. I don't understand where is the error because in my program I simply call sometimes a removeUpdateCallback(nc) then an addUpdateCallback(nc) over my object, where nc is an osgAnimationCallback* object. I never delete my object then it's very strange this output. Can anybody help me? thanks This is call stack: osg65-osgd.dll!osg::NodeCallback::traverse(osg::Node * node=0x01aba720, osg::NodeVisitor * nv=0x019f5f68) Line 21 + 0x2d bytes C++ osg65-osgd.dll!osg::AnimationPathCallback::operator()(osg::Node * node=0x01aba720, osg::NodeVisitor * nv=0x019f5f68) Line 251 C++ osg65-osgUtild.dll!osgUtil::UpdateVisitor::handle_callbacks_and_traverse(osg::Node node={...}) Line 85 + 0x1c bytes C++ osg65-osgUtild.dll!osgUtil::UpdateVisitor::apply(osg::Transform node={...}) Line 57 + 0x1a bytes C++ osg65-osgd.dll!osg::NodeVisitor::apply(osg::MatrixTransform node={...}) Line 136 + 0x13 bytesC++ osg65-osgd.dll!osg::MatrixTransform::accept(osg::NodeVisitor nv={...}) Line 37 + 0x41 bytes C++ osg65-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Line 62 + 0x25 bytes C++ osg65-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Line 191 + 0x1c bytesC++ osg65-osgUtild.dll!osgUtil::UpdateVisitor::handle_callbacks_and_traverse(osg::Node node={...}) Line 86 + 0x25 bytes C++ osg65-osgUtild.dll!osgUtil::UpdateVisitor::apply(osg::Group node={...}) Line 56 + 0x1a bytes C++ osg65-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Line 38 + 0x41 bytesC++ osg65-osgViewerd.dll!osgViewer::Scene::updateSceneGraph(osg::NodeVisitor updateVisitor={...}) Line 87 + 0x1e bytes C++ osg65-osgViewerd.dll!osgViewer::Viewer::updateTraversal() Line 882 C++ osg65-osgViewerd.dll!osgViewer::ViewerBase::frame(double simulationTime=1.7976931348623157e+308) Line 608 + 0xf bytes C++ osg65-osgViewerd.dll!osgViewer::ViewerBase::run() Line 581 + 0x1b bytesC++ osg65-osgViewerd.dll!osgViewer::Viewer::run() Line 322 C++ ARGAME.exe!main() Line 141 + 0xf bytes C++ ARGAME.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C ARGAME.exe!mainCRTStartup() Line 403 C -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28820#28820 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange error only in debug mode
daniele argiolas writes: Thank you. I don't understand where is the error because in my program I simply call sometimes a removeUpdateCallback(nc) then an addUpdateCallback(nc) over my object, where nc is an osgAnimationCallback* object. I never delete my object then it's very strange this output. Then it could be possible that you are removing the callback while OSG is in its update phase. Where are you calling removeUpdateCallback()? -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange error only in debug mode
Hi, Fyi, you can also remove a callback by using NULL, the ref counting would clean it up then. Would that help? Cheers Raymond On 6/11/2010 1:34 PM, Alberto Luaces wrote: daniele argiolas writes: Thank you. I don't understand where is the error because in my program I simply call sometimes a removeUpdateCallback(nc) then an addUpdateCallback(nc) over my object, where nc is an osgAnimationCallback* object. I never delete my object then it's very strange this output. Then it could be possible that you are removing the callback while OSG is in its update phase. Where are you calling removeUpdateCallback()? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Weekend adventure
Hi All, I've just wrapped up my work for the week, and taking this afternoon and whole weekend off! The car is packed with food, camping and running equipment and I'm now setting off. Tomorrow morning I set off on my first mountain marathon, the Lochalsh Dirty 30. http://www.lochalsh-trails.co.uk/ We start at the pituresque village of Glenelg on the west coast of Scotland, overlooking the Isle of Skye, then run along the coast, past the famous Eilean Donan Castle (it's featured in many films) and then back into the mountains and through a mountain pass, then back to Glenelg for beers and food. Total distance is 30 miles, with 1000m of ascent/descent thrown into the mix, furthest I've ever been on foot in one day so it's quite a challenging adventure, but ohh yes the countryside is stunning and worth ever step. But... of course I'll be thinking about terrain visualization, shader composition and fixing pesky bugs as I go... for a at least a second or two ;-) Catch up with you all on Monday, and have a great weekend yourselves, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Weekend adventure
Hi Robert, I've just wrapped up my work for the week, and taking this afternoon and whole weekend off! The car is packed with food, camping and running equipment and I'm now setting off. Tomorrow morning I set off on my first mountain marathon, the Lochalsh Dirty 30. http://www.lochalsh-trails.co.uk/ We start at the pituresque village of Glenelg on the west coast of Scotland, overlooking the Isle of Skye, then run along the coast, past the famous Eilean Donan Castle (it's featured in many films) and then back into the mountains and through a mountain pass, then back to Glenelg for beers and food. Total distance is 30 miles, with 1000m of ascent/descent thrown into the mix, furthest I've ever been on foot in one day so it's quite a challenging adventure, but ohh yes the countryside is stunning and worth ever step. Wow, looks really cool! I'm not in any shape to go running those kinds of distances, but it really makes me want to go to Scotland and walk around all day looking at those sights! But... of course I'll be thinking about terrain visualization, shader composition and fixing pesky bugs as I go... for a at least a second or two ;-) I'm sure after making a hang-gliding simulator, OSG could be used to make a marathon simulator ;-) Catch up with you all on Monday, and have a great weekend yourselves, And you. Enjoy the run and the change of pace! (pardon the pun) J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Weekend adventure
Hi Robert, Ah, life becomes colorful with hobbies, isn't it? :) I'm a novel writer in my spare time, and love to read lots of books everytime and everywhere. But it seems that I still really lack physical exercise. Maybe I should get out of the city and get in a good walk like you, after my OSG book finished and not too busy with business. But at this time I'll be first thinking of a new powerful particle effects implementation in OSG, which will be used to satisfy my client and can be used to enhance the osgParticle library if possible. Also I'll work hard on the beginners book and continue helping to improve the OSG development, too. Have a nice weekend! Wang Rui 2010/6/11 Robert Osfield robert.osfi...@gmail.com: Hi All, I've just wrapped up my work for the week, and taking this afternoon and whole weekend off! The car is packed with food, camping and running equipment and I'm now setting off. Tomorrow morning I set off on my first mountain marathon, the Lochalsh Dirty 30. http://www.lochalsh-trails.co.uk/ We start at the pituresque village of Glenelg on the west coast of Scotland, overlooking the Isle of Skye, then run along the coast, past the famous Eilean Donan Castle (it's featured in many films) and then back into the mountains and through a mountain pass, then back to Glenelg for beers and food. Total distance is 30 miles, with 1000m of ascent/descent thrown into the mix, furthest I've ever been on foot in one day so it's quite a challenging adventure, but ohh yes the countryside is stunning and worth ever step. But... of course I'll be thinking about terrain visualization, shader composition and fixing pesky bugs as I go... for a at least a second or two ;-) Catch up with you all on Monday, and have a great weekend yourselves, 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
[osg-users] Draw dynamic line with LODs and EBO
Hi, I have to make in my app dynamic lines. As far as I know display lists are deprecated for now on GLES2 platform I try to make it using VBO+EBO, like in osgparametric,so now it works fine. But I have to draw up to 1000 lines with 100 points so it can be so hard to GPU. So I decided to recalculate EBO using LOD strategy. So I'll calculate distance to my point and remove odd indices. Could you please give me some snippet how to work with EBO in update or draw callback? Also my lines are trajectories and I have to draw them respectively to simulation time. But I found that I can't change size of element buffer. Because I found in PrimitiveSet.cpp this lines Code: void DrawElementsUInt::draw(State state, bool useVertexBufferObjects) const { ... if (ebo) { if (_numInstances=1) state.glDrawElementsInstanced(mode, size(), GL_UNSIGNED_INT, (const GLvoid *)(ebo-getOffset(getBufferIndex())), _numInstances); else glDrawElements(mode, size(), GL_UNSIGNED_INT, (const GLvoid *)(ebo-getOffset(getBufferIndex(; } } so here size() - total size of element buffer and I create for example EBO with 200 indices total and want draw only first 100 indices - how can I make it? for the reference here is my code Code: osg::Node* createModel( bool dynamic, bool useVBO) { osg::Geode* geode = new osg::Geode; osg::Geometry* geom = new osg::Geometry; geode-addDrawable(geom); osg::Vec3 row(0.0f,0.0f,0.0); unsigned int num_x = 200; unsigned int num_y = 20; unsigned int vert_no = 0; osg::Vec3Array* vertices = new osg::Vec3Array( num_x ); unsigned int iy; for(iy=0; iynum_x; iy++) { (*vertices)[vert_no++] = row; row.y()=1000.0f*iy; row.z()+=100; } geom-setVertexArray(vertices); osg::VertexBufferObject* vbo = useVBO ? new osg::VertexBufferObject : 0; if (vbo) vertices-setVertexBufferObject(vbo); osg::ElementBufferObject* ebo = useVBO ? new osg::ElementBufferObject : 0; osg::DrawElementsUInt* elements = new osg::DrawElementsUInt(GL_LINE_STRIP_ADJACENCY_EXT, num_x); unsigned int element_no = 0; for(unsigned int ix = 0; ixnum_x; ix++) { (*elements)[element_no++] = ix; } geom-addPrimitiveSet(elements); geom -setDataVariance(osg::Object::DYNAMIC); geom-setDrawCallback(new DrawCallback()); if (ebo) elements-setElementBufferObject(ebo); geom-setUseVertexBufferObjects(useVBO); return geode; } ... Thank you! Cheers, Roman[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28826#28826 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Weekend adventure
Looks great - Have a nice weekend! I'm on a yacht (read: dingy) to Rothesay and environs on the 29th. :-) John Montgomery | UOA | +44 (0) 1224 27 3218 | EWG37. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: 11 June 2010 14:07 To: OpenSceneGraph Users Subject: [osg-users] Weekend adventure Hi All, I've just wrapped up my work for the week, and taking this afternoon and whole weekend off! The car is packed with food, camping and running equipment and I'm now setting off. Tomorrow morning I set off on my first mountain marathon, the Lochalsh Dirty 30. http://www.lochalsh-trails.co.uk/ We start at the pituresque village of Glenelg on the west coast of Scotland, overlooking the Isle of Skye, then run along the coast, past the famous Eilean Donan Castle (it's featured in many films) and then back into the mountains and through a mountain pass, then back to Glenelg for beers and food. Total distance is 30 miles, with 1000m of ascent/descent thrown into the mix, furthest I've ever been on foot in one day so it's quite a challenging adventure, but ohh yes the countryside is stunning and worth ever step. But... of course I'll be thinking about terrain visualization, shader composition and fixing pesky bugs as I go... for a at least a second or two ;-) Catch up with you all on Monday, and have a great weekend yourselves, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org The University of Aberdeen is a charity registered in Scotland, No SC013683. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Draw dynamic line with LODs and EBO
Roman, I see that you are allocating EBOs by hand. If you skip that and just call setUseVertexBufferObjects(true), OSG will automatically create a single shared EBO for the osg::Geometry, and put all your PrimitiveSets inside that shared EBO at various offsets/spans. (I could be mistaken but I think that's true.) Then you can just create multiple PrimitiveSets and swap in the one you want drawn at the appropriate time. I'm not sure why osgparametric creates VBOs and EBOs manually, but I have not studied it too closely. Glenn Waldron : Pelican Mapping On Fri, Jun 11, 2010 at 10:27 AM, Roman Grigoriev grigor...@gosniias.ruwrote: Hi, I have to make in my app dynamic lines. As far as I know display lists are deprecated for now on GLES2 platform I try to make it using VBO+EBO, like in osgparametric,so now it works fine. But I have to draw up to 1000 lines with 100 points so it can be so hard to GPU. So I decided to recalculate EBO using LOD strategy. So I'll calculate distance to my point and remove odd indices. Could you please give me some snippet how to work with EBO in update or draw callback? Also my lines are trajectories and I have to draw them respectively to simulation time. But I found that I can't change size of element buffer. Because I found in PrimitiveSet.cpp this lines Code: void DrawElementsUInt::draw(State state, bool useVertexBufferObjects) const { ... if (ebo) { if (_numInstances=1) state.glDrawElementsInstanced(mode, size(), GL_UNSIGNED_INT, (const GLvoid *)(ebo-getOffset(getBufferIndex())), _numInstances); else glDrawElements(mode, size(), GL_UNSIGNED_INT, (const GLvoid *)(ebo-getOffset(getBufferIndex(; } } so here size() - total size of element buffer and I create for example EBO with 200 indices total and want draw only first 100 indices - how can I make it? for the reference here is my code Code: osg::Node* createModel( bool dynamic, bool useVBO) { osg::Geode* geode = new osg::Geode; osg::Geometry* geom = new osg::Geometry; geode-addDrawable(geom); osg::Vec3 row(0.0f,0.0f,0.0); unsigned int num_x = 200; unsigned int num_y = 20; unsigned int vert_no = 0; osg::Vec3Array* vertices = new osg::Vec3Array( num_x ); unsigned int iy; for(iy=0; iynum_x; iy++) { (*vertices)[vert_no++] = row; row.y()=1000.0f*iy; row.z()+=100; } geom-setVertexArray(vertices); osg::VertexBufferObject* vbo = useVBO ? new osg::VertexBufferObject : 0; if (vbo) vertices-setVertexBufferObject(vbo); osg::ElementBufferObject* ebo = useVBO ? new osg::ElementBufferObject : 0; osg::DrawElementsUInt* elements = new osg::DrawElementsUInt(GL_LINE_STRIP_ADJACENCY_EXT, num_x); unsigned int element_no = 0; for(unsigned int ix = 0; ixnum_x; ix++) { (*elements)[element_no++] = ix; } geom-addPrimitiveSet(elements); geom -setDataVariance(osg::Object::DYNAMIC); geom-setDrawCallback(new DrawCallback()); if (ebo) elements-setElementBufferObject(ebo); geom-setUseVertexBufferObjects(useVBO); return geode; } ... Thank you! Cheers, Roman[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28826#28826 ___ 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] I don't want OSG to rescal textures, how can I avoid it?
Ulrich Hertlein wrote: On 11/06/10 15:13 , Manuel Garea wrote: Hi, I have a problem with textures: my textures have sizes that are not power of two, and I don't want OSG to rescale them. OSG show me a message like: Scalling image '...' from (200x200) to (256x256) although I'm calling the function texture-setResizeNonPowerOfTwoHint(false); ... Does your OpenGL driver support non-power-of-two textures? /ulrich ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum Ulrich... I really don't know if my OpenGL driver supports it, how could I know? thank you another time! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28829#28829 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Distortion
Hi, Hello Guys, Actually i have to create radial distortion in an image using osg. So i created root node then camera node then geode and atlast i was trying to create the geometry which i can attach to the geode node. I am assuming distortion to be like this D = (1 +k1*r*r + k2*r*r*r*r); where k1 and k2 are the coefficient of distortion and r is the distance between ideal image coordinate(x and y). So i want to get Barrel distorted image and Pincushion distorted image for postive and negative values of k. But i couldn`t understand which geometry i should attach to get those kind of image. So if anybody knows about this then please let me know. Thanks in advance Thank you! Cheers, Naresh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28774#28774 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] mesh with per-polygon color data?
Hi I have a triangle mesh that contains vertex, triangle vertex index, and color data. I used an osg::Geometry and it is rendered perfectly. Just two questions: 1. When I add the color data to the geometry, the application slows down. I understand that per-primitive binding slows things down, but per-primitive color data is all I have, so can I get better performance with the same data set? 2. Can osg automatically generate surface (or vertex) normals or do I have to write the code for that? Thanks -Alborz -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28830#28830 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Picking node with scaled positionattitudetransform as parent
Looks like my guess was wrong. It looks like the bounding sphere does take into account the scale. I looked into the intersection test in LineSegmentIntersector and found that the line segment is in fact intersecting the sphere at two points but one of the final tests is failing. Here is the intersects function in LineSegmentIntersector. I added line numbers to ease my explanation. Code: 1:bool LineSegmentIntersector::intersects(const osg::BoundingSphere bs ) 2:{ 3: if ( !bs.valid() ) return true; 4: osg::Vec3d sm = _start - bs._center; 5: double c = sm.length2()-bs._radius*bs._radius; 6: if (c0.0) return true; 7: osg::Vec3d se = _end-_start; 8: double a = se.length2(); 9: double b = (sm*se)*2.0; 10: double d = b*b-4.0*a*c; 11: if (d0.0) return false; 12: double div = 1.0/(2.0*a); 13: double r1 = (-b-d)*div; 14: double r2 = (-b+d)*div; 15: if (r1=0.0 r2=0.0) return false; 16: if (r1=1.0 r2=1.0) return false; 17: return true; 18:} The last test ( line 16 ) is failing. From reading the web I understand that if the test on line 11 fails then there is no intersection but if it passes then the line segment intersects the sphere at two points. I don't understand what the last two tests ( lines 15 and 16 ) are testing for. Could someone explain it to me? Thanks in advance for any help. Cheers, Greg -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28832#28832 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Picking node with scaled positionattitudetransform as parent
Hi Greg, Kudos on taking the initiative to debug into the OSG source yourself. I don't think many would have been able to answer your question of why the intersection test was failing, so that was the good thing to do. The last test ( line 16 ) is failing. From reading the web I understand that if the test on line 11 fails then there is no intersection but if it passes then the line segment intersects the sphere at two points. I don't understand what the last two tests ( lines 15 and 16 ) are testing for. Could someone explain it to me? The LineSegmentIntersector tests a line segment for intersection, not a ray. So the tests on lines 15 and 16 are there to make sure any intersection that was detected happened between the start of the line segment and its end (normalized to 0.0 - 1.0). Seems to me that your line segment's second point (end) is before the geometry you're testing, if it fails at line 16. The geometry is further than the furthest point of the line. As to why, I don't know... Perhaps you calculate the endpoints of your line segment wrong? Or there's a mixup in coordinate systems somewhere along the line (geez, forgive the pun). Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Picking node with scaled positionattitudetransform as parent
Hi J-S, Thanks for the explanation. I really appreciate it. I'm using the computeIntersections function for osgViewer::View so it calculates the line segment start and end points for me but now that I'm armed with the knowledge you gave me about the failing condition I can try and do the intersection test using another method where I calculate those points myself and see what happens. If I can't figure it out I'll be back here with my head hanging low. ;) But I will have learned a lot trying to figure it all out. Thanks for taking the time to answer my question. Cheers, Greg -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28834#28834 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] mesh with per-polygon color data?
Alborz Gharraee wrote: Hi I have a triangle mesh that contains vertex, triangle vertex index, and color data. I used an osg::Geometry and it is rendered perfectly. Just two questions: 1. When I add the color data to the geometry, the application slows down. I understand that per-primitive binding slows things down, but per-primitive color data is all I have, so can I get better performance with the same data set? You should be able to write a function that expands the per-primitive data to per-vertex data. You may have to duplicate vertices for this to work (depending on the look you're going for), but the end result should run faster regardless. 2. Can osg automatically generate surface (or vertex) normals or do I have to write the code for that? Look at osgUtil::SmoothingVisitor --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Successful build using VS2010?
Has anybody been able to successfully build the latest dev-head in VS2010? I kept getting several fatal LINK errors saying it cannot open input files ex: LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\osgGA.lib' I'm assuming it's a path error made somewhere in the build scripts. I posted about this a couple of months ago and I couldn't find a fix. I tried searching the forums about this topic but couldn't find anything, are we just out of luck trying to use VS2010 for now? Thanks, Nick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28837#28837 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] scene data and manipulator
there is no ''right' way to set the object to the scene, but i usually set a group to the sceneData and after that I addChild to the group . Cheers, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28838#28838 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DataPager issue
Hi rober, is there a solution to clear the memory of the datapager ? since the function clear() doesnt seem to release the information Thank you! Cheers, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28839#28839 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Scaling an Object - Normals
Hi, I would like to know how I can re-scale the normal of an object loaded after scale the object ? Thank you! Cheers, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28840#28840 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Scaling an Object - Normals
// Normalize normals to correct lighting from the scaling operation. object-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON); On Fri, Jun 11, 2010 at 4:27 PM, Thomas Canipel thomas.cani...@gmail.com wrote: Hi, I would like to know how I can re-scale the normal of an object loaded after scale the object ? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Scaling an Object - Normals
Mail got formated oddly ... trying again. // Normalize normals to correct lighting from the scaling operation. object-getOrCreateStateSet()-setMode(GL_NORMALIZE,osg::StateAttribute::ON); On 6/11/10, Ben Cain brca...@gmail.com wrote: // Normalize normals to correct lighting from the scaling operation. object-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON); On Fri, Jun 11, 2010 at 4:27 PM, Thomas Canipel thomas.cani...@gmail.com wrote: Hi, I would like to know how I can re-scale the normal of an object loaded after scale the object ? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] [Inventor plugin] Fix bugs that Inventor plugin lost Sub-Node name in a *.iv file
Hi John, I have post the submission. See the forum link below. http://forum.openscenegraph.org/viewtopic.php?t=5968 But I am sorry that I did not use the Subversion repository source code for I do not have time to rebuild the latest version. In stead, I use osgdb_iv from osg_2.9.7. I guess these two may have little change. As I know, the latest version use OSG_DEBUG and osg_2.9.7 still use osg::notify(osg::DEBUG_INFO). Thank you! Cheers, Tan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28846#28846 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org