Re: [osg-users] OpenSceneGraph Oculus Rift integration
Hi, Mike, I think you have to set the clearcolor of HUD camera to change the clearcolor of the none-distorted area, and for the distorted area you have to set the clearcolor of the RTT camera. Other discovered bugs are: It might be issues with the depth in the scene, I had to add an osg::Depth StateAttribute to the scene to make the depthbuffer valid. In oculusdevice, the position vector has to be Vec3Array instead of Vec2Array for the distorsion mesh, otherwise it will fail when the TriangleFunctor is applied to the node, this was discovered when setting setAllowEventFocus to true for the cameras. Kind regards Patrik On Mon, Aug 25, 2014 at 2:24 AM, Mike Strean m...@strean.com wrote: Greetings, Sorry for the noob question ( and maybe more of a general OSG one ) ... I am working off of the osgoculus viewerexample, trying to set the background/Clear color. I guess I'm having trouble understanding how the views/viewers work together. I've tried in the graphics context: Code: gc-setClearColor( osg::Vec4( 0.0f, 0.0f, 0.0f, 1.0f ) ); and in the osgViewer: Code: viewer.getCamera()-setClearColor( osg::Vec4( 0.0f, 0.0f, 0.0f, 1.0f )); to no effect. Cheers, Mike[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60753#60753 ___ 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] 答复: OpenSceneGraph Oculus Rift integration
Hi All, I fetched the source code of OSGEarth 2.5 OSG 3.2.0 and successfully built them. When I load an ive file whose size is more than 100MB into OSGEarth, it will crash after a few minutes. But I load a file whose size is about 30MB, the OSGEarth can display it normally. Can anyone help to solve the issue? Best Regards. Glen -邮件原件- 发件人: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] 代表 Bj枚rn Blissing 发送时间: 2014年8月25日 5:12 收件人: osg-users@lists.openscenegraph.org 主题: Re: [osg-users] OpenSceneGraph Oculus Rift integration pajuelo wrote: Yes but thinking a little about the future, they will implement those features at some time but the oculus sdk will become closed source sooner than later... and dont forget that now the oculus sdk has no linux support :( I don't think that that Oculus SDK will become a purely closed source SDK. Some of the functions will remain closed to keep away cheap knockoffs. I guess functions such as sensor fusion and motion prediction will continue to be closed, since this is where I guess Oculus spent most of their RD money. But I see no business benefit for Oculus to hide API access to screen nor to camera. Right now you can access the screen, but there is no easy way of accessing the camera. Hopefully this will open up in the future so that open source developers can build their pure open source SDK with their own sensor fusion and motion prediction algorithms. As of Linux support in the official SDK; that has been promised. But it will be interesting to see how they choose to implement it. /Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60752#60752 ___ 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] 答复: OpenSceneGraph Oculus Rift integration
HI Glen, For different topics please start a different thread. Also a random crash could be anything, you have to provide further information so once you start a dedicated thread for this problem please specify the hardware/OS version you are using, provide a stack trace to the crash. Robert. On 25 August 2014 07:24, Glen first_...@21cn.com wrote: Hi All, I fetched the source code of OSGEarth 2.5 OSG 3.2.0 and successfully built them. When I load an ive file whose size is more than 100MB into OSGEarth, it will crash after a few minutes. But I load a file whose size is about 30MB, the OSGEarth can display it normally. Can anyone help to solve the issue? Best Regards. Glen -邮件原件- 发件人: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] 代表 Bj枚rn Blissing 发送时间: 2014年8月25日 5:12 收件人: osg-users@lists.openscenegraph.org 主题: Re: [osg-users] OpenSceneGraph Oculus Rift integration pajuelo wrote: Yes but thinking a little about the future, they will implement those features at some time but the oculus sdk will become closed source sooner than later... and dont forget that now the oculus sdk has no linux support :( I don't think that that Oculus SDK will become a purely closed source SDK. Some of the functions will remain closed to keep away cheap knockoffs. I guess functions such as sensor fusion and motion prediction will continue to be closed, since this is where I guess Oculus spent most of their RD money. But I see no business benefit for Oculus to hide API access to screen nor to camera. Right now you can access the screen, but there is no easy way of accessing the camera. Hopefully this will open up in the future so that open source developers can build their pure open source SDK with their own sensor fusion and motion prediction algorithms. As of Linux support in the official SDK; that has been promised. But it will be interesting to see how they choose to implement it. /Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60752#60752 ___ 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
Re: [osg-users] OpenSceneGraph Oculus Rift integration
Patrik Andersson wrote: Hi, Mike,I think you have to set the clearcolor of HUD camera to change the clearcolor of the none-distorted area, and for the distorted area you have to set the clearcolor of the RTT camera. This is correct. But it probably wise to let the clear color for the distorted view be black since this is what will be shown outside the FOV of the lenses. And setting it to anything else then black will result in having bright parts in you peripheral vision. Patrik Andersson wrote: Other discovered bugs are: It might be issues with the depth in the scene, I had to add an osg::Depth StateAttribute to the scene to make the depthbuffer valid. Strange, this is not something I have seen in any of my tests. But on the other hand I have tested with simple geometry. What types of issues are you seeing? Patrik Andersson wrote: In oculusdevice, the position vector has to be Vec3Array instead of Vec2Array for the distorsion mesh, otherwise it will fail when the TriangleFunctor is applied to the node, this was discovered when setting setAllowEventFocus to true for the cameras. Why would you like to allow event focus on the cameras? /Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60757#60757 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] wireframe
Hi All, I found a way to display graphics in wireframe, Code: stateset-setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); but is it possible to add a wireframe visualization over the shaded graphic? Please see attached picture. Regards, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60758#60758 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] wireframe
Hi Gianni, As an entrypoint, take a look at the osgscribe.cpp demo it helps you to perform shaded model + wireframing, along with that you can use osgFX::Scribe as a parent to your modelling object which allows you to set SetWireFRameColor, SetWireframeLineWidth ...etc.. attributes. Regards, From: g.ambrosio+...@gmail.com Date: Mon, 25 Aug 2014 12:54:23 +0200 To: osg-users@lists.openscenegraph.org Subject: [osg-users] wireframe Hi All, I found a way to display graphics in wireframe, Code: stateset-setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); but is it possible to add a wireframe visualization over the shaded graphic? Please see attached picture. Regards, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60758#60758 ___ 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] wireframe
Thank you Bacttrack, I didn't realized from the code that osgscribe example implemented what I need. osgFX::Scribe is also useful. Regards, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60762#60762 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph Oculus Rift integration
On Sun, Aug 24, 2014 at 11:12 PM, Björn Blissing bjorn.bliss...@vti.se wrote: pajuelo wrote: Yes but thinking a little about the future, they will implement those features at some time but the oculus sdk will become closed source sooner than later... and dont forget that now the oculus sdk has no linux support :( I don't think that that Oculus SDK will become a purely closed source SDK. Some of the functions will remain closed to keep away cheap knockoffs. I guess functions such as sensor fusion and motion prediction will continue to be closed, since this is where I guess Oculus spent most of their RD money. But I see no business benefit for Oculus to hide API access to screen nor to camera. Well, a closed source blob with a shim library that has source available under a restrictive license is not really open source. Setting ideological issues aside, there are tons of technical consequences of that design, for example a Linux support is going to be a major pain and a potential security liability. The blob would need to talk to the hw, that needs either root access or some distro-specific udev configuration, which they aren't likely to provide, except for perhaps some version of Ubuntu. It isn't hard to setup, but would make installation of Linux applications with Rift support a major pain. (the DK1 has similar issues, but at least one can see what the thing is trying to do, so no need for blind trust there). Right now you can access the screen, but there is no easy way of accessing the camera. Hopefully this will open up in the future so that open source developers can build their pure open source SDK with their own sensor fusion and motion prediction algorithms. I am afraid that unless someone reverse engineers the camera access and what they are doing with the synchronization signal, it won't be available. It is part of their IP, normally you don't need camera sync for tracking markers, so I guess they have done something clever there and wouldn't want to give that know-how away. Even reverse engineering it could be legally iffy in some countries. I hope I am too sceptical about this and that they will prove me wrong in the future, but it is extremely unfortunate that they took this decision. The design with the runtime is not a bad idea as such, because they could easily keep it under their proprietary license and have a fully public domain/BSD-licensed API library to access it - basically establishing an industry standard for the HMD support, with the different HMD vendors only providing their own runtimes using the same API. A win-win proposition for everyone. Unfortunately, as it is, they did it in the worst possible way - the runtime is an opaque blob and the API is still completely proprietary/restricted, so it cannot act as a standard. As of Linux support in the official SDK; that has been promised. But it will be interesting to see how they choose to implement it. I am also wondering. There are ways to make it work (e.g. how the Nvidia drivers are distributed), but I guess they will take the easy way out. Linux users are vocal, but there isn't that much money in them compared to Windows, so it will be a binary blob compiled for a blessed version of Ubuntu/SteamOS and the rest of Linux users will be on their own. If the runtime doesn't work on your machine, too bad ... Regards, J. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph Oculus Rift integration
On Mon, Aug 25, 2014 at 2:24 AM, Mike Strean m...@strean.com wrote: Greetings, Sorry for the noob question ( and maybe more of a general OSG one ) ... I am working off of the osgoculus viewerexample, trying to set the background/Clear color. I guess I'm having trouble understanding how the views/viewers work together. Please don't hijack the thread with unrelated issues. Start a new message/post, please. Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgExp 3ds max transforms
Hi, I am willing to export a 3D model from 3ds studio max to .osg files. Then, in my OSG application I assemble the exported model into a MatrixTransform node and apply some transformation. Althought, no matter which transformation I apply (rotate, translate or scale), it takes no effect in the final image. I realized that in the .osg file all the MatrixTransform nodes have their DataVariance attribute set to STATIC, but I already hard-coded it to DYNAMIC, but their transformations are still having no effect. Am I exporting the model the wrong way, or is the problem in the OSG application side? Thank you! Cheers, Jorge -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60766#60766 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgExp 3ds max transforms
Hi, just a wild guess - could it be that the exported model itself contains a transformation node as a parent, possibly with an absolute reference frame? This can be checked by using osgconv and converting your model to ASCII .osg format. Christian 2014-08-25 16:41 GMT+02:00 Jorge D'Alpuim jorgealp...@gmail.com: Hi, I am willing to export a 3D model from 3ds studio max to .osg files. Then, in my OSG application I assemble the exported model into a MatrixTransform node and apply some transformation. Althought, no matter which transformation I apply (rotate, translate or scale), it takes no effect in the final image. I realized that in the .osg file all the MatrixTransform nodes have their DataVariance attribute set to STATIC, but I already hard-coded it to DYNAMIC, but their transformations are still having no effect. Am I exporting the model the wrong way, or is the problem in the OSG application side? Thank you! Cheers, Jorge -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60766#60766 ___ 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] osgExp 3ds max transforms
Hi Jorge, Can you provide the code you are using to load the model and place it under the MatrixTransform? I don't know what could cause this issue other than the scene graph not being setup properly. Christian mentioned it could be caused by a parent with an absolute reference frame. The exporter does not change the reference frame of any transforms, so maybe you are changing the reference frame in your code? Either way, seeing some code would help a lot. Cheers, Farshid On Mon, Aug 25, 2014 at 7:41 AM, Jorge D'Alpuim jorgealp...@gmail.com wrote: Hi, I am willing to export a 3D model from 3ds studio max to .osg files. Then, in my OSG application I assemble the exported model into a MatrixTransform node and apply some transformation. Althought, no matter which transformation I apply (rotate, translate or scale), it takes no effect in the final image. I realized that in the .osg file all the MatrixTransform nodes have their DataVariance attribute set to STATIC, but I already hard-coded it to DYNAMIC, but their transformations are still having no effect. Am I exporting the model the wrong way, or is the problem in the OSG application side? Thank you! Cheers, Jorge -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60766#60766 ___ 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] [osgCompute] How to postprocess the data in depth buffer using osgCompute?
Hi, This library is a great work for combing CUDA with OSG. I think osgCompute is just what I'm looking for. I'm trying to use osgCompute in a manner very similar to the example of osgComputeDemoApp which can be found in the forum. However, my project needs to bind DEPTH_BUFFER instead of COLOR_BUFFER to the render texture, and then use the rendered depth information in the CUDA kernel. Here comes a problem. As the formats related to the depth buffer (GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, etc.) are not supported by CUDA, such error occurs: [osgCuda::TextureMemory::alloc()]: unable to register image object (cudaGraphicsGLRegisterImage()). Not all GL formats are supported. This problem troubles me a lot. So, how can I deliver the rendered depth information of the scene to the CUDA kernel by using osgCompute? Thank you! Cheers, Jack -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60769#60769 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] No texture with setUseVertexAttributeAliasing enabled
Hi, I tried to fix it with no success, any suggestion? Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60770#60770 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgCompute] How to postprocess the data in depth buffer using osgCompute?
Hi, Which version of osgCompute are you using? I think if you use the osgRTTDemo code from the latest osgCompute in svn as an example you should be able to render to a depth texture and pass that to a cuda kernel. it works for me. CD ... Thank you! Cheers, Conan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60771#60771 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgExp 3ds max transforms
Hi Jorge, It can be a quite dumb suggestion, since other experts comment on the issue , but did you call the dirtyDisplayList after you performed all the transformations? Regards, Date: Mon, 25 Aug 2014 09:41:53 -0700 From: fla...@gmail.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgExp 3ds max transforms Hi Jorge, Can you provide the code you are using to load the model and place it under the MatrixTransform? I don't know what could cause this issue other than the scene graph not being setup properly. Christian mentioned it could be caused by a parent with an absolute reference frame. The exporter does not change the reference frame of any transforms, so maybe you are changing the reference frame in your code? Either way, seeing some code would help a lot. Cheers,Farshid On Mon, Aug 25, 2014 at 7:41 AM, Jorge D'Alpuim jorgealp...@gmail.com wrote: Hi, I am willing to export a 3D model from 3ds studio max to .osg files. Then, in my OSG application I assemble the exported model into a MatrixTransform node and apply some transformation. Althought, no matter which transformation I apply (rotate, translate or scale), it takes no effect in the final image. I realized that in the .osg file all the MatrixTransform nodes have their DataVariance attribute set to STATIC, but I already hard-coded it to DYNAMIC, but their transformations are still having no effect. Am I exporting the model the wrong way, or is the problem in the OSG application side? Thank you! Cheers, Jorge -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60766#60766 ___ 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
Re: [osg-users] OpenSceneGraph Oculus Rift integration
On Mon, 25 Aug 2014 07:30:24 -0600, osg-users wrote: I am afraid that unless someone reverse engineers the camera access and what they are doing with the synchronization signal, it won't be available. It is part of their IP, normally you don't need camera sync for tracking markers, so I guess they have done something clever there and wouldn't want to give that know-how away. I believe (from a presentation by Oculus) that they are sequencing the LEDs in order to aid identification of which is which, but don't have access to DK2 to prove/experiment. Of course the current situation with the SDK is disappointing, hopefully they will remedy this sooner, rather than later. Simon ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSGEarth crash when loading large amount of data
Hello Robert, A strange issue occurs to me. As far as a plant ive model file whose size is about 100 MB is concerned, osgviewer can display it successfully, but when it is loaded into osgearth, osgearth will crash. I don’t attach this model file as it is so big. The running environment is as follows: CMake version: 2.8.12.2 Compilation tools: Visual Studio 2012 OS version: Windows 8 OSG version: 3.2.0 OSGEarth version: 2.5 Sorry for that I can’t give you the stack trace as I don’t know how to it. By the way, could you introduce some strategy to load large amount of data into OSG? 发件人: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] 代表 Robert Osfield 发送时间: 2014年8月25日 15:38 收件人: OpenSceneGraph Users 主题: Re: [osg-users] 答复: OpenSceneGraph Oculus Rift integration HI Glen, For different topics please start a different thread. Also a random crash could be anything, you have to provide further information so once you start a dedicated thread for this problem please specify the hardware/OS version you are using, provide a stack trace to the crash. Robert. On 25 August 2014 07:24, Glen first_...@21cn.com wrote: Hi All, I fetched the source code of OSGEarth 2.5 OSG 3.2.0 and successfully built them. When I load an ive file whose size is more than 100MB into OSGEarth, it will crash after a few minutes. But I load a file whose size is about 30MB, the OSGEarth can display it normally. Can anyone help to solve the issue? Best Regards. Glen 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