Re: [osg-users] OsgMovie ffmpeg and audio (SDL2) - Audio seems to make video slower. Audio has hiccoughing
Hi, Try replacing m_context->time_base by m_stream->time_base in FFmpegDecoderVideo::decodeLoop() (FFmpegDecoderVideo.cpp) This should solve your problem with FFMPEG versions after 3.0 Cheers! On Mon, Jun 11, 2018 at 4:36 PM, Andrea Martini wrote: > Hi everyone, > i'm using osg3.5.6 on visual studio 2013 (windows 10), and i'm using > ffmpeg plugin combined with SDL2 to play video and audio streaming with > osgmovie example. > If i don't use SDL2 (no audio), video streaming works fine. > If i add SDL2 (audio), i get two bad results: > 1) video stream get slower > 2) Audio has hiccoughing > > I tryied with some video examples (with different resolutions) but i get > the same result. > > Following, i report audio streaming output displayed on the console: > > ffmpeg::open(C:\Movie\surfers_360.mp4) size(2048, 1024) aspect ratio 1 > Attaching FFmpegAudioStream > AudioStream read [] > FFmpegAudioStream::setAudioSink( 0277C50FEEE0) > Assigning 0277C50FEEE0 > image->s()2048 image-t()=1024 aspectRatio=1 > SDLAudioSink()::startPlaying() > audioFrequency()=48000 > audioNbChannels()=2 > audioSampleFormat()=4 > SampleFormat = SAMPLE_FORMAT_F32 > > I'm wondering if i should continue with ffmpeg and sdl libraries, or i > have to look at another one. In this last case, could you suggest me some > way to follow? (link, examples, ...) > > Thank you! > > Cheers, > Andrea > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=74033#74033 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] maya2osg with Maya 2015
Hi Karl, I am currently using it with Maya 2015 OSG 3.2. I haven't used it too much with this version, but at least it compiles and works for simple scenes :) Regards, On Thu, Nov 13, 2014 at 1:20 PM, Cary, Karl A. karl.a.c...@leidos.com wrote: Has anyone attempted to use it with Maya 2015 yet? Last time we tried it was 2012, and it has been raised again that they want us to start trying to export directly to ive/osgb instead of our complex conversion process currently in place. Last I can see were some changes to get it compatible with 2014. This is probably mostly directed towards Javier Taibo. I just wanted to make sure this has been tested by someone before we put in for our upgrade from 2014 to 2015. Thanks. Karl ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multiple inheritance ERROR
Search for dreaded diamond problem in Google and you'll find good explanations of this problem and possible solutions. Regards, On Fri, Sep 26, 2014 at 5:01 AM, jiang.sa...@gmail.com jiang.sa...@gmail.com wrote: Hi, recently, I write a sample application based on osgEarth 2.5. when using FeatureManipTool class like the way osg::ref_ptrFeatureManipTool _featureManipulator; I got some errors: error C2385: ambiguous access of 'unref' 1 could be the 'unref' in base 'osg::Referenced' 1 or could be the 'unref' in base 'osg::Referenced' after debuging, I found that this class is using multiple inheritance. then how can I solve the problem? thanks! -- jiang.sa...@gmail.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Maya2osg?
Hi Chris, On Wed, Jan 29, 2014 at 10:54 PM, Chris Hanson xe...@alphapixel.com wrote: Is anyone using Maya2osg? http://maya2osg.sourceforge.net/ Me! :-) It doesn't look like it has been real active in a few years, and I'm wondering if anyone has a binary build that would work with Maya 2014 on Windows? I'd like to evaluate it without having to build it from source. I have recently built it for Maya 2014 win64 + VS2010 + OSG 3.2.0. The problem with the binaries is that it is a combinatorial explosion of OS+architecture+compiler+Maya version+OSG version, so the best option is to compile it yourself in your development environment. Actually, there was a problem with the maya UI in latest Maya versions. I commited the fix to SVN this morning. If you have any problem with the plug-in, let me know. Of course, if anyone in the OSG community has any corrections to contribute, they are welcome. It's funny that after about two years out of the list, the more recent thread I read is this :-) Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Maya2osg?
Hi Chris, I can send you one compiled in Windows 7 64-bit, Maya 2014, VS 2010, OSG 3.2.0. Download the file in this URL http://www.syntheractive.com/maya2osg/maya2osg_win64_maya2014_osg3.2.0_vs2010.tgz and do the following: Copy the file maya2osg.mll to your Maya 2014 plug-ins directory (e.g. C:\Program Files\Autodesk\Maya2014\bin\plug-ins\) Copy the other directories (prefs scripts) to your user directory for Maya 2014 (e.g. ~Documents\maya\2014-x64\) Start Maya and you should have a shelf called OSG with some buttons to export, import, preview... The scripts called from these buttons automatically load the plug-in. Good luck! Let me know if it works... or if you have any problem. Btw, If this configuration does not fit yours, it should not be too painful to compile your binaries. If you need to do it, you can install all the files above from the install target in Visual Studio. The only issue is that your user must have write access to the plug-ins directory. Best Regards, On Fri, Jan 31, 2014 at 10:30 PM, Chris Hanson xe...@alphapixel.com wrote: We've had some issues installing the binary we got. Do you by any chance have a precompiled binary we could test with Maya? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Maya2osg?
It is probably because OSG 3.2.0 libraries are not on the path. Are they? On Sat, Feb 1, 2014 at 12:43 AM, Chris Hanson xe...@alphapixel.com wrote: We just tried installing your build and we're getting an Error: Line 1: The specified module could not be found. http://alphapixel.com/sites/default/files/download/mayaerr.png I'm not sure if that has to do with it not actually finding it, or what the real issue might be. Any suggestions for troubleshooting? We probably could compile this ourselves, but the real goal is to be able to provide it to artists who don't have a compiler or SDK, and so we are hoping to have a binary install recipe that is relatively easy to explain. This is for people in the automotive industry who are authoring art assets in Maya. On Fri, Jan 31, 2014 at 4:17 PM, Javier Taibo javier.ta...@gmail.comwrote: Hi Chris, I can send you one compiled in Windows 7 64-bit, Maya 2014, VS 2010, OSG 3.2.0. Download the file in this URL http://www.syntheractive.com/maya2osg/maya2osg_win64_maya2014_osg3.2.0_vs2010.tgz and do the following: Copy the file maya2osg.mll to your Maya 2014 plug-ins directory (e.g. C:\Program Files\Autodesk\Maya2014\bin\plug-ins\) Copy the other directories (prefs scripts) to your user directory for Maya 2014 (e.g. ~Documents\maya\2014-x64\) Start Maya and you should have a shelf called OSG with some buttons to export, import, preview... The scripts called from these buttons automatically load the plug-in. Good luck! Let me know if it works... or if you have any problem. Btw, If this configuration does not fit yours, it should not be too painful to compile your binaries. If you need to do it, you can install all the files above from the install target in Visual Studio. The only issue is that your user must have write access to the plug-ins directory. Best Regards, On Fri, Jan 31, 2014 at 10:30 PM, Chris Hanson xe...@alphapixel.comwrote: We've had some issues installing the binary we got. Do you by any chance have a precompiled binary we could test with Maya? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training * Consulting * Contracting 3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 * GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL Digital Imaging * GIS * GPS * osgEarth * Terrain * Telemetry * Cryptography * Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS * Android @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775) 623-PIXL [7495] ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ 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
Hi Cory, Sorry I came a bit late to this thread, but just in case you sill find it useful, I sent some code to the list about a year ago, that implements the stencil technique described in the red book. It is in this message: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2010-September/044664.html Regards, On Wed, Jul 20, 2011 at 5:48 PM, Cory Riddell c...@codeware.com wrote: I've been thinking about using a ClipNode to cut my model in two to expose the inside details like a cutaway drawing. Just sticking a ClipNode at the root of my model graph does remove half of it, but the model ends up looking hollow rather than solid. I want to cap the open side. For example, if a sphere is cut in two, I would cap the open side with a circle. A bit of searching for how to do this with OpenGL turned up this page (http://glbook.gamedev.net/moglgp/advclip.asp) that caps the open side using the stencil buffer. Does the technique outlined in the article look like a reasonable OSG-friendly approach? Any advice or pointers to other examples? Grepping the example code turns up a bunch of stencil code, but I'm still a little lost (OpenGL newbie). Thanks, Cory ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Update-Draw frame numbering coherence
Hi all, I have an application where I request from the update thread some operations that must be performed in a draw callback. The operations must be performed in the draw of the same thread they were requested from. I tried to check the frame from the draw callback, using renderInfo.getState()-getFrameStamp()-getFrameNumber(). The problem I found is that this frame number is the one of the frame currently being processed in the UPDATE frame., as it is a reference to the FrameStamp structure of the viewer. The solution I have applied is a change in the file src/osgUtil/SceneView.cpp, method SceneView::cull, in the line 753, replacing state-setFrameStamp(_frameStamp.get()); with state-setFrameStamp( new osg::FrameStamp(*_frameStamp) ); This way, instead of storing a pointer to the global FrameStamp in the renderInfo structure, I build a copy of the FrameStamp object, so the draw stage keep this information intact and is not overwritten by the next frame in the update thread. I don't know if there is a better solution to this problem. Anyway, I think that in the renderInfo argument of a draw callback it would be nice to have the FrameStamp of the frame to which this callback belongs. Thoughts? Anybody else has faced problems with frame numbering in draw callbacks? Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-3.0.0-rc3 tagged, and plan to final 3.0.0 release
?virtual void osgText::Layout::layout(osgText::TextNode) const?: examples/osgtext3D/TextNode.cpp:80:11: warning: variable ?characterHeightScale? set but not used [-Wunused-but-set-variable] examples/osgvolume/osgvolume.cpp: In function ?int main(int, char**)?: examples/osgvolume/osgvolume.cpp:678:38: warning: variable ?internalFormatMode? set but not used [-Wunused-but-set-variable] examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ?bool windowMouseOver(osgWidget::Event)?: examples/osgwidgetcanvas/osgwidgetcanvas.cpp:27:24: warning: variable ?xy? set but not used [-Wunused-but-set-variable] examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ?bool widgetMouseOver(osgWidget::Event)?: examples/osgwidgetcanvas/osgwidgetcanvas.cpp:35:24: warning: variable ?xy? set but not used [-Wunused-but-set-variable] src/osgPlugins/p3d/ReaderWriterP3D.cpp: In member function ?osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode*, bool, osgDB::Options*) const?: src/osgPlugins/p3d/ReaderWriterP3D.cpp:2121:10: warning: variable ?readSlide? set but not used [-Wunused-but-set-variable] applications/present3D/present3D.cpp: In function ?int main(int, char**)?: applications/present3D/present3D.cpp:639:10: warning: variable ?sizesSpecified? set but not used [-Wunused-but-set-variable] 2011-06-22 09:06 robert * src/osgViewer/CompositeViewer.cpp, src/osgViewer/Viewer.cpp: Fixed regression in --run-on-demand feature 2011-06-21 17:30 robert * src/osg/glu/libutil/mipmap.cpp: Merged from svn/trunk changeset r12593, Removed assert() that always evaluated to true. 2011-06-21 13:03 robert * CMakeModules/Find3rdPartyDependencies.cmake: Merged from svn/trunk, changeset 12591, From Torben Dannhauer, originally I posted the addendum of 'freetype244MT', but that was wrong. I updated it to the correct addendum of 'freetype244' yesterday, but supposedly that was not forwarded to you by the forum-to-mail-gateway. Find attached the corrected CMake module. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ 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, On Fri, Jun 10, 2011 at 7:59 PM, Alberto Jaspe aja...@gmail.com wrote: 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. Actually I implemented the capping stuff using the stencil buffer technique described in the chapter 10 of the red book, but I think it finally was not used because the model did not fit the requisites for this technique (being closed convex elements with no intesecting surfaces and so on...). Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test svn/trunk before todays 2.9.15 dev release.
Everything OK in Ubuntu 10.04.2 LTS (64-bit). Regards, On Mon, May 30, 2011 at 10:28 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi All, Could users check out, build and test the svn/trunk version of the OSG and let me know how you get on. I'll be tagging the 2.9.15 release today so would like to make sure it's at least building across platforms before I make the release. Thanks, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Maya2OSG patches
It's far more readable :) Thanks for the changes. They are submitted to svn trunk. Regards, On Wed, May 25, 2011 at 4:50 PM, Ryan Pavlik rpav...@iastate.edu wrote: The replacement of that inline function with a macro removes the type-safety offered by C++ and makes the code more accident prone. I did the static-casts with the multiple parameters because the parameters to the function aren't necessarily always the same type. Looking into it further, a single parameter, which is manually specified when in doubt, seems to be the smartest solution, since it makes it explicit at the point of the call what precision is being used when it is ambiguous. I've attached files for an updated function which combines the best of all solutions so far: template function with a single parameter, body uses osg::absolute to simplify expression, and one explicit specification of the template parameter in calling code. Simpler and more explicit all around, I think - hopefully this will be acceptable. It build cleanly here: windows, vc9, maya 2012 x64 Ryan On Tue, May 24, 2011 at 5:20 PM, Javier Taibo javier.ta...@gmail.com wrote: Thanks for the fixes. Changes are now committed to svn trunk. About the second issue, it seems a much complicated piece of code for what it's doing. I suggest this lighter and cleaner alternative instead of a template with three different typename parameters and the huge expression with four static_cast. #define inTolerance(base, match, tolerance) ( osg::absolute((base)-(match)) tolerance ) However, this part of the code was written by Peter Particle, so I'll redirect to him both proposals. Meanwhile, can you test if it is working for you right now? Regards, On Tue, May 24, 2011 at 11:08 PM, Ryan Pavlik rpav...@iastate.edu wrote: The changes to osgpreview.cpp are for the first issue, while the changes to utility.h are for the second way of solving the second issue. Ryan On Tue, May 24, 2011 at 12:59 PM, Javier Taibo javier.ta...@gmail.com wrote: Hi Ryan, Thank you for the patches. Can you send the whole files instead of patches, please? You can zip all files together to make it easy. Thank you! Best Regards, On Tue, May 24, 2011 at 7:28 PM, Ryan Pavlik rpav...@iastate.edu wrote: Hello all, I've attached small patches to two issues I've found with Maya2OSG. One allows it to build successfully with the current 2.8 branch - there are some manipulators not available in this branch so we just disable them by checking the osg version. The other issue was ambiguity in calling inTolerance, preventing me from building successfully on VC9 x64. I solved this two different ways: take your pick of which way you prefer. I've made inTolerance a template function with a single parameter type and explicitly specified the template parameter in the one case. (fix-vc9-build) inTolerance is a template function with three parameter types, and static_casts all arguments to the type of the tolerance parameter before doing math. This one doesn't require explicit template param specification, and seems more correct to me, or at least more explicit in how it works. I personally prefer this one. (alternate-fix-build) These patches were made against the latest svn trunk of maya2osg using tortoisesvn. Ryan -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo
Re: [osg-users] Maya2OSG patches
Hi Ryan, Thank you for the patches. Can you send the whole files instead of patches, please? You can zip all files together to make it easy. Thank you! Best Regards, On Tue, May 24, 2011 at 7:28 PM, Ryan Pavlik rpav...@iastate.edu wrote: Hello all, I've attached small patches to two issues I've found with Maya2OSG. One allows it to build successfully with the current 2.8 branch - there are some manipulators not available in this branch so we just disable them by checking the osg version. The other issue was ambiguity in calling inTolerance, preventing me from building successfully on VC9 x64. I solved this two different ways: take your pick of which way you prefer. I've made inTolerance a template function with a single parameter type and explicitly specified the template parameter in the one case. (fix-vc9-build) inTolerance is a template function with three parameter types, and static_casts all arguments to the type of the tolerance parameter before doing math. This one doesn't require explicit template param specification, and seems more correct to me, or at least more explicit in how it works. I personally prefer this one. (alternate-fix-build) These patches were made against the latest svn trunk of maya2osg using tortoisesvn. Ryan -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Maya2OSG patches
Thanks for the fixes. Changes are now committed to svn trunk. About the second issue, it seems a much complicated piece of code for what it's doing. I suggest this lighter and cleaner alternative instead of a template with three different typename parameters and the huge expression with four static_cast. #define inTolerance(base, match, tolerance) ( osg::absolute((base)-(match)) tolerance ) However, this part of the code was written by Peter Particle, so I'll redirect to him both proposals. Meanwhile, can you test if it is working for you right now? Regards, On Tue, May 24, 2011 at 11:08 PM, Ryan Pavlik rpav...@iastate.edu wrote: The changes to osgpreview.cpp are for the first issue, while the changes to utility.h are for the second way of solving the second issue. Ryan On Tue, May 24, 2011 at 12:59 PM, Javier Taibo javier.ta...@gmail.com wrote: Hi Ryan, Thank you for the patches. Can you send the whole files instead of patches, please? You can zip all files together to make it easy. Thank you! Best Regards, On Tue, May 24, 2011 at 7:28 PM, Ryan Pavlik rpav...@iastate.edu wrote: Hello all, I've attached small patches to two issues I've found with Maya2OSG. One allows it to build successfully with the current 2.8 branch - there are some manipulators not available in this branch so we just disable them by checking the osg version. The other issue was ambiguity in calling inTolerance, preventing me from building successfully on VC9 x64. I solved this two different ways: take your pick of which way you prefer. I've made inTolerance a template function with a single parameter type and explicitly specified the template parameter in the one case. (fix-vc9-build) inTolerance is a template function with three parameter types, and static_casts all arguments to the type of the tolerance parameter before doing math. This one doesn't require explicit template param specification, and seems more correct to me, or at least more explicit in how it works. I personally prefer this one. (alternate-fix-build) These patches were made against the latest svn trunk of maya2osg using tortoisesvn. Ryan -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S, On Mon, May 9, 2011 at 5:15 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: In the end, the fact that the shader generation code in phong.cpp was trying to access a plug that didn't exist for a blinn material wasn't the cause of the crash (the code is well guarded so it just returns an empty plug). Plus, that plug is never used anyways (the gl_FrontMaterial.shininess is used, and that was set according to my approximation in shader.cpp, so that should be fine). Still, I made the Blinn class anyways so it's a starting point if we ever want to refine it. What I did to remove the crash (at least until we can find the real cause) is to disable optimization for the function where it crashes. I also saw that one of the plugs was missing in phong.cpp, and even if it's empty, for completeness I added it. Great! Thanks for the corrections. Submitted to svn/trunk. So find the modified files attached. They all go in src/GLSL, except the CMakeLists.txt which goes into the root. Do you know of an easy way for CMake to create the folders (e.g., GLSL) inside the Visual Studio project source tree? Cheers! -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
On Mon, May 9, 2011 at 9:58 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Do you know of an easy way for CMake to create the folders (e.g., GLSL) inside the Visual Studio project source tree? See the attached file. :-) Hope this helps, You're my CMake hero! :-) -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S, On Fri, May 6, 2011 at 10:45 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Good, pardon the negativism but it's a relief that you're seeing the crash too now, at least it's not something totally trivial on my side :-) I've gotten pretty far debugging this in release with debug symbols. First it looked as if adding the shading node to the map (ShadingNetwork::registerShadingNode()) was causing it, but I debugged deeper and it's not that. If I comment out shadingnode.cpp line 67: plug.codeBlock = plug.connectedShadingNode-getCodeBlock( rp_name ); it doesn't crash anymore. In release with debug symbols it seems like the debugger sometimes gives bad information (for example sometimes the call stack looks whack, or a pointer will look invalid but will be ok) but it looks as if when rp_name is outColor it will crash shortly after. I'm sure that line is not the cause but the symptom, but maybe this info will help you debug it. I reached the same point as you, activating debugging information in the release configuration. Moreover, I converted the Maya scene to Maya 2010 and tested it in my laptop with Vista + VS 2008 Express + Maya 2010 + OSG 2.9.11 and the crash is exactly the same, only two stack frames before (surfaceshader.cpp line 158). I have to get deeper in this issue, but unfortunately I won't have much time for it. I'll let you know if I get to something. In favor of Peter I must say I am pretty sure it is my fault. I tested it in a version prior to the osgAnimation stuff and mesh export changes and it crashes the same way. It is not at all a random crash. I suppose I didn't noticed that because I always use the Debug configuration. Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi, On Fri, May 6, 2011 at 3:24 AM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: This can actually be handled automatically with the right usage of FindOSG. But I agree that it's not always obvious how to do that. When you start writing tons of ifs for each configuration, it's a clear sign that you're not using CMake to its full potential. Yes. That is *exactly* the point :) I'll have a look at it tomorrow morning. Thank you very much. I really appreciate it. -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S, On Fri, May 6, 2011 at 3:49 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Here are the changes I have made to maya2osg. 1. I have modified the CMake config so it will use the OSG release and debug versions correctly. 2. I made the Maya install directory user-visible because it might not be in Program Files... It is settable at install time. 3. I set the debug, release with debug info and min size release postfixes to empty so that you can compile/install either version and Maya will load it correctly (by default they are d, rd and s). 4. I removed the CONFIG_PROJECT macro since it was now being used only for OpenGL (since FindOSGHelper does all the work for OSG). 5. I aded the possibility for parallel building on MSVC. On my 8 core it builds much quicker :-) 6. The only code change is that I added .get() where needed so the plugin would compile when OSG is built with OSG_REF_PTR_IMPLICIT_CONVERSION disabled. Thank you very much. They are submitted to svn/trunk. Now the CMake script works like a charm. I hope to port it to Linux next monday. Now in VS debug mode works like a charm, did you finally manage to debug Maya and Maya2OSG from VS? I noticed that you've made changes to fix the normal mapping, but for me the plugin seems to make Maya crash when I press the Export button. I tried to debug the crash, but the plugin built in debug doesn't crash... And in release with debug symbols, the crash doesn't seem to happen in the plugin itself, because I don't get a coherent stack trace. I'm assuming you tested your change and it doesn't crash for you, so it's probably something specific to my setup. I'll let you know when I have more information. Actually, I didn't change anything there yet. It was Peter who submitted some changes related with the bumpmapping problems we detected. It was an UI option that accidentally disappeared that allowed to enable/disable bumpmapping export. I also noticed a bug in this code that make the plug-in crash when the bump texture cannot be loaded. It is already fixed, but I don't think it is the same problem you're finding. I am still working on all these and haven't reviewed yet all the changes in the last months that could cause the bump problems. However, if you can send me the scene that is crashing on your system, in case it is not too complex, I can test directly with it. Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S, On Fri, May 6, 2011 at 7:02 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: 1. Named the osg::Light according to the MFnLight/MFnSpotLight name (i.e. if the light's MatrixTransform is directionalLight1, then the osg::Light will be directionalLightShape1) 2. Blinn materials will be shaded like Phong, with an empirical conversion of the eccentricity to an OpenGL shininess value. I haven't found any good online sources on converting the value (and the Maya doc was no help either), so I came up with my own conversion after a bit of experimentation in a spreadsheet... Seems to give roughly the right curve in specular highlight. If we can get a better conversion later I'm all for it. 3. The file connected to a Bump2d node would be converted to a tangent space normal map with the bump2normal() function. Our normal map textures are already tangent space normal maps, so they need no conversion (and converting them gave really bad results). The Bump2d node has a setting called Use As: Bump / Tangent Space Normals / Object Space Normals. I think that if the setting is not set to Bump, there should be no conversion done. So I did that, I hope you agree (or if there's some other way to do that let me know). Thank you for the changes. They are already submitted to svn/trunk. The Blinn shader was something in my to-do list. I wanted to do some research to discover what computations does Maya for it. Now we have a first approximation :) However, I don't know if it is working I saw your change in bump2normal.cpp, but it didn't help. I'm still getting a crash only in release build of the plugin, after pressing Export. I'll probably put in some prints to try and track it down, since the debug version of the plugin doesn't crash. Don't worry about it. By the way, I tested the file you sent me with tangent space normal maps, and worked OK. At least nobody crashed. The mapping is a bit weird however, but I suppose it is just a test to see if it is working. I can send you a snapshot if you want. Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
On Fri, May 6, 2011 at 7:41 PM, Javier Taibo javier.ta...@gmail.com wrote: research to discover what computations does Maya for it. Now we have a first approximation :) However, I don't know if it is working ^ Please, ignore this line. It should not be there X-D -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
On Fri, May 6, 2011 at 8:29 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hi Javier, Great, thanks. Can you please replace the filetexture.cpp by this one as it's the behavior I think we want - if the Use As: field is anything OTHER than Bump, don't convert bump2normal. Sorry I forgot the file, here it is. Updated! Now bump mapping seems to be working fine again, btw... And I must apologize, I absolutely lied to you in the other message. Your scene crashes in Release mode. Just tested it on Debug only. My mistake! I don't know where the problem is... I'm taking a look at it. If I discover something I'll let you know... -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S! On Wed, May 4, 2011 at 10:27 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: maya2osg (Maya plugin) --- As for maya2osg, it also seems active (last checkin Apr. 24th) and I was able to compile it myself and use my compiled version without any problems. But again there are unanswered messages on the sourceforge forum. I've subscribed to its mailing list and posted a few questions to which I haven't yet gotten an answer but it hasn't been that long yet. However from the OMG! X-D How many minutes did you wait??? :) archives it doesn't seem the mailing list is much more active than the forum. Again, the main developer is also a member of this list, ParticlePeter. So the same question applies, where do we discuss this, here or on the project's sourceforge forums / its own mailing list? I have been quite busy last months and didn't work too much on the plug-in. Actually, the active developer was ParticlePeter, integrating osgAnimation export. I am retaking the project these days, and I'm afraid Peter is under heavy workload, so it seems we are playing turns :) About where to discuss, wherever you prefer, the OSG list, the maya2osg list. Personally I don't like forums very much. About the unanswered questions in the forum, it's a matter of time availability. I released the code in case someone finds it useful, but cannot guarantee user support. In both cases, I'd like to ask how active are the projects, really. If I do some work on them, will it likely be accepted and integrated quickly, or will it sit as a patch for a few months? Patches will be accepted and integrated ASAP, but this is a project developed in my spare time, so it is adapted to time availability. We'll be looking to have at least normal mapping exported as a basic feature - maya2osg already supports that but it's not working 100% yet, and we'll It has been broken on one of the last updates. I am checking it... Actually, I will need it soon at work so I must fix it whether I like it or not. want to add it to OSGExp. We'll also probably want to add a callback mechanism in some places, so that the exported file can be customized to the final engine's pipeline. But I can discuss this later. I hope I can work with the authors of the respective plugins and get them working for our purposes. Thanks in advance, As I already said in the other list, contributions are always welcome. It's nice to see there is people interested in the project. Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S, On Thu, May 5, 2011 at 10:25 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: No seriously, about 5 hours, but it's fine, I didn't really expect a reply that quick - it was meant as a joke, and I had other questions to ask for the Max export plugin too so I started a thread about both plugins. I suppose you have a very short timeframe in justincaseidie.com :D About where to discuss, I think you might have better visibility if we discuss here, that way others will know the project is active. But if you generally don't read all messages and prefer to keep the two separate I can understand. It's really up to you. OK. If nobody consider it intrusive to the OSG list, I'll be glad to discuss here. Great! I'll look into adding CMake build files tomorrow, since I just did the same thing for the Max exporter today (it went quite fast). Would you mind if the first version was Windows/VC++ only? I don't have Maya for Linux so couldn't test, and putting in a build system for Linux that should work but is untested is not a good strategy I think. The CMake script is already in the svn/trunk. I am trying in Win7 32-bit + VS2010 Express + Maya 2011 + OSG 2.9.11. It correctly creates the VS project and it is working in Release configuration. The installation is also ready, assuming you have write permission to the plug-in directory. The only thing I have unsolved is the Debug configuration, I don't know what is the orthodox way to make it link with debug versions of OSG. I tried to detect the CMAKE_BUILD_TYPE and if it is Debug link with OSG_LIBRARY_DEBUG instead of OSG_LIBRARY, but it didn't work. I think it should probably work in Linux, but in Visual Studio the configurations are managed inside the VS project/solution and so the CMAKE_BUILD_TYPE is not known when the CMake script is evaluated. Maybe you can help me with that, and test it in your system and let me know if it works. I'm pretty sure that you have much more knowledge than me about CMake. I am developing a weird love-hate relationship with this software. Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Perspective division MVPW
Hi all, I am using the MVPW matrix to transform vertices from object space to window space. I get this matrix through the getMVPW method of CullVisitor. Taking a look at the code, it seems that MVPW is (as its name implies) the multiplication of Model View Projection and Window matrices. Isn't perspective division missing? Shouldn't it be performed between the projection (view to clip coordinates) and the viewport (normalized device to window coordinates) transformations? Obviously, I am missing something here... If somebody can trow some ligth at this, I would really appreciate it. Thanks in advance. -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Perspective division MVPW
Well... I suppose this method is meant to be used with orthographic cameras only. Regards, On Fri, Feb 18, 2011 at 5:01 PM, Paul Martz pma...@skew-matrix.com wrote: On 2/18/2011 5:27 AM, Javier Taibo wrote: Hi all, I am using the MVPW matrix to transform vertices from object space to window space. I get this matrix through the getMVPW method of CullVisitor. Taking a look at the code, it seems that MVPW is (as its name implies) the multiplication of Model View Projection and Window matrices. Isn't perspective division missing? Shouldn't it be performed between the projection (view to clip coordinates) and the viewport (normalized device to window coordinates) transformations? I haven't looked at the code you're referring to (I don't use getMVPW myself), but yes, you are correct, perspective divide occurs after the Projection transform and before the scale and bias to window coords. * The Projection matrix transforms from eye coords to clip coords (CC). * Divide CC xyz by CC w to get normalized device coords (NDC). * Scale and bias NDC xy by the viewport and NDC z by the depth range to get window coords. Ref: OpenGL spec section 2.11. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgCompute CMake
Hi, I have found a problem building osgCompute in Ubuntu 10.04 with CMake 2.8. My knowledge about CMake is near zero, so I cannot give much more info than the error I get: CMake Error in examples/osgGeometryDemo/src/CMakeLists.txt: Cannot find source file WarpMe.vsh. Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx Any clue about how to solve it? Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgCompute CMake
Silly me!!! I had the data and the OSG_FILE_PATH env var set, but I missed the OSGCOMPUTE_FILE_PATH. Thanks for the hint! (and sorry for the noise :) On Wed, Feb 16, 2011 at 11:49 AM, J.P. Delport jpdelp...@csir.co.za wrote: I think you need the data from separate osgCompute repository. cheers jp On 16/02/11 12:35, Javier Taibo wrote: Hi, I have found a problem building osgCompute in Ubuntu 10.04 with CMake 2.8. My knowledge about CMake is near zero, so I cannot give much more info than the error I get: CMake Error in examples/osgGeometryDemo/src/CMakeLists.txt: Cannot find source file WarpMe.vsh. Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx Any clue about how to solve it? Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Cameras and FBOs
Hi there! Is there any way to explicitly pass an osg::FrameBufferObject to a Camera, so the camera renders into it? or, using FRAME_BUFFER_OBJECT as the Camera RenderTargetImplementation and attaching textures/images/buffers to it, is there any way to get the FrameBufferObject the camera is using from a Camera draw callback? or, even not getting it, is there a way to bound the FrameBufferObject of this Camera? Thanks in advance! -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgviewer: specify camera position at the command line
Hi, We discussed this issue some time ago. You can check the thread http://forum.openscenegraph.org/viewtopic.php?t=6861 I solve it making a small modification to osgviewer. I added a command-line parameter (noautohomeview) to make it conserve the camera position and not establishing an automatic position computed from the geometry bounding volume. if ( arguments.read(--noautohomeview) ) { osg::Vec3 eye, center, up; viewer.getCamera()-getViewMatrixAsLookAt( eye, center, up ); keyswitchManipulator-setHomePosition( eye, center, up ); } With this option and the -c option to use the camera, it works for me. $ osgviewer --noautohomeview -c camera.osg model.osg Robert, would it be possible to add such a modification to osgviewer? It would be really useful to preview from Maya the OSG exported scene from the active camera in Maya. Best regards, Javier Taibo. On Thu, Nov 18, 2010 at 3:36 PM, Ares Lagae ares.la...@gmail.com wrote: Thanks for your quick reply. Some comments: - I assumed there was support for this since camera paths are supported. - I am perfectly prepared to extend osgviewer. I appreciate any pointers on how to best implement this feature. - maya2osg exports the maya camera as an osgViewer::Viewer node. So this node must somehow already exist and/or be supported? Or maybe the maya2osg author has plugins for this? Thanks, ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera config file problems
I have not an extremely deep knowledge of the intricacies of OSG code, but if there is something I can help with, let me know. Anyway, is it OK to use osgDB::writeObjectFile on the osgViewer::Viewer object to create the config file? Best regards, Javier Taibo. On Thu, Oct 14, 2010 at 9:24 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Javier, Thanks for pointing these problems out, I hadn't tested the viewer configuration plugin recently so hadn't spotted the regression. I suspect the regression happened when we merged the new serialization support. I'll put fix the viewer configuration on my TODO list for the week. Cheers, Robert. On Wed, Oct 13, 2010 at 10:27 PM, Javier Taibo javier.ta...@gmail.com wrote: Hi, I am trying to figure how to use config files for camera definition with osgviewer. After some search in the list and browsing the code, it seems that camera config files can be passed to osgviewer in two ways: the environment variable OSG_CONFIG_FILE and the command-line option -c. There are some examples in OpenSceneGraph-Data/Configuration (with .view extension), but they fail in different ways: osgviewer -c Configuration/SingleScreen.view cow.osg Warning: Could not find plugin to read objects from file Configuration/SingleScreen.view. OSG_CONFIG_FILE=Configuration/SingleScreen.view osgviewer cow.osg Warning: Could not find plugin to read objects from file Configuration/SingleScreen.view. Viewer::realize() - failed to set up any windows Warning: Could not find plugin to read objects from file Configuration/SingleScreen.view. Viewer::realize() - failed to set up any windows It seems that the program cannot find the plug-in to read .view files. What plug-in is this? Isn't it osgdb_osgviewer? Anyway, after browsing the source and experimenting a little more, I managed to get it working with regular .osg files (instead of .view) that I created with osgDB::writeObjectFile from an osgViewer::Viewer with the desired configuration. It works with the command-line option: osgviewer -c mycamera.osg model.osg But using the environment variable OSG_CONFIG_FILE still does not work, it keep showing the following messages: Viewer::realize() - failed to set up any windows Viewer::realize() - failed to set up any windows One last issue with camera config in the command-line option is that even though it work for the projection matrix and other features, the initial view is reset by osgviewer. To avoid this, I added this code to osgviewer.cpp after keyswitchManipulator creation and configuration. if ( arguments.read(--noautohomeview) ) { osg::Vec3 eye, center, up; viewer.getCamera()-getViewMatrixAsLookAt( eye, center, up ); keyswitchManipulator-setHomePosition( eye, center, up ); } This way, the config file view matrix is set as home position for the manipulator, what prevents the manipulator to override it. It is activated with a command-line option, to keep backwards compatibility. Btw, I am using OSG 2.9.9. My questions are: Is all this config file system deprecated? (the -c command-line option is not shown in the osgviewer help) If it is not, what am I doing wrong? Is there any way to see the initial camera position defined in the config file, without needing to modify the osgviewer code? Any help would be very appreciated. Best Regards, Javier Taibo. ___ 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] Camera config file problems
Hi, I am trying to figure how to use config files for camera definition with osgviewer. After some search in the list and browsing the code, it seems that camera config files can be passed to osgviewer in two ways: the environment variable OSG_CONFIG_FILE and the command-line option -c. There are some examples in OpenSceneGraph-Data/Configuration (with .view extension), but they fail in different ways: osgviewer -c Configuration/SingleScreen.view cow.osg Warning: Could not find plugin to read objects from file Configuration/SingleScreen.view. OSG_CONFIG_FILE=Configuration/SingleScreen.view osgviewer cow.osg Warning: Could not find plugin to read objects from file Configuration/SingleScreen.view. Viewer::realize() - failed to set up any windows Warning: Could not find plugin to read objects from file Configuration/SingleScreen.view. Viewer::realize() - failed to set up any windows It seems that the program cannot find the plug-in to read .view files. What plug-in is this? Isn't it osgdb_osgviewer? Anyway, after browsing the source and experimenting a little more, I managed to get it working with regular .osg files (instead of .view) that I created with osgDB::writeObjectFile from an osgViewer::Viewer with the desired configuration. It works with the command-line option: osgviewer -c mycamera.osg model.osg But using the environment variable OSG_CONFIG_FILE still does not work, it keep showing the following messages: Viewer::realize() - failed to set up any windows Viewer::realize() - failed to set up any windows One last issue with camera config in the command-line option is that even though it work for the projection matrix and other features, the initial view is reset by osgviewer. To avoid this, I added this code to osgviewer.cpp after keyswitchManipulator creation and configuration. if ( arguments.read(--noautohomeview) ) { osg::Vec3 eye, center, up; viewer.getCamera()-getViewMatrixAsLookAt( eye, center, up ); keyswitchManipulator-setHomePosition( eye, center, up ); } This way, the config file view matrix is set as home position for the manipulator, what prevents the manipulator to override it. It is activated with a command-line option, to keep backwards compatibility. Btw, I am using OSG 2.9.9. My questions are: Is all this config file system deprecated? (the -c command-line option is not shown in the osgviewer help) If it is not, what am I doing wrong? Is there any way to see the initial camera position defined in the config file, without needing to modify the osgviewer code? Any help would be very appreciated. Best Regards, Javier Taibo. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Autorotating scene elements (osg::Billboard vs. osg::AutoTransform)
Hi all, In a recent thread it was commented the differences between Billboards and AutoTransforms. For lightweight models (like trees) Billboard is a very efficient solution. AutoTransform, on the other side, is a Group node that orient the scene graph behind it towards the screen (or the camera). However, I think there is a useful feature missing. I have found in many cases that I need to rotate a part of the scene graph around an axis (just like billboards do), usually the Z-axis. It would be nice to have in AutoTransform a way to define a rotation axis and a mode to activate it. Is there any evident way to do it that I am missing (this is probable)? In case there is not, do you think it would be interesting to add this feature to AutoTransform? Best Regards, Javier Taibo. P.S.: Maybe I am nostalgic of old VRML Billboards, that in fact were a Group node :) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Missing osgUtil::RegisterRenderBinProxy
Hi Robert, On Fri, Oct 1, 2010 at 9:41 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Javier, On Thu, Sep 30, 2010 at 6:54 PM, Javier Taibo javier.ta...@gmail.com wrote: I searched the list and the web but I couldn't found any reference to this fact. I was wondering the reason to remove it, just pure curiosity :) Is it not the recommended way to define RenderBins anymore? In RenderBin there is now a static method: static void addRenderBinPrototype(const std::string binName,RenderBin* proto); Which you call : RenderBin::addRenderBinPrototype(MyRenderBinName,new MyRenderBin); Thanks for the answer. Actually, it was the method called by the proxy class RegisterRenderBinProxy. It is not indispensable, but was an easy method to automatically register RenderBin's. Anyway, it can be easily solved including the proxy in my code :) Cheers! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Missing osgUtil::RegisterRenderBinProxy
Hi All, I was porting some old code to the last development release and I found that the proxy class RegisterRenderBinProxy has been removed from osgUtil/RenderBin. I searched the list and the web but I couldn't found any reference to this fact. I was wondering the reason to remove it, just pure curiosity :) Is it not the recommended way to define RenderBins anymore? Best regards, Javier Taibo. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Error compiling osgText on mingw (trunk)
Hi David, Add #include osg/Geode to Glyph file. At least it worked for me. Best Regards, Javier Taibo. On Sun, Sep 26, 2010 at 8:41 AM, David Wilson spam...@gmail.com wrote: Hi, I checked out the trunk of OSG so I could get into the new Qt stuff. I'm compiling using the version of MinGW included with Qt 4.7 - I think it's 4.4.0, and I get this error: ... Building CXX object src/osgText/CMakeFiles/osgText.dir/DefaultFont.obj In file included from C:\OpenSceneGraph\src\osgText\/DefaultFont.h:19, from C:\OpenSceneGraph\src\osgText\DefaultFont.cpp:18: C:\OpenSceneGraph\include/osg/ref_ptr: In destructor 'osg::ref_ptrT::~ref_ptr() [with T = osg::Geode]': C:\OpenSceneGraph\include/osgText/Glyph:101: instantiated from here C:\OpenSceneGraph\include/osg/ref_ptr:35: error: invalid use of incomplete type 'struct osg::Geode' C:\OpenSceneGraph\include/osg/Image:412: error: forward declaration of 'struct osg::Geode' mingw32-make[2]: *** [src/osgText/CMakeFiles/osgText.dir/DefaultFont.obj] Error 1 mingw32-make[1]: *** [src/osgText/CMakeFiles/osgText.dir/all] Error 2 mingw32-make: *** [all] Error 2 Hoping someone can give me an unofficial workaround for this. Thank you! Cheers, David Wilson -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32074#32074 ___ 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] Load texture in *.obj
If you build your models in Maya, you can try the Maya2OSG exporter in http://maya2osg.sourceforge.net Texture coordinates and texture transformations are exported to OSG file. Best regards, Javier Taibo. On Thu, Sep 23, 2010 at 12:10 AM, John Kush dfoo...@gmail.com wrote: Hi, I'm loading a sphere with texture that was created in Maya. In osg only a black sphere. Why? Code for laoding texture: Code: osg::Image* image = osgDB::readImageFile( neptune2.jpg ); if ( image ) { osg::Texture2D* tex2d = new osg::Texture2D;//( image ); tex2d-setImage(image); tex2d-setDataVariance(osg::Object::DYNAMIC); ballNode-getOrCreateStateSet()-setTextureAttributeAndModes( 0, tex2d, osg::StateAttribute::ON); } if (!image) { std::cout Couldn't load texture. std::endl; return NULL; } Thank you! Cheers, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31953#31953 ___ 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] osgParticle emitter and transforms
Hi all, I am trying to make a directional emitter using osgParticle nodekit and faced a problem. I am using a osgParticle::ModularEmitter and everything works fine except for one thing: the emission direction. I configured an emission cone around Z-axis using the osgParticle::RadialShooter and tried to orient it to the desired direction by applying transformations above the emitter node in the scene graph. The problem is that rotations above this node do not affect the direction of emitted particles. Is this the expected behaviour? Is the problem between keyboard and chair? Any suggestion on how to solve it? Maybe creating a new shooter (DirectionalShooter)? Best Regards Javier Taibo. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Wiki editing
I would like to have editing access to the OSG Wiki. I sent two e-mails to the address in the page http://www.openscenegraph.org/projects/osg/wiki/About/WikiEditing leaving a month between them and I had no response. Maybe the address is no longer this? Thanks in advance. Javier Taibo. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Maya to OSG exporter and importer
Hi all, I have released an open source plug-in for Maya that allows to export Maya scenes to OSG and import them back from OSG to Maya. In case someone is interested, you can find it at: http://maya2osg.sourceforge.net/ It is a preliminary release. I am currently testing it, but I think it is fairly usable for the basic features. If you are interested init, stay tuned... more features are on the way. User feedback is very welcome. Enjoy! Best regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] draw callbacks
Of *Javier Taibo *Sent:* Thursday, September 02, 2010 1:09 PM *To:* osg-users@lists.openscenegraph.org *Subject:* [osg-users] draw callbacks Hi, I have some solid geometry clipped by some clipping planes in an OSG application. I am trying to use the capping technique described in chapter 10 of the Red Book using the stencil buffer. I have successfully implemented this technique in raw OpenGL, but I would like to use it whithin the OSG application. The technique is based on storing on the stencil buffer the regions that are open and then in a later pass draw a solid color in these regions. I have put the clipped geometry under an osg::Camera node with the stencil function configured. To do the second pass (the one that draws the caps in the regions marked in the stencil), I am trying to use a post-draw callback with the OpenGL calls (saving and restoring the states to avoid breaking things). The problem is that I need to set the NESTED rendering order to see all the scene graph, and when I do it, the post-draw callback is not called anymore. I do not have full control over the application, so the solution I am looking for has to be transparent to the rest of the scene graph. I must activate this behaviour to a group in the scene graph without breaking anything outside this branch. What is the best way to do it? camera post-draw callbacks? rendering bins? any other? I am not very familiar with render passes in OSG, so the way I am trying is probably not the best way. I would appreciate any suggestion, advice or pointer to any related documentation or source code. Thanks in advance. Javier Taibo. ___ 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] draw callbacks
Hi, I have some solid geometry clipped by some clipping planes in an OSG application. I am trying to use the capping technique described in chapter 10 of the Red Book using the stencil buffer. I have successfully implemented this technique in raw OpenGL, but I would like to use it whithin the OSG application. The technique is based on storing on the stencil buffer the regions that are open and then in a later pass draw a solid color in these regions. I have put the clipped geometry under an osg::Camera node with the stencil function configured. To do the second pass (the one that draws the caps in the regions marked in the stencil), I am trying to use a post-draw callback with the OpenGL calls (saving and restoring the states to avoid breaking things). The problem is that I need to set the NESTED rendering order to see all the scene graph, and when I do it, the post-draw callback is not called anymore. I do not have full control over the application, so the solution I am looking for has to be transparent to the rest of the scene graph. I must activate this behaviour to a group in the scene graph without breaking anything outside this branch. What is the best way to do it? camera post-draw callbacks? rendering bins? any other? I am not very familiar with render passes in OSG, so the way I am trying is probably not the best way. I would appreciate any suggestion, advice or pointer to any related documentation or source code. Thanks in advance. Javier Taibo. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] draw callbacks
Hi Robert, Thank you very much for your very detailed help!!! osgFX is exactly what I was looking for. Actually I don't even need the camera, I only put it there to be able to assign the post-draw callback. I will try it and if it works, I will post the code, just in case someone is interested... Best regards! On Thu, Sep 2, 2010 at 5:19 PM, Robert Milharcic robert.milhar...@ib-caddy.si wrote: You can use osgFX node kit framework to implement described capping tehnique. You do that by inheriting osgFX::Effect class. In your derived class you have to override/implement virtual bool define_techniques() member of the osgFX::Effect class like this: bool CappingEffect::define_techniques() { CappingTechnique* technique = new CappingTechnique(this); addTechnique(technique); return true; } CappingTechnique must inherit from osgFX::Technique. In the derived class you will have to implement virtual bool validate(osg::State) const, virtual void define_passes() and optionally virtual osg::Node* getOverrideChild(int pass) like this: bool CappingTechnique::validate(osg::State) const { return true; } bool CappingTechnique:: define_passes() { // pass #1 { osg::ref_ptrosg::StateSet ss = new osg::StateSet; ... setup states for stencil operation addPass(ss.get()); } // implement pass #2 { osg::ref_ptrosg::StateSet ss = new osg::StateSet; ... setup states for solid color draw addPass(ss.get()); } } You can optionally implement getOverrideChild (int pass) to supply some other graph for a particlular pass. You then add your group to the CappingEffect (the osgFX::Effect inherits from osg::Group node) and CappingEffect to the camera. Robert Milharcic *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Javier Taibo *Sent:* Thursday, September 02, 2010 1:09 PM *To:* osg-users@lists.openscenegraph.org *Subject:* [osg-users] draw callbacks Hi, I have some solid geometry clipped by some clipping planes in an OSG application. I am trying to use the capping technique described in chapter 10 of the Red Book using the stencil buffer. I have successfully implemented this technique in raw OpenGL, but I would like to use it whithin the OSG application. The technique is based on storing on the stencil buffer the regions that are open and then in a later pass draw a solid color in these regions. I have put the clipped geometry under an osg::Camera node with the stencil function configured. To do the second pass (the one that draws the caps in the regions marked in the stencil), I am trying to use a post-draw callback with the OpenGL calls (saving and restoring the states to avoid breaking things). The problem is that I need to set the NESTED rendering order to see all the scene graph, and when I do it, the post-draw callback is not called anymore. I do not have full control over the application, so the solution I am looking for has to be transparent to the rest of the scene graph. I must activate this behaviour to a group in the scene graph without breaking anything outside this branch. What is the best way to do it? camera post-draw callbacks? rendering bins? any other? I am not very familiar with render passes in OSG, so the way I am trying is probably not the best way. I would appreciate any suggestion, advice or pointer to any related documentation or source code. Thanks in advance. Javier Taibo. ___ 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] IntersectVisitors and LODs
Hi all, I have a problem in a situation that seem quite common. I have an IntersectVisitor traversing a scene with LOD nodes. The LOD ranges are not overlapped. The problem is that intersections are only detected with one of the LOD children, not neccesarily the visible one. There must be any obvious thing that I am not doing, so any ideas or any advice about where to search would be very appreciated. Thanks in advance. -- Javier Taibo VideaLAB. Grupo de Visualización en Ingeniería, Arquitectura y Urbanismo Universidade da Coruña E.T.S.I. de Caminos, Canales y Puertos Campus de Elviña, s/n 15071 - A Coruña (Spain) http://videalab.udc.es +34-981-167000 (ext. 5444) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] access frame buffer when using osgViewer::Viewer
You can do it just calling glReadPixels after viewer.frame() Best Regards, El vie, 28-12-2007 a las 12:40 -0500, Yanling Liu escribió: Hello, is there an easy to access frame buffer when using osgViewer::Viewer? I need to save each frame as image file for later process. Thanks advance for your response! Yanling ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo VideaLAB. Grupo de Visualización en Ingeniería, Arquitectura y Urbanismo E.T.S.I. de Caminos, Canales y Puertos Universidade da Coruña Campus de Elviña, s/n 15071 - A Coruña (Spain) +34-981-167000 (ext. 5444) http://videalab.udc.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] gDEBugger and OpenSceneGraph
Hi Paul, I tried gDEBugger releases from beta7 and experienced the same behaviour with OSG based applications in my Ubuntu (Linux - i386 libstdc++ 4.X) Breakpoints don't stop in the graphics context (I have to manually switch it every break) and what is worse, there is no information about OpenGL states at all. This problem doesn't exist in my OpenGL based applications not using OSG. I simply need to run osgviewer cow.osg to reproduce the problem in gDEBugger. Best Regards, O Mér, 28-11-2007 ás 15:52 +1100, Paul Pocock escribiu: Can all those who have tried gDEBugger http://www.gremedy.com/gDEBuggerLinux.php?sdk with OpenSceneGraph post their experiences. I'm running i586 suse-linux and have had mixed results (understandably - it is in beta), namely blank screen when running any OSG application - Performance counters appear to be working however. Be interested to hear what experiences others have had Regards Paul IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo VideaLAB. Grupo de Visualización en Ingeniería, Arquitectura y Urbanismo Universidade da Coruña E.T.S.I. de Caminos, Canales y Puertos Campus de Elviña, s/n 15071 - A Coruña (Spain) http://videalab.udc.es +34-981-167000 (ext. 5444) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] gDEBugger and OpenSceneGraph
That was exactly the problem. Thank you very much, Robert! Best Regards, O Mér, 28-11-2007 ás 10:54 +, Robert Osfield escribiu: On Nov 28, 2007 9:28 AM, Javier Taibo [EMAIL PROTECTED] wrote: Hi Paul, I tried gDEBugger releases from beta7 and experienced the same behaviour with OSG based applications in my Ubuntu (Linux - i386 libstdc++ 4.X) Breakpoints don't stop in the graphics context (I have to manually switch it every break) and what is worse, there is no information about OpenGL states at all. This problem doesn't exist in my OpenGL based applications not using OSG. I simply need to run osgviewer cow.osg to reproduce the problem in gDEBugger. I have tried gDEBugger, but perhaps you could force the OSG to run single threaded to help make things a bit simpler for gDEBugger to handle i.e. export OSG_THREADING=SingleThreaded osgviewer cow.osg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Javier Taibo VideaLAB. Grupo de Visualización en Ingeniería, Arquitectura y Urbanismo Universidade da Coruña E.T.S.I. de Caminos, Canales y Puertos Campus de Elviña, s/n 15071 - A Coruña (Spain) http://videalab.udc.es +34-981-167000 (ext. 5444) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG rendering inside OpenGL application
Hi, I am trying to use OSG for rendering a scenegraph to texture for its use in an OpenGL application. The application binds an FBO with a texture attached to it and establishes the Viewport where the render should be done, so I have a valid and active OpenGL context configured to just draw the primitives. Then, a virtual method of an abstract class is called to do the render. I want to make an implementation of this class based on OSG to render complex scenes and load them from any file format supported by OSG. What is the best way to do it? I am wondering about using a SceneView object or doing it at a lower level (building the CullVisitor, RenderStage, StateGraph, etc). As the second choice considerably more difficult, I'm trying first using SceneView. I am initializing with _sceneView = new osgUtil::SceneView(); _sceneView-setDefaults(); _sceneView-setSceneData( _escena.get() ); and then every frame, after placing the camera I do the traversals _sceneView-update(); _sceneView-cull(); _sceneView-draw(); but I am getting this message continuously: Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) I would like to know the experts suggestions, just in case I am doing it the wrong way. Is there any example/tutorial/source code doing something similar that I can take a look at? Thanks in advance. -- Javier Taibo VideaLAB. Grupo de Visualización en Ingeniería, Arquitectura y Urbanismo E.T.S.I. de Caminos, Canales y Puertos Universidade da Coruña Campus de Elviña, s/n 15071 - A Coruña (Spain) +34-981-167000 (ext. 5444) http://videalab.udc.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org