Re: [osg-users] osgGA modifications for IPhone and other stuff
sth wrote: > Hi, > > just a short follow-up: The new code works nicely, here's a small demo > video (just crosslines for every touch-point): > > http://vimeo.com/14938178 > > Kool! Look like the same thing on smart boards. The only thing is that smart boards use multiple mice points and to my understanding Linux can't do that now - only Windows 7 can on PC's! D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31583#31583 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgGA modifications for IPhone and other stuff
Hi, just a short follow-up: The new code works nicely, here's a small demo video (just crosslines for every touch-point): http://vimeo.com/14938178 cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Problem Building OSG 2.8.2 with CMake 2.8 and VS2008
Hello all, I'm attempting to build OSG 2.8.2 under CMake 2.8 and VS2008. My ultimate goal is to use this with OSGART! I'm following the "Support/PlatformSpecifics/VisualStudio" page on the wiki. (Guess I can't post links yet, sorry :( ) My first problem is when using CMake. A lot of the variables have values that are not found. Like this: > Name=GIFLIB_LIBRARY Value=GIFLIB_LIBRARY-NOTFOUND Even though... > Name=GIFLIB_INCLUDE_DIR > Value=C:/Users/Elliott/Documents/School/Fall10/Capstone/OpenSceneGraph-2.8.2/3rdparty/include Is correctly found. That seems weird to me! I've tried leaving these and filling in all these values as best I could understand. I've also since added all the System Environment Variables like %OSG_ROOT% and I get the same results. That problem aside (thought I believe it's linked): When I build the solution in Visual Studio I get a lot of unresolved external symbol errors. The first is with the PNG plugin project. These occur whether or not I fill in the values in CMake. It's entirely possible I missed a value or used an incorrect one in CMake. (There are a lot of them and it's hard to tell what's needed!) I've also checked and re-checked the page of instructions and I don't think I'm missing anything obvious. :? If anyone has any tips or answers I would greatly appreciate it! Thank you for reading, Elliott -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31580#31580 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] BIND_PER_PRIMITIVE broken?
Hi Don, I'm using TortoiseSVN on a Windows system. This has a right-click menu entry for "SVN Checkout". The GUI can only handle the URL and was confused by the "OpenSceneGraph" after "trunk". Heh, that's the destination directory when using the command-line SVN... So you're right, in Tortoise you just need the URL, which was http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk 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] BIND_PER_PRIMITIVE broken?
Hi J-S, I'm using TortoiseSVN on a Windows system. This has a right-click menu entry for "SVN Checkout". The GUI can only handle the URL and was confused by the "OpenSceneGraph" after "trunk". You're exactly right that I was pulling down and eternity and a half. Today, after contemplating installing svn on a SuSE linux system, I got what I wanted with http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk which I swear I tried Friday. Thanks for keeping an eye out. -Don Jean-Sébastien Guay wrote: Hi Don, I bailed on my svn import. TortoiseSVN wouldn't work with the checkout command as documented. I got the checkout going, but I seemed to be getting way more than I wanted. After more time than I had to spend I still didn't have the OSG source. What command did you try? This page gives you the command you should have been using: http://www.openscenegraph.org/projects/osg/wiki/Downloads/SVN which is: svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph That gets you only the trunk source tree, i.e. what you need. It should be a pretty speedy checkout, at least it is whenever I do it on a new machine (which I've done a few times in the past month or two). I would understand it taking a lot of time if you had removed one or especially two levels from the path, i.e. if you did svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/ That would checkout all the branches, tags and trunk, i.e. it would take an eternity and a half, in addition to taking more disk space than you probably have... SVN branches and tags are shallow copies unless something changes, so they're lightweight on the server, but as soon as you download them on your machine they take the full size of all files. Hope this helps, J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vertex visualized problem, processed via shader.
Aitor Ardanza wrote: Ok, sorry... I have the following scene: [Image: http://img810.imageshack.us/img810/8789/armn.jpg ] Now I can not put a picture with the problem, because the movement of the arm is connected to a motion capture system that I haven't connected right now ... When you move your arm at some point, for example when I lift a lot, that part of the hand exceeds a point disappears. When I can, I will upload an image with the problem .. It could be that the sections of the model are getting erroneously culled because the cull traversal can't take into account what's going on in the shader. As a quick check, try calling setCullingActive(false) on the geode(s) that are erroneously disappearing and see if they behave differently. --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgFX Outline Patch
On 9/8/2010 10:26 AM, Jean-Sébastien Guay wrote: Hi Todd, Thanks for the suggestions. I just tried that, and unfortunately this particular exception seems to occur *after* exit. It seems to be this error: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/afebacc2-65e6-43f8-b7aa-73bfd5ade11d Anyway, thanks again. I'm pretty sure this isn't an OSG problem, but I'll post an update if it turns out to be one. Well that post relates to VB garbage collection and Crystal Reports, so I'm pretty sure it's not related :-) A crash on exit is generally a double-delete... Are you using ref_ptrs for all your OSG variables? Or are you doing weird things with memory allocation? Small anecdote on that subject: A while ago we had a class in our code base that derived from an OSG class (so from osg::Referenced indirectly) but declared its destructor public. So users of that class could delete it while it was still in the scene graph, and when OSG (through ref counts falling to 0 and cascading deletes of ref_ptrs) came to delete it, it had already been deleted, thus the app crashed on exit. So making the destructor of an osg::Referenced-derived class public is a no-no, unless you can make sure to remove it from all OSG structures before you delete it (which is a lot of work for not much gain, IMHO, so just keep that destructor protected and all will be fine). Hope this helps, J-S OK, I tracked this one down and wanted to share. I was compiling the Outline class with my app - my app uses OSG 2.8.3, but the class is from the OSG trunk. Apparently, this line was causing the problem: Registry::Proxy proxy(new Outline); The class works fine without that line, so commenting it out fixed the problem. I think that this wouldn't have been an issue at all if I just used the OSG trunk completely, but I'm trying to stick with official releases for apps we develop. -Todd ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgBullet: Stereo mode / TriMesh Collision Shapes
Sergey Polischuk wrote: Coming back to starter post: First: you can update your position from physics with matrix transform or position attitude transform even if there are parent transforms on tree up to this node, you just need to modify (or write new) callback that setups nodes positions to count transforms up to this node (u can get that with computeLocalToWorld method of matrix transform), then u getting inverse of this matrix (or may be you can skip inverse when using computeWorldtoLocal ) and combine with matrix you got from physics simulation, then u get matrix u need to set for your node with physics object. True, view = modelView * inverseModel. I'll take a look at implementing this in AbsoluteModelTransform. -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgGA modifications for IPhone and other stuff
Hi, Am 13.09.10 10:39, schrieb Robert Osfield: > I kinda like this idea, it's not too intrusive w.r.t osgGA. However, > in terms of event handlers receiving events I would have thought you'd > want to get all the events for a single multi-touch together, since if > you are getting them one by one you'd need to have a start and stop > event so you'd know how to accumulate. > > How about a composite GUIEventType, or one that forms a linked list, > and you just pass the head around. Yes you are right, that's a problem with my last approach. Perhaps it's best to add a ref_ptr to GuiEventAdapter holding a custom structure with all touch-points with their positions, tapCounts and Ids. (after a while) So I tried that approach, I did not use a linked list of GUIEventAdapters, as they would store too much information for a single touchpoint (like scrolling and tablet-information, etc). Instead I added a new class called TouchData which basically holds a list of structs of { touch-id, touch-phase, x, y, tap-count}. The GUIEventAdapter holds only a ref_ptr to this class, so the overhead for osgGUIEventAdapter is not too much. I added some convenience-methods to EventQueue and GUIEventAdapter. To add multiple touch-points to a GUIEventAdapter you'll basically do something along these lines: osg::ref_ptr osg_event(NULL); for(int i=0; igetEventQueue()->touchMoved(id, phase,x, y); } else { osg_event->addTouchPoint(id, phase, x, y); } } The current implementations set the x and y properties of the GUIEventAdapter from the first touch point, so we get some basic compatibility to existing manipulators (basically a one button mouse). To get the touch-points from inside your event-handler: if (ea.isMultiTouchEvent()) { osgGA::GUIEventAdapter::TouchData* data = ea.getTouchData(); for( osgGA::GUIEventAdapter::TouchData::iterator i = data->begin(); i != data->end(); ++i) { std::cout << " id: " << i->id << " phase: " << i->phase << " pos: " << i->x << "/" << i->y << " tapCount:" << i->tapCount << std::endl; } } I hope this design makes more sense. You can find this approach in the git-repository / iphone-branch. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vertex visualized problem, processed via shader.
Hi Aitor, On Mon, Sep 13, 2010 at 2:34 PM, Aitor Ardanza wrote: > I only update the matrix of bones each time step, and modify the positions of > the vertex via vertex shader (taking into account the matrix of the bones and > weights). Sigh there is still many unknowns for anyone to be able to guess what how you are doing things. Please answer the questions I asked. Your inability to be specific is the reason why you haven't got any useful answers. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture coordinate calculation in vertex shader
Hi Werner, I doubt these five lines kill your framerate. Fixed pipeline on modern graphics boards these days is implemented internally on shaders and must do the same. There must be something else in your vertex shader approach that goes wrong... Wojtek -- From: "Werner Modenbach" Sent: Monday, September 13, 2010 4:15 PM To: "OpenSceneGraph Users" Subject: Re: [osg-users] Texture coordinate calculation in vertex shader Hi Wojtek, thanks for your reply. I have instantly studied the orange book. According to the book I have to use something like: vec4 tmp = gl_ModelViewMatrix * gl_Vertex; ShadowTexcoord.s = dot(tmp, gl_EyePlaneS[1]); ShadowTexcoord.t = dot(tmp, gl_EyePlaneT[1]); ShadowTexcoord.p = dot(tmp, gl_EyePlaneR[1]); ShadowTexcoord.q = dot(tmp, gl_EyePlaneQ[1]); But unfortunately this kills performance inacceptably and also rendering of my scene is not stable (flickering). Shadow appear as expected. On Monday 13 September 2010 13:51:02 Wojciech Lewandowski wrote: Hi Werener, See VertexShader in StandardShadowMap. OpenGL Shading Languege (Orange Book) contains a chapter on emulating fixed pipeline. And you may also try to use 3DLabs ShaderGen. Wojtek Lewandowski -- From: "Werner Modenbach" Sent: Monday, September 13, 2010 12:00 PM To: Subject: [osg-users] Texture coordinate calculation in vertex shader > Hi everybody! > > I'm using osgShadow::ShadowMap on my scene. > Also I have written my own vertex and fragment shaders. > When coming to apply the shadow effect in the fragment shader I have to > access > the shadow map. > The original shader uses just > shadow2DProj( osgShadow_shadowTexture, gl_TexCoord[1] ) > to access the texture. Obviously gl_TexCoord[1] is calculated by the > standard > gl pipeline shader. > Any quick hint, how I have to do the calculation in my vertex shader? > > Many thanks in advance > > - Werner - > ___ > 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 -- TEXION Software Solutions TEXION GmbH - Rotter Bruch 26a - D 52068 Aachen - HRB 14999 Aachen Fon: +49 241 475757-0, Fax: +49 241 475757-29, web: http://www.texion.eu Geschäftsführer/Managing Director: Werner Modenbach ___ 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] Texture coordinate calculation in vertex shader
Hi Wojtek, thanks for your reply. I have instantly studied the orange book. According to the book I have to use something like: vec4 tmp = gl_ModelViewMatrix * gl_Vertex; ShadowTexcoord.s = dot(tmp, gl_EyePlaneS[1]); ShadowTexcoord.t = dot(tmp, gl_EyePlaneT[1]); ShadowTexcoord.p = dot(tmp, gl_EyePlaneR[1]); ShadowTexcoord.q = dot(tmp, gl_EyePlaneQ[1]); But unfortunately this kills performance inacceptably and also rendering of my scene is not stable (flickering). Shadow appear as expected. On Monday 13 September 2010 13:51:02 Wojciech Lewandowski wrote: > Hi Werener, > > See VertexShader in StandardShadowMap. OpenGL Shading Languege (Orange > Book) contains a chapter on emulating fixed pipeline. And you may also try > to use 3DLabs ShaderGen. > > Wojtek Lewandowski > > -- > From: "Werner Modenbach" > Sent: Monday, September 13, 2010 12:00 PM > To: > Subject: [osg-users] Texture coordinate calculation in vertex shader > > > Hi everybody! > > > > I'm using osgShadow::ShadowMap on my scene. > > Also I have written my own vertex and fragment shaders. > > When coming to apply the shadow effect in the fragment shader I have to > > access > > the shadow map. > > The original shader uses just > > shadow2DProj( osgShadow_shadowTexture, gl_TexCoord[1] ) > > to access the texture. Obviously gl_TexCoord[1] is calculated by the > > standard > > gl pipeline shader. > > Any quick hint, how I have to do the calculation in my vertex shader? > > > > Many thanks in advance > > > > - Werner - > > ___ > > 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 -- TEXION Software Solutions TEXION GmbH - Rotter Bruch 26a - D 52068 Aachen - HRB 14999 Aachen Fon: +49 241 475757-0, Fax: +49 241 475757-29, web: http://www.texion.eu Geschäftsführer/Managing Director: Werner Modenbach ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vertex visualized problem, processed via shader.
Hi, I only update the matrix of bones each time step, and modify the positions of the vertex via vertex shader (taking into account the matrix of the bones and weights). Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31570#31570 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vertex visualized problem, processed via shader.
Hi Aitor, Still not much help. How have you implemented the animation? Using osgAnimation? Your own custom scene using osg::Geometry and own shaders... We don't have the paranormal ability to guess all this stuff. Robert. On Mon, Sep 13, 2010 at 10:50 AM, Aitor Ardanza wrote: > Ok, sorry... > I have the following scene: > [Image: http://img810.imageshack.us/img810/8789/armn.jpg ] > Now I can not put a picture with the problem, because the movement of the arm > is connected to a motion capture system that I haven't connected right now ... > When you move your arm at some point, for example when I lift a lot, that > part of the hand exceeds a point disappears. > When I can, I will upload an image with the problem .. > Cheers, > Aitor > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31565#31565 > > > > > > ___ > 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] Texture coordinate calculation in vertex shader
Hi Werener, See VertexShader in StandardShadowMap. OpenGL Shading Languege (Orange Book) contains a chapter on emulating fixed pipeline. And you may also try to use 3DLabs ShaderGen. Wojtek Lewandowski -- From: "Werner Modenbach" Sent: Monday, September 13, 2010 12:00 PM To: Subject: [osg-users] Texture coordinate calculation in vertex shader Hi everybody! I'm using osgShadow::ShadowMap on my scene. Also I have written my own vertex and fragment shaders. When coming to apply the shadow effect in the fragment shader I have to access the shadow map. The original shader uses just shadow2DProj( osgShadow_shadowTexture, gl_TexCoord[1] ) to access the texture. Obviously gl_TexCoord[1] is calculated by the standard gl pipeline shader. Any quick hint, how I have to do the calculation in my vertex shader? Many thanks in advance - Werner - ___ 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] Mask RTT output
Hi, I'm wondering how to apply an alphamask (from another image w alphachannel) to a RTT-texture that is attached to a camera. Thank you! Cheers, Rob -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31567#31567 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Texture coordinate calculation in vertex shader
Hi everybody! I'm using osgShadow::ShadowMap on my scene. Also I have written my own vertex and fragment shaders. When coming to apply the shadow effect in the fragment shader I have to access the shadow map. The original shader uses just shadow2DProj( osgShadow_shadowTexture, gl_TexCoord[1] ) to access the texture. Obviously gl_TexCoord[1] is calculated by the standard gl pipeline shader. Any quick hint, how I have to do the calculation in my vertex shader? Many thanks in advance - Werner - ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vertex visualized problem, processed via shader.
Ok, sorry... I have the following scene: [Image: http://img810.imageshack.us/img810/8789/armn.jpg ] Now I can not put a picture with the problem, because the movement of the arm is connected to a motion capture system that I haven't connected right now ... When you move your arm at some point, for example when I lift a lot, that part of the hand exceeds a point disappears. When I can, I will upload an image with the problem .. Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31565#31565 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why I can not call discardAllDeletedGLObejcts function
Hi, the osg::discardAllDeletedGLObjects has been found. the function was undefined because I hadn't add the file path osg/GLObjects. :-* Now I have new problems. Problem1: the parameter of discardAllDeletedGLObjects is a contextID. How can I get the context ID? The GraphicsContext was created like this: osg::ref gc; then in cpp file: gc = osg::GraphicsContext::createGraphicsContext(traits.get()); Problem2: all the destruction functions in OSG are protected . So I can not using delete myself. But If I want to release all the resources like graphicscontext... What can I do? using releaseGLObjects? If so, the key is that there are many releaseGLObjects() functions in different classes ,which should I choose? call releaseGLObjects one by one? Thank you! many thanks Cheers, Licheng -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31563#31563 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vertex visualized problem, processed via shader.
Hi Aitor, This is a classic example asking a question "how long is a piece of string?" without the anyone getting to see or feel the string, or even knowing what type of string it is, but still expecting an accurate answer... So.. given how loosely defined your question is I would expect very few answers as there are just too many unknowns, what shaders? what type of skinning? what art part route? See you post really leaves us with more questions to ask that you've even asked.. So... please be specific about this stuff. Robert. On Mon, Sep 13, 2010 at 9:47 AM, Aitor Ardanza wrote: > Hi, > > I have a model with a skeleton that moves by using skinning shader. > The problem is that with some moves and according to the position of the > camera, some parts of the model vanish. I guess it will be something related > to boundingbox ... > What would be the best method to update this? > > Thank you! > > Cheers, > Aitor > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31560#31560 > > > > > > ___ > 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] Manipulate the stereo view (render to texture).
HI Christoph, I would recommend setting the stereo yourself in osgViewer using two slave Camera, each of which renders to a separate FBO based texture, and then have a third slave Camera that rendered a screen aligned geometry with the textures plus any shaders/state that you want. The osgdistorion example does this for a mono scene, but you should be able to generalise this to more cameras. A more extreme example of using multiple RTT slave camera can be found in src/osgViewer/View.cpp which the View::setUpViewFor3DSphericalDisplay(..) method sets up six slave Camera for six sides of cube surrounded the eye point, and one slave Camera that composes the result into a single distortion corrected image that gets rendered onto a fish eye lens inside a spherical display. In you case you'll just need to set up the camera offsets for the stereo yourself for each of the slave Camera and not use the OSG's default stereo settings. Robert. On Mon, Sep 6, 2010 at 12:54 PM, Christoph Harms-Ensink wrote: > Hey everybody! > > I'm trying to render my stereo (horiz. split) view into a texture, split that > texture so i have one texture for left and one for right view, then > manipulate those textures, put them back together into one texture and render > that texture to the screen. Could someone provide me with the basic steps for > this? > > I already have a camera rendering into a texture. And i reckon that I have to > use osg::Texture2D::copyTexSubImage2D to split it into 2 halfs, but I have my > problems with that. Also, I don't exactly know how to render the finished > Texture back onto the screen. Put it on a quad? > > ... > > Thanks in advance! > > Cheers, > Christoph > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31345#31345 > > > > > > ___ > 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] Vertex visualized problem, processed via shader.
Hi, I have a model with a skeleton that moves by using skinning shader. The problem is that with some moves and according to the position of the camera, some parts of the model vanish. I guess it will be something related to boundingbox ... What would be the best method to update this? Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31560#31560 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why I can not call discardAllDeletedGLObejcts function
Hi Licheng, You don't mention which version of the OSG you are using, or whether you've got the source and have compiled it. If you think the function is undefined then go source the source files and double check. You have access to svn/trunk and the dev series so you can easily cross reference. In general svn/trunk and the dev series may well be the better if you are pushing the envelope w.r.t OSG usage - 99% of users should never need to call these functions explicitly, but if you are part of that 1% then you are on the bleeding edge and should view the svn/trunk and dev series as good base. Robert. On Mon, Sep 13, 2010 at 6:24 AM, Licheng Zhang wrote: > Hi, > > it's my careless , but osg::discardAllDeletedGLObjects() is also undefined. > when I push the refresh button in the browser for about 12 times, the activex > control will crash. I don't know why. the thread conflict? or there are any > resources which haven't been destroyed? > > Thank you very much! > > Cheers, > Licheng > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31552#31552 > > > > > > ___ > 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] osgGA modifications for IPhone and other stuff
Hi Stephan and Thomas, On Sun, Sep 12, 2010 at 8:03 PM, Stephan Huber wrote: > I'd say, we'll use the the exisiting event-types , push, drag, release > for touch-events. What is needed is a touch-id-variable to differentiate > between multiple touches at the same time. So we have basic > compatibility to old code and do not bloat the GUIEventAdapter-class too > much, only adding one int. We can even use the _button-property of > EventAdapter. (that's my current approach) I kinda like this idea, it's not too intrusive w.r.t osgGA. However, in terms of event handlers receiving events I would have thought you'd want to get all the events for a single multi-touch together, since if you are getting them one by one you'd need to have a start and stop event so you'd know how to accumulate. How about a composite GUIEventType, or one that forms a linked list, and you just pass the head around. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering left & right stereo frames in separate threads?
Hi Brian, The current stereo support in the OSG is provided by the osgUtil::SceneView class, this is an old class that have survived through todo because it's still be useful for managing low level rendering, it is set for eventually replacement though. SceneView being old and quite primitive doesn't know about threading or multiple contexts so in itself it can't do stereo multi-thread or with multiple contexts. The osgViewer library which is a much higher level of abstraction is much more modern and is capable of multi-threading and multi-context rendering, but right now at the low level it still defers to SceneView to do the rendering and stereo if you use the OSG standard stereo support. However, if manage stereo yourself you aren't limited to restrictions of SceneView w.r.t threading for stereo if you do your own stereo setup at the high level - using two slave Camera in a osgViewer::Viewer is the prefect way to do this, it's slightly more setup but it still should be quite straight forward. There is a gotcha though... most stereo is done with a single graphics context, and you can only efficiently drive a single graphics context from a single thread, so OpenGL/hardware limitations themselves may well limit you to use a single thread for rendering. Potentially you can use CullThreadPerCamerDrawThreadPerContext threading model which would run the cull threads in parallel, but the draw will still be single threaded. The OSG's default threading model of DrawThreadPerContext also enables multi-threading by allow the draw threading to dispatch static objects whilst the next frame gets under way. The fact that OSG already will likely be doing DrawThreadPerContext rather diminishes the potential of CullThreadPerCameraDrawThreadPerContext to make much difference. If you are able to do stereo with two graphics cards, two contexts and two screens then threading does a better possibility as the OSG can naturally run this configuration multi-threaded and it should scale very well. This is a very specific stereo setup though - so as driver two passive stereo projectors. You haven't said anything about the type of stereo you intend so I can't really say whether this is possible at your end. So... all in all it's likely that you won't have much opportunity to make things more parallel that then probably already are, unless you have a specific hardware setup. However, multi-threading isn't the only area of optimization you can do, so I'd suggest you look very strongly at why your app is currently so CPU limited. Robert. On Sat, Sep 11, 2010 at 3:36 PM, Brian Tomko wrote: > Hi, > I have a 1 camera 1 viewport OSG app that uses close to 50% of the CPU. > When I enable stereo (anaglyph/quad buffered), CPU utilization nearly > doubles. Is there a way to split the left and right eye frame rendering into > separate threads so that I can take advantage of mulitcore? I am using osg > 2.8.3 on windows. > > ... > > Thank you > > Brian > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31539#31539 > > > > > > ___ > 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] Manipulate the stereo view (render to texture).
Sheck osgPPU, its nodekit for doing render to screen aligned quads (for posteffects and such), there u can build "chains" of RTT targets with nodes feeding data to each other. Cheers, Sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31557#31557 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org