Re: [osg-users] Better debug visualization in Visual Studio
Hi Dženan , thanks for this hint, I will try it in VS2008 and report if it works too :) Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32769#32769 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Save texture changes via fragment shader
Hi, On 14/10/10 17:26, Aitor Ardanza wrote: Sorry for my explanation, but my level of English is not very good ... I would need two textures, an original model and a modified one, which are applied to the model. I assume you have the original texture (O) loaded from file. Prerender RTT camera can take the original and modify it as you please to get a new texture (M). How you set up the RTT camera depends on what you want to do. If you modify per pixel values, a view aligned quad with output size the same as the input texture is the default way to do it. Now you have 2 textures (O) and (M). For the next stage of rendering, e.g. osg main camera, these two textures are treated exactly the same. You can apply either one or both using multitexturing (see osg multi texture example) to any geometry you want. If you want to save (M) as an image, do so in the RTT render callback. If you applied (M) to your mesh/geometry and want to save the complete model (mesh+texture). Save that part of the scene graph to .osg or whatever format supports what you want. HTH jp Thanks for your patience! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32759#32759 ___ 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] texture SubloadCallback and TextureObject generating
Hi Thomas, On Thu, Oct 14, 2010 at 9:26 PM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Robert, i'll take a look at the new code, but I assume this can be used to solve my problem of not wanting the object released if the image demensions are different to the texture dimensions? I don't recall fully understanding your original email so can't give you an answer without digging it back up and having a think. Given this the best I could as is maybe ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stencil buffer and FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT
Hi Fred, we've also encountered cases (float formats) where we need to call: void setInternalTextureFormat(GLint internalFormat); after allocateImage in the case of using Images to read back data. If you look at allocateImage code, you'll see why. Can you check if this works for you without modification to Texture2D.cpp? rgds jp On 14/10/10 17:55, Fred Smith wrote: This looks like an OSG bug to me. The code is in osg\Texture2D.cpp, in Texture2D::apply. With PACKED_DEPTH_STENCIL_BUFFER, internalFormat should be GL_DEPTH24_STENCIL8_EXT, format should be GL_DEPTH_STENCIL_EXT and type GL_UNSIGNED_INT_24_8_EXT. The current OSG 2.8 code makes this GL_DEPTH_STENCIL_EXT, GL_DEPTH_STENCIL_EXT and GL_UNSIGNED_BYTE. This is incorrect, hence the driver returns GL_INVALID_ENUM. To make the osgpackeddepthstencil sample work as desired, with the code modification mentionned at the beginning of this thread, Texture2D.cpp can be modified this way: Code: if (_internalFormat == 6408) // GL_RGBA glTexImage2D( GL_TEXTURE_2D, 0, _internalFormat, _textureWidth, _textureHeight, _borderWidth, _sourceFormat ? _sourceFormat : _internalFormat, _sourceType ? _sourceType : GL_UNSIGNED_BYTE, 0); else glTexImage2D( GL_TEXTURE_2D, 0, 0x88F0, // GL_DEPTH24_STENCIL8_EXT, _textureWidth, _textureHeight, _borderWidth, 0x84F9, // GL_DEPTH_STENCIL_EXT, 0x84FA, // GL_UNSIGNED_INT_24_8_EXT, 0); Of course the code above is just a dirty modification just for testing purposes, but it does work. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32762#32762 ___ 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] texture SubloadCallback and TextureObject generating
Hi Thomas, 15.10.2010 0:26, Thomas Hogarth wrote: Hi Robert, Mikhail Mikhail thanks for pointing me to this as a solution to my subload problems. Robert, i'll take a look at the new code, but I assume this can be used to solve my problem of not wanting the object released if the image demensions are different to the texture dimensions? Tom In your case this would be a small hack. After release of texture object, you can reuse it using new generateTextureObject method. For example: code osg::Texture::TextureObject* TextureSubloadCallback::generateTextureObject(const osg::Texture2D texture, osg::State state) const { const osg::Image *image = texture.getImage(); if(image image-data()) { texture.setNumMipmapLevels(1); int width = image-s(); int height = image-t(); texture.setTextureSize(width, height); return osg::Texture::generateTextureObject(texture, state.getContextID(),GL_TEXTURE_2D, texture.getNumMipmapLevels(),texture.getInternalFormat(),width,height,1,texture.getBorderWidth()); } else return osg::Texture2D::SubloadCallback::generateTextureObject(texture, state); } /code After that in load method you can check what texture object is already allocated and use subload instead load. Mikhail. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Reading/writing float data into an image
Hello guys, I'm trying to write and then read back float data from an image but for some reason only the last written data seems correct code: dirImage-allocateImage((int) vertices.size(), (int)vertices.size(), (int)vertices.size(), GL_RGB, GL_FLOAT); for ( unsigned int i = 0; i vertices.size(); i++) { osg::Vec3 pos = vertices[i]; (float )dirImage-data(i)[0] = pos.x(); (float )dirImage-data(i)[1] = pos.y(); (float )dirImage-data(i)[2] = pos.z(); std::coutactual.x ispos.x()std::endl; std::coutactual.y ispos.y()std::endl; std::coutactual.z ispos.z()std::endl; std::coutpos.x is(float )dirImage-data(i)[0]std::endl; std::coutpos.y is(float )dirImage-data(i)[1]std::endl; std::coutpos.z is(float )dirImage-data(i)[2]std::endl; } can anybody point out the mistake, sorry if its too silly. -- http://www.mahendragr.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Reading/writing float data into an image
Hi Mahendra , osgimage::data() returns an (unsigned char *) so the array indexing only steps one byte. use ((float *)dirImage-data(i))[0] = pos.x();//same effect ((float *)dirImage-data(i))[1] = pos.y();//different effect ((float *)dirImage-data(i))[2] = pos.z(); Laurens. On 10/15/2010 10:55 AM, Mahendra G.R wrote: Hello guys, I'm trying to write and then read back float data from an image but for some reason only the last written data seems correct code: dirImage-allocateImage((int) vertices.size(), (int)vertices.size(), (int)vertices.size(), GL_RGB, GL_FLOAT); for ( unsigned int i = 0; i vertices.size(); i++) { osg::Vec3 pos = vertices[i]; (float )dirImage-data(i)[0] = pos.x(); (float )dirImage-data(i)[1] = pos.y(); (float )dirImage-data(i)[2] = pos.z(); std::coutactual.x ispos.x()std::endl; std::coutactual.y ispos.y()std::endl; std::coutactual.z ispos.z()std::endl; std::coutpos.x is(float )dirImage-data(i)[0]std::endl; std::coutpos.y is(float )dirImage-data(i)[1]std::endl; std::coutpos.z is(float )dirImage-data(i)[2]std::endl; } can anybody point out the mistake, sorry if its too silly. -- http://www.mahendragr.com ___ 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] Threading issues with osgText
Hi Robert et al, I have already set DYNAMIC data variance to both the osgText::Text and the osg::Geode which holds the text. Crashes anyway. I have tried to replicate the error in a more simple environment than our production software. But no luck with getting crashes with the simple one. :/ The problem with debugging these type of threading issues are that the crashes aren't deterministic, sometimes we can add hundreds of texts to the scene before it crashes and sometimes it crashes when adding the first text to the scene. I will continue to dig into this problem. Hopefully I will find the root cause for the crashes soon. But thank you anyway! /Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32776#32776 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Reading/writing float data into an image
Hello Laurens, Thank you, you are correct it worked. Best regards, On Fri, Oct 15, 2010 at 11:23 AM, Laurens Voerman l.voer...@rug.nl wrote: Hi Mahendra , osgimage::data() returns an (unsigned char *) so the array indexing only steps one byte. use ((float *)dirImage-data(i))[0] = pos.x();//same effect ((float *)dirImage-data(i))[1] = pos.y();//different effect ((float *)dirImage-data(i))[2] = pos.z(); Laurens. On 10/15/2010 10:55 AM, Mahendra G.R wrote: Hello guys, I'm trying to write and then read back float data from an image but for some reason only the last written data seems correct code: dirImage-allocateImage((int) vertices.size(), (int)vertices.size(), (int)vertices.size(), GL_RGB, GL_FLOAT); for ( unsigned int i = 0; i vertices.size(); i++) { osg::Vec3 pos = vertices[i]; (float )dirImage-data(i)[0] = pos.x(); (float )dirImage-data(i)[1] = pos.y(); (float )dirImage-data(i)[2] = pos.z(); std::coutactual.x ispos.x()std::endl; std::coutactual.y ispos.y()std::endl; std::coutactual.z ispos.z()std::endl; std::coutpos.x is(float )dirImage-data(i)[0]std::endl; std::coutpos.y is(float )dirImage-data(i)[1]std::endl; std::coutpos.z is(float )dirImage-data(i)[2]std::endl; } can anybody point out the mistake, sorry if its too silly. -- http://www.mahendragr.com ___ 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 -- http://www.mahendragr.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems about osgOcean
Hi forks. I saw some pictures in the internet about osgocean and attracted by it's amazing effects. now I want try myself. I have compiled it, but some problems at run time. 1 When I run it via visual studio, I get information that can not load island.ive. But I have download the oceandata and put it into resources directory just like osgocean wiki told. 2 When I run it from bin directory by .exe, I get information that can not found plug-in to handle png files. But i already have gotten the libpng.lib file and set that directory by system variable. In both situations, the sky was not rendered. Could somebody give me some suggestions? Thanks for attention. Any answers will be appreciated! -- Best Regards! Yours Lee ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems about osgOcean
Hello Lee, Hi forks. I prefer to think of myself as a spoon. SPN! Sorry, I had to. :-) 1 When I run it via visual studio, I get information that can not load island.ive. But I have download the oceandata and put it into resources directory just like osgocean wiki told. If you run in Visual Studio, the default working directory is where the executable is located. If you go into the oceanExample's project properties, Debugging section, you can set the Working Directory to where the resources directory is located (the base of your osgOcean checkout), and then islands.ive and the skydome images should be found. 2 When I run it from bin directory by .exe, I get information that can not found plug-in to handle png files. But i already have gotten the libpng.lib file and set that directory by system variable. You need to have the OSG libraries and its dependencies on your system PATH. This means you need to put on your PATH the directory that contains osgXX-osg.dll and others, and the PNG plugin needs libpng13.dll which needs to be in your PATH as well. I generally copy the contents of the 3rdparty\bin directory into my OpenSceneGraph\bin directory so that I'm sure all OSG's dependencies will be found if OSG itself is. In both situations, the sky was not rendered. See above, the skydome images are in the resources folder and are PNG images, thus will only be found and loaded if a) you run the oceanExample from the correct working directory, and b) the png plugin can load them. 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] Save texture changes via fragment shader
Yeah, I understand it... but I can't work on a quad, because I need to compare the position of the picking and the vertex in the vertex shader, and depending on the distance between them make a new texture Doing on a quad, the resulting image would be the next: [Image: http://img836.imageshack.us/img836/3308/bakeoverride.jpg ] painting in areas of blank. I need a way to find the coordinates of the texture, having an vertex area of the model. With th picking, I get the position and texture coordinates... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32781#32781 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems about osgOcean
Hi J-S Thanks for your reply! I think fork is more sharp :). Ha, I am sorry for the wrong words. Actually, I found that the 3rd part lib I download from osg office site is not include the libpng(d).dll file. The libpng.dll I used is complied by the newest version download from libpng office site. It's libpng14(d).dll. Is this way any problem? On Fri, Oct 15, 2010 at 8:15 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hello Lee, Hi forks. I prefer to think of myself as a spoon. SPN! Sorry, I had to. :-) 1 When I run it via visual studio, I get information that can not load island.ive. But I have download the oceandata and put it into resources directory just like osgocean wiki told. If you run in Visual Studio, the default working directory is where the executable is located. If you go into the oceanExample's project properties, Debugging section, you can set the Working Directory to where the resources directory is located (the base of your osgOcean checkout), and then islands.ive and the skydome images should be found. 2 When I run it from bin directory by .exe, I get information that can not found plug-in to handle png files. But i already have gotten the libpng.lib file and set that directory by system variable. You need to have the OSG libraries and its dependencies on your system PATH. This means you need to put on your PATH the directory that contains osgXX-osg.dll and others, and the PNG plugin needs libpng13.dll which needs to be in your PATH as well. I generally copy the contents of the 3rdparty\bin directory into my OpenSceneGraph\bin directory so that I'm sure all OSG's dependencies will be found if OSG itself is. I have checked the setting, and both osgXX-osg.dll and 3rd plugin are all set corrected by PATH. But why the missing plug-in error disappear in Visual Studio way, while appear in .exe double clicked from bin directory way? In both situations, the sky was not rendered. See above, the skydome images are in the resources folder and are PNG images, thus will only be found and loaded if a) you run the oceanExample from the correct working directory, and b) the png plugin can load them. 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 Thanks for your suggestions! -- Best Regards! Yours Lee ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Save texture changes via fragment shader
OK, so we've finally arrived at your problem :) On 15/10/10 14:31, Aitor Ardanza wrote: Yeah, I understand it... but I can't work on a quad, because I need to compare the position of the picking and the vertex in the vertex shader, and depending on the distance between them make a new texture Doing on a quad, the resulting image would be the next: [Image: http://img836.imageshack.us/img836/3308/bakeoverride.jpg ] painting in areas of blank. I need a way to find the coordinates of the texture, having an vertex area of the model. With th picking, I get the position and texture coordinates... Check out the intersection code in osgmovie example in MovieEventHandler::handle. You get back the closest 3 vertices and a texture coordinate. I'm not sure what else you need. It should work on a complex model and a quad. jp -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32781#32781 ___ 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] Threading issues with osgText
Hi Björn, If setting the DataVariance to DYNAMIC doesn't fix the crash then it looks likely that the problem is elsewhere. I don't have an answer to what this might be, debugging problems like this is hard when you have the crashing app in front of you, without this it's just a case of educated guesses based on what caused problems in other apps previously. Robert. 2010/10/15 Björn Blissing bjorn.bliss...@vti.se: Hi Robert et al, I have already set DYNAMIC data variance to both the osgText::Text and the osg::Geode which holds the text. Crashes anyway. I have tried to replicate the error in a more simple environment than our production software. But no luck with getting crashes with the simple one. :/ The problem with debugging these type of threading issues are that the crashes aren't deterministic, sometimes we can add hundreds of texts to the scene before it crashes and sometimes it crashes when adding the first text to the scene. I will continue to dig into this problem. Hopefully I will find the root cause for the crashes soon. But thank you anyway! /Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32776#32776 ___ 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] [osgPlugins] use FFmpeg with Visual C++
Ok I have always problem to compile FFMpeg but it isn't the topic of this forum... I have found the release for Windows (with the link of Norman) and the plugin works perfectly ! Thanks for your help ! Cheers, Patrice -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32785#32785 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems about osgOcean
Hello Lee, I think fork is more sharp :). Ha, I am sorry for the wrong words. Hehe, it's fine, I didn't mean to make fun of your wording, it was just a funny slip. :-) Actually, I found that the 3rd part lib I download from osg office site is not include the libpng(d).dll file. It might be that the libpng in that 3rdparty zip was compiled to be a static-link library (no dll required). But if you want you can use the 3rdparty VC8 and copy the libpng13.dll from that, since libpng is a pure C library it doesn't matter which compiler it was compiled with. See here : https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/3rdParty_win32binaries_vs80sp1/bin/ The libpng.dll I used is complied by the newest version download from libpng office site. It's libpng14(d).dll. Is this way any problem? If you get another version of libpng, you will need to recompile (or at least relink) the OSG png loader plugin (osgdb_png(d).dll) using the lib file from that version. Otherwise it probably won't work, as first of all it will be looking for libpng13.dll, and even if you rename libpng14.dll to libpng13.dll (I'm not suggesting you do that, but if you did) the ABI is probably different which is why they changed the version number, so it wouldn't work anyways. 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] Stencil buffer and FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT
Hi JP, As soon as I attach an image, OSG crashes on me. The problem arises in FrameBufferObject::Pimpl::Pimpl. Code: // This code crashes osg::Texture2D *texture = new osg::Texture2D(); texture-setTextureSize(1024, 1024); texture-setInternalFormat(GL_DEPTH24_STENCIL8_EXT); osg::Image *image = new osg::Image(); image-allocateImage(1024, 1024, 1, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 1); texture-setImage(image); rttCamera-attach(osg::Camera::PACKED_DEPTH_STENCIL_BUFFER, image); The following code works, but only if I modify Texture2D.cpp Code: osg::Texture2D *texture = new osg::Texture2D(); texture-setTextureSize(1024, 1024); texture-setInternalFormat(GL_DEPTH24_STENCIL8_EXT); rttCamera-attach(osg::Camera::PACKED_DEPTH_STENCIL_BUFFER, texture); Fred -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32787#32787 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Intersecting volumes and terrain
Hi, I generate terrain using VPB and need to implement intersection lines like on attached picture (green lines that shows intersecton between cone and terrain). Could someone please give me a hint how to make it using osg? Thank you! Cheers, Roman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32788#32788 Attachments: http://forum.openscenegraph.org//files/1_201.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] changing the up direction of the SphericalManiuplator
I have been using the SphericalManipulator and it works really well for my application. One thing I would like to do is change which direction is up. The default is Z == up. Sometimes I want X to be up. If I understand the code, I need to make fairly extensive modifications to the existing manipulator. Before I start down that road, I just wanted to ask if that sounds right. I'm hoping I'm not missing some place where I obviously just need to apply some transformation matrix. I actually want my entire scene to go sideways, not just orbit up and down on my screen rather than right and left. For example, if I were modeling a pencil (coaxial the z axis), I sometimes want it standing on end, and sometimes lying on its side on my screen. I think I'm asking a question that has been asked before: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg33695.html Cory ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intersecting volumes and terrain
Hi, I haven't done this myself, but I believe the PolytopeIntersector will give you a list of points you are after. You need to define the planes that make up your volume and then use an IntersectionVisitor with the PolytopeIntersector to intersect agains your terrain. From there you can retrieve the intersection points. I know something similar is done in the osgSim::OverlayNode though I think its usage is more complex than yours. Cheers, Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Roman Grigoriev Sent: Saturday, 16 October 2010 1:32 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Intersecting volumes and terrain Hi, I generate terrain using VPB and need to implement intersection lines like on attached picture (green lines that shows intersecton between cone and terrain). Could someone please give me a hint how to make it using osg? Thank you! Cheers, Roman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32788#32788 Attachments: http://forum.openscenegraph.org//files/1_201.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org DISCLAIMER:--- This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than the intended recipient should not be deemed a waiver of any privilege or protection. Thales Australia does not warrant or represent that this e-mail or any documents, files and previous e-mail messages attached are error or virus free. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgDB::readNodeFile fails for IVE files, works in osgviewer
Hi, I am in the process of porting a program using OSG developed in Windows to Linux (Ubuntu 10.04), and I am not able to get the program to load my IVE files that were generated in Windows. However, the osgviewer program is able to open the files without problem, but my program won't. Every time I try using osgDB::readNodeFile with the relative path and absolute path to the file name, I get NULL returned. I'm using the latest source download of OSG 2.8.3 and running on an Intel Quad Core PC with 4 GB of RAM and an NVIDIA Graphics Card. Is there some extra step I need to take to make sure the IVE plugin is loaded properly? I converted the IVE to an OSG file and that works, but I don't want to have to convert all my files if I can avoid it. Thank you! Cheers, Daniel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32792#32792 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB::readNodeFile fails for IVE files, works in osgviewer
Hi Daniel, On 16/10/10 12:18 , Daniel Barber wrote: (Ubuntu 10.04), and I am not able to get the program to load my IVE files that were generated in Windows. However, the osgviewer program is able to open the files without problem, but my program won't. Every time I try using osgDB::readNodeFile with the relative path and absolute path to the file name, I get NULL returned. ... Is there some extra step I need to take to make sure the IVE plugin is loaded properly? I converted the IVE to an OSG file and that works, but I don't want to have to convert all my files if I can avoid it. Nothing necessary except calling osgDB::readNodeFile(). I'd suspect a different environment (LD_LIBRARY_PATH, OSG_FILE_PATH, etc). What do the logs say? Does it find the plugin? Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org