Re: [osg-users] OSG + Qt4.5 + Textures
Thanks Roland, in fact I didn't realize the emoticon has different meaning than look. Sorry about that, I'm not shocked at all, just curiously waiting if someone may have time/knowledge/whatever it takes... to answer my question, which will pop up more and more times from others as well, because OSG _is_ mixed with other toolkits. rosme wrote: > Note that users in the forum can easily add emoticons through clicking on an > image. > Mailing list users will not see the emoticons but the BBCode that was used. I > don't know if these are replaced by an alternative textual representation. > Art will have to answer that. Vice versa users in the forum will see > emoticons appear in strange locations if source code is posted on the forum. > > -- > Roland > Cheers -- Bence -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10891#10891 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Failed to read unsigned int value??
Hi, While adding blumarble's .ive file as a child to a group in my application, I m getting the following warning and error, Warning: Could not find plug-in to read objects from file "C:\BlueMarble\output_L0_X0_Y0_Subtile.ive" Error reading file: DataInputStream::readUInt():Failed to read unsigned int value I have installed OSG2.2(on Windows XP) in my system and all my dlls are in OSG_FILE_PATH and PATH too. What could be the problem Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10889#10889 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CAD style rotation
> > 3 - I haven't implemented the setByMatrix function, because I don't need > it. But this should be done. > Regards, Moji the Great Has this been implemented yet? > But I was wondering if it would be better as an extention to > TrackBallManipulator? The spherical mode is really just a set of constraints > to the regular trackball which you might want to turn on and off. For a CAD > app being able to lock and free individual rotation axes is certainly > useful. > > Martin > Another difference is the TrackBallManipulator rotates around the origin while SphericalManipulator should rotate around the centre of the screen. Richard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fwd: shader implementation - newbie
Hello Robert, After going through several source code regarding shaders, i think that using seperate program for different type of shader is a better choice. In that case i am creating a vector<> of osg::Program initially, and attaching the shaders corresponding to the programs. Now with user input i am trying to enable a particular program . In OpenGL there is a command named glUseProgram(id); To enable the program which we can link and validate later. It is like toggling between different program object. In OSG i think we have to toggle between StateSet. Can you suggest any example with in OSG that does that state changes in an interactive way? Regards Sajjad -- Forwarded message -- From: ami guru Date: Sun, Apr 26, 2009 at 7:30 AM Subject: Fwd: [osg-users] shader implementation - newbie To: OpenSceneGraph Users Hello Robert, Thanks for the feedback. I am trying to design the interface as follows: if(userEvent == "Toon Shader") { //adding the corresponding shader to the program for the StateSet of the model } else if(userEvent == "Gooch Shader") { //adding the corresponding shader to the program for the StateSet of the model } Now If the user select the Toon Shader several times at several instances the very same shader will be added several times. I was thinking about loading all the shaders that i want to incorporate within in my application during the class's constructor and make the particular shader active during user selection . Is there any way within OSG to activate a particular shader while deactivating the rest of them? I have one model in my scene that i want to apply different shader on it. Regards Sajjad -- Forwarded message -- From: Robert Osfield Date: Sat, Apr 25, 2009 at 10:43 AM Subject: Re: [osg-users] shader implementation - newbie To: OpenSceneGraph Users HI Sajjad, osg::Program has have a list of shaders, think of shaders like .cpp's that go together to make a C++ program. You can have just the main or a whole series of separate files. The osg::Program is what tells the OSG/OpenGL what shaders should linked together to make the final program downloaded to the GPU. Now if you want different compositions of shaders at different points in your scene graphs then you'll need to link them together with separate osg::Program, or use a single osg::Program and uniforms to option select different paths in the shaders. Robert. On Sat, Apr 25, 2009 at 7:54 AM, ami guru wrote: > Hello forum, > > I am trying to implement some of the shaders in a single OSG application. > At the same time i was going through the osgshaders example and if i have > understood that correctly, > i saw that the example has separate osg::program for different shaders > > I was wondering if it is possible to have one single program to manage all > the shaders. I think osg::Program > contains a vector of shaders. > > Is that possible to store different shaders by different name and load that > according to the user selection; > delete previous shader and load the currently selected one. > > > Or separate osg::program for different shader example is best approach. > > I am considering different design issue here. > > Any opinion regarding that will be helpful. > > > Thanks > Sajjad > > ___ > 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] VertexArray from a loaded .osg file
Please read the Quick Start Guide, or grep the source for "intersection". Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brett Sent: Sunday, April 26, 2009 7:04 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] VertexArray from a loaded .osg file Hi I solved the first question myself.Can any help me find intersection of a line on "surface" of the object. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10884#10884 ___ 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] VertexArray from a loaded .osg file
Hi I solved the first question myself.Can any help me find intersection of a line on "surface" of the object. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10884#10884 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VertexArray from a loaded .osg file
Hi, I am new to osg.I will load a osg file containing vertex arrays and color arrays.I want to access these arrays from the loaded osg file.Can any one help me in doing that.Please. My another question is i want to find intersection point of line with an object ,on the object surface.can you please refer me that method pls. Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10883#10883 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] build problem on Mac OS/X 10.5.6
On Sun, Apr 26, 2009 at 6:09 PM, Stephan Huber wrote: > Hi, > > please don't hijack old threads for starting new threads. Start a new > one instead. This will help people following and reading your post. > > It seems, that the inventor-framework is not universal build (ppc + > intel) so either > * install a universal-build of the inventor-framework, > * disable the build of the inventor-plugin if you don't need it, > * or disable universal builds for osg via ccmake. > > cheers, > Stephan > Hi, wouldn't setting CXXFLAGS help? export CXXFLAGS="-arch i386 -arch x86_64 -arch ppc" then cmake and make. > > Jaeyoung Haan schrieb: >> I'm trying to install OSG on my Mac OSX 10.5.6 in order to develop 3D >> simulation. >> I'm not going to use Xcode. >> >> I downloaded osg source codes thru svn 2.8.1 rc, installed Cmake, >> and did ./configure and make. >> >> But the following error occurred, and I could not figure it out. >> Plz help me. >> >> >> Code: >> >> Scanning dependencies of target osgdb_iv >> [ 80%] Building CXX object >> src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertToInventor.cpp.o >> [ 80%] Building CXX object >> src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertFromInventor.cpp.o >> [ 80%] Building CXX object >> src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/GroupSoLOD.cpp.o >> [ 80%] Building CXX object >> src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/PendulumCallback.cpp.o >> [ 80%] Building CXX object >> src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ReaderWriterIV.cpp.o >> [ 80%] Building CXX object >> src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ShuttleCallback.cpp.o >> Linking CXX shared module ../../../lib/osgPlugins-2.8.1/osgdb_iv.so >> ld warning: in >> /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks//Inventor.framework/Inventor, >> file is not of required architecture >> Undefined symbols for architecture ppc: >> "SoNode::writeInstance(SoOutput*)", referenced from: >> vtable for GroupSoLODin GroupSoLOD.cpp.o >> "SoVRMLTexture::getClassTypeId()", referenced from: >> ConvertFromInventor::preVRMLAppearance(void*, SoCallbackAction*, >> SoNode const*)in ConvertFromInventor.cpp.o >> "SoFieldData::~SoFieldData()", referenced from: >> GroupSoLOD::atexit_cleanup() in GroupSoLOD.cpp.o >> >> >> >> ... hundreds lines of similar messages ... >> >> >> >> >> "SoGroup::replaceChild(int, SoNode*)", referenced from: >> vtable for GroupSoLODin GroupSoLOD.cpp.o >> "SoLOD::getClassTypeId()", referenced from: >> ConvertFromInventor::preGroup(void*, SoCallbackAction*, SoNode >> const*)in ConvertFromInventor.cpp.o >> ConvertFromInventor::postGroup(void*, SoCallbackAction*, SoNode >> const*)in ConvertFromInventor.cpp.o >> GroupSoLOD::initClass() in GroupSoLOD.cpp.o >> "SoMFUInt32::getClassTypeId()", referenced from: >> bool ivApplicateIntType(osg::Array const*, >> SoMFUInt32&, int, int, int)in ConvertToInventor.cpp.o >> "SoSphere::SoSphere()", referenced from: >> ConvertToInventor::processShapeDrawable(osg::ShapeDrawable const*, >> ConvertToInventor::InventorState*)::MyShapeVisitor::apply(osg::Sphere >> const&)in ConvertToInventor.cpp.o >> ld: symbol(s) not found for architecture ppc >> collect2: ld returned 1 exit status >> lipo: can't open input file: >> /var/folders/bf/bf+HkrbPFfGBxK0g6Fm5vE+++TI/-Tmp-//cc9Swfmi.out (No such >> file or directory) >> make[2]: *** [lib/osgPlugins-2.8.1/osgdb_iv.so] Error 1 >> make[1]: *** [src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/all] Error 2 >> make: *** [all] Error 2 >> >> >> [/code] >> >> -- >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=10871#10871 >> >> >> >> >> >> ___ >> 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] build problem on Mac OS/X 10.5.6
Hi, please don't hijack old threads for starting new threads. Start a new one instead. This will help people following and reading your post. It seems, that the inventor-framework is not universal build (ppc + intel) so either * install a universal-build of the inventor-framework, * disable the build of the inventor-plugin if you don't need it, * or disable universal builds for osg via ccmake. cheers, Stephan Jaeyoung Haan schrieb: > I'm trying to install OSG on my Mac OSX 10.5.6 in order to develop 3D > simulation. > I'm not going to use Xcode. > > I downloaded osg source codes thru svn 2.8.1 rc, installed Cmake, > and did ./configure and make. > > But the following error occurred, and I could not figure it out. > Plz help me. > > > Code: > > Scanning dependencies of target osgdb_iv > [ 80%] Building CXX object > src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertToInventor.cpp.o > [ 80%] Building CXX object > src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertFromInventor.cpp.o > [ 80%] Building CXX object > src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/GroupSoLOD.cpp.o > [ 80%] Building CXX object > src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/PendulumCallback.cpp.o > [ 80%] Building CXX object > src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ReaderWriterIV.cpp.o > [ 80%] Building CXX object > src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ShuttleCallback.cpp.o > Linking CXX shared module ../../../lib/osgPlugins-2.8.1/osgdb_iv.so > ld warning: in > /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks//Inventor.framework/Inventor, > file is not of required architecture > Undefined symbols for architecture ppc: > "SoNode::writeInstance(SoOutput*)", referenced from: > vtable for GroupSoLODin GroupSoLOD.cpp.o > "SoVRMLTexture::getClassTypeId()", referenced from: > ConvertFromInventor::preVRMLAppearance(void*, SoCallbackAction*, SoNode > const*)in ConvertFromInventor.cpp.o > "SoFieldData::~SoFieldData()", referenced from: > GroupSoLOD::atexit_cleanup() in GroupSoLOD.cpp.o > > > > ... hundreds lines of similar messages ... > > > > > "SoGroup::replaceChild(int, SoNode*)", referenced from: > vtable for GroupSoLODin GroupSoLOD.cpp.o > "SoLOD::getClassTypeId()", referenced from: > ConvertFromInventor::preGroup(void*, SoCallbackAction*, SoNode > const*)in ConvertFromInventor.cpp.o > ConvertFromInventor::postGroup(void*, SoCallbackAction*, SoNode > const*)in ConvertFromInventor.cpp.o > GroupSoLOD::initClass() in GroupSoLOD.cpp.o > "SoMFUInt32::getClassTypeId()", referenced from: > bool ivApplicateIntType(osg::Array const*, > SoMFUInt32&, int, int, int)in ConvertToInventor.cpp.o > "SoSphere::SoSphere()", referenced from: > ConvertToInventor::processShapeDrawable(osg::ShapeDrawable const*, > ConvertToInventor::InventorState*)::MyShapeVisitor::apply(osg::Sphere > const&)in ConvertToInventor.cpp.o > ld: symbol(s) not found for architecture ppc > collect2: ld returned 1 exit status > lipo: can't open input file: > /var/folders/bf/bf+HkrbPFfGBxK0g6Fm5vE+++TI/-Tmp-//cc9Swfmi.out (No such file > or directory) > make[2]: *** [lib/osgPlugins-2.8.1/osgdb_iv.so] Error 1 > make[1]: *** [src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/all] Error 2 > make: *** [all] Error 2 > > > [/code] > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=10871#10871 > > > > > > ___ > 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] Keyboard or mouse handler from Qt
You don't have to do anything in Qt. Unless you explicitly handle a key press event in Qt and delete the event it will pass on to OSG. (Sorry not at my computer right now to find an example ) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10880#10880 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometryconsidered in near+far plane auto computation
Hi David, I had to use the approach I posted to simultaneously: 1) Make sure the skydome didn't participate in near/far autocalculation 2) Make sure OSG didn't cull the skydome 3) Make sure that OGL would actually draw something 4) Allow the skydome to draw last. The problem when the skydome renders last is that it won't be blended correctly with transparent objects (they need to be rendered after all opaque objects, and sorted back to front). Since the skydome is furthest from the camera, but if actually wraps around the camera, the only way to guarantee that it will be drawn in the correct order for transparent objects in the foreground to blend correctly with it is to render it first. I know this sounds bad, I previously advocated rendering skydomes/skyboxes last too (to take advantage of the fact that we can just set any fragments that have not been set yet by other objects) but I don't see how to reconcile that with the rendering of transparent objects in the foreground. So, given that I need the skydome to render first, it means I need to muck around with the clear settings and things like that, which I don't like. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometryconsidered in near+far plane auto computation
Hi Chris, After some brain-twisting, I did realize that even with z comparison off, OGL is probably rejecting the skydome because it's beyond the far clip plane. I've been trying to think of a way to fool this, but it seems like it is unavoidable. Yeah, that's the conclusion I got to as well. I wonder if there were somehow a callback you could apply somewhere that would hork with the near/far clip, or if it's just easier to use multiple cameras at that point. I wonder where the near/far for final rendering are set. I'll investigate this. I agree with your intuition, if we can find an appropriate place where we could set a large value for the far plane, then reset it to the previous value when the skydome is rendered then that would work. Perhaps in a Drawable DrawCallback? Something like: struct MyDrawCallback : public osg::Drawable::DrawCallback { virtual void drawImplementation(osg::RenderInfo& renderInfo, const osg::Drawable* drawable) const { // Save old values. double left, right, bottom, top, zNear, zFar; renderInfo->getCurrentCamera()->getProjectionMatrixAsFrustum( left, right, bottom, top, zNear, zFar; // Set the far plane to a large value. renderInfo->getCurrentCamera()->setProjectionMatrixAsFrustum( left, right, bottom, top, 1000, 1); drawable->draw(renderInfo); // Reset the far plane to the old value. renderInfo->getCurrentCamera()->setProjectionMatrixAsFrustum( left, right, bottom, top, zNear, zFar); } }; I'll test something like that out, in combination with the cull callback for ignoring the skydome in the automatic near/far computation, tomorrow when I get in the office. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometryconsidered in near+far plane auto computation
Hello Doug, Is the solution you posted below the final solution you settled on? I had trouble determining what you finally ended up deciding was the best path forward. Thanks for posting this information on the list. Yeah, as Robert said it was a convoluted thread... :-) Yes, I ended up using the code you quoted. As I said, it has too many implications on the scene graph and viewer but it ended up being the only solution I could find that worked and gave the results I wanted. I'm still open to suggestions though. :-) Glad I could help, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometryconsidered in near+far plane auto computation
Chris, > After some brain-twisting, I did realize that even with z comparison off, > OGL is > probably rejecting the skydome because it's beyond the far clip plane. I've > been trying to > think of a way to fool this, but it seems like it is unavoidable. > That's exactly what I found (or even wierder, the skydome vertices would clip, but the inter-vertex points wouldn't due to interpolation, so the dome looked "patchy". I had to use the approach I posted to simultaneously: 1) Make sure the skydome didn't participate in near/far autocalculation 2) Make sure OSG didn't cull the skydome 3) Make sure that OGL would actually draw something 4) Allow the skydome to draw last. In my app, I don't see a Camera with NESTED_RENDER as much of a per-frame overhead - it's pretty much negligible with all the rest of the CPU activity I'm engaging in, but I can appreciate that this might not be the case for everyone. Plus it had the advantage of being scenegraph agnostic - i.e. injection of this as a (for example) .osg worked without having to appeal to a particular application scenegraph structure in terms of PRE_RENDER, depth clears, etc. David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Minimal OSG installation
I've seen this error before. The issue could be that you put the Visual C++ 2008 (SP1?) runtime into the program folder. The only way to do this properly is to run the Visual C++ 2008 (SP1) redistributable from the application's installer. This will take care of placing the DLL in the WinSXS folder (Side by Side assembly cache). Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rendering transparent/opaque objects separately in deferred renderer using osg::RenderBin - how?
Hi, I work on a deferred renderer for my master thesis. Everything is fine and now I want to correctly render transparent objects. I want to use forward rendering for that taks - just render the transparent objects in one pass, blend them together and add it to buffer of rendered opaque objects (by deferred rendering). The problem is that I don't now how to correctly access opaque/transparent objects in my scene graph to render them separately and combine them in the final stage of deferred renderer. I have found a disscussion http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-July/014769.html where access to render bin #10 (which should always contain transparent geometry ?) is described. So I got and idea that I could create my custom scene graph node (derived from osg::Geode) and redefine its traversal method, where I would "discard" the render bin for transparent/opaque objects after the cull traversal. I modified the code from the discussion a little bit and I mask depth and color buffer for writing when rendering transparent objects (don't know how to acctually remove transparent drawables from particular render bin): Code: void RenderBinMaskNode::traverse(osg::NodeVisitor& nv) { this->osg::Group::traverse( nv ); // Clone render-bin 10 if this is a cull visitor if ( nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR ) { osgUtil::CullVisitor* cv = dynamic_cast( &nv ); if ( cv ) { // Act if we have a RenderStage pointer if ( osgUtil::RenderStage* renderStage = cv->getRenderStage() ) { // Get the render-bin list osgUtil::RenderBin::RenderBinList& binList = renderStage->getRenderBinList(); osg::notify(osg::ALWAYS) << "RENDER BIN LIST SIZE: " << binList.size() << std::endl; // go to renderbin which stores transparent drawables (always number 10 ?) if( binList.find(10) != binList.end() ) { // for this render bin, do not render its content osg::StateSet* binStateSet = binList[10]->getStateSet(); // mask depth buffer binStateSet->setAttributeAndModes( new osg::Depth(osg::Depth::LESS, 0.0, 1.0, false), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE ); // mask color buffer binStateSet->setAttributeAndModes( new osg::ColorMask(false, false, false, false), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE ); // TO DO: stencil and accum mask } } } } } If I add this custom node as a child of my camera node and the scene itself as a child of my custom node, then no transparent objects are rendered - which is exactly what I want. But the trouble is when I want to render only the transparent objects. When I dump the size of render bin list (see the code), it is 0 if no transparent object should be rendered on the screen (it is outside the view frustum) and 1 if a transparent object should be rendered (but it is not visible since I mask the depth and color buffers). So I have only one render bin containing transparent geometry and no render bin with opaque geometry (and even though the opaque geometry is rendered correctly). I don't underestand why since as far as I know, the cull visitor should fill at least two render bins, one for transparent and one for opaque geometry. Finally, my questions: Is it correct that I have only one render bin containing transparent geometry and no render bin with opaque geometry? How can I render only the transparent geometry of my scene (possibly using the approach from the code)? Thank you in advance for _any_ help. I really need to solve this out. PS.: I apologize for my poor English. Regards, Jirka. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10874#10874 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Orphographic Camera View?
You need to take into account the aspect ratio of the display format, I believe, if i understand what you are asking.. "It is only necessary to make war with five things: with the maladies of the body, with the ignorances of the mind, with the passions of the body, with the seditions of the city, with the discords of families." - Tacitus "The desire for safety stands against every great and noble enterprise." - Tacitus "Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin "Numquam ponenda est pluralitas sine necessitate." - William of Ockham On Sat, Apr 25, 2009 at 6:59 PM, Paul wrote: > Im using the following code for orthographic projection: > > Code: > > // set the projection matrix > camera->setProjectionMatrix(osg::Matrix::ortho(-2.0, 2.0, -2.0, 2.0, 0.0, > 1.0)); > > // set the view matrix > camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); > camera->setViewMatrix(osg::Matrix::identity()); > > > > When I resize the window I would like the scene to stretch and not resize, So > if the window is twice as wide as it is high the i would like the scene to > stretch twice as wide too. Any ideas? > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=10868#10868 > > > > > > ___ > 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] [build] osgdb_freetype build problem on Mac OS/X 10.5.6
I'm trying to install OSG on my Mac OSX 10.5.6 in order to develop 3D simulation. I'm not going to use Xcode. I downloaded osg source codes thru svn 2.8.1 rc, installed Cmake, and did ./configure and make. But the following error occurred, and I could not figure it out. Plz help me. Code: Scanning dependencies of target osgdb_iv [ 80%] Building CXX object src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertToInventor.cpp.o [ 80%] Building CXX object src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertFromInventor.cpp.o [ 80%] Building CXX object src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/GroupSoLOD.cpp.o [ 80%] Building CXX object src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/PendulumCallback.cpp.o [ 80%] Building CXX object src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ReaderWriterIV.cpp.o [ 80%] Building CXX object src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ShuttleCallback.cpp.o Linking CXX shared module ../../../lib/osgPlugins-2.8.1/osgdb_iv.so ld warning: in /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks//Inventor.framework/Inventor, file is not of required architecture Undefined symbols for architecture ppc: "SoNode::writeInstance(SoOutput*)", referenced from: vtable for GroupSoLODin GroupSoLOD.cpp.o "SoVRMLTexture::getClassTypeId()", referenced from: ConvertFromInventor::preVRMLAppearance(void*, SoCallbackAction*, SoNode const*)in ConvertFromInventor.cpp.o "SoFieldData::~SoFieldData()", referenced from: GroupSoLOD::atexit_cleanup() in GroupSoLOD.cpp.o ... hundreds lines of similar messages ... "SoGroup::replaceChild(int, SoNode*)", referenced from: vtable for GroupSoLODin GroupSoLOD.cpp.o "SoLOD::getClassTypeId()", referenced from: ConvertFromInventor::preGroup(void*, SoCallbackAction*, SoNode const*)in ConvertFromInventor.cpp.o ConvertFromInventor::postGroup(void*, SoCallbackAction*, SoNode const*)in ConvertFromInventor.cpp.o GroupSoLOD::initClass() in GroupSoLOD.cpp.o "SoMFUInt32::getClassTypeId()", referenced from: bool ivApplicateIntType(osg::Array const*, SoMFUInt32&, int, int, int)in ConvertToInventor.cpp.o "SoSphere::SoSphere()", referenced from: ConvertToInventor::processShapeDrawable(osg::ShapeDrawable const*, ConvertToInventor::InventorState*)::MyShapeVisitor::apply(osg::Sphere const&)in ConvertToInventor.cpp.o ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/bf/bf+HkrbPFfGBxK0g6Fm5vE+++TI/-Tmp-//cc9Swfmi.out (No such file or directory) make[2]: *** [lib/osgPlugins-2.8.1/osgdb_iv.so] Error 1 make[1]: *** [src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/all] Error 2 make: *** [all] Error 2 [/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10871#10871 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Minimal OSG installation
Greetings, excuse me if this is too trivial a question, but what is the minimal OSG installation? I need to distribute my OSG-based viewer for Windows; what libraries should I include? Are there any configuration steps needed to be taken? I tried to simply package the executable and DLLs used, and when I started program it said something like "Configuration is incorrect, please re-install". I guess that minimal distro for "osgviewerd.exe" is the same. Thanks, Daniel ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org