Re: [osg-users] [consulting] OSG terrain consultant/contractor needed for short-term project
Hi Mike, I sent you an email regarding osgVisual. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31179#31179 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change in osgText from 2.8.3 to 2.9.8?
Hi Andreas, I've been able to recreate the flickering issues using your model, and as your later email picks out the problems isn't related to ShapeDrawable. The problem looks like a z fighting issue with the black text outline quads which should sit behind the main text quads. Why the z fighting should be any different between 2.8.3 and 2.9.8 I can't say right now, it would either indicates the depth range of the computed for the scene is different so the near/far planes are computed differently so less z precision, or that the glPolygonOffset values have changed, On both counts I don't recall any related code changing so I'm surprised that the issue has arisen. As a general note, the way that osgText does outlines is a real hack and is the real source of the problem, change the polygon offset or depth range will just be dancing around the real problem - and that the approach used for outline is inherently susceptible to problems like this. It is actually possible to recreate this problem with any version of the OSG that has outline text used on it, it'll just be different z ranges that bring it to the fot. Changing the back end implementation of outlines will be the problem solution to the problem. Unfortunately this isn't a trivial fix. A short term fix for yourself would be to disable the outline for the time being. Another would be to look at osgPango as I doubt it'd use the same algorithm for outlines. Robert. On Mon, Aug 30, 2010 at 9:46 PM, Andreas Goebel a-goe...@gmx.de wrote: Hi Robert, I´ve done some tests and was able to reproduce the problem. I am the author of a 3D-Math-software and use long, thin cylinders to represent lines. For the cylinder I use a shape drawable. The flickering only occurs when a long cylinder is in the scene. On my machine I get flickering when zooming in and rotating the attached scene with the standard osgViewer of 2.9.8. (on windows, NVidia GForceGo card). The problem probably didn´t occur within your work as you are probably not using ShapeDrawables. Maybe I should replace them with my own geometries, but I find shape drawables quite useful, as they do exactly what I want (basic shapes). Andreas Am 30.08.2010 10:11, schrieb Robert Osfield: Hi Andreas, I'm surprised by the problem as I hadn't seen anything like this in my own work adapting osgText to support GL3/OpenGLES - I had to remove the glPushAttrib/glPopAttrib and glBegin/glEnd style calls. Would it be possible to put together a small example app or .osg file that reproduces the problem? Robert. On Sun, Aug 29, 2010 at 8:45 AM, Andreas Goebela-goe...@gmx.de wrote: Hi, yesterday I´ve tried the 2.9.8 developer release. I encounter problems with osgText-objects, see attached image (all characters should be white with black outline). Could someone give me a pointer if there is a switch or something to get back the old behaviour? Regards, Andreas ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Qt, Collada OSG
HI Samuel, Collada and QT are two independent issues. There is several osgviewerQT* examples to illustrate OSG/Qt integration. Collada integration is just a case of building the OSG against the COLLADA dom. There are docs on openscenegraph.org on COLLADA. Go do a search for it. Robert. On Mon, Aug 30, 2010 at 10:10 PM, Samuel Grant osgfo...@tevs.eu wrote: Hi, I am trying to get the three to play nice together. Can someone please give me a quick tutorial on getting OSG w/Collada working in QT? Thank you! Cheers, Samuel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31171#31171 ___ 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] Get rotation vectors from a Quaternion
Hi, I have a issue: I need to extract from a Quaternion the rotation vector of XYZ axis independently. This is, I need to apply X rotation vector to a Node an YZ rotation vectors to another. I know that with osg::Quat::getRotate, I get a XYZ vector and angle value, but is posible to know only the values of X rotation? What would be the steps? Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31182#31182 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] so big different performance in debug and release?
Hi, recently, I trace 3D application'performance in debug, frame rate always is low and cull time always is high, I use lots of method to speed application; it improve a little. but today after I compile application as release version, the culling time drops from 100ms to less than 10ms, the speed also make big change.( very very fast!!) so what happen in debug and release of osg ?? so big different improvment. any advice, appreciate!! Thank you! Cheers, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31183#31183 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change in osgText from 2.8.3 to 2.9.8?
Hi Robert, thanks for explaining that issue. I suspect a problem with z precision, as the flickering is worse for big nodes with big bounding boxes (the long line). I´ll have a look if I can hack the hack. I have also taken a look at osgPango, but this would need quite some refactoring of my own code which I do not have the time for at the moment. The problem did indeed occur before with older versions of osg, but only on cheap hardware. I then suspected a problem with textures on the cheap hardware and did not investigate further. With 2.9.8 I got flickering with my not so cheap hardware, too, so I thought that there had been a change. Greetings, Andreas ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Qt, Collada OSG
Hi, If you are using MSVC2008, there are prebuild collada binaries in the 3rdParty packages, so it is easy to build OSG against it. As soon as Robert adds my last submission, your CMake will even find the libraries it self. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31184#31184 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting the List of Triangles from an osg model
On Mon, Aug 30, 2010 at 7:55 PM, Paul Martz pma...@skew-matrix.com wrote: I'm about to write some code that needs to convert tri strips and fans to triangles, and I figured I'd use TriangleFunctor for that task. By the way, osgUtils::IndexMeshVisitor does that, pretty much. Tim ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change in osgText from 2.8.3 to 2.9.8?
Hi Robert, I´ve digged a bit and found a change concerning the polygon offset. In 2.8.3 there is: for( ; backdrop_index max_backdrop_index; backdrop_index++) { const GlyphQuads::Coords3 transformedBackdropCoords = glyphquad._transformedBackdropCoords[backdrop_index][contextID]; if (!transformedBackdropCoords.empty()) { state.setVertexPointer( 3, GL_FLOAT, 0, (transformedBackdropCoords.front())); glPolygonOffset(0.1f * osg::PolygonOffset::getFactorMultiplier(), 2.0f * osg::PolygonOffset::getUnitsMultiplier() * (max_backdrop_index-backdrop_index) ); glDrawArrays(GL_QUADS,0,transformedBackdropCoords.size()); } } whereas in 2.9.8 there is for( ; backdrop_index max_backdrop_index; backdrop_index++) { const GlyphQuads::Coords3 transformedBackdropCoords = glyphquad._transformedBackdropCoords[backdrop_index][contextID]; if (!transformedBackdropCoords.empty()) { state.setVertexPointer( 3, GL_FLOAT, 0, (transformedBackdropCoords.front())); glPolygonOffset(0.1f * osg::PolygonOffset::getFactorMultiplier(), osg::PolygonOffset::getUnitsMultiplier() * (max_backdrop_index-backdrop_index) ); state.drawQuads(0,transformedBackdropCoords.size()); } } which leaves out the factor 2.0f. On the other hand I thought that the y-coordinate was used to change the placement of the backdrop and should not result in z-fighting. Andreas ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change in osgText from 2.8.3 to 2.9.8?
HI Andreas, Try adding back in the 2.0 factor to see how it effects things. Robert. On Tue, Aug 31, 2010 at 9:24 AM, Andreas Goebel a-goe...@gmx.de wrote: Hi Robert, I´ve digged a bit and found a change concerning the polygon offset. In 2.8.3 there is: for( ; backdrop_index max_backdrop_index; backdrop_index++) { const GlyphQuads::Coords3 transformedBackdropCoords = glyphquad._transformedBackdropCoords[backdrop_index][contextID]; if (!transformedBackdropCoords.empty()) { state.setVertexPointer( 3, GL_FLOAT, 0, (transformedBackdropCoords.front())); glPolygonOffset(0.1f * osg::PolygonOffset::getFactorMultiplier(), 2.0f * osg::PolygonOffset::getUnitsMultiplier() * (max_backdrop_index-backdrop_index) ); glDrawArrays(GL_QUADS,0,transformedBackdropCoords.size()); } } whereas in 2.9.8 there is for( ; backdrop_index max_backdrop_index; backdrop_index++) { const GlyphQuads::Coords3 transformedBackdropCoords = glyphquad._transformedBackdropCoords[backdrop_index][contextID]; if (!transformedBackdropCoords.empty()) { state.setVertexPointer( 3, GL_FLOAT, 0, (transformedBackdropCoords.front())); glPolygonOffset(0.1f * osg::PolygonOffset::getFactorMultiplier(), osg::PolygonOffset::getUnitsMultiplier() * (max_backdrop_index-backdrop_index) ); state.drawQuads(0,transformedBackdropCoords.size()); } } which leaves out the factor 2.0f. On the other hand I thought that the y-coordinate was used to change the placement of the backdrop and should not result in z-fighting. Andreas ___ 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] [osgOcean] increase ocean view range
can you explain more in details this please ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31188#31188 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?
Hi, Thanks for suggestion. I played with it a bit, but with no success. Anyway, I have debugged the code this procedure was supposed to test, so no need to spend more time on it. Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31190#31190 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] increase ocean view range
LOD - Level Of Detail. Obviously when you build a terrain database, you build it in few different level of details. What is close is more detailed what is further is less detailed. All of the terrain generation tools are aware of this and they build the final scene graph using LODs. They often build it as quad tree structure. So what you would need is, different representation of the ocean that will change based on the range. And that is done with LOD node. So your ocean can be polygonal for far range, and a hole for closer range (the hole will become your osgocean) The terrain tools like TerraVista, can do this easy. When you build your database, you would have vector culture (ESRI shape. etc) for your ocean. And you specify how this culture will be represented in your final terrain database. So you make it polygonal for lower LODs and a hole for the highest LOD. Then you set the range of your osgocean to be the same as your highest LOD range That is how I build the bosphores database with TerraVista. I am not very familiar with vpb (well, I used it couple of times to generate the whole earth with the blue marble dataset). You would need to see if vpb can work with vector culture. Or go with some commercial tolls, TerraVista, TerraSim ... etc. There are some contractors as well you can outsource the terrain generation to them. Maybe you explain what is your final database (also, what kind of sources you have) and we see if we can give better guidance. I expect some of the rest from the community might have faced and resolved this issue differently then me. -Nick On Tue, Aug 31, 2010 at 12:54 PM, issam boughanmi amigof...@gmail.comwrote: can you explain more in details this please ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31188#31188 ___ 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] so big different performance in debug and release?
John Water schrieb: Hi, recently, I trace 3D application'performance in debug, frame rate always is low and cull time always is high, I use lots of method to speed application; it improve a little. but today after I compile application as release version, the culling time drops from 100ms to less than 10ms, the speed also make big change.( very very fast!!) so what happen in debug and release of osg ?? so big different improvment. any advice, appreciate!! Hello John, First of all you did mention the compiler you are using and which compile flags are set. Anyways, under MS Visual Studio the Release builts have two major performance advantages: First, there is a lot of debug code inside the STL-implementation (Range checking etc.) This results in big performance differences, as this debug code for almost every access to STL container-types which are heavily used inside OSG. Second, most compilers will aggressively optimize loops, return values which can be referenced (return value optimization) and function inlining (thus saving time for calling functions). As far as I can tell the cull traversal executes numerous loops (e.g. for any group, every child-tree must be traversed) and uses lots of matrix,vector and trigonometric operation (which I think are now SSE-operations). A side note of mine: Try to measure performance in release only, as optimizing should be done by the compiler first, then by the human writing the code. Most modern compliers are much better in optimizing than most programmers are. So start optimizing at a higher level (scene graph structure/layout) before going into micro-optimization. hth Sebastian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Get rotation vectors from a Quaternion
I answer myself: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg18670.html Can be the solucion??? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31193#31193 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] increase ocean view range
Hi nick and thanks for your support ;) i can investigate for your suggestion about lod node , shape files integration ... etc but for now i have a simple question : can i simply increase the ocean grid size surface ? if yes how ? my terrain is built like i said with vpb using srtm elevation file and landsat geotiff images + some high res geotiff files of some regions i am using this in a flight sim app the terrain database work perfectelly and now i want to integrate osgocean for the sea side region of my map -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31194#31194 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vertex Buffer Objects and Transform Feedback
Hi, I could read this post but didn't see any answer of it. Does someone have a working implementation of that ? Thanks, Vincent ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] increase ocean view range
yes. look in the setup code for the oceansurface (I think. Dont have the code with me at the moment, but as far I can recall you can do that). -Nick On Tue, Aug 31, 2010 at 2:15 PM, issam boughanmi amigof...@gmail.comwrote: Hi nick and thanks for your support ;) i can investigate for your suggestion about lod node , shape files integration ... etc but for now i have a simple question : can i simply increase the ocean grid size surface ? if yes how ? my terrain is built like i said with vpb using srtm elevation file and landsat geotiff images + some high res geotiff files of some regions i am using this in a flight sim app the terrain database work perfectelly and now i want to integrate osgocean for the sea side region of my map -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31194#31194 ___ 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] [osgOcean] increase ocean view range
yes from the osgapp example Code: _oceanSurface = new osgOcean::FFTOceanSurface( 64, 256, 17, windDirection, windSpeed, depth, reflectionDamping, waveScale, isChoppy, choppyFactor, 10.f, 256 ); i tried before to increase some of these value but i got a very strange and horrible effect since i don't know each parameter value correspondence for example i tried this before Code: _oceanSurface = new osgOcean::FFTOceanSurface( 128, 512, 33, windDirection, windSpeed, depth, reflectionDamping, waveScale, isChoppy, choppyFactor, 10.f, 256 ); -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31198#31198 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream
Ok, I have localized the problem. For example, the class osgDB::fstream: class OSGDB_EXPORT fstream : public std::fstream { }; which just inherits from std:.fstream causes the symbols of std::fstream to be exposed into osgDB.dll This effectively means that It might cause problems for people linking against osgDB.dll later on. Same goes for inheriting from std::string, std::ostringstream etc. This must obviously be a bug, a very serious one in VS2010. We had a class derived from std::ostringstream, which exposed the symbols in the vtable for the class: namespace ns { class Notify : public std::ostringstream { }; } Using depends.exe to analyze the dll-file gives: const ns::Notify::`vftable'{for `std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar '} My issue was reported to the msdn forum. Their first take was: Oh you use CMake, thats not our product :-) But in later threads, they tried to reproduce the problem without luck... So if you manage to reproduce this in a small example, go ahead and post it. We must make them aware of this problem. http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/191de00a-53c9-4bd9-9cb6-e844eb224ca2 /Anders On Mon, Aug 30, 2010 at 4:31 AM, Christiansen, Brad brad.christian...@thalesgroup.com.au wrote: Hi, Unfortunately I can't offer a solution, but I thought I would mention I have come across this exact problem and have also pulled my hair out trying to find a solution. This same problem exists when building virtual planet builder, linking with osgDB causes the multiply defined symbols. I had no other issues building the 3rd party libs and osg with 2010. The only way I could move forward was to allow multiply defined symbols (as has already been mentioned). I agree this seems dangerous and is not a solution but it has allowed me to continue working. So far it hasn’t caused any issues with my vpb build. Given you have used the streams extensively without issue and it seems osgDB is the source of the trouble, have you had a look to see if there is any discernable difference between your code and that in osgDB ? I would love to find a solution to this. Cheers, Brad *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Anders Backman *Sent:* Friday, 27 August 2010 4:00 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream I have verified the build mode for all ingoing libraries. I build all the dependencies myself. Including OSG. The problem I have (which is OSG related), is that if I build without OSG support (no rendering), it all works. And I still use std::ostringstream and std::stringstream quite extensively... We still link against OpenThreads (but no rendering). So only when I link against osg (osg.lib, osgDB.lib, osgText.lib, osgShadow.lib, osgViewer.lib osgGA.lib) I get this problem. I have verified that osg (and OpenThreads) are all built consistently all over the field. Release and /MD (MultiThreadedDLL), which is default from CMake. So I can use/link against OpenThreads.lib, but not OSG... Rather nasty problem, I'm trying to reduce it, but I'm getting nowhere. And once again, same settings, same CMake version, same code all over the place, and it works in VS2008... /A On Thu, Aug 26, 2010 at 8:17 PM, Simon Hammett s.d.hamm...@googlemail.com wrote: Ah ok, then next things to check: Make absolutely sure you aren't mixing up objects libraries from the different builds. For my projects I include a vc version number in the name, so .vc7.lib/vc7.dll .vc9.lib/.vc9.dll and I also use the vc version in the name of output intermediate directory Then check all the code for any use of #pragma comment(lib, libname) and make sure any preprocessor guards that select different versions have been updated to know about vc2010. On 26 August 2010 18:37, Anders Backman ande...@cs.umu.se wrote: Well, I have verified that ALL the dependencies Im using are all built with /MD and NOT debug. Im building all of the dependencies for osg and our lib myself, so I got full control. Also, as I wrote before, I have even tried to build our libs using project files generated from cmake vs2008, build with vs2008 - works ok. Open same project files in vs2010 - problem occurs. Im using buildscripts to build dependencies, and it all works for vs2008... No external libraries, everything is built from code. For VS2010, all the dependencies (including osg 2.8.3) builds/links fine. But for my libs, I get the linking errors. Allowing multiple symbols sounds dangerous, and it did not resolve my problem... /A On Thu, Aug 26, 2010 at 7:26 PM, Simon Hammett s.d.hamm...@googlemail.com wrote: On 26 August 2010 17:35, Anders Backman ande...@cs.umu.se wrote: snip CMake defaults
Re: [osg-users] FBO render once and display the different buffers in multiple osg viewers
Hi, I think i got a solution. Isn't it possible to render two planes, one with the color buffer and the other with the render buffer in one scene. After this add to the normal Viewer two slaves like in the osgcamera example? As result, two windows and no extra copy operations, isn't it? ... Thank you! Cheers, Mo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31200#31200 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FBO render once and display the different buffers in multiple osg viewers
Hi Mo, On Tue, Aug 31, 2010 at 1:29 PM, Mo Flanders dreiun...@gmail.com wrote: I think i got a solution. Isn't it possible to render two planes, one with the color buffer and the other with the render buffer in one scene. After this add to the normal Viewer two slaves like in the osgcamera example? As result, two windows and no extra copy operations, isn't it? I'm don't understand what you mean here so can't comment on any of it. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problem regarding apply Light with material
hi All, I am trying apply light in scene but it appearing White My question is that 1) Do I need to turn off off the default light does it make any difference 2) is apply material to body make any difference in lighting. Thanks in advance cheers, Nitin Rangari ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Qt, Collada OSG
I did already do a search...and tried to build...and tried to build...and tried to build... So now I am asking the community! Specifically, I can get OSG to build with Collada support. I did everything according to the Wiki, and it all works OK. The examples build, and run fine...no problems there. That is, no problems when using M$ VS2005. My deal is that I want to build OSG with Collada support so that I can use it in a QT 4.6 environment. If I build using MingW32 or VS2005, and try to use the libs dlls in QT, I get the dreaded undefined referece to _imp__Z... errors. I know this is due to name mangling, but it happens even if I use the MingW32 compiler... So, again...any help would greatly be appreciated. Thank you! Cheers, Samuel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31203#31203 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Qt, Collada OSG
Hi, do you build static or dynamic? Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31204#31204 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Qt, Collada OSG
Hi Samuel, On Tue, Aug 31, 2010 at 1:52 PM, Samuel Grant osgfo...@tevs.eu wrote: If I build using MingW32 or VS2005, and try to use the libs dlls in QT, I get the dreaded undefined referece to _imp__Z... errors. I know this is due to name mangling, but it happens even if I use the MingW32 compiler... This doesn't really sound like an OSG specific issue. I would suggest Mingw and Qt communities would be the best place to look into this problem. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgswig / osgpython
Hi, I have tried to compile osgswig (python), unfortunately there is a compile issue. I have tried to fix it to build with the trunk of osg, I have really improve the binding of missing stuff, just to be able to build it. I push the mercurial diff on this repository: http://hg.plopbyte.net/osgswig/ Is there a better mailing list to talk about it ? Cheers, Cedric -- Provide OpenGL, WebGL and OpenSceneGraph services +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GL_COLOR_MATERIAL setting problem?
Hi Akilan, I recently had the same issue when trying to convert cessnafire.osg as an IVE file using osgconv.exe. I get the same message as you, using the OSG 2.8.2. I'll try with a newer version and keep you posted. 2010/2/22 Akilan Thangamani akilan.thangam...@gmail.com Hi, I installed osg 2.8.2 by compiling all 3rd party sources including glut. I tried to run one of example, osgblendequation, it throws the following error, Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored. The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute. Setting this as a mode fools osg's State tracking. Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored. Is any of glut file missed out in my compilation? Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24596#24596 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GL_COLOR_MATERIAL setting problem?
Trying with lastest pre-compiled 2.8.3 binaries produce the same error : *C:\Program Files (x86)\OpenSceneGraph-2.8.3\binosgconv.exe cessnafire.osg cessn afire.ive Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) i gnored. The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute. Setting this as a mode fools osg's State tracking. Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) i gnored. The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute. Setting this as a mode fools osg's State tracking. Error writing IVE file: Unknown node in Group::write() Warning: Write to cessnafire.ive not supported.* Has somebody any clue about this ? 2010/8/31 Alexandre Amalric alex.pix...@gmail.com Hi Akilan, I recently had the same issue when trying to convert cessnafire.osg as an IVE file using osgconv.exe. I get the same message as you, using the OSG 2.8.2. I'll try with a newer version and keep you posted. 2010/2/22 Akilan Thangamani akilan.thangam...@gmail.com Hi, I installed osg 2.8.2 by compiling all 3rd party sources including glut. I tried to run one of example, osgblendequation, it throws the following error, Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored. The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute. Setting this as a mode fools osg's State tracking. Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored. Is any of glut file missed out in my compilation? Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24596#24596 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Enable, Disable Multible Shaders
Hi, First of, can I attach multible Shaders to one geometry node? I tried an it ran but obviosly only the last attached shader was rendered. Now is (if) there a way to toggle between these shaders? GeometryStateSet-setAttributeAndModes(programObject, StateAttribute::OFF); Has no effekt at all on any shader?! What am I doint wrong, workarounds? Thank you! Cheers, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31211#31211 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable, Disable Multible Shaders
Hi Thomas, There is only one osg::StateSet per osg::Drawable/osg::Geometry so if you attach the osg::Program(and associated osg::Shader) directly to it then you'll only have one for that geometry. However, the OSG allows you to place osg::StateSet on any node the scene graph, and inherits state top down, this allows you to override the state on the drawable, as well as provide multiple paths down to the drawable leaves of the scene graph, these multiple paths can different StateSet associate with them and therefore provide different state for a single drawable. Note only does the state inheritance allow you to have multiple shaders for each drawable, but it also enables you to use nodes in the scene graph to enable/disable different shaders via osg::Switch or NodeMasks. The system as a whole is very flexible. Robert. On Tue, Aug 31, 2010 at 3:53 PM, Thomas Klemmer klem...@uni-weimar.de wrote: Hi, First of, can I attach multible Shaders to one geometry node? I tried an it ran but obviosly only the last attached shader was rendered. Now is (if) there a way to toggle between these shaders? GeometryStateSet-setAttributeAndModes(programObject, StateAttribute::OFF); Has no effekt at all on any shader?! What am I doint wrong, workarounds? Thank you! Cheers, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31211#31211 ___ 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] [3rdparty] Qt, Collada OSG
Hello, I have OSG 2.8.0, Qt 4.5, and Collada working together (compiled with Visual Studio 2005 (vc8)) I built my application with Qt and OSG at first and later added the Collada dae plugin. The following information might be of interest (debug build): Collada from collada-dom-2.2.zip OSG dae plugin linker/input/additional dependencies includes: E:\Collada\collada-dom-2.2\collada-dom\dom\build\vc8-1.4-d\libcollada14dom21-d.lib (I compiled this) E:\Collada\collada-dom-2.2\collada-dom\dom\external-libs\boost\lib\vc8\libboost_system-d.lib (precompiled) OSG CMake: COLLADA_DYNAMIC_LIBRARY_DEBUG: E:/Collada/collada-dom-2.2/collada-dom/dom/build/vc8-1.4-d/libcollada14dom21-d.lib COLLADA_INCLUDE_DIRECTORY: E:/Collada/collada-dom-2.2/collada-dom/dom/include DLL: libcollada14dom21-d.dll Cheers, Peter -- This message has been scanned for viruses and dangerous content by Pinpoint, and is believed to be clean. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] transform to screen function
Is there some easy function on the osg::Camera (or some other osg class) that I can call to compute the 2d screen position of a 3d point? I couldn't find one when looking through the documentation, but I figured I would ask just in case I am missing it. Thanks. Alex ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Qt, Collada OSG
Peter, Thank you! Mind if I ask a few more questions as I go along? Cheers, Samuel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31216#31216 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GL_COLOR_MATERIAL setting problem?
Hi Alexandre, Use a newer version of cessnafire.osg or remove the line with GL_COLOR_MATERIAL from the file. The GL_COLOR_MATERIAL in cessnafire.osg was an error and led someone to submit a change to detect and report the error. As of the 2.8.0 version of osg, models with particles cannot be saved as an ive file. I don't know if this has changed with newer versions of osg. From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alexandre Amalric Sent: Tuesday, August 31, 2010 9:05 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] GL_COLOR_MATERIAL setting problem? Trying with lastest pre-compiled 2.8.3 binaries produce the same error : C:\Program Files (x86)\OpenSceneGraph-2.8.3\binosgconv.exe cessnafire.osg cessn afire.ive Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) i gnored. The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute. Setting this as a mode fools osg's State tracking. Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) i gnored. The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute. Setting this as a mode fools osg's State tracking. Error writing IVE file: Unknown node in Group::write() Warning: Write to cessnafire.ive not supported. Has somebody any clue about this ? 2010/8/31 Alexandre Amalric alex.pix...@gmail.commailto:alex.pix...@gmail.com Hi Akilan, I recently had the same issue when trying to convert cessnafire.osg as an IVE file using osgconv.exe. I get the same message as you, using the OSG 2.8.2. I'll try with a newer version and keep you posted. 2010/2/22 Akilan Thangamani akilan.thangam...@gmail.commailto:akilan.thangam...@gmail.com Hi, I installed osg 2.8.2 by compiling all 3rd party sources including glut. I tried to run one of example, osgblendequation, it throws the following error, Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored. The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute. Setting this as a mode fools osg's State tracking. Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored. Is any of glut file missed out in my compilation? Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24596#24596 ___ osg-users mailing list osg-users@lists.openscenegraph.orgmailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting the List of Triangles from an osg model
Hi Jean, I was not able to understand this behavior: When I had a vec3Array and I queried it using vec3 = vec3Array-at(0) I would get an exception. Why does it give that exception ? I needed to use (*Vec3Array)[i] to get each Vec3. But then at i = 14113, I got an Unhandled exception: at 0x00402207 in OSG_examples.exe: 0xC005: Access violation reading location 0x00ba9000. And size has a value much higher = 4176061468 when I query the vec3Array for size I get a very large number and much large than Vec3Array-numElements() size = 4176061468 numElements = 7772 Which of these represents the number of vertices in the model ? Thanks Sincerely, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31222#31222 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting the List of Triangles from an osg model
Hello Sanat, I was not able to understand this behavior: When I had a vec3Array and I queried it using vec3 = vec3Array-at(0) I would get an exception. Why does it give that exception ? Check the C++ standard, osg::Vec3Array::at() eventually calls std::vector::at() which throws an exception when you try to access something that's past the end of the vector (i.e. not a valid index). You would have seen this if you'd tried to debug the program. When debugging, when you get an exception, you can get the stack trace of where the exception was thrown and thus learn why you got an exception yourself. I needed to use (*Vec3Array)[i] to get each Vec3. But then at i = 14113, I got an Unhandled exception: at 0x00402207 in OSG_examples.exe: 0xC005: Access violation reading location 0x00ba9000. And size has a value much higher = 4176061468 when I query the vec3Array for size I get a very large number and much large than Vec3Array-numElements() size = 4176061468 numElements = 7772 Which of these represents the number of vertices in the model ? I strongly suspect you're acting on a variable that you've casted to Vec3Array without first checking whether it was really a Vec3Array. As I said above, at() checks if the index you pass is valid or not. operator[] does not check, so you can do it even if it's not a valid index... Also the size you get is a value that I would question, seems to me that it's an invalid size as no one would ever make a model for real-time use that has 4 billion vertices. Again, you have your data, so this is something you could have checked by loading the same model in osgviewer, pressing 's' 4 times and looking at the number of vertices, I bet it's lower than 4 billion. The number of vertices in the model is array-size(). And array-at() should always work if the index you pass is under array-size(). So if that's not the case, then you're using an area of memory that isn't the type you think it is, and you better check things better before you cast. Again, please look at previous discussions, someone else was doing very unsafe things lately... You're not doing yourself a favor by casting things without checking and then wondering why you get errors... Hope this helps, 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] Getting the List of Triangles from an osg model
to me looks like you are trying to debug in release -Nick On Tue, Aug 31, 2010 at 10:46 PM, Sanat Talmaki sanat.sch...@gmail.comwrote: Hi Jean, I was not able to understand this behavior: When I had a vec3Array and I queried it using vec3 = vec3Array-at(0) I would get an exception. Why does it give that exception ? I needed to use (*Vec3Array)[i] to get each Vec3. But then at i = 14113, I got an Unhandled exception: at 0x00402207 in OSG_examples.exe: 0xC005: Access violation reading location 0x00ba9000. And size has a value much higher = 4176061468 when I query the vec3Array for size I get a very large number and much large than Vec3Array-numElements() size = 4176061468 numElements = 7772 Which of these represents the number of vertices in the model ? Thanks Sincerely, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31222#31222 ___ 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] Crash when GLObjectsVisitor gets to the same texture in several threads at the same time
Hello Robert, all, I'm seeing a crash in our simulator after many scenario loads. The stack trace differs, but it's always similar to this: a) Thread A is calling osg::Texture2D::getModifiedCount() for a new contextID, causing the _modifiedCount variable (which is an osg::buffered_value) to be resized. b) At the same time, Thread B is calling osg::Texture::getTextureParameterDirty() for a new contextID (different from the one in a), causing the _texParametersDirtyList variable (also an osg::buffered_value) to be resized. The osg::Texture and osg::Texture2D in threads A and B are the same object. But the graphics context for which these operations happen is different. Both threads are running the osgUtil::GLObjectsVisitor (starting from osgViewer::Renderer::compile()) when this happens. The stack trace can differ in the sense that instead of getModifiedCount(), thread A could be calling applyTexImage2D_load() or some other method on that same Texture. But getTextureParameterDirty() is always involved in the other thread from what I've seen. The crash happens in operator delete in thread B, while trying to resize the _texParametersDirtyList variable. The crash can happen at the second scenario load, or at the fifth, or at the 15th. And only if there are two or more GraphicsContexts running at the same time, so using a single window doesn't reproduce the problem. I don't see why doing different things in different threads causes a problem here, but apparently it does. And in general, running the GLObjectsVisitor from two different threads, one per context, even if it's on the same scene, should not cause problems, right? A workaround I have found is to do the following before the viewer starts rendering, but after the scene data has been loaded and the viewer has been realized (so all GraphicsContexts are created): a) stop the viewer's threads b) for each graphics context b.1) make the context current b.2) run the GLObjectsVisitor on the scene b.3) release the context c) start the viewer's threads This basically forces the GLObjectsVisitor to be run for each context sequentially instead of in parallel, so any resizes that need to happen will happen single-threaded. After this, the viewer will re-run the GLObjectsVisitor, but all resizes will already have been done, so there is no crash. But I shouldn't have to do this. I feel dirty even having this kind of workaround in the code :-) The code example I've included demonstrates this. You'll notice we use osg::GraphicsContext::incrementContextIDUsageCount() to ensure OSG doesn't reuse old graphics contexts. This is actually required to reproduce this crash. Also you'll notice the example creates 8 windows, but the problem is also present when you have 2 screens and use setUpViewAcrossAllScreens() on a single view, since then 2 contexts are created. This is what happens in our app. I've just made it create 8 windows so the crash happens quicker. In my case, I just run the example and press esc each time the viewer windows appear, and after a few times (generally less than 5 x 8 windows) I get a crash with the symptoms I gave above. If you uncomment the ENABLE_WORKAROUND define, and do the same thing, it shouldn't crash (I've gone to over 30 x 8 windows a few times with no crash). Note that I have no idea how OS/compiler dependent this is, perhaps it only happens on Windows when OSG is compiled with Visual Studio, or something like that. That's actually something I hope others can help me find out. Has anyone encountered something similar to this? Thanks in advance, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ #include osgDB/ReadFile #include osgViewer/CompositeViewer #include osgViewer/ViewerEventHandlers #include osgGA/TrackballManipulator #include iostream //#define ENABLE_WORKAROUND void main_func(int argc, char** argv) { // load the data osg::ref_ptrosg::Group root = new osg::Group; root-addChild(osgDB::readNodeFile(cow.osg)); root-addChild(osgDB::readNodeFile(cessnafire.osg)); root-addChild(osgDB::readNodeFile(lz.osg)); root-addChild(osgDB::readNodeFile(skydome.osg)); osgViewer::CompositeViewer viewer; for (unsigned int i = 0; i 8; ++i) { osgViewer::View* view = new osgViewer::View; view-setCameraManipulator( new osgGA::TrackballManipulator ); // add the stats handler view-addEventHandler(new osgViewer::StatsHandler); view-setSceneData( root.get() ); view-setUpViewInWindow(50+i*10, 50+i*10, 800, 600); viewer.addView(view); } viewer.realize(); #ifdef ENABLE_WORKAROUND viewer.stopThreading(); #endif osgViewer::CompositeViewer::Cameras cameras; viewer.getCameras(cameras, false); for
Re: [osg-users] transform to screen function
Alex, The short answer is no. However, this question has already been addressed... http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/59941/focus= 59966 -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Pecoraro, Alexander N Sent: Tuesday, August 31, 2010 9:56 AM To: OpenSceneGraph Users Subject: [osg-users] transform to screen function Is there some easy function on the osg::Camera (or some other osg class) that I can call to compute the 2d screen position of a 3d point? I couldn't find one when looking through the documentation, but I figured I would ask just in case I am missing it. Thanks. Alex smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change in osgText from 2.8.3 to 2.9.8?
Am 31.08.2010 10:54, schrieb Robert Osfield: HI Andreas, Try adding back in the 2.0 factor to see how it effects things. Hi Robert, I´ve first done some useless tests, as I saw later on that POLYGON_OFFSET isn´t the default backdrop implementation. Using POLYGON_OFFSET als backdrop implementation an re-introducing the 2.0 factor gave me the results I was used too. I am confused though that polygon_offset wasn´t the default in 2.8.3, too, so I should have gotten flickering there, too. Mysterious. I think that I´ll have to make the choice of backdrop implementation and of that factor available to my users, as - as I read in the docs - users with ATI-Cards probably will have problems with the polygon_offset method. I´ll implement a static method and variable DefaultBackdropType so one can choose the backdrop type for all osgText objects. I´d have to review all of my code to give users a choice otherwise. Maybe you´ll want to check that into osgText. Regards, Andreas ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] transform to screen function
Well that's easy enough: osg::Matrix MVPW(camera-getViewMatrix() * camera-getProjectionMatrix() * camera-getViewport()-computeWindowMatrix()); osg::Vec3 posIn2D = posIn3D * MVPW; Thanks. Alex -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Tuesday, August 31, 2010 1:05 PM To: OpenSceneGraph Users Subject: EXTERNAL: Re: [osg-users] transform to screen function Alex, The short answer is no. However, this question has already been addressed... http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/59941/focus= 59966 -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Pecoraro, Alexander N Sent: Tuesday, August 31, 2010 9:56 AM To: OpenSceneGraph Users Subject: [osg-users] transform to screen function Is there some easy function on the osg::Camera (or some other osg class) that I can call to compute the 2d screen position of a 3d point? I couldn't find one when looking through the documentation, but I figured I would ask just in case I am missing it. Thanks. Alex ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] BasicGeometry.cpp crash in release version
Hi, I'm new here so please forgive any faux pas. I'm trying to run the BasicGeometry example that's on the OSG website. I got it to work in debug mode, referencing libraries like osgd.lib and osgDBd.lib etc, but I can't get it to work in release mode. In release mode there's a reference error: Unhandled exception at 0x00018001b1b3 in BasicGeometry.exe: 0xC005: Access violation reading location 0x. This access violation always occurs at the same spot: osg::DrawElementsUInt* pyramidBase = new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0); pyramidBase-push_back(3); pyramidBase-push_back(2); //--- right here pyramidBase-push_back(1); pyramidBase-push_back(0); pyramidGeometry-addPrimitiveSet(pyramidBase); It seems that it always crashes at the second push_back call to a DrawElementsUInt. I searched around and found out that someone else had the same problem which was solved by using the debug libs in debug mode. I double checked that I was using the release libs while in release mode, but I still have these problems. In release mode I reference libraries osg.lib and osgDB.lib. I'm using Visual Studio 2008 and OSG version 2.8.3. I'm compiling in 64 bit so I did have to build OSG myself. Thanks in advance, James. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31229#31229 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting the List of Triangles from an osg model
Hi Nick, Jean The problem was because I was using the Release version of osg. I used the Debug instead and both size and numElements give the same value. I had turned optimization off but it seems as though you cannot run through the code even then. Thanks Sincerely, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31230#31230 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rendering each primitive set differently in one osg::Geometry?
Hi, I am rendering three separate primitive sets of TRIS,QUADS and LINES in one osg::Geometry object. I am rendering them using BIND_PER_PRIMITIVE of the normals with lighting enabled. Lighting of lines is not really very useful and it would be better to render the lines only in solid color. Is there any straightforward way of rendering the LINES only without lighting or is the only way to move them to their own osg::Geometry object. Is their some way of using BIND_PER_PRIMITIVE_SET to achieve this? Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31231#31231 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org