Re: [osg-users] [osgPlugins] Animated Gifs on iOS
I'm thinking to create a osg::ImageSequence if the actual Gif file contains more than 1 image and return that instead of a osg::Image object... I will test this approach more in depth and submit the improvement if there's no other way to use animated Gifs on iOS. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75770#75770 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Animated Gifs on iOS
Hi, I'm using OSG 3.6.3 on iOS and, as far as I understand, using imageio plugin the loading Gif images works fine, but I cannot see animations if the Gif is animated. Looking at the imageio plugins source code, unless I missed something, no ImageStream is ever created, instead just a single Image is returned with the image stored at index 0. Am I missing something or the imageio plugin should be updated to support animated Gifs? Thank you! Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75768#75768 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLES link error for unidentified Program
I did some more tests, tried to remove that 'program' from StateSet::setGlobalDefaults () and I realised that, at last, that very program is really not tried to be linked at all (it looks like the attached shaders are not even compiled, but I'm not 100% sure). So, I cannot say that the error comes from that 'program' in StateSet::setGlobalDefaults(), also because I tried to print the addresses of the 'program's being linked and I cannot track the origin of the one that fails to link...I also tried to get its attached shaders during the application loop but none is really attached to that program (calling getNumShaders() returns 0 on the 'program' that is not linked). I think that what I am missing is a deeper understanding about what happens beyond the setup of the simple scene graph that I explicitly do with my code. Is there the possibility that OSG automatically creates a 'program' somewhere else beyond my explicit code? Any suggestion where to look? I tried to search for strings like "new osg::Program" or "getOrCreateProgram" but could not figure out anything yet... Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72863#72863 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLES link error for unidentified Program
Hi Robert, and thanks again for your help and suggestions. I'm aware of the remapping done by OSG under the hood, indeed I had no issues with this when targeting GLES 2 with version 3.4.0. I investigated my issue further and found out that a osg::Program is added to the scene graph by the StateSet::setGlobalDefaults() method which does something like this: Code: osg::DisplaySettings::ShaderHint shaderHint = osg::DisplaySettings::instance()->getShaderHint(); if (shaderHint==osg::DisplaySettings::SHADER_GL3 || shaderHint==osg::DisplaySettings::SHADER_GLES3) { OSG_INFO<<" StateSet::setGlobalDefaults() Setting up GL3 compatible shaders"< program = new osg::Program; program->addShader(new osg::Shader(osg::Shader::VERTEX, gl3_VertexShader)); program->addShader(new osg::Shader(osg::Shader::FRAGMENT, gl3_FragmentShader)); setAttributeAndModes(program.get()); setTextureAttribute(0, createDefaultTexture()); addUniform(new osg::Uniform("baseTexture", 0)); } this automatically added program is the one that fails while linking. Now I'm trying to understand why it fails, but my question is: why is this program added? Is it supposed to provide a 'default' program in case there's nothing else in the scene graph? Can I avoid it to be added? I'm also trying to understand where StateSet::setGlobalDefaults() is called in the first place... Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72862#72862 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] GLES link error for unidentified Program
Hi, I used to work with OSG 3.4.0 (stable) and now I'm trying version 3.5.10 on iOS (trying both GLES 2 and 3) but now I having the following error when the first frame is drawn: glLinkProgram 0x1c41cda70"" FAILED Program "" infolog: ERROR: OpenGL ES requires exactly one vertex and one fragment shader to validly link. Note that I have only one quad to which I apply a texture, I'm using a single 'vertex' and 'fragment shader' and there's only on 'program' around. The same code works fine with OSG 3.4.0 and even though with version 3.5.10 there is the above error, the texture is nonetheless displayed. If I use a more verbose notification level I see that my program "BckProgram" is compiled and linked correctly but then another program with empty name is tried to be linked and it is the one for which I'm receiving the above error, but I did not create a second program anywhere... am I missing something? And here's the verbose log: View::init() cull() cull() got SceneView 0x106510300 ShaderComposer::~ShaderComposer() 0x1c02d7450 Uniform Adding parent Uniform Adding parent Uniform Adding parent Uniform Adding parent Uniform Adding parent Uniform Adding parent Uniform Adding parent end cull() 0x1065101f0 draw() got SceneView 0x106510300 Renderer::compile() State::convertShaderSourceToOsgBuiltIns() ++Before Converted source varying vec2 texcoord; void main(void) { texcoord = gl_MultiTexCoord0.xy; gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } Converted source attribute vec4 osg_MultiTexCoord0; attribute vec4 osg_Vertex; uniform mat4 osg_ModelViewProjectionMatrix; varying vec2 texcoord; void main(void) { texcoord = osg_MultiTexCoord0.xy; gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; } Compiling A :VERTEX source: 1: attribute vec4 osg_MultiTexCoord0; 2: attribute vec4 osg_Vertex; 3: uniform mat4 osg_ModelViewProjectionMatrix; 4: varying vec2 texcoord; 5: void main(void) 6: { 7: texcoord = osg_MultiTexCoord0.xy; 8: gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; 9: } State::convertShaderSourceToOsgBuiltIns() ++Before Converted source precision mediump float; uniform sampler2D texture0; varying vec2 texcoord; void main(void) { gl_FragColor = texture2D( texture0, vec2(texcoord.x, 1.0-texcoord.y)); } Converted source precision mediump float; uniform sampler2D texture0; varying vec2 texcoord; void main(void) { gl_FragColor = texture2D( texture0, vec2(texcoord.x, 1.0-texcoord.y)); } Compiling A :FRAGMENT source: 1: precision mediump float; 2: uniform sampler2D texture0; 3: varying vec2 texcoord; 4: void main(void) 5: { 6: gl_FragColor = texture2D( texture0, vec2(texcoord.x, 1.0-texcoord.y)); 7: } Linking osg::Program "BckProgram" id=3 contextID=0 State's vertex attrib binding 2, osg_Color State's vertex attrib binding 12, osg_FogCoord State's vertex attrib binding 3, osg_MultiTexCoord0 State's vertex attrib binding 4, osg_MultiTexCoord1 State's vertex attrib binding 5, osg_MultiTexCoord2 State's vertex attrib binding 6, osg_MultiTexCoord3 State's vertex attrib binding 7, osg_MultiTexCoord4 State's vertex attrib binding 8, osg_MultiTexCoord5 State's vertex attrib binding 9, osg_MultiTexCoord6 State's vertex attrib binding 10, osg_MultiTexCoord7 State's vertex attrib binding 1, osg_Normal State's vertex attrib binding 11, osg_SecondaryColor State's vertex attrib binding 0, osg_Vertex Program "BckProgram" link succeeded, infolog: WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord7' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord5' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_SecondaryColor' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord1' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord6' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_FogCoord' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_Normal' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_Color' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord4' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord2' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord3' to match BindAttributeLocation request. Uniform "texture0" loc=4 size=1 type=sampler2D Uniform "osg_ModelViewProjectionMatrix" loc=0 size=1 type=mat4 Attrib "osg_MultiTexCoord0" loc=3 size=1 Attrib "osg_Vertex" loc=
Re: [osg-users] [osgPlugins] Unable to load texture in the same folder as the scene file
Hi, if you open the FBX file with a text editor you will see that, for each texture, the corresponding path is stored to refer to the absolute path in your computer file system... try to modify those paths by removing all the paths components but the filename of the texture (if you want the textures to be in the same folder as the .fbx file). You could also try to export the binary variant of the FBX file instead of ASCII, in that case be sure to check the embed media option in order to include the textures inside the FBX file itself. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72791#72791 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] iOS/OSX: avfoundation plugin not reporting correct media duration
Hi Robert, as far as I know the issue was present already with OSG version 3.4.0. According to the AVFoundation documentation it seems that when one wants to access 'static' aspects of a media, such as the duration it is safe to rely on the AVAsset reference while when actually playing the media one has to use the AVPlayerItem instance, whose specific duration may be available only after a while... this is the reason, I think, the _duration variable is set to 0 in the above code. This is what the doc says: > AVAsset only models the static aspects of the media, such as its duration or > creation date, and on its own, is unsuitable for playback with an AVPlayer. > To play an asset, you need to create an instance of its dynamic counterpart > found in AVPlayerItem. In my proposal, [avplayer.currentItem asset] is the AVAsset reference that stores the static duration of the movie, and avplayer.currentItem is the AVPlayerItem that is still used for playback. Anyway, I'm not an expert of AVFoundation, so please, anyone with more experience with that is welcome to comment :) Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72789#72789 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] CMake fails to find latest FBX SDK for iOS
Hi, found out that current version of FindFBX.cmake does not manage to find the FBX SDK version 2018.1.1 specifically for iOS. To my understanding the reasons are: 1) the FBX_LIBDIR is not set to any of the real folders used for the iOS/simulator distribution, which are "ios-armv7" and "ios-386" 2) if we search for FBX_LIBNAME such as "libfbxsdk" (without ".a") CMake fails to find the library (I'm using CMake version 3.10.2) even if I explicitly set the extensions that it should look for 3) the FBX_SEARCH_PATH is missing "/Applications/Autodesk/FBX SDK/2018.1.1" My proposal: A) add the correct folders to search into B) add the ".a" extension at least for iOS to the lib base name C) add the missing "/Applications/Autodesk/FBX SDK/2018.1.1" to FBX_SEARCH_PATH I've already my modifications ready, if you agree I can send a pull request. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72788#72788 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] CMake fails to generate project for iOS
Hi, when trying to generate a valid Xcode project to build OSG for iOS I noticed that even if we follow the platform specific instructions available on the OSG website, one has to manually modify the path to many iOS frameworks that are not set correctly by CMake using the current version of the CMakeLists.txt file. Specifically I tried with CMake 3.6.2, 3.9.6 and the latest 3.10.2. Xcode is version 9.2 and I am targeting iOS 11.0 as minimum deployment target. Based on my experience the following frameworks are not set correctly and consequently the Xcode project fails to build: OpenGLES.framework AVFoundation.framework CoreMedia.framework CoreVideo.framework QuartzCore.framework SystemConfiguration.framework Also zlib is not set correctly to the iOS SDK specific path. Since the official version of CMake's find does not manage to set those paths correctly I'm proposing to modify the OSG's CMakeLists.txt file. To this regards, is there anyone out there that is experiencing the same issue? Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72787#72787 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] iOS/OSX: avfoundation plugin not reporting correct media duration
Hi, I found out that when you want to know the duration of a media file, specifically a movie, the instruction: Code: _videoDuration = CMTimeGetSeconds([_data->avplayer.currentItem duration]); returns 0, I tried to use the following instead: Code: _videoDuration = CMTimeGetSeconds([[_data->avplayer.currentItem asset] duration]); that seems to return the correct movie's duration in seconds. If you agree I will send a pull request about this fix. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72784#72784 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [ANN] Job Opportunity: Realtime 3D Computer Graphic Engineer (web/osgjs)
Hello dear OSG-community, I'm posting a job call on behalf of my company, please read the details below and get in touch if you are interested. Job description ABOUT INGLOBE TECHNOLOGIES Inglobe Technologies is a leading company that develops Software and Solutions that enable the creation of Smart and Augmented Environments. Inglobe is the developer of the popular Augmented Reality (AR) platforms ARmedia, Hyperspaces, HyperIndustry and ARmedia SDK. With more than 60.000 registered users worldwide and +1.230.000 total installs of mobile apps, Inglobe provides AR solutions and software to different market segments, including Architecture, Engineering & Construction (AEC), Avionics and Aerospace, Medical & Healthcare, Process Industry, Manufacturing, Media & Publishing, Cultural Heritage and Education. More on the company here: http://www.inglobetechnologies.com. POSITION OPEN Position: Realtime 3D Computer Graphic Engineer (web) Kind of Position: Full Time Kind of Contract: Permanent Contract by the Italian Law Other options: we also consider professional collaborations with different contracts (e.g. Partita IVA holders) Requisite: remunerated trial period: 1-2 months Place: the resource will be employed in one of the following company offices in Italy: Ceccano, Rome, Milan DESCRIPTION OF POSITION We are seeking an experienced software engineer with 3D computer graphics skills especially related to web technologies. This engineer will work primarily on custom virtual and augmented reality web applications supposed to run smoothly on the most used browsers. RESPONSIBILITIES Develop Highly Interactive and Advanced 3D Applications Collaborate with the Project Team to deliver quality code on schedule EDUCATION B.S in Computer Science, Computer Engineering or related field (Preferred) EXPERIENCE 1+ years experience with 3D technologies for the Web 1+ years of development of 3D real-time applications is a PLUS 1+ years Unity3D is a PLUS 1+ year experience with any AR SDK or Authoring Tool is a PLUS REQUIREMENTS Design and analysis of software components Reliable time management and task estimation Programming Patterns Knowledge of Windows and Mac OS X operating systems Knowledge of Real-time 3D Computer Graphics concepts and methods Good to excellent Three.js skills Good to excellent PHP, Python, JavaScript, HTML/CSS and bash scripting skills Good to excellent OpenGL/OpenSceneGraph/GLSL skill Design and implementation of modern and effective GUI SKILLS (PLUS) C/C++ programming skills Good to excellent iOS/Android Programming Skills Knowledge of Computer Vision concepts and Libraries Knowledge of Artificial Intelligence and Machine Learning concepts and Libraries LANGUAGE AND COMMUNICATION English Fluent (both written and spoken) Good communication and relational capabilities Italian, French, Spanish, Russian, Chinese, or Portuguese is a plus PERSONAL INFORMATION Besides the above, we are seeking for individuals who are also: Autonomous, i.e. you are able to solve problems autonomously without relying on the help of anybody else thanks to a strong attitude toward careful reflection and research Creative, i.e. when you face a new problem you do not limit yourself to experiment just with the existing solutions, instead you find a new solution that possibly integrates and improves, if it does not totally replace, the existent Open-minded, i.e. it is normal for you to offer your best contribution to the team even if this might require others to change their mindset; on the other hand it is normal for you to accept constructive criticism from others when it is meant to improve the quality of the outcomes Pragmatic, i.e. you work to reach the goals and aim at resolving a problem efficiently without getting lost in its many possible ramifications unnecessarily Problem Solver, i.e. you are not scared by new problems and challenges; on the contrary they exalt your capability to solve them Collaborative, i.e. when you deal with a complex problem you are willing to collaborate with others in finding a solution; not only you offer your contribution, but you are always ready to review your ideas and work anytime when necessary Accurate, i.e. your job is always carried out and described in a synthetic and as complete as possible way Curious, i.e. you are always seeking new information and you like learning new things Traveler, i.e. traveling around the globe does not scare you, on the contrary it stimulates you If you recognize yourself in the profile above then you could be the ideal candidate! Applications can be sent to or through LinkedIn https://www.linkedin.com/jobs/view/504568916/. Looking forward to hearing from you! Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72423#72423 ___ osg-users mailing list osg-users@lists.opensc
Re: [osg-users] [osgPlugins] Osg to fbx
Hi Joe, I'm quite confident that the latest version of OSG works with the latest version of the FBX sdk... did you tried them? Alessandro On Wednesday, May 3, 2017, Joe Kindle wrote: > Hi, > I'm using visual studio 2012, osg version 3.0.1 > I want to convert osgb file into fbx, the problem is : > Version 3.0.1 supports fbx sdk 2012.1, and it supports visual studio 2010 > only > What is the best solution ? I want to stay with that version of visual > studio (2012). What versions of osg, fbx sdk should I use ? > > > ... > > Thank you! > > Cheers, > Joe > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=70875#70875 > > > > > > ___ > 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] Shadows on "invisible" objects
Hi Nick, as far as I understand you'd like to cast shadows onto a geometry that is kind of invisible but still can receive shadows, is this right? Have you already read these? http://forum.openscenegraph.org/viewtopic.php?t=8912&highlight=invisible+shadow http://forum.openscenegraph.org/viewtopic.php?t=12628&highlight=invisible+shadow Hope these will help. Alessandro On Tue, Mar 28, 2017 at 9:06 AM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Hi Community, > > I am trying to solve a problem where my scene is with shadow caster model > where I want to see only the shadows and have the shadow caster model > invisible. What would be the node masks game to achieve this? or some other > solution? > > Thanks a bunch as always > > Nick > > -- > trajce nikolov nick > > ___ > 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] StatsHandler on mobile devices
Hi, is there any way to show rendering statistics (by means of the StatsHandler class) programmatically (i.e. without the need to press any key)? I'd like to show those stats when the viewer runs on mobile devices where the keyboard is not available. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66443#66443 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OcclusionQueryNode iOS Crash
Hi, I'm trying to use the OcclusionQueryNode to check if a model (loaded from a file) is visible or not, but as soon as the app starts I get some warnings: Code: Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile Warning: PolygonMode::apply(State&) - is not supported. Warning: PolygonMode::apply(State&) - is not supported. Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) the first frame is actually drawn (and the loaded model is also displayed correctly) but the app crashes with this message: Code: error: memory read failed for 0x0 I'm using OSG 3.4.0 on iOS (8.4.1). Built with OpenGLES 1.0 support. FYI, I'm just adding the OcclusionQueryNode to a group and then I add a subgraph (where there's the loaded model) to the OcclusionQueryNode itself. Moreover regardless if I enable or not the occlusion node (by means of setQueriesEnabled(bool)) the app crashes in any case. Do you know if OcclusionQueryNode has some problems on iOS? Any suggestion? Thank you. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65162#65162 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems with MultiTouchTrackballManipulator on iOS.
Hi, recently I updated my apps from OSG 3.2.0 to OSG 3.4.0 and I noticed that the MultiTouchTrackballManipulator behaves differently. Specifically while single touches are working almost the same (for instance to rotate the view), the pinch gesture is quite different because even if I try to make a very small pinch, the model disappears suddenly. I checked that the near and far planes are correctly set, so maybe the problem must be somewhere else. Is there a 'speed' parameter that controls how much the gesture affects the manipulator? I am thinking about a 'speed' parameter because actually also the camera rotation controlled by the manipulator (single touch gesture) is either very slow or incredibly fast. Thank you. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64850#64850 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ColorMask and depth information issue.
Hi Robert, thank you for the answer, I managed to get to the expected result following your suggestion. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64799#64799 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ColorMask and depth information issue.
Thank you again Robert for your explanation. So I tried to explicitly set some render bins but I am not sure to understand what happens now. I am attaching 2 files: the yellow box and a blue box to which I apply the color mask. I modified both files in order to use the same render bin number and name ("RenderBin"), what I observe is: 1) if the bin number of the color-masked box is "lower" than the other then it hides the yellow box 2) if the bin number of the color-masked box is "higher" than, or equal to, the other then it does NOT hide the yellow box I expected the opposite, am I wrong? Also, if instead of using "RenderBin" I use "DepthSortedBin" then the behavior is similar but, in the case where the bin numbers are equal, then the occlusion works only up to a certain viewing angle. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64784#64784 Attachments: http://forum.openscenegraph.org//files/bnm_122.osg http://forum.openscenegraph.org//files/b_o_129.osg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ColorMask and depth information issue.
Using render bins makes sense but what I still do not completely understand is why the very same setup with OSG 3.2.1 worked as I expected despite of render bins and, also, since the occluder plane is taken into account to fill the depth buffer (as well as the boxes) why it is still required to explicitly set render bins? Does it make sense if they all live in the same render bin? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64779#64779 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ColorMask and depth information issue.
Have you tried to rotate the view? There's a plane hanging over the red and yellow boxes and unless you move the camera you won't realize about it's presence in the scene (regardless of the ColorMask). I'm attaching a couple of screenshots related to what I get with and without the color mask applied to the plane after having rotated the camera a little bit. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64771#64771 Attachments: http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_43_16_67_211.png http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_42_16_14_317.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ColorMask and depth information issue.
Sorry Robert, I tried to cleanup that file but missed to remove a bracket. Anyway, I have fixed it and also exported another .osg file where I apply the ColorMask to a quad. I tried on Windows (where I currently have OSG 3.4.0 rc9...) and if I open the 3 models together at the same time I still see the problem: the red box is hidden while the yellow one is not. I am attaching the 3 .osg files again. Please let me know if you also have this problem on Linux or whatever you are using now. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64769#64769 Attachments: http://forum.openscenegraph.org//files/occluder_163.osg http://forum.openscenegraph.org//files/bnm_147.osg http://forum.openscenegraph.org//files/bm_209.osg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ColorMask and depth information issue.
Thank you Robert. I will try to setup an example on a desktop computer. Just to add more to the topic, I tried to call osg::Camera::getOrCreateStateSet()->setGlobalDefaults(); but nothing changed. And here's how I setup my camera (that is not the one coming from the viewer): Code: foreground_camera = new osg::Camera; foreground_camera->getOrCreateStateSet()->setGlobalDefaults(); foreground_camera->setViewport(new osg::Viewport(0, 0, captureWidth, captureHeight)); foreground_camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); foreground_camera->setClearMask( GL_DEPTH_BUFFER_BIT ); foreground_camera->setRenderOrder(osg::Camera::POST_RENDER, 2); foreground_camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); foreground_camera->setCullingMode(osg::CullSettings::NO_CULLING); This camera is supposed to render objects on top of a video camera feed. I am attaching also 2 simple boxes (osgt) one is correctly hidden the other is not. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64766#64766 Attachments: http://forum.openscenegraph.org//files/bnm_150.osg http://forum.openscenegraph.org//files/bm_102.osg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ColorMask and depth information issue.
Hi Robert, so far I can say that if I do not apply the ColorMask then the object is rendered correctly. Also, there is one specific geometry that actually gets hidden by the object the ColorMask is applied to, whereas all other geometries appear on top of that object. Apparently the only difference among those geometries is that the first has an opacity map applied while the others do not. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64763#64763 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] ColorMask and depth information issue.
Hi, I am having a problem related somehow to osg::ColorMask ... in order make an object invisible while still taking it's depth information into account I use these instructions: Code: osg::ref_ptr< osg::ColorMask > mask = new osg::ColorMask(false, false, false, false); my_model->getOrCreateStateSet()->setAttributeAndModes(mask.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE) This used to work fine with OSG version 3.2.1 but I've tried using OSG 3.4.0 (stable release) and now the object is still not rendered but also the depth information seems to be ignored because other objects that are supposed to be behind that 'invisible' objects are not hidden by it anymore. I'm using GLES1 profile on iOS. Tried to apply the color mask on a model loaded from FBX or OBJ. Any suggestion? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64756#64756 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems loading OSGB files created with old version of OSG.
Understood. I will try to find the original scenes, export them again using a new version of OSGExp re-built against OSG 3.4.0 and see what happens. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64662#64662 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems loading OSGB files created with old version of OSG.
Hi Robert, I am not sure about the exact version I used... we are talking of 2 years ago and, as far as I remember, I used the latest version available at that time to build OSGExp plugin for 3ds Max and to export the model I've shared (maybe it was version 2.9.4). Also, if it can help, osgviewer built against OSG version 3.1.0 can open that model without errors (but with the messages I posted in my previous message). What I can do is to export a new animated model using a more recent version of OSGExp and check if there exists the same problem. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64660#64660 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems loading OSGB files created with old version of OSG.
Hi Robert, I tried the conversions you suggested, during the conversion process I received these messages: InputStream::readObject(): Unsupported wrapper class osg::ComputeBoundingBoxCallback InputStream::readObject(): Unsupported wrapper class osg::UpdateCallback InputStream::readObject(): Unsupported wrapper class osg::ComputeBoundingBoxCallback InputStream::readObject(): Unsupported wrapper class osg::UpdateCallback This, by the way, was the reason I wanted to upgrade to OSG 3.4.0. Then, tried to open the converted models using osgviewer (3.4.0) and they all work (even though the "ive" and "osgt" variants have misplaced geometries) - the original animation seems that has been removed, or at least it does not work anymore: with the "ive" variant osganimationviewer crashes, whereas with "osg" and "osgt" variants the animation is actually found (as "Take 001") but the geometries do not move at all. I am attaching a zip with the original OSGB file and the converted variants. Thank you. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64657#64657 Attachments: http://forum.openscenegraph.org//files/models_127.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems loading OSGB files created with old version of OSG.
Hi, I am experiencing some problems when I try to load osgb files containing animations. Those files were created with a quite old version of OSG and now I'm trying to load them using version 3.4.0 rc9. If I try to load models without animations then they are opened correctly. Basically here's the message I get: InputStream: Failed to read from stream. At osg::Node When enabling a more verbose notify level I get the log attached to this post. As far as I could try the problem seems to exist both on Windows and iOS. Any suggestion? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64655#64655 Attachments: http://forum.openscenegraph.org//files/log_939.txt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: flickering problem when changing orientation and using AutoLayout
I came across this issue...again. What I found out this time is that when the OSG view is resized (because of Auto Layout trying to enforce some constraints), "that" UIView is resized correctly but it also has a subview (created by OSG automatically I guess) that keeps the original size and is displayed behind the first view... in some cases, in order to avoid the problem, one has to change the viewport to match the 'original' size and not the new one but this does not work in every case of course. This is particularly annoying when using Size Classes. Anyone had the same issue? Any suggestion/workaround? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63230#63230 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLES 2 and models loaded from files without any shader definition
Hi Robert, > ShaderComposition still requires you to put together the shaders so won't > instantly give you what you after. The ShaderComposition functionality is > also experimental. > > In your case it's probably best just to implement your own shaders. In order to follow your suggestion, can you point me to an example (if available) that shows how to use ShaderComposition with my own shaders implementation? If I understood correctly this would make my life a little easier but I still would need to do some manual work (ie just to provide custom GLES 2 shaders source code), am I correct? I guess that this would be fine in my case. Thank you. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62477#62477 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] GLES 2 and models loaded from files without any shader definition
Hi, I'm trying to develop apps for iOS using GLES 2, so far I managed to build OSG 3.2.1 to use GLES 2 and as long as I create some geometry and manually load/apply GLES 2 shaders everything is fine. On the other hand I am experiencing some issues when I try to load models from files (not containing any shader definition - OBJ, FBX and some OSG/OSGT). I know that when I use such kind of models then I should provide GLES 2 shaders in order to display them and, to my understanding, there are 3 possibilities: 1) manually apply shaders to the loaded model 2) use ShaderGenVisitor that generates shaders automatically 3) use Shader Composition I tried using ShaderGenVisitor, but it looks like that the shaders that are generated are not GLES 2 compliant (because of missing pre-built attributes), and even though attribute aliasing is applied, not every "gl_" attribute is translated to the corresponding "osg_" version. For instance in the converted version I have a row like this: gl_Position = osg_ModelViewProjectionMatrix * gl_Vertex; Note that only "gl_ModelViewProjectionMatrix" has been converted but for some reason "gl_Vertex" has not changed. Also, there are attributes that are not translated at all, like gl_TexCoord and gl_LightSource. Searching the forum, it looks like that the ShaderGen approach should be replaced by Shader Composition, so I wanted to try it but I'd need some directions to start with it...so far I only managed to enable it like this: state->SetShaderCompositionEnabled(true); Where state comes from the viewer's window. But no model is displayed by the viewer. Actually I am not sure at all that I should use Shader Composition, so my question is: if in my GLES 2 app I want to display models loaded from files (not containing any shader definition), what should I use and where should I look at to get started? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62475#62475 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] iOS: Crash when deallocating viewer on arm64 devices.
Hi all and happy New Year! I'm facing an issue related to OSG for iOS, specifically I built OSG for the following architectures: armv7, armv7s and arm64 but when I build my iOS app and run it on a device with arm64 I got a crash when the viewer is deallocated, in particular somewhere in GraphicsWindowIOS::closeImplementation(). A workaround would be just not to build for arm64, but the problem is that starting from the February the 1st Apple requires that architecture otherwise the app would be rejected. Any idea or suggestion about this issue? Has anyone else experienced it? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62213#62213 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] iOS: texture memory not released
Hi Robert, thank you for updating the documentation. As mentioned earlier I was using release() where I was not supposed to, anyway after having updated my code I noticed that there is a potential issue related to some memory not being released by the osgdb_fbx plugin... specifically I noticed that when the plugin loads a file it first sets the CACHE_IMAGES option. To my understanding this makes the osgDB::Registry instance to keep references to loaded images contained in the FBX file. The problem is that it seems that the fbx plugin seems not to clean the registry cache (even when it is not used anymore), so my question is: is the fbx plugin supposed to clean the cache after it has done its job or this task is supposed to be done 'manually/explicitly ' by the user? Or in general, when the registry cache is supposed to be cleaned? Is the viewer in charge of cleaning the registry's cache when it has done? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62168#62168 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] iOS: texture memory not released
The problem was exactly in the way I was releasing test_obj, I misunderstood the ref_ptr::release() semantic (my fault, sorry) but now that I had a second look at its implementation I saw that it calls unref_nodelete() and not unref() and that wrong assumption of mine lead to memory leaks. Thank you anyway for all the info and suggestions provided so far. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62156#62156 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] iOS: texture memory not released
Hi again, I've done other tests and I think that the problem is not just related to Image but to the Referenced class in general, because in my last test I just derived a simple class from Referenced, added a member variable to my ViewController like this: osg::ref_ptr test_obj; then I instantiated test_obj and when I release it, its destructor is never called (even though the reference count is set to 0 and the test_obj seems to be not valid anymore). Moreover, if I use just simple pointers, like this: MyReferencedClass* test_obj_2; then it's destructor is called. So, to my understanding, the problem happens only when using ref_ptr. I have searched the Internet for something ObjectiveC 's specific, and found that there exist a compiler option GCC_OBJC_CALL_CXX_CDTORS that should/can be used to ask the OBJ-C code to call Cxx destructors, but actually it seems not to make any difference in my case. I am quite sure that it is something that depends on the compiler options or some Xcode settings, I use to use OSG from iOS SDK 4 and never had such an issue, I am experiencing it now with iOS SDK 7 and 8. Thanks Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62154#62154 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] iOS: texture memory not released
Hi again, unfortunately I was wrong, I still experience the same problem. Furthermore, I managed to reproduce it even in the very simple case where I just create a osg::Image object (loading it from disk) and releasing it immediately: the memory does not get deallocated even though the image reference's count is correctly set to 0. Note: the problem happens even if I do not create any viewer and do not create any OpenGL context, I am just loading an image from disk into an osg::Image object. Any suggestion? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62147#62147 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] iOS: texture memory not released
Thank you Robert, I will try to understand if I really need to use those methods or if I manage to let the viewer do all the cleanup as it is supposed to do. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62093#62093 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] iOS: texture memory not released
Hi Robert, thank you for your answer, I guess that what you have talked about is exactly what is happening in my case. Indeed, I tried to 'manually' release the textured objects while the rendering loop is still active and I assured that this happened in the same thread that created the OpenGL context: in this case everything is freed as expected and in a very short time. Now I have to figure out why this does not happen when I 'dealloc' the view controller that originally created the rendering context (I'm releaseing OSG stuff in the 'destructor' of the view controller), I guess that this may be related to the fact that the 'dealloc' operation actually happens in a different thread (need to check this), so even though I release the scene graph and the viewer, all those OpenGL objects are kept in memory (as you said). Provided that I will free all resources in the right thread, is there a way (API) to force the viewer to delete that orphaned OpenGL texture object or this can happen only automatically? Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62081#62081 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] iOS: texture memory not released
Hi, I've noticed that when I load a model with a texture and then dismiss the ViewController that displays that model, even though I correctly release it's memory (I'm tracing reference counts and I see that they always are 0 when the ViewController is dismissed), all the memory related to textures is still allocated. Anyone having this same issue? Moreover, it looks like that the same texture is allocated several times (2 or 4 depending on the plugin I use to load a model, for instance using fbx I see a couple of allocations while when using obj I see 4 allocations...and every single one remains allocated). I'm using OSG 3.2.0, iOS SDK (as well as iOS itself) is 7 or 8 and tried with both Xcode 5.1.1 and Xcode 6. Don't know if this could be meaningful but I built OSG and my app with these compiler settings: C Language Dialect: compiler-default C++ Language Dialect: compiler-default C++ Standard Library: libstdc++ I am attaching a couple of stack traces captured using Instruments and related to the same run/same snapshot. Thank you for your help. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62075#62075 Attachments: http://forum.openscenegraph.org//files/screenshot2_891.png http://forum.openscenegraph.org//files/screenshot1_156.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [forum] iOS: texture memory not released
Hi, I've noticed that when I load a model with a texture and then dismiss the ViewController that displays that model, even though I correctly release it's memory (I'm tracing reference counts and I see that they always are 0 when the ViewController is dismissed), all the memory related to textures is still allocated. Anyone having this same issue? Moreover, it looks like that the same texture is allocated several times (2 or 4 depending on the plugin I use to load a model, for instance using fbx I see a couple of allocations while when using obj I see 4 allocations...and every single one remains allocated). I'm using OSG 3.2.0, iOS SDK (as well as iOS itself) is 7 or 8 and tried with both Xcode 5.1.1 and Xcode 6. Don't know if this could be meaningful but I built OSG and my app with these compiler settings: C Language Dialect: compiler-default C++ Language Dialect: compiler-default C++ Standard Library: libstdc++ I am attaching a couple of stack traces captured using Instruments and related to the same run/same snapshot. Thank you for your help. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62071#62071 Attachments: http://forum.openscenegraph.org//files/screenshot2_110.png http://forum.openscenegraph.org//files/screenshot1_593.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] iOS: flickering problem when changing orientation and using AutoLayout
Hi, I'm experiencing a problem related to orientation changes on iOS and AutoLayout. Specifically, in InterfaceBuilder I created a UIView where I render OSG stuff, I made this view a subview of the ViewController's main view, then if I add some constraints among those views (in order to resize the OSG view appropriately), I see that when orientation changes, the OSG view content flickers a lot between a couple of frames (when I go back to the original orientation everything works again) . If I remove the constraints then the issue disappears. Anyone with the same problem? Any suggestion? Thanks! Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60875#60875 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] imageio plugin memory issue.
Hi, while profiling my iOS app I noticed that when I load a model with a texture memory grows up to 130MB, after a while it drops down to 64MB and even if I release the memory of the whole scene graph (I dealloc the whole ViewController that hosts all the osg stuff...) those 64MB remain allocated on the heap. Using the Instruments tools I found out that the responsible for that allocation is this function: osg::Image* CreateOSGImageFromCGImage(CGImageRef image_ref); Anyone having the same issue? Any suggestion about a possible solution? I used the latest OSG developer release (3.3.1) and also the stable release (3.2.0). Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59226#59226 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Cannot generate Xcode project (OSX 10.9/Xcode 5)
Hi Stephan, yes, I did specify OSG_BUILD_PLATFORM_IPHONE, but the OPENGL_INCLUDE_DIR was not set. Finally I managed to generate the Xcode project by manually set it to: /System/Library/Frameworks/OpenGL.framework. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57687#57687 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Cannot generate Xcode project (OSX 10.9/Xcode 5)
Hi, just downloaded the latest sources from GIT but I am facing some issues when I try yo generate the Xcode project for iOS, I am using Mac OS X 10.9 and Xcode 5...I set CMake variables in order to build of OpenGLES 2 (as suggests here: http://trac.openscenegraph.org/projects/osg//wiki/Community/OpenGL-ES), but I get an error regarding the variable OPENGL_INCLUDE_DIR not being set (in the past I did not touched that variable in any way and always managed to generate the Xcode project), am I missing something new now? Any suggestion? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57683#57683 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [ANN] New Augmented Reality project based on OSG - crowdfunding started
Hi all, I am glad to announce that at Inglobe Technologies (http://www.armedia.it) we have just launched a crowdfunding campaign for our new Augmented Reality project I-Mechanic (http://www.indiegogo.com/projects/i-mechanic-the-ar-app-that-turns-yourself-into-a-mechanic). We have been working hard on our new 3D tracking technology and we prepared some demonstrations (http://www.youtube.com/inglobe)during the last few months, all of which were bases on OpenSceneGraph for iOS. Some of them were also presented at the Augmented World Expo 2013 in Silicon Valley last June. Now we have decided to turn one of these demos into a real App: I-Mechanic is the name of the project, if you'd like to contribute have a look at the campaign website: http://www.indiegogo.com/projects/i-mechanic-the-ar-app-that-turns-yourself-into-a-mechanic Looking forward to receive your feedback and, hopefully, your contribution :) Alessandro[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56035#56035 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] NPOT textures on iOS (GLES 1.x)
Hi Stephan, thank you for your help, it works indeed...I've tried with a new clean project and everything went fine (maybe there was something wrong in the app/project I was originally trying it with). Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53501#53501 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] NPOT textures on iOS (GLES 1.x)
As far as I know, if we want to use NPOT textures on iOS (specifically using GLES 1.x APIs) we have to use a subload callback. No problem with this, but I've also found that many developers suggest to use a specific extension created by Apple itself that should allow the usage of such textures by simply setting the wrap mode to "CLAMP_TO_EDGE". I tired this other approach with OSG, but it seems not to work...is there something else (beyond setting the wrap modes) that must be done in order to use that extension? Anyone managed to use it successfully? The extension should be called "GL_APPLE_texture_2D_limited_npot". Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53474#53474 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video textures on iOS (and audio)
Hi Stefan, thanks for the explanation, I will try to follow your suggestion. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51871#51871 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video textures on iOS (and audio)
Hi again, I managed to use the avfoundation plugin, everything seems to work fine but I have an issue with a video that was recorded using an iPhone (portrait mode): when it is played on a texture, it is rotated by 90 degrees. That same video is not rotated if I play it for example on a PC or Mac using other plugins different than avfoundation (in particular the quicktime plugin)...other movies downloaded from the web are not rotated, as well as any movie recorded by the iPhone in landscape mode. I guess that AVFoundation can find out that the video should be played 'vertically' so it rotates it automatically (indeed it is played correctly by QuickTime on my Mac) and this should be the correct behavior also if playing in a media player on iOS, but what do you think the correct behavior should be when the movie is applied to a 3D plane as a texture? Just let AVFoundation rotate the video or not? If yes, is there a way to avoid this (for instance by querying the movie file, just guessing...)? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51858#51858 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video textures on iOS (and audio)
Thanks Stefan, just trying it now. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51787#51787 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video textures on iOS (and audio)
Hi Stefan, thank you for the update, I look forward to trying the avfoundation plugin... but can you provide some help to let me configure CMake in order to generate a target for that plugin? So far it is missing in the project I get from CMake. Thank you. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51780#51780 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Cannot load models with user's data on iOS.
Hi, when reading a model (osgb) into my iOS app, I get the following error: Code: InputStream::readObject(): Unsupported wrapper class osg::DefaultUserDataContainer InputStream::readObject(): Unsupported wrapper class As far as I understood this is because that model defines some user's data for certain nodes, but on iOS this seems to be not supported or, at least, there is something missing among the static libraries I'm linking to. Is there something I have to do (perhaps adding a USE_DOTOSGWRAPPER macro...) in order to be able to read models with user's data on iOS? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50431#50431 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using shaders (vert and frag) with StandardShadowMap shaders.
Don't know if this is your case, but depending on the way you create or import your models into the scene graph, you may be using different TUs in your model than in the shadows shaders, be sure to use the same TUs in the first place. I'd suggest you to try to create a simple scene with just two objects with TUs configured as required by the shaders and then, if everything is fine, try with more complex models (if you still get black objects use a visitor to see what TUs are used and if they match those supposed to be used in the shadows shaders). Hope this helps. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48985#48985 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems with textures converted
In some cases, that bad visualization is due to the Gamma/LUT Correction. Don't know if this is also your case, but try disabling the Gamma/LUT Correction: from Rendering menu, Gamma/LUT Setup..., Gamma and LUT tab and finally uncheck the Gamma/LUT Correction option. Hope this helps. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45168#45168 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgviewer random crashes on a Quadro 2000M
A user of our OSG application is experiencing some random crashes on his machine. To investigate the problem I provided the osgviewer application and he keeps experiencing the same problem. By the way, if a crash occurs, then it occurs at the very beginning and no OpenGL windows (context?) is displayed (created?) at all, but if osgviewer does not crash at the beginning then it won't crash while running. I could not manage to reproduce those crashes on any of my computers, unfortunately none of them is like that users' one: he's using a DELL laptop with a NVidia Quadro 2000M with the latest official NVidia video drivers. The operating system is Windows 7 - 64 bit and OSG is version 3.0.1 - 32 bit. As reported by the user, every other OpenGL app is working fine. If he chooses not to use the NVidia card but to rely only on the integrated card, no crashes occur with osgviewer. Anyone experienced such issues? I'd like to further investigate the problem on that user's machine, but before proceeding, I'd like to ask you if there is something specific that I should look for or take care of. Can you suggest how to proceed to narrow down the possible causes for that kind of problems? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45167#45167 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgmaxexp problems
> Hi, > I have compiled osgmaxexp svn rev 236 without problems, but when using that > I get this error when running 3DS max 2012 (32bit version): > > DLL (OSGEXP.dle) failed to initialize. Error code 998 - Invalid access to > memory location. > > > > Anyone else had the same problem, with possible solution? Don't know if this is your case, but: are you sure you are using the 32 bit version of OSGEXP.dle? Be sure to use the correct version depending on the version of Max you are really using (32 vs. 64 bit). Alessandro ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] FBX plugin: mixing skin and morph animation.
Hi, I've noticed a problem when using the FBX plugin when I setup a scene in 3dsMax with an object that has both the skin and morpher modifiers applied: If I export using the FBX exporter 2012.2 then in osgviewer only the skinning animation is played while the morphing is not. On the other hand, if I play the FBX file using QuickTime player then both animations are played. The problem exists regardless of the order of the applied modifiers. I'm attaching a sample FBX file that you can use to reproduce the problem. One last note: I'm using OSG 3.0.1. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44432#44432 Attachments: http://forum.openscenegraph.org//files/skin_morph_2012_2_185.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Particles on iOS
Hi Su, please refer to any of the (many) threads that already discusses the topic you're interested in (building for iOS), anyway in order to build (anything) for iOS you need at least a Mac, then Xcode and so you'll be able to develop for the simulator, finally if you need to build for a real device you'll need also to be enrolled in the Apple developer program. Do not want to look unkind :) anyway, please, as a general rule do not ask questions that do not relate to the thread, rather start a new one if your question is not already in any other thread ;) Regards. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43790#43790 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Particles on iOS
Hi, I'd like to use osgParticles on iOS, I tried the example from the book OpenSceneGraph 3.0.0 - Beginners Guide, but I get lots of warnings like this: Warning: ParticleSystem::drawImplementation(..) not fully implemented. and visualization get messed. Maybe I'm doing something wrong, but I'd like to ask if, in general, osgParticles are supposed to work on iOS and if there are any issue with them. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43759#43759 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] New OSG book on the way, and new plan of OSG recipes
Your first book 'OpenSceneGraph 3.0: Beginner's Guide' has been really useful for me (I'd recommend it to anyone interested in OSG and computer graphics), I'm sure the cookbook will fulfill my expectations as well. Looking forward to buy it. By the way would you share a table of content? I'm really interested in what will be covered in the book. Cheers and best wishes for your wedding! :) Alessandro On Thu, Sep 29, 2011 at 9:31 AM, Torben Dannhauer wrote: > Hi Wang, > > this idea is great, I would like to contribute a detailed recipe how to use > osgVisual :) > > best regards, > > Torben > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=43087#43087 > > > > > > ___ > 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] Issues with osgShadow and diffuse+reflections maps
I'm trying different shadows techniques with some simple models and I'm facing some issues when I try to add shadows to a scene where an object has both a diffuse and reflection map. By providing some arguments to osgshadow (in order to change shadow texture unit for example) in some cases I manage to see the reflections but I never get the expected result (either the diffuse map disappears or the shadows are not correct). If I just use a diffuse map (or just the reflection map) then some techniques work fine but others do not. I'm attaching the sample model I tried. Can anyone suggest if there is a way to get the expected result? Am I supposed to change the shaders' code in some way? Thanks. Alessandro PS: I'm using version OSG v3.0.1. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42739#42739 Attachments: http://forum.openscenegraph.org//files/test_diffuse_reflection_179.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: wireframe
I think it could be useful in many other scenarios, regarding the current one, at last, requirements changed so I had not to use wireframe anymore. If you don't mind it would be great to have the chance to try it. By the way, is your implementation intended for GLES? Thanks. Alessandro On Fri, Sep 2, 2011 at 9:48 PM, Jeremy Moles wrote: > On Fri, 2011-09-02 at 18:11 +0200, Alessandro Terenzi wrote: >> Ok and thanks for your help. > > I think I might finish my own personal solid+wireframe GLSL example here > in a few minutes. Would this be of use to you? (It is derived from this > example: > > http://www2.imm.dtu.dk/~jab/Wireframe/ > > > >> Cheers. >> Alessandro >> >> -- >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=42387#42387 >> >> >> >> >> >> ___ >> 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] iOS: wireframe
Ok and thanks for your help. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42387#42387 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] iOS: wireframe
Hi, I'd like to set the visualization mode to wireframe on iOS, I use these instructions: Code: osg::ref_ptr ss = myModelNode->getOrCreateStateSet(); osg::ref_ptr pm; pm = new osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE); ss->setAttributeAndModes(pm.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); but when the app is running and 'myModelNode' is shown, I keep getting this warning: ... Warning: PolygonMode::apply(State&) - not supported. ... and, of course, the model is drawn as if it is NOT in wireframe. Am I doing something wrong? Is really PolygonMode not supported on iOS? If so, how can I change to wireframe mode? Thanks for your help. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42375#42375 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX: skinned mesh messed up
Hi Michael, do not apologize for the late answer, as you can see my own reply is quite late too :) Talking about the issue, frankly speaking I cannot answer your questions, the example I sent comes from simplifying some more complex models that were prepared by character animators, maybe merging skeletons into one would work. Cheers. Alessandro PS: good luck with your new job :) On Mon, Aug 15, 2011 at 3:31 PM, Michael Platings wrote: > Hi Alessandro, thanks for the example. > osgAnimation only allows one skeleton per RigGeometry, and the FBX importer > assumes that no more than one skeleton will be attached to a mesh, hence the > messed up results. > Can you explain why multiple skeletons are attached? If the importer merged > the skeletons into one would that be OK? > > Apologies for the delayed response btw, I've switched jobs so I don't have > much time to spend on this any more but I'll still try to help occasionally. > Cheers > -Michael > > On 17 July 2011 11:31, Alessandro Terenzi wrote: >> >> Hi >> I finally managed to make a simple model that shows an issue I usually >> experience with skinned characters, ie the mesh is messed up when imported >> in OSG. >> >> I'm attaching a very simple FBX model: 1 mesh, 2 bones systems and a dummy >> object used to control one of the bones systems, no animations at all. >> >> I created the model in 3dsMax and noticed that the problem appears if >> there are 2 bones systems (4 bones) attached to the same mesh and one system >> is also linked to a dummy object (see the example I'm attaching) - if there >> is just one system (2 bones) and it is linked to a dummy then the problem >> does not appear. >> >> QuickTime displays the mesh correctly while osgviewer does not (OSG v3.0.0 >> - FBX 2012 and 2011). >> >> Please (Michael P. or anyone with expertise in osgAnimation) can you have >> a look at the model and let me know if I can provide more examples or help >> to solve the issue? >> >> Thanks. >> Alessandro >> >> -- >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=41412#41412 >> >> >> >> >> Attachments: >> >> http://forum.openscenegraph.org//files/osgviewer_2011_07_17_12_21_22_84_209.png >> http://forum.openscenegraph.org//files/test_284.zip >> >> >> ___ >> 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] Shadows on invisible objects
Paul Martz wrote: > > When I use depth map shadows, I use a fragment shader to sample the depth > texture. If I wanted to see only the shadow areas but not the lit areas, I'd > just add the appropriate conditional call to "discard". > Thanks Paul, your suggestion is very helpful, anyway I wonder if there exists also a way to achieve the same result without relying on shaders...for example, in the past I used the ColorMask to create an 'invisible' object that was able to hide other objects (its shape and volume was reveiled if other objects moved behind it, even though it was not visible in the scene). You can also pick such kind of invisible objects, so, maybe, something similar can be done also with shadows. Basically I'm looking for a way to reveil the shape/volume of an invisible object by means of shadows casted onto it, I know that this may make no sense from a physical point of view, but we're in the CG world where only imagination is the limit, aren't we? Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41897#41897 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Shadows on invisible objects
Hi, I want to make an object invisible but, nonetheless, I also want it to receive shadows, any suggestion? By the way, I'm using the ShadowMap technique to implement shadows. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41894#41894 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] using ClipNode to cut a model in two, then cap the open side
I'm trying the Javier's "CappingEffect" example and it seems to work fine...but only when I look at the scene from one side...if I move the camera to the opposite side I still see the cappings that are drawn over my geometry (they should be hidden instead)...please refer to the attachments to see what I mean. In order to use the CappingEffect I modified osgviewer in this way: Code: osg::ClipNode* clipnode = new osg::ClipNode; osg::ClipPlane* clipplane = new osg::ClipPlane(); clipplane->setClipPlane(0, 1, 0, 1); clipnode->addClipPlane(clipplane); clipnode->addChild(loadedModel.get()); CappingEffect* capping_effect = new CappingEffect; capping_effect->addChild(clipnode); scene->addChild(capping_effect); viewer.setSceneData(scene); How can I solve the issue? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41807#41807 Attachments: http://forum.openscenegraph.org//files/capping_2_434.png http://forum.openscenegraph.org//files/capping_1_109.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video textures on iOS (and audio)
Hi Tom, I've seen some examples related to video textures coming from the camera but it looks like that the approach for video coming from files is quite different: basically you have to create asset readers, get the tracks (video or audio or both) and start reading frames (or audio samples)...unfortunately there is quite a lot to do in order to synch audio and video and to update the video texture at a given framerate. Anyway, Stephan's suggestion was quite useful from this point of view, my only concern is how to correctly send the texture data from the asset readers to OSG...I still need to think about the most effective way to do this and, most of all, to do it in a thread-safe manner. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41482#41482 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] FBX: skinned mesh messed up
Hi I finally managed to make a simple model that shows an issue I usually experience with skinned characters, ie the mesh is messed up when imported in OSG. I'm attaching a very simple FBX model: 1 mesh, 2 bones systems and a dummy object used to control one of the bones systems, no animations at all. I created the model in 3dsMax and noticed that the problem appears if there are 2 bones systems (4 bones) attached to the same mesh and one system is also linked to a dummy object (see the example I'm attaching) - if there is just one system (2 bones) and it is linked to a dummy then the problem does not appear. QuickTime displays the mesh correctly while osgviewer does not (OSG v3.0.0 - FBX 2012 and 2011). Please (Michael P. or anyone with expertise in osgAnimation) can you have a look at the model and let me know if I can provide more examples or help to solve the issue? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41412#41412 Attachments: http://forum.openscenegraph.org//files/osgviewer_2011_07_17_12_21_22_84_209.png http://forum.openscenegraph.org//files/test_284.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video textures on iOS (and audio)
Yes I have, and actually I found something (both in WWDC2010 and WWDC2011) but everything I found was mostly related to getting the video camera frames to OpenGL not video/movie files and it looks like that the approach for video files is quite different if compared to the camera approach. So far I've thought about some ways to do what I'm after, but looking at the Apple developers forum everyone that tried those techniques was not really satisfied...so I'm still looking for the best approach... Did you refer to a specific resource available in WWDC 2011 videos? Maybe I missed it... Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41403#41403 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Video textures on iOS (and audio)
Thanks Stephan, I'll study the possibilities more in depth. Cheers. Alessandro On Thu, Jul 14, 2011 at 10:07 AM, Stephan Huber wrote: > Hi, > > Am 14.07.11 09:14, schrieb Alessandro Terenzi: >> I wonder if playing a video texture (from a .MOV file) with OSG for iOS >> works the same way as OSG for Mac OS X...I mean, is it enough to build the >> osgdb_qt library and statically link to it? Would this work for iOS too? > > Unfortunatley you can't use the quicktime-plugin for ios. In fact it's > difficult to play a movie into an open gl texture, the info on the net > is relatively spare. > > > OpenFrameworks has an ios video player, perhaps it's a start for porting > it to osg: > > https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/video/ofiPhoneVideoPlayer.mm > > On the other side it's pretty easy to add a movie player to an UIView. > > cheers, > Stephan > ___ > 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] Video textures on iOS (and audio)
Hi, I wonder if playing a video texture (from a .MOV file) with OSG for iOS works the same way as OSG for Mac OS X...I mean, is it enough to build the osgdb_qt library and statically link to it? Would this work for iOS too? What about any audio eventually embedded in the .MOV? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41347#41347 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT issue when switching from fullscreen to windowed mode
I kept playing with RTT and I noticed an issue: If you do not set a single threading model then if you go from fullscreen to windowed mode and back to fullscreen, the system hangs (I get a black screen and I can only reboot) - you may have to press 'f' several times before the hang occurs... If you instead choose to use a single threading model it looks like that everything goes fine. I've read about something like this in other posts: someone had the same issue in a multi-screen setup, but this is not my case, someone else noticed that the osgdistortion example (that employs RTT) also sets a single threading model. To reproduce the problem I guess that you can just use the code posted above. In order to solve the issue: am I supposed to lock something when toggling fullscreen/windowed mode? Should I try by changing threading model on the fly before switching fullscreen/windowed mode? In this case, where is it safe to do it? I'm on Windows 7 64bit and OSG version is 3.0.0 rc1 (32bit). Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41286#41286 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] StatsHandler hang
Hi, I wonder if anyone noticed this behavior: if you add a StatsHandler and, BEFORE pressing the 's' key you press 'SHIFT+s' then the applications seems to freeze (you cannot interact with the viewer anymore and you have to kill the app) but nonetheless it starts printing ... Stats Viewer FrameNumber 21379 Stats Camera FrameNumber 21379 Stats Viewer FrameNumber 21380 Stats Camera FrameNumber 21380 ... to the console. On the other hand, if at the beginning you press 's' and THEN press 'SHIFT+s' the problem does not occur. I'm using a 32bit build on Windows 7 64bit and OSG version is 3.0.0 rc1. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41285#41285 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT issue when switching from fullscreen to windowed mode
Ok, thank you very much for your help. Now I think I'll make some tests with either FRAME_BUFFER or FBO targets and see what I'll get. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41239#41239 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT issue when switching from fullscreen to windowed mode
Well, no, I was not re-creating the texture, so if I understood it correctly: if I want to use the FRAME_BUFFER target I also need to re-create the texture every time a resize occurs and also call runCameraSetup as well, right? Actually the decision not to use FBOs is not final, I'm just trying the possibilities...to this regard I wonder which target, among FRAME_BUFFER, FBO and pbuffer, is the one that is most likely going to work on, let's say, 3 or 5 years old computers? Thank you again. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41237#41237 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT issue when switching from fullscreen to windowed mode
Thanks JP, after having searched the archives, I tried to create a cull callback and in its operator() method I tried different things among adding these lines: Code: cv->getCurrentRenderBin()->getStage()->setCameraRequiresSetUp(true); cv->getCurrentRenderBin()->getStage()->runCameraSetUp(cv->getRenderInfo()); But this seems to be not enough. I also tried to detach the COLOR_BUFFER and attach it again along with the RTT texture, but still same issue. I do not understand what happens behind the scenes, so I still cannot think about what else to try...any hint about the workaround you were talking about? :) Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41234#41234 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT issue when switching from fullscreen to windowed mode
Hi, I just tried the prerender example by issuing the --fb parameter and I get the same problem as described above...so I guess that this is the expected behaviour even though it is not the effect one could expect. So, is there something that must be done in order to use RTT when a window resizing occurs? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41232#41232 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] RTT issue when switching from fullscreen to windowed mode
I started playing with RTT cameras and, having looked at some OSG examples, I tried my own code but when I switch from fullscreen to windowed mode the rendered texture doesn't appear as expected: it seems not to cover the whole quad as it does while in fullscreen, only a part of it is updated and as you stretch the window the rendered texture is stretched too (refer to attached images). Here's my code: Code: int main( int argc, char **argv ) { osg::ArgumentParser arguments(&argc,argv); osgViewer::Viewer viewer(arguments); // add stats and window size handlers... viewer.addEventHandler( new osgViewer::StatsHandler() ); viewer.addEventHandler( new osgViewer::WindowSizeHandler() ); int screenWidth = 1366; int screenHeight = 768; // create the texture to render to... osg::ref_ptr texture_RTT = new osg::Texture2D; texture_RTT->setTextureSize(screenWidth, screenHeight); texture_RTT->setInternalFormat(GL_RGBA); texture_RTT->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR); texture_RTT->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR); texture_RTT->setResizeNonPowerOfTwoHint(false); // create the quad... osg::ref_ptr quad_RTT = osg::createTexturedQuadGeometry( osg::Vec3(0.0, 0.0, 0.0), osg::Vec3(screenWidth, 0.0, 0.0), osg::Vec3(0.0, screenHeight, 0.0)); quad_RTT->setDataVariance( osg::Object::DYNAMIC ); osg::ref_ptr quad_geode_RTT = new osg::Geode; quad_geode_RTT->addDrawable(quad_RTT.get()); quad_geode_RTT->setDataVariance( osg::Object::DYNAMIC ); osg::StateSet *quadState = quad_geode_RTT->getOrCreateStateSet(); quadState->setTextureAttributeAndModes(0, texture_RTT.get(), osg::StateAttribute::ON); quadState->setMode( GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED ); // create the camera... osg::ref_ptr camera_RTT = new osg::Camera; #ifdef USE_IMAGE osg::ref_ptr image_RTT = new osg::Image; image_RTT->allocateImage(screenWidth, screenHeight, 1, GL_RGBA, GL_UNSIGNED_BYTE); camera_RTT->attach(osg::Camera::COLOR_BUFFER, image_RTT.get()); texture_RTT->setImage(0, image_RTT.get()); #else camera_RTT->attach(osg::Camera::COLOR_BUFFER, texture_RTT.get()); #endif //camera_RTT->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT, osg::Camera::FRAME_BUFFER); camera_RTT->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER); camera_RTT->setRenderOrder(osg::Camera::PRE_RENDER); camera_RTT->setReferenceFrame( osg::Camera::ABSOLUTE_RF ); camera_RTT->setClearColor( osg::Vec4( 0., 0., 1., 1. ) ); camera_RTT->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // add whatever children you want drawn to the texture osg::ref_ptr< osg::Node > node = osgDB::readNodeFile("cow.osg"); if(node.valid()) { const osg::BoundingSphere& bs = node->getBound(); float znear = 1.0f*bs.radius(); float zfar = 3.0f*bs.radius(); float proj_top = 0.25f*znear; float proj_right = 0.5f*znear; znear *= 0.9f; zfar *= 1.1f; camera_RTT->setProjectionMatrixAsFrustum(-proj_right,proj_right,-proj_top,proj_top,znear,zfar); camera_RTT->setViewMatrixAsLookAt(bs.center()-osg::Vec3(0.0f,2.0f,0.0f)*bs.radius(),bs.center(),osg::Vec3(0.0f,0.0f,1.0f)); camera_RTT->addChild(node.get()); } else osg::notify(osg::FATAL)<<"model not loaded"addChild(quad_geode_RTT.get()); // add model to the viewer. viewer.setSceneData( rootNode ); return viewer.run(); } Sorry if the code doesn't visualize fine (I'm attaching a .cpp FYC). The situation does not change if I use FRAME_BUFFER_OBJECT target instead of FRAME_BUFFER. On the other hand, it changes if I use an osg::Image (by defining USE_IMAGE in the above code, but performances are not so good (9 fps) as when using the texture). What am I missing? Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41214#41214 Attachments: http://forum.openscenegraph.org//files/rtt_windowed_using_image_712.png http://forum.openscenegraph.org//files/rtt_windowed_919.png http://forum.openscenegraph.org//files/rtt_fullscreen_175.png http://forum.openscenegraph.org//files/test_rtt_603.cpp ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] When is it safe to resize an osg::Camera viewport?
Hi, I have an osg:Camera (beyond the viewer's default camera) and I need to resize the viewport of that camera when a RESIZE event occurs (actually when the user resizes the app window). So I thought to handle the viewer's RESIZE event by calling the setViewport(.) method on my custom camera because my custom osg::Camera viewport is not resized automatically. I wonder if it is safe to call setViewport(.) in the handle() method of an event handler or if I'm supposed to change camera's properties (like the viewport) somewhere else (for example in an UpdateCallback or in a CullCallback...). I'm asking this because I often experience a system crash when toggling fullscreen on/off...but I'm not sure that this is related to the way I call setViewport(.). One more question: what are 'slave' cameras used for? Are them supposed to be used only if they need to follow a parent's transform? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41187#41187 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGExp, movie textures and OSG file formats
Hi, if I'm not wrong it should be enough to just set Image to DYNAMIC (not the Texture). Currently I'm on a travel, so I cannot try your suggestions right now, but I asked my teammates to do it and I'll let you know as soon as I'll have some news. It would be great if both ive and osgb could embed also movies. Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41061#41061 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGExp, movie textures and OSG file formats
Hi, thanks everybody for your answers... to Farshid: when I exported to .ive or .osgb I checked 'Embed image data'...but the ive/osgb file size doesn't looks correct (I used a 16MB video and the size of the ive/osgb was something like 300KB). Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41008#41008 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSGExp, movie textures and OSG file formats
I wonder if anybody else experienced my same problem: I wrote a visitor that looks for movie textures in order to play them, the input files come from 3dsMax via OSGExp v1.0.0, but I made it work only if I export to .osg, if I export to either .ive or .osgb the visitor fails to dynamic_cast any found Image to ImageStream so I cannot play those movie textures. I also noticed that if I export to .osgt then the Image's DataVariance is set to STATIC, even though the texture file type is avi, mov or others (so I have to change it to DYNAMIC otherwise they won't play) Does anyone have the same issues (especially those with the binary formats)? Is all this related to OSGExp only or am I supposed to look for movie texture in a different way than the way I use with .osg files? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40884#40884 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX plugin: crash if using AVI texture
Finally, I could try with the debug build and here's the call stack when the crash occurs: > osg78-osgd.dll!osg::ObserverSet::signalObjectDeleted(void * ptr) Line > 79 + 0x1b bytes C++ osg78-osgd.dll!osg::Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) Line 318C++ osg78-osgd.dll!osg::Referenced::unref() Line 200 C++ osg78-osgDBd.dll!osg::ref_ptr::~ref_ptr() Line 35 + 0x24 bytes C++ osg78-osgDBd.dll!std::_Pair_base,double>::~_Pair_base,double>() + 0x16 bytes C++ osg78-osgDBd.dll!std::pair,double>::~pair,double>() + 0x16 bytes C++ osg78-osgDBd.dll!std::_Pair_base,std::allocator > const ,std::pair,double> >::~_Pair_base,std::allocator > const ,std::pair,double> >() + 0x3f bytes C++ osg78-osgDBd.dll!std::pair,std::allocator > const ,std::pair,double> >::~pair,std::allocator > const ,std::pair,double> >() + 0x16 bytes C++ osg78-osgDBd.dll!std::pair,std::allocator > const ,std::pair,double> >::`scalar deleting destructor'() + 0x16 bytes C++ osg78-osgDBd.dll!std::_Destroy,std::allocator > const ,std::pair,double> > >(std::pair,std::allocator > const ,std::pair,double> > * _Ptr) Line 64 C++ osg78-osgDBd.dll!std::allocator,std::allocator > const ,std::pair,double> > >::destroy(std::pair,std::allocator > const ,std::pair,double> > * _Ptr) Line 213 + 0x9 bytesC++ osg78-osgDBd.dll!std::_Dest_val,std::allocator > const ,std::pair,double> > >,std::pair,std::allocator > const ,std::pair,double> > >(std::allocator,std::allocator > const ,std::pair,double> > > & _Alval, std::pair,std::allocator > const ,std::pair,double> > * _Pdest) Line 288 C++ osg78-osgDBd.dll!std::_Tree,std::allocator >,std::pair,double>,std::less,std::allocator > >,std::allocator,std::allocator > const ,std::pair,double> > >,0> >::_Erase(std::_Tree_nod,std::allocator >,std::pair,double>,std::less,std::allocator > >,std::allocator,std::allocator > const ,std::pair,double> > >,0> >::_Node * _Rootnode) Line 1617 + 0x22 bytes C++ osg78-osgDBd.dll!std::_Tree,std::allocator >,std::pair,double>,std::less,std::allocator > >,std::allocator,std::allocator > const ,std::pair,double> > >,0> >::clear() Line 1416 C++ osg78-osgDBd.dll!osgDB::Registry::clearObjectCache() Line 1601 C++ osg78-osgDBd.dll!osgDB::Registry::destruct() Line 431 C++ osg78-osgDBd.dll!osgDB::Registry::~Registry() Line 410 C++ osg78-osgDBd.dll!osgDB::Registry::`vector deleting destructor'() + 0x57 bytes C++ osg78-osgd.dll!osg::Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) Line 323 + 0x23 bytes C++ osg78-osgd.dll!osg::Referenced::unref() Line 200 C++ osg78-osgDBd.dll!osg::ref_ptr::~ref_ptr() Line 35 + 0x24 bytes C++ osg78-osgDBd.dll!`osgDB::Registry::instance'::`2'::`dynamic atexit destructor for 's_registry''() + 0xd bytes C++ osg78-osgDBd.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 415 C osg78-osgDBd.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 526 + 0x11 bytes C osg78-osgDBd.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 476 + 0x11 bytesC ntdll.dll!76f297a0() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!76f3dcda() ntdll.dll!76f3db7c() kernel32.dll!75147363() msvcr100d.dll!__crtExitProcess(int status) Line 709C msvcr100d.dll!doexit(int code, int quick, int retcaller) Line 621 + 0x9 bytes C msvcr100d.dll!exit(int code) Line 393 + 0xd bytes C osgviewerd.exe!__tmainCRTStartup() Line 568C osgviewerd.exe!mainCRTStartup() Line 371 C kernel32.dll!75143677() ntdll.dll!76f29d42() ntdll.dll!76f29d15() Please let me know if you need me to try something else. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40856#40856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX plugin: crash if using AVI texture
Thank you Robert for your answers, I'll try the ffmpeg plugins as soon as I'll be back to work, only one note: I've already tried the directshow plugin but, as you can see from a couple of mails of mine, without success...so far I could not find a solution for using that plugin and this is the reason I'm stll using QuickTime even on Windows. Cheers. Alessandro On Wednesday, June 22, 2011, Robert Osfield wrote: > HI Alessandro, > > On Wed, Jun 22, 2011 at 8:00 PM, Alessandro Terenzi > wrote: >> unfortunately I will not be able to try it before friday, anyway the >> video plugin that I use is QuickTime (the OS is Windows 7 x64, OSG is >> built for 32 bit and we tried with a couple of different AVIs on two >> PCs). > > Friday will be too later for 3.0.0. Where the problem might lie I > can't say, but it all works at > least with the ffmpeg plugin under Linux, so one might consider the > Quicktime plugin as being > a potential cause of problems, but it just as easily code be a problem > elsewhere. > > Quicktime used to be the only video solution under Windows but now we > have the ffmpeg and > the directshow plugins so if it does turn out to be the problem then > you can always look into > trying out these other plugins. > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX plugin: crash if using AVI texture
Hi Robert, unfortunately I will not be able to try it before friday, anyway the video plugin that I use is QuickTime (the OS is Windows 7 x64, OSG is built for 32 bit and we tried with a couple of different AVIs on two PCs). Hope this helps a little. Alessandro On Wednesday, June 22, 2011, Robert Osfield wrote: > HI Alessandro, > > Could run a debug build and get a stack trace from the crash and then > post this stack trace, it should give us a bit more of ideal of what > might be at fault. > > Also what movie plugin are you attempting to use to play the movie? > > Robert. > > On Wed, Jun 22, 2011 at 6:32 PM, Alessandro Terenzi > wrote: >> Hi, >> I'm trying to see a simple quad with a video (AVI) texture applied. The >> video is played correctly by osgmovie but if I use osgviewer to open the FBX >> model (that uses the AVI) when execution is over osgviewer crashes. >> >> I'm using OSG 3.0.0 rc1 and the FBX was created from 3dsMax using the FBX >> SDK 2012. >> >> I'm attaching the FBX and OSG (if you want to try them you have to just >> replace the paths for the video file). I also tried with a .osg and it >> doens't crashes. >> >> Cheers, >> Alessandro >> >> -- >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=40757#40757 >> >> >> >> >> Attachments: >> http://forum.openscenegraph.org//files/video_texture_139.zip >> >> >> ___ >> 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] [osgPlugins] FBX plugin: crash if using AVI texture
Hi, I'm trying to see a simple quad with a video (AVI) texture applied. The video is played correctly by osgmovie but if I use osgviewer to open the FBX model (that uses the AVI) when execution is over osgviewer crashes. I'm using OSG 3.0.0 rc1 and the FBX was created from 3dsMax using the FBX SDK 2012. I'm attaching the FBX and OSG (if you want to try them you have to just replace the paths for the video file). I also tried with a .osg and it doens't crashes. Cheers, Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40757#40757 Attachments: http://forum.openscenegraph.org//files/video_texture_139.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X windowing system related issue (maybe)
I finally managed to solve the issue: I called setUpViewAcrossAllScreens() before opening the settings window. What does setUpViewAcrossAllScreens do? Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40735#40735 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X windowing system related issue (maybe)
Thank you Stephan, I've tried by executing getWindowingSystemInterface() before opening the settings window but unfortunately it didn't help. On the other hand, I tried to call the viewer's realize() method BEFORE opening the settings window and now it has focus, can be moved and it works as expected...BUT, when the settings window is shown, I also see the viewer's window (fullscreen and filled with white color) just behind the settings window...when I close the latter, the viewer shows my scene normally. This is close to the expected behavior except for the viewer's window 'already' showing behind the settings window (it should be shown only after the user closes the settings windows). I guess that the camera settings window is created as a child of the OSG application window, so it behaves normally only when the application window's creation has completed...don't know. Maybe I should perform only a part of what happens in the realize() method? Regards. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40730#40730 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X windowing system related issue (maybe)
Thank you Stephan, I've tried by executing getWindowingSystemInterface() before opening the settings window but unfortunately it didn't help. On the other hand, I tried to call the viewer's realize() method BEFORE opening the settings window and now it has focus, can be moved and it works as expected...BUT, when the settings window is shown, I also see the viewer's window (fullscreen and filled with white color) just behind the settings window...when I close the latter, the viewer shows my scene normally. This is close to the expected behavior except for the viewer's window 'already' showing behind the settings window (it should be shown only after the user closes the settings windows). I guess that the camera settings window is created as a child of the OSG application window, so it behaves normally only when the application window's creation has completed...don't know. Maybe I should perform only a part of what happens in the realize() method? Regards. Alessandro On Tue, Jun 21, 2011 at 11:40 PM, Stephan Huber wrote: > Hi Alessandro, > > Am 21.06.11 22:35, schrieb Alessandro Terenzi: >> If this can help, when I built OSG I chose 'Carbon' as windowing system, I >> built OSG as frameworks and I'm building my OSG application as a console >> application. If I build my application as an app bundle (instead of a > > try creating the WindowSystemInterface via > > osg::GraphicsContext::getWindowingSystemInterface() > > before opening the settings-dialog. the WindowingSystemInterface does > some fancy things, so that windows opened by a console-app work correctly. > > Perhaps that helps. > > cheers, > Stephan > ___ > 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] Mac OS X windowing system related issue (maybe)
Hi, first of all I apologize if this is a duplicate post, I first tried to send a mail to the mailing list, but then I could not find it in this forum, so I'm trying again here by creating a new topic. It is not easy to explain the nature of the issue I'm experiencing anyway I'll try. I have an OSG application (on Mac OS X) that, on startup (no viewer realized and not in the application loop yet), opens a video device in order to display a webcam stream inside the application itself (the interface to the video device is provided by a 3rd party lib)...everything is fine unless I ask to display the camera settings window before actually starting the video stream: in that case the correct behavior is that the OSG application waits until the user makes his choices and close the settings window, when the window is closed the OSG application continues setting up the scene and finally enters the application loop and shows the viewer window. When I used OSG 2.9.6 everything worked as described in both cases (with and without showing the settings window), but when I switched to OSG 2.9.14, 2.9.16 or 3.0.0 if I choose to show the camera settings window then I cannot move or grab focus on that window in any way (even though I still can click its controls/buttons - for instance if I move another window on top of that settings window, then I cannot bring to the foreground it anymore). Unfortunately I cannot have too much control and information about that camera settings window, I can just choose to show it or not when I open the video stream..that window is not managed by my code and, as far as I know, it is related to QUICKTIME in some way, I do not know much more and cannot provide further details about this. Since my OSG application code didn't change in any way and since it worked with OSG 2.9.6, I wonder if something changed from the windowing system point of view on Mac OS X (I have no problems on Windows by the way). By the way in the console I also get this message: GraphicsWindowCarbon::grabFocusIfPointerInWindow: not implemented Don't know if this may be related to my issue... If this can help, when I built OSG I chose 'Carbon' as windowing system, I built OSG as frameworks and I'm building my OSG application as a console application. If I build my application as an app bundle (instead of as a console application) then it works even if I choose to show the settings window. I know that there is very little information about this issue, but I wonder if any Mac OS X expert has a suggestion or can tell me what I should look for in order to overcome this problem? Thanks. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40725#40725 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Good new for IOS developers
Congratulation Thomas! what's your app's name? I look forward to trying it... Alessandro PS: hope it's free ;) On Tue, Jun 21, 2011 at 1:41 PM, Thomas Hogarth wrote: > Hi All, > > This might have been discussed in the past but it's the > first confirmation I have personally had. My first IOS app using > OpenSceneGraph was approved for the app store today. I was using 2.9.15, so > a pretty recent version (not recent enough to be a test of the 3.0 > rc1). OpenSceneGraph was also built statically and was using the depreciated > osg and imageio plugins. > > > Thought other would be interested. > Tom > > PS > If other have submitted apps, please let me know your experience > > > ___ > 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] Mac OS X windowing system related issue (maybe)
Hi, it is not easy to explain the nature of the issue I'm experiencing anyway I'll try. I have an OSG application (on Mac OS X) that, on startup (no viewer realized and not in the application loop yet), opens a video device in order to display a webcam stream inside the application itself (the interface to the video device is provided by a 3rd party lib)...everything is fine unless I ask to display the camera settings window before actually starting the video stream: in that case the correct behavior is that the OSG application waits until the user makes his choices and close the settings window, when the window is closed the OSG application continues setting up the scene and finally enters the application loop and shows the viewer window. When I used OSG 2.9.6 everything worked as described in both cases (with and without showing the settings window), but when I switched to OSG 2.9.14, 2.9.16 or 3.0.0 if I choose to show the camera settings window then I cannot move or grab focus on that window in any way (even though I still can click its controls/buttons - for instance if I move another window on top of that settings window, then I cannot bring to the foreground it anymore). Unfortunately I cannot have too much control and information about that camera settings window, I can just choose to show it or not when I open the video stream..that window is not managed by my code and, as far as I know, it is related to QUICKTIME in some way, I do not know much more and cannot provide further details about this. Since my OSG application code didn't change in any way and since it worked with OSG 2.9.6, I wonder if something changed from the windowing system point of view on Mac OS X (I have no problems on Windows by the way). By the way in the console I also get this message: GraphicsWindowCarbon::grabFocusIfPointerInWindow: not implemented Don't know if this may be related to my issue... If this can help, when I built OSG I chose 'Carbon' as windowing system, I built OSG as frameworks and I'm building my OSG application as a console application. If I build my application as an app bundle (instead of as a console application) then it works even if I choose to show the settings window. I know that there is very little information about this issue, but I wonder if any Mac OS X expert has a suggestion or can tell me what I should look for in order to overcome this problem? Thanks. Alessandro ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Error writing particles in .IVE but not in .OSG
Thanks Robert, I'll go with version 3.0.0 rc1 and definitely use the .osgb format. Regards. Alessandro On Mon, Jun 20, 2011 at 1:36 PM, Robert Osfield wrote: > Hi Alessandro, > > The .ive format doesn't support the osgParticle NodeKit. The .ive > format is actually pretty limited as it's not extensible other than by > hacking the plugin directly. > > You are now much better off using the .osgb native binary file format, > it entirely replaces the functionality of .ive and is extensible and > handles fowards/backwards comtability far better thanks to being based > on the new serializers. Thanks to the extensibility osgParticle and > the other NodeKits are supported by the new .osgb format. > > I would recommend moving to svn/trunk or OSG-3.0 branch or > OSG-3.0.0-rc1 as they all offer refinements to the new serailizers. > When you upgrade to any of these versions you won't get any changes to > the .ive plugin - this is deperecated and will never support > osgParticle. > > Robert. > > On Mon, Jun 20, 2011 at 11:38 AM, Alessandro Terenzi > wrote: > > I'm experiencing an issue with particles: if I export from 3dsMax+OSGExp > to > > .osg then particles are working, but if I export to.ive I get some errors > > and a message prompts me that the plugin to write the ive file cannot be > > found. > > Actually any model without particles is exported fine to .ive, so I guess > > that the error message refers to some other DLL. I assured that: > > osg75-osgParticle.dll > > osgdb_deprecated_osgparticle.dll > > osgdb_serializers_osgparticle.dll > > are where they are supposed to be. Anyway if I export to .osg no problem > at > > all. > > I also tried to first export to .osg and then to use osgconv to create > the > > .ive but I get the following messages: > > Unknown node in Group::write(), className()=ModularEmitter > > Unknown node in Group::write(), className()=ParticleSystemUpdater > > Error writing IVE image: Unknown drawable in > > DataOutputStream::writeDrawable() > > Warning: Write to "C:\Users\Alessandro\Documents\3dsMax\export\test.ive" > not > > supported. > > I'm on Windows 7 x64, OSG 2.9.14 and OSGExp 0.9.9 (built against OSG > 2.9.14, > > both 32 and 64 bit) - tried with Max 2010, 2011 and 2012. > > What am I missing? > > Thanks. > > Alessandro > > ___ > > 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] Error writing particles in .IVE but not in .OSG
I'm experiencing an issue with particles: if I export from 3dsMax+OSGExp to .osg then particles are working, but if I export to.ive I get some errors and a message prompts me that the plugin to write the ive file cannot be found. Actually any model without particles is exported fine to .ive, so I guess that the error message refers to some other DLL. I assured that: osg75-osgParticle.dll osgdb_deprecated_osgparticle.dll osgdb_serializers_osgparticle.dll are where they are supposed to be. Anyway if I export to .osg no problem at all. I also tried to first export to .osg and then to use osgconv to create the .ive but I get the following messages: Unknown node in Group::write(), className()=ModularEmitter Unknown node in Group::write(), className()=ParticleSystemUpdater Error writing IVE image: Unknown drawable in DataOutputStream::writeDrawable() Warning: Write to "C:\Users\Alessandro\Documents\3dsMax\export\test.ive" not supported. I'm on Windows 7 x64, OSG 2.9.14 and OSGExp 0.9.9 (built against OSG 2.9.14, both 32 and 64 bit) - tried with Max 2010, 2011 and 2012. What am I missing? Thanks. Alessandro ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DirectShow plugin: error 016EE500
Hi, after some months I still cannot let the directshow plugin work, I'm still getting the error shown below...by the way if I try to load the movie by means of the qt plugin then the video is loaded. Currently I'm trying with osg 2.9.14, any idea/suggestion? Thanks. Alessandro On Mon, Feb 21, 2011 at 7:40 PM, Alessandro Terenzi wrote: > Hi, > I'm trying the DirectShow plugin but I'm getting an error when trying to > load .avi movies. Here's what I do: > > *osgmovie test.avi.directshow* > > and the output in the console is: > > * 016EE500 test.avi Not specified error.* > * Unable to read file test.avi.directshow* > > The sentence "Not specified error" is my translation, actually the message > is in italian. I'm using the latest developer release of osg and the > Platform SDK 6.1 from which I built strmbase.lib (MBCS) > > Every movie I try gives that error, but they are played correctly by > Windows Media Player. Also they are played fine by the ffmpeg plugin. > > Kindest regards. > Alessandro > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG based aplication nominated in CG Architect Awards
Thanks Alberto for spending time to answer my questions, your answers and your work are really inspiring. Looking forward to seeing other works like that. Alessandro On Fri, Jun 10, 2011 at 7:59 PM, Alberto Jaspe wrote: > Hi, > > Thanks Alsessandro and Ulrich for your feedback :) > > Asking questions... > >> >> 1) how do you cap holes when performing dynamic clipping? >> > Every poly behind the holes is viewed by its back face. You only have to > fill any back face with an uniform color in a fragment program. > > >> >> 2) is global illumination calculated in real-time as well? >> > No. It's a precalculated radiosity solution, with some optimizations in > the scenegraph and lighting info per vertex. > >> >> 3) how did you integrated panoramas in OSG? >> > Well, we had two ways doing that. At one hand, we developed our own > panorama library, that textures any panoramic image in the inside face of a > sphere, taking care of projections, texture load, movement control, etc. > This is a good choose if you need to integrate in any way the panorama in > your 3D scene. > By the other side and in the last times we had integrated web browsing > inside our own GI system, via awesomium. So most times it were faster and > more effective using a page with a flash panorama viewer, like kr-pano. > > Bye and thanks again! > Alberto. > > -- > *Alberto Jaspe* > *Computer Graphics R&D Guy* > > http://albertojaspe.net > > > ___ > 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] OSG based aplication nominated in CG Architect Awards
Hi Alberto, congratulations for the nominee, your application is really amazing and the video is worth seeing up to the very end! I'd like to ask you something, if you don't mind: 1) how do you cap holes when performing dynamic clipping? 2) is global illumination calculated in real-time as well? 3) how did you integrated panoramas in OSG? Thanks and, again, congrats to you and to everyone else that worked with you on the project! Regards. Alessandro On Wed, Jun 8, 2011 at 8:48 PM, Alberto Jaspe wrote: > Hello people! > > Lot of time without writing anything here. Anyway I've been using a lot OSG > in almost all my projects. > > I just one to tell you that one of them have just been nominated in the CG > Architect Awards 2011, for "Best Real-Time Application", and is completely > based on OpenSceneGraph. It's called "Spatial, volumetric and sectional > analysis of the Cathedral of Santiago de Compostela". > > http://3dawards.cgarchitect.com/nominees/view/realtime/1099 > > So never is late to thank the community, because without you this projects > are not possible. > > > -- > *Alberto Jaspe* > *Computer Graphics R&D Guy* > > http://albertojaspe.net > > > ___ > 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] COLLADA plugin: out of memory error.
Hi, I have to load a 75MB Collada model but when I try to open it I get the following error: Error: xmlSAX2Characters: huge text node: out of memory Load failed in COLLADA DOM Load failed in COLLADA DOM conversion osgviewer.exe: No data loaded The model comes from SketchUp and contains no textures, just (a lot of) geometry data (few meshes with lots of vertices). I tried to open it in a text editor but the file is so big that I do not know where to look. Does that error give you a hint on what I should try to look for? Thanks. Alessandro ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org