Re: [osg-users] animtk release 0.0.9
Hi Sukender, I have same problem under Windows. If you achive, please show how. And another question to Cedric and Robert, In which version osganimation library will be added ? Best Regards. Umıt Uzun 2008/11/1 Sukender [EMAIL PROTECTED] Yes i guess i would need to add export in order it compiles on windows. Hum... I'm interested in using animTK in a cross-platform way... I tried to CMake-it under Windows but it can't find pkg-config (of course). I guess the CMake script has to be changed, but I'm new to CMake and I can't. I will try to bybass that problem. If I get something compiled under Windows, I'll let you know. But if anyone did it before, please tell me! Sukender ___ 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] Browser integration
Hi Wang, Community - Wiki Login Details Username: osg Password: 05G (note: first digit is zero) Regards. Umit Uzun 2008/11/1 Wang Rui [EMAIL PROTECTED] Hi, ok... It is a RAR file with a VS8 project inside. i'm not sure if the project could run immediately on your computer, but the code is proved to be usable. BTW, I remember there is a publc account of the OSG website. But I lost the user name and password. Could anybody tell me again, plz? I would try to upload the simple osgviewerIE example and another osgviewerVBasic example to http://www.openscenegraph.org/projects/osg/wiki/Community/WindowingToolkits Regards, Wang Rui 2008/11/1 Erik den Dekker [EMAIL PROTECTED] And five,… Isn't it a good idea to just to mail to osg-users? Erik -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *ami guru *Sent:* Friday, October 31, 2008 21:02 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] Browser integration me four!!! [EMAIL PROTECTED] sajjad On Fri, Oct 31, 2008 at 8:32 PM, Charles Cossé [EMAIL PROTECTED] wrote: me three! On Fri, Oct 31, 2008 at 12:43 PM, Mario Mango Furnari [EMAIL PROTECTED] wrote: Quoting Wang Rui [EMAIL PROTECTED]: Hi Wang, I'm interested too ([EMAIL PROTECTED]) Thank you in advance. Mario Mango Furnari Hi, I don't think it easy for me to translate the whole page into english in a short time. :) But I'm glad to share my project freely. I will send you a private mail later in order not to bother others. Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas --- Istituto di Cibernetica E. Caianiello Comprensorio A. Olivetti Ed. 70 Via Campi Flegrei, 34 I-80078 - Pozzuoli (Italy) Tel:+39.081.867.5154 Fax:+39.081.867.5109 Mobile: +39.335.539.8250 - This mail sent through IMP: http://horde.org/imp/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- AsymptopiaSoftware|[EMAIL PROTECTED] http://www.asymptopia.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] terrain segmentation
Hi, I have a rough terrain model. now I want to segment the terrain into multiple patches. Each patch should be an approximate plane. So totally I want to segment the terrain into planes. How can we do it ? is there any algorithm ? Is there any feature in osg that can help completely or partially in this issue ? Thank you hemanth ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Browser integration
Hi, The osgActiveX, which helps embed a osg viewer into IE or VisualBasic, is added at wiki/Community/WindowingToolkits. Thanks for help. Regards, Wang Rui 2008/11/1 Ümit Uzun [EMAIL PROTECTED] Hi Wang, Community - Wiki Login Details Username: osg Password: 05G (note: first digit is zero) Regards. Umit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] addEventHandler with osg and wxWidget2.8.8
Hi Everyone: When i use below Canvas calss with osg and wxWidget2.8.8 I found my viewer can not addEventHandler(new PickHandler()); Why? Best regards. #ifndef _CANVAS_H #define _CANVAS_H #include wx/glcanvas.h #include osgViewer/CompositeViewer class Canvas : public wxGLCanvas { public: Canvas(osgViewer::CompositeViewer* viewer, wxWindow* parent, wxWindowID id = wxID_ANY, int* attribList = 0, const wxPoint pos = wxDefaultPosition, const wxSize size = wxDefaultSize, long style=0, const wxString name=LGLCanvas, const wxPalette palette = wxNullPalette); ~Canvas(); class View : public osgViewer::View { public: View(); void requestRedraw(); void requestContinuousUpdate(bool needed=true); void requestWarpPointer(float x,float y); private: void setCanvas(Canvas* _canvas); friend class Canvas; Canvas* _canvas; }; void setView(View* view); void updateWhenIdle(bool update); void setUpdateWhenIdleOverride(bool status); void OnPaint(wxPaintEvent event); void OnEraseBackground(wxEraseEvent event); void OnIdle(wxIdleEvent event); void OnSize(wxSizeEvent event); void OnMouse(wxMouseEvent event); void OnMouseCaptureLost(wxMouseCaptureLostEvent event); void OnKey(wxKeyEvent event); void OnShow(wxShowEvent event); private: osg::ref_ptrosgViewer::CompositeViewer _viewer; osg::ref_ptrView _view; class GraphicsContext : public osgViewer::GraphicsWindow { protected: virtual ~GraphicsContext(); public: GraphicsContext(Canvas* canvas); void detachFromCanvas(); bool valid() const; bool realizeImplementation(); bool isRealizedImplementation() const; void closeImplementation(); bool makeCurrentImplementation(); bool makeContextCurrentImplementation(osg::GraphicsContext *context); bool releaseContextImplementation(); void bindPBufferToTextureImplementation(GLenum buffer); void swapBuffersImplementation(); wxGLContext* getWxContext(); unsigned int getGlContext(); private: wxGLContext* _wxContext; Canvas* _canvas; static unsigned int _s_glContexts; unsigned int _glContext; }; osg::ref_ptrGraphicsContext _context; bool _renderingActive; int _mouseButtonCaptured; bool _updateWhenIdle; bool _updateWhenIdleOverride; DECLARE_EVENT_TABLE(); }; #endif //_CANVAS_H - 雅虎邮箱,您的终生邮箱!___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] animtk release 0.0.9
2008/11/1 Ümit Uzun [EMAIL PROTECTED]: Hi Sukender, I have same problem under Windows. If you achive, please show how. You guys are probably the first to run AnimTK under Windows, a port to windows will take the addition of exports as well possible tweaks to CMake. And another question to Cedric and Robert, In which version osganimation library will be added ? My last proposal was for Cedric to coordinate with Jeremey on integrating AnimTK into Jeremey's osgWidget dev branch in OSG/svn/branches, at this integration point the new NodeKit name would be osgAnimation. This branch would then need to be tested and shook down before integration from this experimental branch into svn/trunk. You can browse the branch via: http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/branches/OpenSceneGraph-osgWidget-dev Or check it out with: svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-osgWidget-dev OpenSceneGreaph-osgWidget-dev I quick browse just now suggests that Cedric hasn't yet merged AnimTK/osgAnimation. I'll have to defer to him for his own plans on completing this. As to whether osgAnimation will be merged with before 2.8 or after will depend on whether it how well it ports across platforms and how quickly it converges to a functional and stable enough state to make it in. The more developers pitch in with porting/testing/bug fixing the sooner the merge point could be. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] terrain segmentation
Hi Memanth, The OSG doesn't have a feature like the one your describe. We do have VirtualPlanetBuilder that builds paged database that are composed of a quad tree of tiles, the source data for this tool is geospatial imagery and DEMs, but it doesn't build paged databases from polygonal terrain models. Robert. On Sat, Nov 1, 2008 at 9:23 AM, hemanth korrapati [EMAIL PROTECTED] wrote: Hi, I have a rough terrain model. now I want to segment the terrain into multiple patches. Each patch should be an approximate plane. So totally I want to segment the terrain into planes. How can we do it ? is there any algorithm ? Is there any feature in osg that can help completely or partially in this issue ? Thank you hemanth ___ 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] Untextured materials = pure black
Hi Jefferson, When using a shader that expects a texture, you must supply a texture or the result is undefined. I think with most graphics cards the texture read just results in black. So if you want to have models that don't have a specific texture you should: a) use another shader that doesn't do a texture read, or b) set a simple default texture (for example, a 1x1 white texture) on the root node of your scene. - Terry Message: 4 Date: Fri, 31 Oct 2008 23:30:23 -0300 From: Jefferson Pinheiro [EMAIL PROTECTED] Subject: [osg-users] Untextured materials = pure black To: osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=iso-8859-1 Every material that has no texture associated becomes completely black when I do one of the following: - change the shadow technique from ShadowMap to SoftShadowMap - add any of the GLSL bloom shader I found on the net ( http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=27976postdays=0postorder=ascstart=0or http://www.gamedev.net/community/forums/topic.asp?topic_id=395186) Any idea why this is happening? Details: I have a single light, declared thusly: osg::Vec3 lightPosition(4,4,8); // my prog's scale is big osg::LightSource* ls = new osg::LightSource; ls-getLight()-setPosition(osg::Vec4(lightPosition,1)); ls-getLight()-setAmbient(osg::Vec4(0.5,0.5,0.5,1.0)); ls-getLight()-setDiffuse(osg::Vec4(0.9,0.9,0.9,1.0)); shadowedScene-addChild(ls); I'm posting direct links to the shaders, case you're lazy to open those ones :) http://magiadosdoces.com/temp/PP_GL_Bloom1.fx http://magiadosdoces.com/temp/PP_GL_Bloom2.fx http://magiadosdoces.com/temp/PP_GL_Bloom3.fx http://magiadosdoces.com/temp/PP_GL_Bloom4.fx http://magiadosdoces.com/temp/shader.frag And this is how I'm loading the shaders: osg::ref_ptrosg::StateSet stateSet(root-getOrCreateStateSet()); osg::Program* program = new osg::Program; osg::Shader* frag = new osg::Shader( osg::Shader::FRAGMENT ); frag-loadShaderSourceFromFile(Shaders/shader.frag); program-addShader(frag); stateSet.get()-setAttributeAndModes(program, osg::StateAttribute::ON); I'm using OSG 2.6, Windows Vista 64, Geforce 8800M GTS. Oh and by the way, the bloom shader effect doesn't works even on the textured surfaces. They simply remain the same. Image: http://magiadosdoces.com/temp/car.jpg Thanks, Jefferson -- next part -- An HTML attachment was scrubbed... URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20081031/e7d8b42c/attachment-0001.htm ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Disable self shadows (ShadowMap)
Jefferson, I'm sure that Jean-Sebastien or Wojciech can answer better and more correctly than me, but in the meantime... Firstly, I notice that you are using OSG 2.6. The versatility of the API into the shadowing stuff is much better in the 2.7 versions, and allows you better control over what is being applied, so I recommend you move to that if you can. Secondly, in 2.6 at least, the only flag (castsShadow or receivesShadow) that is honoured by the shadowedScene's subgraph is the castsShadow one. Hence if things cast shadows they will also receive shadows. However, in your example, it is only the default fragment shader applied by the shadow map, in the end, which is shading your cars, so one way around it is to reset/force the fragment shader on your cars to one that doesn't try to do the lookup in the shadow texture. You can't do this at the shadowMap level (as this would then be applied to everything including your buildings), but you can do it to the cars individually. Create a shader - you can use the GLSL in ShadowMap.cpp as a starting point - and then bind it to your car node stateset with the usual methods Hope that helps, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] 3D Graphs - edges?
All, I am wondering if anyone has tried to implement a graph edge? i.e. a connection (such as a line) between geodes to make a 3D graph, where the connection derives its properties from the geodes it connects. I need to implement such a connector myself, I'm thinking of making it an actual osg node type (extended either osg::Geode or osg:Group) and hopefully it will be good enough to include in OSG. OpenSG has a NodeGraph::Edge (though I haven't looked at it in detail) so I am guessing other OpenSceneGraph users may want one too and someone may have even started... Cheers, Paul -- Paul McIntosh www.internetscooter.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadows in osgviewerQT ? (solved / patch)
Hi again, please find attached a patch against current trunk that fixes my problems. This patch does the following (in order of the chunks in the patch): - Add a missing include in GraphicsWindowsX11 without which it won't compile on my Mac. - Add a missing include to the osgviewerQt build (taken straight from src/osgviewer/CMakeLists.txt) - Ensure GraphicsWindowsCarbon::WindowData is used with QOSGWidget for Mac builds even on 10.4 and 10.5. Without this change, the widget will use the X11 WindowData struct but the peer will expect a Carbon WindowData struct, leading to a segfault. I'm not sure this is the right fix - it might have to pay attention to other configure-time variables. (I.e. it might not work if you asked for using the X11 peers instead of the carbon peers at configure time) - Extract a WindowPtr from the HIViewRef that QWidget::winId() returns. Without this change, the peer tries to call GetWindowPort on the HIViewRef which returns 0. This was the reason that the window remained white. - Setup the camera only after ViewerQOSG's Qt base class has been initialized. Without this change, the view is wrong (doesn't cover the whole window). - Open the ViewerQOSG window at 30/30 instead of 0/0. When opened at 0/0 it lacks any window decoration (not sure why that is so - might be a Qt feature?) I hope this helps. Cheers, Julian On Fri, Oct 31, 2008 at 12:26 PM, Julian Scheid [EMAIL PROTECTED]wrote: Hi, OK so I figured out that my problems are due to using AdapterWidget - I understand that shadows etc. should work fine with QOSGWidget. Unfortunately QOSGWidget doesn't work here: the widgets remains white and Qt prints warnings about recursive repaint. I've checked out the latest OSG trunk and tried with that but get the same result (actually it segfaults due to a bogus ifdef in the QOSGWidget source code - I'll send over a patch shortly - but after fixing that I get the same result.) I've started tracking down the problem, so far the only thing that I figured out is that GetWindowPort always seems to return 0 for the QOSGWidget's native peer - is that expected? I'm using Qt 4.4.3 on an Intel Mac with OS X 10.5. The Carbon code paths are used, not X11. Are there any known problems with QOSGWidget with Qt 4.4, OS X 10.5 or with the Carbon peers? Thanks in advance, Julian On Thu, Oct 30, 2008 at 3:30 AM, Julian Scheid [EMAIL PROTECTED]wrote: Hi, I'm trying to embed osg in a Qt4 application. I've had some troubles with FSAA/multisampling but managed to work around it by configuring the QGLWidget for FSAA instead of osg. However, I'm now trying to get shadows to work based on the osgshadow code, and it seems that no matter which shadowing technique I try it brings my machine to a grinding halt - the whole screen starts to flicker wildly, circles and balls reminiscent of Katamari Damacy are drawn into the scene, and when continuous update (via timer) is enabled I have no recourse but to restart my machine. (This is one of the new Intel Macbooks running OS X 10.5) I gather that when embedded in Qt, the GraphicsWindowCarbon code isn't used and osg just uses the existing GL context. Does that mean that I would have to manually setup Qt's GL context and somehow synchronize it with osg's shadow magic? If all that is meant to be supported in the Qt viewer, is there any chance you could add an example for this situation? Thanks in advance, -Julian osg-qosgwidget-osx.patch Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org