Re: [osg-users] Remove textures and texture coorindates.
On Thu, 23 Sep 2010 10:22:30 +0200, Robert Osfield wrote: Hi Joakim, I have never personally attempted to do these specific steps, but I guess it should work if non const get methods for the containers are available. Have you tried it? Yes, it is the non-const get methods. It seems to work. The reason I asked was to be sure that I didn't forget something... Thanks. Robert. On Thu, Sep 23, 2010 at 9:04 AM, Joakim Simonsson wrote: Hi, Is this the correct way to do it? Remove all textures from a StateSet: ss->getTextureAttributeList().clear(); ss->getTextureModeList().clear(); Remove all texture coordinates from a Geometry: geometry->getTexCoordArrayList().clear(); -- Joakim Simonsson ___ 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 -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Remove textures and texture coorindates.
Hi, Is this the correct way to do it? Remove all textures from a StateSet: ss->getTextureAttributeList().clear(); ss->getTextureModeList().clear(); Remove all texture coordinates from a Geometry: geometry->getTexCoordArrayList().clear(); -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv.exe textures getting mangled
Gotta go now. See what I can do tomorrow. On Thu, 06 Aug 2009 15:24:40 +0200, Mach Bhai wrote: If you can do that, it would be very kind of you. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv.exe textures getting mangled
On Thu, 06 Aug 2009 14:55:12 +0200, Mach Bhai wrote: I will want to go with the first approach and add support for writing compressed textures. So how can I go about uncompressing this data ? Any clues ? You have to write an S3TC uncompressor. I have done this in a school project some years ago... If you want I can try to dig up that code. and thanks for your help. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv.exe textures getting mangled
You are using compressed textures in the ive file, right? I figured out that the rgb plugin can't write compressed textures. The only pixel formats that are supported are: GLenum pixelFormat = img.getPixelFormat(); raw.sizeZ = pixelFormat == GL_COLOR_INDEX? 1 : pixelFormat == GL_RED? 1 : pixelFormat == GL_GREEN? 1 : pixelFormat == GL_BLUE? 1 : pixelFormat == GL_ALPHA? 1 : pixelFormat == GL_RGB? 3 : pixelFormat == GL_BGR ? 3 : pixelFormat == GL_RGBA? 4 : pixelFormat == GL_BGRA? 4 : pixelFormat == GL_LUMINANCE? 1 : pixelFormat == GL_LUMINANCE_ALPHA ? 2 : 1; When an compressed pixelformat (0x83f0) is encountered, it is treated as an unknown pixel format. And hence 1 is used for sizeZ... On Thu, 06 Aug 2009 14:42:03 +0200, Mach Bhai wrote: So how can this issue be resolved ? The issue can be solved by extending the rgb plugin, so that it can write compressed textures. OR Don't compress your textures when you create the ive file... -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv.exe textures getting mangled
No, it is not possible. The current osg implementation looks for the filename extension for the texture inside the .ive file. If the texture originally was an .rgb texture, it will try to write it to that format as well. On Thu, 06 Aug 2009 14:17:43 +0200, Mach Bhai wrote: Yes i am also getting rgb files. It might be that something is wrong with that plugin but i cannot verify. Can we specify the format of the texture ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15904#15904 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv.exe textures getting mangled
On Thu, 06 Aug 2009 14:00:15 +0200, Joakim Simonsson wrote: On Thu, 06 Aug 2009 10:31:57 +0200, Mach Bhai wrote: Hi, I have a model in ive format and osgviewer displays it fine. However if i convert it to osg, i get black and white shaded files as textures, which are of no use. I am using osgconv.exe with the following command line osgconv.exe -e osg -O OutputTextureFiles -O precision:0.001 model.ive model.osg Try osgconv.exe -e osg -O "OutputTextureFiles precision 4" model.ive model.osg precision takes an integer multiple options are space separated When I try the OutputTextureFiles option, I also get black and white striped textures. What image format do you use? I use .rgb. If you also use .rgb, perhaps it is something with the .rgb plugin... -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv.exe textures getting mangled
On Thu, 06 Aug 2009 10:31:57 +0200, Mach Bhai wrote: Hi, I have a model in ive format and osgviewer displays it fine. However if i convert it to osg, i get black and white shaded files as textures, which are of no use. I am using osgconv.exe with the following command line osgconv.exe -e osg -O OutputTextureFiles -O precision:0.001 model.ive model.osg Try osgconv.exe -e osg -O "OutputTextureFiles precision 4" model.ive model.osg precision takes an integer multiple options are space separated -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] View textures in GFX mem.
Hi, I wonder if someone has a suggestion how to view what textures have been uploaded to the gfx mem. I know the software gDEBugger has the possibility to do this. But is there another way? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Edge blending
On Wed, 15 Oct 2008 11:24:13 +0200, su hu wrote: Hi Robert Thanks for your reply. I will see the osghud example and try your method. Thanks. But due to projector's black level, really dark scenes will not look good with only software edgeblending. In these cases, you have to put something that shields the light in front of the projector's lens. With this way, you achieve mechanical edge-blending. However, software edge blending and mechanical edge blending can be combined to get an even better result. Best Regards, Su Hu 2008/10/15 Robert Osfield Hi Su Hu, I haven't personally implemented edge blending yet, but it should be straight forward. All you need to do is render a alpha blending quad over the edge of window as a HUD. See the osghud example for inspiration. Robert. On Wed, Oct 15, 2008 at 9:18 AM, su hu wrote: > Hi all, > > I want to implement edge blending by osg, but I don't know which way is > better. Our requirement of edge blending is simple: overlapped area of two > screens is rectangular. > > If someone has done it, please give me some advice. > > Much appreciation to any reply. > > Regards, > > Su Hu > > ___ > 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 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mirrored camera
On Mon, 02 Mar 2009 15:50:41 +0100, Ufuk wrote: Hi Joakim, in examples osgcamera, in function: void multipleWindowMultipleCameras(osgViewer::Viewer& viewer, bool multipleScreens) i tried this code sample: if (i != 2) viewer.addSlave(camera.get(), osg::Matrix::scale(aspectRatioScale, 1.0, 1.0)*osg::Matrix::translate(translate_x, 0.0, 0.0), osg::Matrix() ); else viewer.addSlave(camera.get(), osg::Matrix::scale(-1.0 * aspectRatioScale, 1.0, 1.0)*osg::Matrix::translate(translate_x, 0.0, 0.0), osg::Matrix() ); camera which has id 2 become mirrored. is it something that you want? Yes, and I have done this in my app as well. But the thing is, cow.osg uses double sided polygons. If you edit cow.osg. On line 17: change GL_CULL_FACE OFF to GL_CULL_FACE ON Then you will render the front face only. If you then run your modded version of osgcamera, then you will see that the mirrored cameras render the backfaced polygons (i.e. the inside of the cow) So this is not a general solution. I will try to add unique groups that contains my shared scene graph for each camera, and give them different osg::FrontFace attributes. It seems that the stateset of the cameras are ignored for their underlying scenegraph. So adding groups for each camera, seems to be the only solution. On Mon, Mar 2, 2009 at 4:46 PM, Joakim Simonsson wrote: On Mon, 02 Mar 2009 15:37:07 +0100, Mathias Fröhlich < m.froehl...@science-computing.de> wrote: Hi, On Monday 02 March 2009 15:24, Joakim Simonsson wrote: Is it possible to use two cameras, where one is mirrored, that share the same scene? You should be able to have that attached either to the camera itself, the mirrored one (is this true, or are the StateSets at the camera something special - I dont remember by heart?). I tried to attach that stateattribute to the mirrored camera only. But it does not seem to work. Or attach a group to the camera that is not shared , apply that state at this group and attach the shared graph to those two groups. I'll go for the group approach. Thanks for your help. -- Joakim ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mirrored camera
On Mon, 02 Mar 2009 15:37:07 +0100, Mathias Fröhlich wrote: Hi, On Monday 02 March 2009 15:24, Joakim Simonsson wrote: Is it possible to use two cameras, where one is mirrored, that share the same scene? You should be able to have that attached either to the camera itself, the mirrored one (is this true, or are the StateSets at the camera something special - I dont remember by heart?). I tried to attach that stateattribute to the mirrored camera only. But it does not seem to work. Or attach a group to the camera that is not shared , apply that state at this group and attach the shared graph to those two groups. I'll go for the group approach. Thanks for your help. -- Joakim ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mirrored camera
I have created a slave camera. It should represent a rear mirror on a vehicle. See osg::FrontFace and the the man page of glFrontFace. Thank you for your tip, its much better to use that StateAttribute. But... I am not able to apply it just for one slave camera. As I wrote in my previous mail, I use two cameras that share the same scene (where one camera is mirrored) So, my question still is: Is it possible to use two cameras, where one is mirrored, that share the same scene? -- Joakim ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mirrored camera
Hi all, I have created a slave camera. It should represent a rear mirror on a vehicle. It uses the master camera's scene data. Its projectionMatrix offset is osg::Matrixd::scale(-1.0, 1.0, 1.0), so that its view is mirrored. But by using this offset projection matrix, every polygon's back face is rendered instead of their front face. I can modify the stateset of the master camera, such that double sided rendering is enabled: viewer->getCamera()->getOrCreateStateSet()->setMode(GL_CULL_FACE, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF); However, this results in rendering double sided polygons for all my cameras. Trying to modify the stateset of a slave camera does not seems to affect the scene: viewer->getSlave(0)._camera->getOrCreateStateSet()->setMode(GL_CULL_FACE, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF); So my question is: Is it possible to use two cameras, where one is mirrored, that share the same scene? -- Joakim ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Precompile GL objects problems...
On Mon, 23 Feb 2009 18:31:54 +0100, Robert Osfield wrote: Yes a complete recompile traversal will be done, but if objects are already compiled they won't be compiled again. If you do want to just compile you new elements then you could a a custom GraphicsOperation to the GraphicsContext's GraphicsThread. Another alternative would be to use a CompileContext to allow you to compile the new subgraph asynchronously. Finally you could look at use the DatabasePager to load and precompile you data. Thanks Robert! -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Precompile GL objects problems...
On Mon, 23 Feb 2009 17:38:35 +0100, Robert Osfield wrote: You can only compile OpenGL objects form the thread with the context current. The easist way to do this would be to just use the existing osgViewer::Renderer::setCompileOnNextDraw(true) functionality on all your active cameras. You can get the renderer by doing: Thanks for your advice! I looked in the osgViwer::Renderer code. And it seems that the entire sceneview is compiled in osgViewer::Renderer::compile(). In my scenario, I first load a huge database. Then during the simulation, I load smaller objects and add them to my existing scene graph. I was just wondering if it is an overkill to compile the entire sceneview for each smaller object that I load during runtime. Wouldn't it be enough to only compile my added objects, before I add them to my existing scene graph? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Precompile GL objects problems...
Hi, I use 4 screens (running on two nvidia cards). When I don't precompile the gl objects things look as expected. But when I precompile stuff, things are shown only on some graphic contexts. 1. I am loading models on my own background thread. 2. This is what I do on the "main" thread, before the update traversal: osgUtil::GLObjectsVisitor glov; glov.setNodeMaskOverride(0x); osgViewer::Viewer::Contexts graphicContexts; myViewer->getContexts(graphicContexts); for (osgViewer::Viewer::Contexts::iterator it = graphicContexts.begin(); it != graphicContexts.end(); ++it) { glov.setState((*it)->getState()); glov.apply(*loadedNode); } Finally I add "loadedNode" to the scenegraph. Is this the wrong approach? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multiple graphics contexts hurting performance?
Hi Joe, Yesterday, I setup a new system with 2 GeForce GTX 280 cards and four monitors. The OS is Vista x64. I just read your previous posting and I can confirm the exactly same problems. Now I am about to install XP (and Ubuntu) to see if it runs better with four monitors there. Have you done any more discoveries since you wrote this mail? Are you able to run multiple contexts with good performance now? On Fri, 31 Oct 2008 17:16:10 +0100, Joe Lyga wrote: Hi osg-users, I'm having another issue with my four monitor setup with 2 graphics cards. Now that I'm running Windows XP, I'm past the OS/Driver issue that was slowing down both osg-viewer and my program when it was being displayed in one graphics context across all four monitors. However, now I'm having a problem when trying to run with more than one graphics context. My machine is running Windows XP that has two Geforce 8800 GTX graphics cards. I'm running these cards with SLI disabled so I can hook up 4 monitors, with 2 on each graphics card. I have my 4 monitors aligned side by side in display properties, each set to 1400 x 1050 resolution. I have vsync turned off. Anyway, when I'm running in one 5600 x 1050 graphics context (which is across all four monitors), I'm getting around 140 frames per second . If I switch it so there are two 2800 x 1050 graphics contexts, the performance drops to around 14 frames per second. Also, the draw and gpu reads almost 10 times what it did with a single context . Does anyone have any insight on why two graphics contexts would be slowing down my program? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Precipitation effect coming too fast, and hiding on some areas
Hi Fred, On Sat, 13 Dec 2008 17:02:38 +0100, Frederic Bouvier wrote: If you want to see this funny effect in action, watch this video http://www.vimeo.com/2511328 ( move forward to 5:00 ) Very nice vid. But besides from raining inside the plane, it seems that the rain particles are "too vertical" - like the particles have a transform that follows the camera. Hmm.. I don't know, but you would expect horizontal rain at high speeds. I managed to get "horizontal rain" with the osg's precepitation effect. But maybe "vertical rain" is your intent? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Stats crashes on windows
Is there anybody else here who can easily crash osgViewer when pressing 's' 3 or 4 times? I'm running quite a complex model, and I can reproduce the crash everytime. I can reproduce it on both WinXP and Vista x64. Sometimes it crashes when 's' has been pressed 3 times, and sometime when it is presses 4 times. When using a simpler model, it is more difficult to make it crash. If the camera is standing still and I display the detailed stats, it doesn't seem to crash. But as soon as I start to move around it crashes. It is in stl's vector header file where things stops: _DEBUG_ERROR("vector iterator not dereferencable"); Callstack is attached as a text file, so unwanted linebreaks are avoided. Oh.. By the way... I just discovered that the crashes does not seem to appear when running single threaded... -- Joakim Simonssonmsvcp80d.dll!std::_Debug_message(const wchar_t * message=0x01a75578, const wchar_t * file=0x01a74ec8, unsigned int line=99) Line 24 osg51-osgUtild.dll!std::_Vector_const_iterator >::operator*() Line 99 + 0x14 bytes osg51-osgUtild.dll!osgUtil::RenderBin::getStats(osgUtil::Statistics & stats={...}) Line 518 + 0x17 bytes osg51-osgUtild.dll!osgUtil::RenderBin::getStats(osgUtil::Statistics & stats={...}) Line 538 + 0x1d bytes osg51-osgUtild.dll!osgUtil::RenderStage::getStats(osgUtil::Statistics & stats={...}) Line 1296 + 0xc bytes osg51-osgUtild.dll!osgUtil::SceneView::getStats(osgUtil::Statistics & stats={...}) Line 1694 osg51-osgViewerd.dll!osgViewer::CameraSceneStatsTextDrawCallback::drawImplementation(osg::RenderInfo & renderInfo={...}, const osg::Drawable * drawable=0x08d3f7f0) Line 359 + 0x1e bytes osg51-osgd.dll!osg::Drawable::draw(osg::RenderInfo & renderInfo={...}) Line 896 + 0x27 bytes osg51-osgUtild.dll!osgUtil::RenderLeaf::render(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * previous=0x03d4bb60) Line 60 + 0x19 bytes osg51-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x03d4bb60) Line 419 + 0x19 bytes osg51-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x03d4bb60) Line 384 + 0x17 bytes osg51-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x03d4bb60) Line 469 + 0x35 bytes osg51-osgUtild.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x03d4bb60) Line 1253 osg51-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x03d4bb60) Line 384 + 0x17 bytes osg51-osgUtild.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x03d4bb60, bool & doCopyTexture=false) Line 848 osg51-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x03d4bb60) Line 1108 + 0x1b bytes osg51-osgUtild.dll!osgUtil::SceneView::draw() Line 1504 + 0x37 bytes osg51-osgViewerd.dll!osgViewer::Renderer::cull_draw() Line 545 + 0xf bytes osg51-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext * context=0x0a4a8d28) Line 646 + 0xf bytes osg51-osgd.dll!osg::GraphicsContext::runOperations() Line 688 + 0x33 bytes osg51-osgd.dll!osg::RunOperations::operator()(osg::GraphicsContext * context=0x0a4a8d28) Line 135 osg51-osgd.dll!osg::GraphicsOperation::operator()(osg::Object * object=0x0a4a8d28) Line 50 + 0x19 bytes osg51-osgd.dll!osg::OperationThread::run() Line 413 + 0x26 bytes osg51-osgd.dll!osg::GraphicsThread::run() Line 40 ot11-OpenThreadsd.dll!OpenThreads::ThreadPrivateActions::StartThread(void * data=0x0a752994) Line 113 + 0xf bytes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] You have three guess...
1. Could it be the VNC client plugin? On Mon, 17 Nov 2008 17:08:47 +0100, Robert Osfield <[EMAIL PROTECTED]> wrote: For a bit of fun see if you can explain the attached screenshot... If if you get that right your next challange is explain exactly how I went about writing this email... Robert -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mail Headers
Sorry for another mail that does not contain anything about OSG. But I can't resist since the word "headers" was mentioned in the "Migrating to Forum" thread. After the OSG mailinglist changed from <[EMAIL PROTECTED]> to my mail client has complained a bit (Opera mail-client). I think I've tracked it down in the mail header. The reason is that the "List-Id:"-element in the header does not comply with RFC standards. The current header looks like this: List-Id: "OpenSceneGraph Users" But I think it should be changed to this: List-Id: "OpenSceneGraph Users" I.e. the format: list-label "." list-id-namespace Where, list-label: a list label (osg-users) list-id-namespace: domain-name(lists.openscenegraph.org) The disadvantage to change the List-Id is: 1. Some sofisticated mail-clients could recognize the list as a different list. The advantages is: 1. It will comply to RFC 2919 http://www.ietf.org/rfc/rfc2919.txt 2. My (and potentially others) mail-clients (that strictly utilize RFC standards) will be more happy. Comments? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] StateSet - newbie
It seems that you are now using the shader you are expecting. But you have error in your GLSL code... Try replace the GLSL code, with a simple "Hello World" GLSL example. Just to see that the GLSL code compiles correctly. On Thu, 16 Oct 2008 00:08:59 +0200, ami guru <[EMAIL PROTECTED]> wrote: Hi Joakim, Thats the error with the previous suggestion *' FRAGMENT glCompileShader "" FAILED But works fine if i have the following instead... ref_ptr nodess3 (myshapegeode3->getOrCreateStateSet()); I doubt that the above line compiles. You should use the clone function if you want to copy things. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] StateSet - newbie
On Wed, 15 Oct 2008 23:48:40 +0200, ami guru <[EMAIL PROTECTED]> wrote: //create a new stateset //with the default setting capsuleState->setAttribute(capsuleProgramObject.get()); Every thing look correct, but I am not sure about this line. Try this one instead: capsuleState->setAttributeAndModes(shaderNightDriving.get()); -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] StateSet - newbie
On Wed, 15 Oct 2008 22:43:14 +0200, ami guru <[EMAIL PROTECTED]> wrote: Hello forum Is there any difference between these following: 1. osg::ref_ptr nodess3 = new StateSet((myshapegeode3->getOrCreateStateSet())); 2. osg::ref_ptr nodess3((myshapegeode3->getOrCreateStateSet())); Yes they differ. But do you want to do? Copy the stateset? If you want to share the stateset (for example, edit myshapegeode3's stateset) do this: osg::ref_ptr nodess3 = myshapegeode3->getOrCreateStateSet(); If you want to copy it, do this: osg::ref_ptr nodess3 = myshapegeode3->getOrCreateStateSet()->clone(osg::CopyOp::DEEP_COPY_ALL)); -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Multiple Graphicscards - windows
Hi, Is it possible, on Windows, to use two GeForce cards (not Quadro) with dual outputs, so the total number of monitors will be 4? Have anybody here tried this? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Calculate BoundingBox
Wow! Thanks for the extremely fast answer :) På Tue, 05 Aug 2008 14:02:06 +0200, skrev Gordon Tomlinson <[EMAIL PROTECTED]>: Heres an old exmaple http://www.3drealtimesimulation.com/osg/code/osgcode_bbox1.htm -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joakim Simonsson Sent: Tuesday, August 05, 2008 7:59 AM To: OpenSceneGraph Users Subject: [osg-users] Calculate BoundingBox Hi, I've made a NodeVisitor that should calculate the bounding box of a Node. Here is the apply function: void ComputeBoundingBox::apply(osg::Geode& node) { for(unsigned int i = 0; i < node.getNumDrawables(); ++i) { m_bb.expandBy(node.getDrawable(i)->getBound()); } traverse(node); } Where m_bb is an osg::BoundingBox. This works perfectly if the scene graph does not contain any transforms. If the scene graph contains transform, the geometry is not transformed prior the "expandBy" function. The result of this, is of course a bad bounding box. What is the best way to calculate a bounding box? -- Joakim Simonsson ___ 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 -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Calculate BoundingBox
Hi, I've made a NodeVisitor that should calculate the bounding box of a Node. Here is the apply function: void ComputeBoundingBox::apply(osg::Geode& node) { for(unsigned int i = 0; i < node.getNumDrawables(); ++i) { m_bb.expandBy(node.getDrawable(i)->getBound()); } traverse(node); } Where m_bb is an osg::BoundingBox. This works perfectly if the scene graph does not contain any transforms. If the scene graph contains transform, the geometry is not transformed prior the "expandBy" function. The result of this, is of course a bad bounding box. What is the best way to calculate a bounding box? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] What is K-tree?
http://en.wikipedia.org/wiki/Kd_tree På Mon, 04 Aug 2008 12:56:23 +0200, skrev GMD GammerMaxyandex.ru <[EMAIL PROTECTED]>: What is K-tree? I searched information about in the Internet but found nothing. Could you give me some links to the articles about this theme? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering to multiple graphics cards
On Tue, 01 Jul 2008 17:59:59 +0200, Bob Balfour <[EMAIL PROTECTED]> wrote: Joakim Simonsson wrote: On Tue, 01 Jul 2008 00:34:09 +0200, Bob Balfour <[EMAIL PROTECTED]> wrote: The scene achieves 60Hz at times, but feels choppy, and I notice the middle two GPUs at times show long orange bars, which are killing the 60Hz rate. This is probably obvious for you, but the "fancy" aero rendering is turned off, right? I set the theme to "windows classic", which I assumed would do away with the aero stuff (with no discernible difference), but is there something else to specifically turn off? No, with turning aero "off", I meant to switch to classic. When having aero on, i have discovered that osgviewer reports 60hz, but the real frame rate i clearly bellow 60hz. or 2 double-wide screens (screen 0 & 2, each set to 2880x900). Note that in the Vista display settings all 4 screens are set up as 1 big "extended desktop". How do you configure "extended desktop" in Vista? I mean, microsoft (or nvidia) has removed the horizontal/vertical span possibility. But if I understand you correctly, there is a possibility to "fool" vista, so it believes your multiple monitors is only one monitor with a very large resolution? rt.click desktop->Personalize->Display Settings (Monitor tab) shows 4 monitors that you can select, then check the "Extend the desktop onto this monitor" box. So if you have 4 1024x768 monitors. Can you make Vista believe that you have ONE 2048x1536 or 4096x768 monitor? (as with nvidia's vertical/horizontal span) rotates with a discernible choppiness. Is Microsoft punishing me for disabling dwm? That is strange. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering to multiple graphics cards
On Tue, 01 Jul 2008 00:34:09 +0200, Bob Balfour <[EMAIL PROTECTED]> wrote: The scene achieves 60Hz at times, but feels choppy, and I notice the middle two GPUs at times show long orange bars, which are killing the 60Hz rate. This is probably obvious for you, but the "fancy" aero rendering is turned off, right? or 2 double-wide screens (screen 0 & 2, each set to 2880x900). Note that in the Vista display settings all 4 screens are set up as 1 big "extended desktop". How do you configure "extended desktop" in Vista? I mean, microsoft (or nvidia) has removed the horizontal/vertical span possibility. But if I understand you correctly, there is a possibility to "fool" vista, so it believes your multiple monitors is only one monitor with a very large resolution? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FOI Postmaster (hacked???)
H... There is a controversial law that recently have beeing approved in Sweden. This law ables the intelligence service FRA to legally eavesdrop every Swedish citizen, telehpone, internet, sms, etc. I read yesterday in Swedish newspaper that the guys behind thepiratebay.org have contacted major ISP's around the world, to block or restrict their traffic to Sweden. (Because everything sent to Sweden could be read by FRA) That your mails are forwarded to FOI, is strange. But, of course, it could be just a coincidence and have nothing to do with the FRA. Can you access Swedish websites? On Mon, 23 Jun 2008 14:59:34 +0200, Art Tevs <[EMAIL PROTECTED]> wrote: Hi folks, sorry, it seems there is something wrong with my email account. Every time I write something to the list my mails are forwarded to some "Swedish Defence Research Agency, FOI" I think I was hacked ;) I checked my mail settings and there is nothing suspicious. Maybe somebody of you have some hint for me ??? Cheers, Art __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to control a car in a big scene?
This tutorial is a good start: http://faculty.nps.edu/jasullivan/osgtutorials/ On Mon, 23 Jun 2008 14:48:29 +0200, Zoltán <[EMAIL PROTECTED]> wrote: 浣曚紵 wrote on Monday 23 June 2008: I load a car model in a big scene,i want to control the car like the camera in the DriveManipulator. Anybody give me a hint? Same question here: I would like to write a Space-shuttle simulator landing on Venus, can anybody give me a hint ? Please ? Zoltán -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgmovie with mpgs or avis on windows
I tried the quicktime plugin for the first time yesterday. I tried with mov and mp4 movies. But I had to specify -e qt as an argument. Does it work for you if you specify the same argument? Den 2008-06-10 13:07:57 skrev David De Weerdt <[EMAIL PROTECTED]>: Hi all, I use osg 2.4 and followed http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio/VisualStudioPluginsfor installing the quicktime plugin. However, it seems that mpg/avi support in the quicktime plugin is not supported under windows. Also xine is probably not an option as I understand that nobody managed to get xine running with osg yet (on windows). So my question is: is there currently a reasonable way on windows to run the osgmovie example with an mpg/avi? Thanks, David DW -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video in osg on Windows
Does the xine and qt plugins work under windows? The qt plugin runs under windows - once you have quicktime installed. Ok thanks! -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Video in osg on Windows
Does the xine and qt plugins work under windows? If no, is there a way to use a video-texture in Windows compiled osg? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cullvisitor problems
Hi Joakim! I know what's wrong here. The geode, which has the cull callback, has an absolute reference frame. That's why you don't get the expected values from the cullvisitor. On Fri, 09 May 2008 17:34:18 +0200, Joakim Simonsson <[EMAIL PROTECTED]> wrote: I've done this before, several times, but now I can't see where the problem is. What I want is simply to get the modelviewmatrix from the cullvisitor. But it returns the identity matrix. The viewpoint and modelviewmatrix are unchanged even if I move the camera around. // Attach callback geode->setCullCallback(new MyCullCallback()); class MyCullCallback : public osg::NodeCallback { public: MyCullCallback() : osg::NodeCallback() { } void operator () (osg::Node* node, osg::NodeVisitor* nv) { osgUtil::CullVisitor* cv = dynamic_cast(nv); if(cv) { cv->getModelViewMatrix(); // Returns identity matrix. cv->getViewPoint(); // Returns (0,0,0) } ... Is not this the way to do it? What am I missing? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Cullvisitor problems
I've done this before, several times, but now I can't see where the problem is. What I want is simply to get the modelviewmatrix from the cullvisitor. But it returns the identity matrix. The viewpoint and modelviewmatrix are unchanged even if I move the camera around. // Attach callback geode->setCullCallback(new MyCullCallback()); class MyCullCallback : public osg::NodeCallback { public: MyCullCallback() : osg::NodeCallback() { } void operator () (osg::Node* node, osg::NodeVisitor* nv) { osgUtil::CullVisitor* cv = dynamic_cast(nv); if(cv) { cv->getModelViewMatrix(); // Returns identity matrix. cv->getViewPoint(); // Returns (0,0,0) } ... Is not this the way to do it? What am I missing? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How I build OSG on WinXP (WAS Freetype plugin doesn't appear in project list)
Nice! On Wed, 07 May 2008 19:37:41 +0200, Mike Weiblen <[EMAIL PROTECTED]> wrote: 1) svn checkout https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/osgbuilds/tags/osg2.4.0_vs80sp1_setup_2008-04-28 It goes smooth until: svn: REPORT-förfrågan misslyckades till "/svnroot/osgtoy/!svn/vcc/default" svn: REPORT till '/svnroot/osgtoy/!svn/vcc/default': Could not read response body: Secure connection truncated (https:// osgtoy.svn.sourceforge.net) It's an error message partial in Swedish (but that's not you fault, that it is in Swedish I mean...) The first line says something like this: REPORT-query failed to "/svnroot/osgtoy/!svn/vcc/default" I'll wait to do step 2, 3, 4, and 5 until you figure out what is wrong. Then I will try out your batch files :) BTW, is it possible to build static with your BATs? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange polygon flickering
The artifact you are experincing is called z-fighting. Your graphicscard does not know if the truck is above or bellow the ground. There are several solutions to you problem: 1. Make sure that your view frustum isn't to large! Push the near plane as far away as possible from the camera (and the far plane as close as possible). Osg adjusts the near and far planes automatically. So if you have objects close to the camera and far away from the camera, you will have a large frustum. 2. Put the terrain in one renderbin and your vehicles in another. Disable depth testing on the terrain, so that it is always drawn first. If there is a chance that your vehicle can be occluded by the terrain (tunnel), this is a bad technique. On Wed, 07 May 2008 19:40:07 +0200, Brian <[EMAIL PROTECTED]> wrote: Hi, I have a scene that contains a large terrain database and some vehicles. The scene is being viewed from a very high altitude using very small horizontal and vertical FOVs so that the camera is zoomed in on the truck. I've noticed that if I have the truck pictured in the attachment so that its wheels are on the terrain, I get a strange flickering of polygons (imagine going back and forth between images truck1.jpg and truck2.jpg.) If I raise the truck about 5 meters off the ground, then the flickering goes away. However, having a truck float five meters off the ground isn't terribly realistic. Any clues as to what is going on? Thanks, Brian -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Filling colors into a Drawn object
Hi, How do we fill colors in a drawn object.Here I am trying to draw a circle and also I want to fill it with yellow color. The only way to "fill" a circle is to build polygons. One polygon would be enough, since the circle shape is convex. With other words, change the primitive set on this line: (could be POLYGON, not sure, check the src) osg::DrawElementsUInt( osg::PrimitiveSet::LINE_LOOP, 0 ); If you want an edge on your circle, you can use your line loop in addition to the poly. Texture coordinates. Well, they pretty much depend on you texture. If you don't use a texture, don't set up the texture array. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to load VRML file in OSG?
On Wed, 07 May 2008 18:10:43 +0200, 이정석 <[EMAIL PROTECTED]> wrote: Hi all. I encounter with VRML file (*.wrl) I have to load this VRML file on OSG. How am I suppose to do? Is there good example? even simple. Thanks to everybody read my naive questions. :-) First, be sure that you compiled the vrml plugin, and that it resides in you environmet path. You don't say if you want to load your model from console or programmatical. From a console, type: osgviewer.exe youfile.wrl To see how this is achieved programmatical, have a look in the source code to osgviewer (applications\osgviewer\osgviewer.cpp). This line is relevant for you: osg::ref_ptr loadedModel = osgDB::readNodeFile("youfile.wrl"); -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Load all 6 images from cubemap dds.
Roland, Thanks for the info! On Mon, 05 May 2008 19:46:18 +0200, Smeenk, R.J.M. (Roland) <[EMAIL PROTECTED]> wrote: Joakim, I sent in a submission last year for loading complete cubemaps from DDS files. That submission affects important parts of the osg core and therefore Robert put it on the stack, which in practice means that it won't be merged soon. kind regards, Roland Smeenk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joakim Simonsson Sent: maandag 5 mei 2008 15:03 To: osg-users@lists.openscenegraph.org Subject: [osg-users] Load all 6 images from cubemap dds. Hi, I have a dds file containing a cube map, that is six images that are embedded in the file. However, when I read it: osg::ref_ptr image = osgDB::readImageFile("cubemap.dds"); the image returned is only the FIRST image of the embeded images. Is there a way to load the other 5 images? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Load all 6 images from cubemap dds.
Hi, I have a dds file containing a cube map, that is six images that are embedded in the file. However, when I read it: osg::ref_ptr image = osgDB::readImageFile("cubemap.dds"); the image returned is only the FIRST image of the embeded images. Is there a way to load the other 5 images? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Crossfade between two texture layers
Brilliant! And by having a look in MultiTextureControl.cpp I understand how TexEnvCombine should be setup. But I don't want to invent the wheel again, so I go for your MultiTextureControl node! :) On Tue, 04 Mar 2008 13:44:38 +0100, Robert Osfield <[EMAIL PROTECTED]> wrote: > Hi Joakim, > > The easiest way is to use the osgFX::MultiTextureControl node as this > allows you to set the relative weights to use for each texture unit. > It just so happens that yesterday I wrote and checked in an > osgmultitexturecontrol example as well - this example adjusts the > weights as you change height so different layers fade in at different > heights. > > Robert. > > On Tue, Mar 4, 2008 at 12:39 PM, Joakim Simonsson <[EMAIL PROTECTED]> > wrote: >> >> Hello all OSGers! >> >> I have two simple questions. >> >> >> Question 1: >> >> I have two texture layers, L0 and L1 >> >> What is the best way in OSG to crossfade between these? >> >> What I want is: L0 * (a) + L1 * (1 - a) >> >> I think it must be either osg::TexEnv or osg::TexEnvCombine. But how >> should they be setup? >> >> >> >> Question 2: >> Is it more efficient to do this operation in a shader? >> >> >> -- >> Joakim Simonsson >> ___ >> 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 -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Crossfade between two texture layers
Hello all OSGers! I have two simple questions. Question 1: I have two texture layers, L0 and L1 What is the best way in OSG to crossfade between these? What I want is: L0 * (a) + L1 * (1 - a) I think it must be either osg::TexEnv or osg::TexEnvCombine. But how should they be setup? Question 2: Is it more efficient to do this operation in a shader? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OT : http://www.andesengineering.com
On Wed, 27 Feb 2008 15:26:48 +0100, Gordon Tomlinson <[EMAIL PROTECTED]> wrote: > Having issues getting to Don's site from work, this has been going on > for a > while > I got our IT folks to look at it this morning and they are saying its not > them but Verizon, > Basically they are saying when you trace the IP it goes to Verizon the > hopes > to an IP in Sweden and dies there > I was wondering if any other OSG user who may have Verizon as there ISP > can > see http://www.andesengineering.com > I know the site can be seen I can see it on my cell , just find it > annoying > not being able to get places from work > thanks. I don't have Verizon as my ISP, and I can access http://www.andesengineering.com. But take a look at this: http://who.is/whois-com/ip-address/andesengineering.com/ and compare with http://who.is/whois-org/ip-address/openscenegraph.org/ On andesengineering, it says ERROR: No route to host (113) So it could be that the error is related to andesengineering.com or their ISP. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] opengl to opengles
Maybe i'm telling you things that you already know, But if you're target device is albe to run java me apps (most mobile phones), you should consider m3g. Which is a (jave me) scenegraph API built on top of OpenGL ES. On Tue, 22 Jan 2008 11:44:19 +0100, Charles, Oliver <[EMAIL PROTECTED]> wrote: > Hello, > > We try to port openscenegraph to a device where only opengl es is > available. > Does anyone know if this was tried before? And if - if the sources are > available? > If not - does anyone have experience or any hints with porting opengl > applications to opengl es? > The problem in detail is that many of the opengl functions used by > openscenegraph are not available on opengl es , eg GL_POLYGON, Shading > or any functions introduced in OpenGl 2.0. Is there any well performing > algorithm to replace for example GL_POLYGON with eg GL_TRIANGLES (etc). > > Any hints would be helpful. > > > With best regards > Oliver and Andreas > *** > Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte > Informationen. Wenn Sie nicht der richtige Adressat sind oder diese > E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den > Absender und loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die > unbefugte Weitergabe dieser Mail ist nicht gestattet. > This e-mail may contain confidential and/or privileged information. If > you are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and delete this e-mail. Any > unauthorized copying, disclosure or distribution of the contents in this > e-mail is strictly forbidden. > *** > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Relative Priotiy RenderBin
Thanks for the feedback guys! So if there are no objections, i will try to make the flight plugin to use the "Relative Priority" as "RenderBin". På Tue, 08 Jan 2008 15:31:35 +0100, skrev Gordon Tomlinson <[EMAIL PROTECTED]>: > Hi Paul > > FYI from memory its been a while and I'm get old ;), the Relative > priority > if OFLT was matched to Vega Prime to basically help with sub facing in > Creator and doing runway markings etc by using the RP to do offsetting to > aid stopping the Z fighting that can happen when just using the GL offset > mechanism, and in fact VP did use local render bins for this under the > hood, > so not as old as you might think ;) , so a lot of VP/Creator users still > use > this a lot > > > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Paul > Martz > Sent: Tuesday, January 08, 2008 9:19 AM > To: 'OpenSceneGraph Users' > Subject: Re: [osg-users] Relative Priotiy RenderBin > > Conceptually, FLT relative priority and OSG RenderBin numbers are a good > match. > > In practice, most FLT files I've seen that use relative priority are > designed for rendering on old display systems that lack depth buffers. > OSG > relative priority alone is not sufficient to support "painter's > algorithm" > rendering. > > Paul Martz > Skew Matrix Software LLC > http://www.skew-matrix.com > 303 859 9466 > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Joakim Simonsson >> >> Hi! >> >> I am looking for a way to specify the renderbin index in the flt >> format, to prevent transparent artifacts. While studying the help >> files from MultiGen Creator, I found that there is one property on >> Object basis that defines a "Relative Priority". Quote: >> >> "Some functions, such as Fixed List drawing and the rendering of face >> transparency, use the order of nodes in the database traversal to >> determine the final appearance of the Graphics view. This order can be >> changed using relative priority." >> It seems that the relative priority does the same as osg's renderbin >> index. >> >> If nobody here has anything against this, I would be happy to modify >> the flight reader, so the "Relative Priority" sets the renderbin >> number. >> >> Comments? >> >> -- >> Joakim Simonsson -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Relative Priotiy RenderBin
Hi! I am looking for a way to specify the renderbin index in the flt format, to prevent transparent artifacts. While studying the help files from MultiGen Creator, I found that there is one property on Object basis that defines a "Relative Priority". Quote: "Some functions, such as Fixed List drawing and the rendering of face transparency, use the order of nodes in the database traversal to determine the final appearance of the Graphics view. This order can be changed using relative priority." It seems that the relative priority does the same as osg's renderbin index. If nobody here has anything against this, I would be happy to modify the flight reader, so the "Relative Priority" sets the renderbin number. Comments? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Index array
Hi, I want to generate a grid. I have done this with triangle strips, but I want to try to do it with the triangle primitive instead. Is it possible to define vertices in one array, and vertex-indices in another array that forms the triangles, for example: The indices: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 The index array: { 00, 04, 01, 01, 04, 05, ..., 11, 14, 15 } In the osgGeometry example this approach is not used. Is it because it is not supported by OpenGL or OpenSceneGraph? How should I build up my grid in the best way when it comes to performance? My grid is approx 100x100. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DWB
No problem. And thanks for you reply. We are considering to use CarbonGraphics' software to do the DWB -> OpenFlight conversion. Thanks anyway. Joakim På Mon, 13 Aug 2007 20:37:47 +0200, skrev Hamm, Brandon <[EMAIL PROTECTED]>: > Joakim, > > I realize this is quite delayed, please accept my apologies. > > Unfortunately, for reasons which I cannot disclose, I'm prohibited by my > employer from releasing any of the DWB/Coryphaeus Software documentation > or other such materials. > > If you run into a snag, I'll certainly _attempt_ to help you out - just > pose a question to the list or email me privately at hamm at > simauthor[dot com]. > > I'd be interested in hearing about what you end up doing with the DWB > assets that you're dealing with (using GEO, OpenFlight, or some other > such format/toolchain). > > Take care, > > Brandon Hamm > SimAuthor, Inc. > >> -----Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf >> Of Joakim Simonsson >> Sent: Wednesday, August 01, 2007 8:53 AM >> To: osg-users@lists.openscenegraph.org >> Subject: Re: [osg-users] DWB >> >> On Wed, 01 Aug 2007 16:46:49 +0200, Paul Martz >> <[EMAIL PROTECTED]> >> wrote: >> >> >> "dwb2oflt - converts DWB files to OpenFlight format." >> >> >> >> It seems that this converter was free for download. If anyone have >> >> this converter please let me know! >> >> >> >> Carbon graphics' software sounds interesting, I will >> investigate in >> >> this. >> > >> > Carbon Graphics' Geo package also supports OpenFlight. You could >> > purchase a copy of Geo and convert the files manually to either >> > OpenFlight or the Geo format, then your OSG-based app could >> load them >> > using the existing OpenFlight or Geo plugins. >> >-Paul >> >> This is really good news! Thank you very much. >> >> -- >> Joakim Simonsson >> _______ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce >> negraph.org >> > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DWB
On Wed, 01 Aug 2007 16:46:49 +0200, Paul Martz <[EMAIL PROTECTED]> wrote: >> "dwb2oflt - converts DWB files to OpenFlight format." >> >> It seems that this converter was free for download. If anyone >> have this converter please let me know! >> >> Carbon graphics' software sounds interesting, I will >> investigate in this. > > Carbon Graphics' Geo package also supports OpenFlight. You could > purchase a > copy of Geo and convert the files manually to either OpenFlight or the > Geo > format, then your OSG-based app could load them using the existing > OpenFlight or Geo plugins. >-Paul This is really good news! Thank you very much. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DWB
Thank you for your answers! I knew that this place was the correct place to ask this question :) A client wants to use their old databases (dwb) with our osg-based apps. When I googled the dwb format, I found out that there exists a dwb->flt converter (http://www.agocg.ac.uk/reports/virtual/36/appendix.htm). But the link on this page is broken. It refers to the non-existing www.coryphaeus.com site. "dwb2oflt - converts DWB files to OpenFlight format." It seems that this converter was free for download. If anyone have this converter please let me know! Carbon graphics' software sounds interesting, I will investigate in this. A dwb plugin for OSG could of course be another solution (but a very time-demanding one). In this case, format specs. will be of high interest for us. On Wed, 01 Aug 2007 04:19:22 +0200, Paul Martz <[EMAIL PROTECTED]> wrote: >> If you need some docs, I have an almost complete collection >> of the DWB SDK documentation that I pulled off of one our old >> SGI machines. I also wrote a very simple python script that >> runs over a DWB database and dumps some information about it >> (I use it to "diff" two DWB models as the DWB modelling >> package never seems to be consistent about how it writes out >> the model at any given time), as well as some old SDK example >> code for parsing a DWB database from Coryphaeus Software (now >> defunct). > > Wow! Sounds like you've done a lot with DWB since I left SimAuthor a year > ago. > > Did you ever find any documentation for (I think they were called) link > nodes? -- the records that specified input variables and the > functions/formulas that tied them to transform nodes/strings/etc within > the > model. That was missing in the most current version of the spec I had > while > at I was at SimAuthor. Really frustrating as that appeared to be the > single > feature of DWB that made it a valuable file format. > > If you're asking for permission to distribute this stuff for a DWB plugin > project, you might also investigate whether or not SimAuthor is at > liberty > to distribute the RTM code. Lacking a complete and current spec, that old > K&R C code is the best description of the DWB format around. > > Best, > > Paul Martz > Skew Matrix Software LLC > http://www.skew-matrix.com > 303 859 9466 > > _______ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] DWB
Does anyone here know something about the DWB format? Is the dw plugin for osg able to read this format, or is it a different format? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Line-Plane intersection
On Tue, 31 Jul 2007 16:24:10 +0200, Robert Osfield <[EMAIL PROTECTED]> wrote: > On 7/31/07, Joakim Simonsson <[EMAIL PROTECTED]> wrote: >> >> OSG provides functionality for intersection testing between a line and a >> plane with the osg::Plane::intersect(vertices) function (vertices in my >> case is a list with two points, defining a line). This works great! :) >> >> But what I am looking for is a function that returns the intersection >> point of the line and the plane. >> >> Does there exist such a function in osg, or do I have to write my own? > > The intersect methods are just for determining whether a set of points > etc actually intersect a plane, none of this compute the intersection. > Computing the intersection between a line and plane isn't provided > but isn't difficult to compute so just code it up yourself. Ok. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Line-Plane intersection
OSG provides functionality for intersection testing between a line and a plane with the osg::Plane::intersect(vertices) function (vertices in my case is a list with two points, defining a line). This works great! :) But what I am looking for is a function that returns the intersection point of the line and the plane. Does there exist such a function in osg, or do I have to write my own? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Frustum intersection
Hi, I want to obtain all intersection points between the edges of the camera frustum and the xy plane. Does osg provide (partial or complete) functionality to do this? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] From post-perspective space to world space (GLSL)
Thanks for the replies. Mew, you have a very nice quick reference! It mentions built-in uniforms that the orange book doesn't mention. It is a pitty that ATI doesn't prioritize the OpenGL community high enough. I'm glad that I'm not writing a game application that should work on all hardware configurations. :) OT: AFAIK, amd as bought ATI. What is their strategy. Will their opengl driver support be improved? På Thu, 26 Jul 2007 12:07:12 +0200, skrev David Spilling <[EMAIL PROTECTED]>: > Although be a little wary... I have had problems (in the past, so I don't > know whether they are still there) with particular driver > implementations - > mainly ATI - not actually populating some of the GLSL required matrices, > which caused me no end of confusion > > I ended up just defining a set of uniforms in the application for the > matrices I wanted - annoying (as they had to be "manually" updated in > callbacks) but at least more driver proof. > > David > > On 24/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> > >> > Hi, >> > >> > In GLSL, a point is transformed from world-space to post-perspective >> > camera space like this: >> > >> > ftransform(); >> > OR >> > gl_ModelViewProjectionMatrix * gl_Vertex; >> > OR >> > gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; >> > OR >> > gl_ProjectionMatrix * osg_ViewMatrix * gl_Vertex; >> > >> > It seems that the osg-provided uniform, osg_ViewMatrix, is equivalent >> with >> > gl_ModelViewMatrix. >> >> No, osg_ViewMatrix is just the view (ie camera) transformation, without >> the model transformation. gl_ModelViewMatrix is the standard OpenGL >> combined view+model transformation. >> >> >> > >> > What I am looking for is to transform a point from post-perspective >> space >> > to world-space. >> > >> > A document that I've read says that this is done by the following >> > equations: >> > >> > (I am using the ' symbol for denoting an inverse (^-1) ) >> > >> > Eq 1: >> > M_Projector = (M_View * M_Perspective)' >> > >> > If I have understood things correctly, this is the inverse of >> > ModelViewProjectionMatrix. (?) >> > >> > Eq 2: >> > p_world = M_Projector * p_projector >> > >> > M are the camera matrices. p is a point in homogenous >> three-dimensional >> > space. >> > >> > If (M_View * M_Perspective)' is the the inverse of >> > ModelViewProjectionMatrix it would be equivalent to, >> > osg_ViewMatrixInverse * gl_ProjectionMatrix', as B'A'=(AB)' . (?) >> > >> > osg_ViewMatrixInverse is provided by osg, so the only thing I have to >> do >> > is to calculate the inverse of gl_ProjectionMatrix. >> >> GLSL provides many of the built-in "gl_" matrices also as inverse, >> transpose, and inverse-transpose. See p45 of the 1.10 spec or the GLSL >> Quick Reference at mew.cx >> >> cheers >> -- mew >> >> >> > >> > Are there a more convenient way make this calculation? >> > >> > >> > >> > -- >> > Joakim Simonsson >> > ___ >> > 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 >> -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mailing List-id
På Thu, 26 Jul 2007 21:37:14 +0200, skrev Robert Osfield <[EMAIL PROTECTED]>: > On 7/26/07, Joakim Simonsson <[EMAIL PROTECTED]> wrote: >> >> Nice to have the mailing lists up and running again. :) >> >> Please note that the List-Id: attribute in the mail header has changed: >> >> Original >> New >> >> Original >> New >> >> (A dot is now a dash, and net has become org) >> >> Is this intentional? > > .net to .osg is intentional. Ok, I have to hack my mail client's config files then ;) > The - is something that Dreamhost appear to have done as a standard > setting, its nothing I have chosen for the lists, for the most part > everything has been created in a standard way .w.r.t Dreamhosts > scripts for setting up new lists. > > I can't check anything right now as Dreamhost server has gone down > again...argghgg. > >> It messes up my mail client a bit, as it automatically creates >> (non-editable) mailing-list filters based on the List-Id. > > Which mail tool is this? It is "Opera's revolutionary e-mail client: http://www.opera.com/mail/"; as they self say it. Available on 8 different platforms. :) -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mailing List-id
Nice to have the mailing lists up and running again. :) Please note that the List-Id: attribute in the mail header has changed: Original New Original New (A dot is now a dash, and net has become org) Is this intentional? It messes up my mail client a bit, as it automatically creates (non-editable) mailing-list filters based on the List-Id. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] From post-perspective space to world space (GLSL)
Hi, In GLSL, a point is transformed from world-space to post-perspective camera space like this: ftransform(); OR gl_ModelViewProjectionMatrix * gl_Vertex; OR gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; OR gl_ProjectionMatrix * osg_ViewMatrix * gl_Vertex; It seems that the osg-provided uniform, osg_ViewMatrix, is equivalent with gl_ModelViewMatrix. What I am looking for is to transform a point from post-perspective space to world-space. A document that I've read says that this is done by the following equations: (I am using the ' symbol for denoting an inverse (^-1) ) Eq 1: M_Projector = (M_View * M_Perspective)' If I have understood things correctly, this is the inverse of ModelViewProjectionMatrix. (?) Eq 2: p_world = M_Projector * p_projector M are the camera matrices. p is a point in homogenous three-dimensional space. If (M_View * M_Perspective)' is the the inverse of ModelViewProjectionMatrix it would be equivalent to, osg_ViewMatrixInverse * gl_ProjectionMatrix', as B'A'=(AB)' . (?) osg_ViewMatrixInverse is provided by osg, so the only thing I have to do is to calculate the inverse of gl_ProjectionMatrix. Are there a more convenient way make this calculation? -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org