Re: [osg-users] [build] Building OSG 3.6.4 in Win64 TDM GNU.
Zachary1234 wrote: > Not quite, unfortunately, it seems. I can't install linux at this time. > > I was wondering if someone over there has a file tree of libraries that > exists on a Windows 64 bit filesystem? I figure that OSG was programmed and > tested on Windows, and that hoefully someone still has something for all the > dependencies that could be easily copied in one fell hit, zipped and uploaded. > > What are my chances? All of the libraries and optionals? If I had to guess, close to zero. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76537#76537 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geode and Drawable Classes
Hi Catalin, oso::Geode has been deprecated. Replace it with osg::Group. Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76532#76532 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image capture in memory
https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osgposter/osgposter.cpp On Tue, Apr 16, 2019 at 12:22 PM Catalin Flower wrote: > Hi, > > What is the canonical way to capture an image of a view to memory with > different resolutions? > > Thank you! > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=75830#75830 > > > > > > ___ > 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] osgAnimation depth of Skeleton update
Hi All, I'm currently trying to parse in a custom file format and I'm running into issues generating a proper skeleton hierarchy for it. It doesn't look like the osgAnimation::Skeleton traverses all the way down the bone hierarchy. I've created a minimal example here: https://gist.github.com/sbrkopac/2ea619b90573c4cb25af639589c31e2d It's possible my understanding of osgAnimation is incorrect. Any insight would be greatly appreciated. Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75799#75799 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?
Hi Rodrigo, The Camera::setViewMatrixLookAt function is equivalent to the gluLookAt. You can find more documentation on the inner workings here (https://stackoverflow.com/questions/21830340/understanding-glmlookat). If you don't set a camera manipulator prior to viewer.run() and move the camera the results will be lost due to viewer.run() setting up its own manipulator and overriding your initial setup. You have a few options: assign the camera manipulator -> update the manipulator -> call home(1) to force an update. Don't call viewer.run() and implement the loop yourself (this will prevent a manipulator from getting set and allowing you to freely manually manipulate the camera). Implement your own manipulator and set it before you call viewer.run(). If you have a specific question regarding one of the manipulators, please ask. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75575#75575 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Loading osgt from string / Compile resources into binary
Hi Michael, The portable way is to define a byte array. See this stackoverflow for more detail: https://stackoverflow.com/questions/7288279/how-to-embed-a-file-into-an-executable Sent from my iPhone > On Jan 21, 2019, at 4:02 AM, Michael Maurus wrote: > > Hi guys, > > is it possible to somehow compile resources like models/nodes into an > executable? > How about putting the content of an osgt file as a string into my source code? > But as far as I've seen, there is no readNodeFromString method in osgDB. > > Any ideas/suggestions? > > Thank you! > > Cheers, > Michael > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=75519#75519 > > > > > > ___ > 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] setViewMatrixAsLookAt not working to set the initial camera position
After you set the home position try: viewer.getCameraManipulator()->home(1); Sorry I'm not right in front of my computer right now. On Mon, Jan 7, 2019 at 7:26 PM Rodrigo Dias wrote: > Hi Sam, > > By "home" I think you mean > > > Code: > viewer.getCameraManipulator()->setHomePosition( eye, center, up ); > > > > > This really changed camera's position, though it's totally freaking out > now (I'm still fiddling with the values in eye, center and up). > > But I have no idea what you meant by "delta time", something to go inside > the loop? > > Thank you! > > Cheers, > Rodrigo > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=75413#75413 > > > > > > ___ > 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] setViewMatrixAsLookAt not working to set the initial camera position
Hey Rodrigo, You have to set the home position of your camera manipulator and make a call to home(1). You can force the delta time with a 1. Sam On Mon, Jan 7, 2019 at 6:48 PM Rodrigo Dias wrote: > Hi, > > I'm able to change the camera's position with TrackballManipulator. > However, I'd like to change the camera's initial position, but all the > examples I've found just won't work. My source code is: > > > Code: > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > using namespace std; > using namespace osg; > using namespace osgEarth; > using namespace osgEarth::Drivers; > > int main (int argc, char** argv) { > MapOptions mapOpt; > mapOpt.coordSysType() = MapOptions::CSTYPE_PROJECTED; > mapOpt.profile() = ProfileOptions("plate-carre"); > osg::ref_ptr map = new Map(mapOpt); > { > GDALOptions gdal; > gdal.url() = "br_modified.tif"; > osg::ref_ptr layer = new ImageLayer( "BR", > gdal ); > map->addLayer( layer ); > } > { > GDALOptions gdal; > gdal.url() = "BRalt.tif"; > osg::ref_ptr layer = new ElevationLayer( > "SRTM", gdal ); > map->addLayer( layer ); > } > osg::ref_ptr mapNode = new MapNode( map ); > osgViewer::Viewer viewer; > viewer.setSceneData( mapNode.get() ); > viewer.setCameraManipulator( new osgGA::TrackballManipulator ); > > Vec3 eye( 1.0, 5.0, 10.0 ); // The position of your > camera > Vec3 center( 0.0, 0.0, 0.0 ); // The point your camera is looking > at > Vec3 up( 0.0, 1.0, 0.0 ); // The up-vector of your camera - this > controls how your viewport will be rotated about its center and should be > equal to [0, 1, 0] in a conventional graphics coordinate system > viewer.getCamera()->setViewMatrixAsLookAt( eye, center, up ); > while ( !viewer.done() ) { > viewer.frame(); > } > return 0; > } > > > > > No matter which values I use for "eye", the camera always begins in the > same position. Why is that? > > Thank you! > > Cheers, > Rodrigo > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=75411#75411 > > > > > > ___ > 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] Working with osg::Text on animation
Use event handlers, node masks or a switch. Sent from my iPhone > On Dec 20, 2018, at 5:28 PM, Diego Mancilla wrote: > > Hello ravi, > > Thank you for your your answer. > > What you suggest can be accomplish by the use a visitor or a callback?: Lets > say that I want to change show/hide the text when the user press a key, > moreover, if some of the text for nodes (cessna) should be shown/hidden with > some key and others (glider) with another. And at the same time, each text > varies in time (like if they were their positions)...How can I accomplish > this? > > Cheers, > > > > ravidavi wrote: >> If you will be dynamically changing your text, then specify that when you >> first create it:osgText::Text* text = new osgText::Text; >> text->setDataVariance(osg::Object::DYNAMIC); >> Note that setting the data variance isimportant for multithreaded Viewers >> (http://forum.openscenegraph.org/viewtopic.php?t=10441=next). >> >> >> Then you can change the text easily: >> text->setText("insert dynamically-generated string here"); >> >> >> You can show/hide the text with its node mask: >> text->setNodeMask(0x0); // NodeMask = 0 to hide >> text->setNodeMask(~0x0); // NodeMask = 0x to show >> >> >> Hope that helps, >> Ravi >> >> >> >> On Thu, Dec 20, 2018 at 8:39 AM Diego Mancilla < ()> wrote: >> >> >>> Hello, >>> >>> I have a couple of doubts regarding the proper way of handling osg::Text >>> inside an animation. >>> >>> For the sake of simplicity lets say we are working on the osganimate >>> example, and we have multiple cessna moving around. >>> >>> 1- What is the proper way of changing the text of osg::Text on runtime? For >>> instance, if I want to display current position of cessna. >>> >>> 2- How can I hide/show the current value of the text on user request (stoke >>> of key for example). >>> >>> Thank you! >>> >>> Cheers, >>> >>> -- >>> Read this topic online here: >>> http://forum.openscenegraph.org/viewtopic.php?p=75329#75329 >>> (http://forum.openscenegraph.org/viewtopic.php?p=75329#75329) >>> >>> >>> >>> >>> >>> ___ >>> osg-users mailing list >>> () >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>> (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) >>> >> >> >> -- >> Post generated by Mail2Forum > > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=75333#75333 > > > > > > ___ > 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] DirectX Texture Stage Sets to OSG
Hey Michael, It's a format used in the game Dungeon Siege. When the game goes to load up its texturing information, it uses those "TSD" files in order to setup the texture state sets for DirectX. I did proof of concept up here: https://pastebin.com/FwaYd1S9. If you have anymore questions or feedback, I'd love to hear it. Thanks, Sam On Wed, Dec 5, 2018 at 3:16 AM michael kapelko wrote: > Hi. > > It would be good to know what that format is all about, never seen it > before. > > > On Tue, 4 Dec 2018 at 23:46, sam wrote: > > > > Hi All, > > > > I have a file format that is laid out as follows: > > > > [t:tsd,n:b_t_grs01_rvr_fall-bottom-08-static] > > { > > b dither = false; > > b hasalpha = false; > >layer1alphaarg1 = texture; > >layer1alphaarg2 = diffuse; > >layer1alphaop = modulate; > >layer1colorarg1 = texture; > >layer1colorarg2 = diffuse; > >layer1colorop = modulate2x; > > i layer1numframes = 1; > > f layer1secondsperframe = 0.0; > >layer1texture1 = texture_filename1; > > f layer1ushiftpersecond = 0.0; > > b layer1uwrap = true; > > f layer1vshiftpersecond = 0.0; > > b layer1vwrap = true; > >layer2alphaarg1 = texture; > >layer2alphaarg2 = current; > >layer2alphaop = arg2; > >layer2colorarg1 = texture; > >layer2colorarg2 = current; > >layer2colorop = modulate; > > i layer2numframes = 1; > > f layer2secondsperframe = 0.0; > >layer2texture1 = texture_filename2; > > f layer2ushiftpersecond = 0.0; > > b layer2uwrap = true; > > f layer2vshiftpersecond = 0.5; > > b layer2vwrap = true; > > i numlayers = 2; > > i texturedetail = 2; > > b timesyncanimation = true; > > } > > > > I want to create a layer between this and osg StateSet commands. Has > anybody attempted to do this? Is there an easy way to do the mapping? Or > will it be parse -> set settings -> and then parse. > > > > Ideas are welcome. > > > > Thanks, Sam > > ___ > > 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] DirectX Texture Stage Sets to OSG
Hi All, I have a file format that is laid out as follows: [t:tsd,n:b_t_grs01_rvr_fall-bottom-08-static] { b dither = false; b hasalpha = false; layer1alphaarg1 = texture; layer1alphaarg2 = diffuse; layer1alphaop = modulate; layer1colorarg1 = texture; layer1colorarg2 = diffuse; layer1colorop = modulate2x; i layer1numframes = 1; f layer1secondsperframe = 0.0; layer1texture1 = texture_filename1; f layer1ushiftpersecond = 0.0; b layer1uwrap = true; f layer1vshiftpersecond = 0.0; b layer1vwrap = true; layer2alphaarg1 = texture; layer2alphaarg2 = current; layer2alphaop = arg2; layer2colorarg1 = texture; layer2colorarg2 = current; layer2colorop = modulate; i layer2numframes = 1; f layer2secondsperframe = 0.0; layer2texture1 = texture_filename2; f layer2ushiftpersecond = 0.0; b layer2uwrap = true; f layer2vshiftpersecond = 0.5; b layer2vwrap = true; i numlayers = 2; i texturedetail = 2; b timesyncanimation = true; } I want to create a layer between this and osg StateSet commands. Has anybody attempted to do this? Is there an easy way to do the mapping? Or will it be parse -> set settings -> and then parse. Ideas are welcome. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Extension ' is not supported
Just for clarity, it wasn't causing me any issues. Thanks for looking into it, Robert. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75180#75180 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Extension '' is not supported
Hi, When I use the latest 3.6.3 release, I get the following message when enabling OSG_INFO. Code: OpenGL extension '' is not supported. Does anybody else get this when running a normal viewer example? Code: int main(int argc, const char *argv[]) { osg::setNotifyLevel(osg::NotifySeverity::INFO); osgViewer::Viewer viewer; viewer.setUpViewInWindow(50, 50, 640, 480, 0); viewer.setCameraManipulator(new osgGA::MultiTouchTrackballManipulator); return viewer.run(); } Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75175#75175 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Crash when using LineSegmentIntersector
Hi Robert, Thanks for taking the time to write up your post - very informative. > For a modern scene graph I wouldn't create any Geode's at all. Most of the OSG examples use Geodes. What is the type you would use for a modern scene graph? > However, as I've only seen a tiny snippet of your code and explanation > I can't really say where you've understanding of how best to implement > what you need has gone off in the weeds. This is a very real possibility. To keep it short and sweet: I have a plugin that returns a geode from a custom file format. There is supporting data associated with the format such as walkable flags. I use Geodes to group together drawables (using the visitor) to draw them if the user wants to see them. Basically debug data for the node. > Another general comment is that it's not recommend practice to go > adding objects to the scene graph from within a NodeVisitor. Understood. Is there a best practice I can align myself with? Should I be handling that all in the plugin loader and potentially use something like osg::Switch to turn them on and off? Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74465#74465 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Crash when using LineSegmentIntersector
Hi Robert, Looks like in slimming down my code there are some things that look... odd. Different meshes can have multiple groupings of the flags so I use one geode to render all of those triangles. Should I not be attaching the geode used to render the triangles to the main geode returned from the plugin? I guess what I'm asking is why is it odd to have a geode attached to a geode. Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74463#74463 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Crash when using LineSegmentIntersector
Hi All, I have a custom plugin that loads mesh data and then also loads the walkable flag information that is associated with that node. When doing a LineSegmentIntersector to pick the node in the scene everything works perfectly well - until I apply the visitor and append the geometry with the walkable faces. Once the visitor has completed and the user goes to click in the scene, I get a crash. I've managed to create a small example that reproduces the crash. The stack trace seems to indicate that when the IntersectionVisitor attempts to call Geode::getDrawable() it returns a null drawable. Please note that I do see the proper geometry drawing when the visitor is applied. https://gist.github.com/sbrkopac/45b4e9d7d35a979e7e0dd7eebbd2a061 Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74459#74459 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to speed up rendering in this case.
Jinh Are they 1000 unique meshes? You might want to look into the osgdrawinstanced example. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74431#74431 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CameraManipulator init
Hi All, I was digging through the CameraManipulator code and came across the init function. I noticed it runs a few times during scene setup, and after looking into the code I see the following: Code: /** Start/restart the manipulator. FIXME: what does this actually mean? Provide examples. */ virtual void init(const GUIEventAdapter& ,GUIActionAdapter&) {} Does anybody have the update documentation or perhaps some notes on when / how the init function is being called? Thanks, Sam[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74429#74429 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to track down memory leaks?
Not really sure what you mean by memory leaks. If you don't want the cache to cache any objects then disable it. This will have the trade off of having to parse / upload a node every time you remove it and then re-add it. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74311#74311 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visualizing triangle data
Hi Robert, It seems to work okay. I wasn't sure how to do it in my original post and that is what I came up with. I haven't tried this on a large scale map consisting of around ~1700 of the nodes. I'll post back if there are any performance issues. Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74074#74074 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visualizing triangle data
Hi Robert, I have the mesh setup correctly using the DrawElementsUShort. My question was regarding drawing the walkable triangles that are attached to the mesh. These don't have indices and just consist of the vertex information. Here was my approach to draw them. Code: for (size_t index = 0; index < sno.mystery_section_count(); index++) { const auto * mystery_section = sno.mystery()->at(index); const auto triangleSectionCount = mystery_section->triangle_section_count(); osg::ref_ptr flags = new osg::Geode; grouping->addChild(flags); const osg::Vec4 non(1.0f, 0.0f, 0.0f, 0.5f); // red for non-walkable const osg::Vec4 floor(0.0f, 1.0f, 0.0f, 0.5f); // green for walkable const osg::Vec4 water(0.0f, 0.0f, 1.0f, 0.5f); // blue for water osg::ref_ptr color(new osg::Vec4Array(1)); switch (mystery_section->floor()) { case sno_t::floor_t::FLOOR_IGNORED: (*color)[0] = non; break; case sno_t::floor_t::FLOOR_FLOOR: (*color)[0] = floor; break; case sno_t::floor_t::FLOOR_WATER: (*color)[0] = water; break; } for (size_t j = 0; j < triangleSectionCount; j++) { const auto * triangle_section = mystery_section->triangle_section()->at(j); const auto * triangleA = triangle_section->triangle()->a(); const auto * triangleB = triangle_section->triangle()->b(); const auto * triangleC = triangle_section->triangle()->c(); // setup the vertices based on the triangles osg::ref_ptr vertices(new osg::Vec3Array(3)); (*vertices)[0] = osg::Vec3(triangleA->x(), triangleA->y(), triangleA->z()); (*vertices)[1] = osg::Vec3(triangleB->x(), triangleB->y(), triangleB->z()); (*vertices)[2] = osg::Vec3(triangleC->x(), triangleC->y(), triangleC->z()); // setup our geometry osg::ref_ptr geometry(new osg::Geometry); geometry->setVertexArray(vertices); geometry->setColorArray(color); geometry->setColorBinding(osg::Geometry::BIND_OVERALL); geometry->addPrimitiveSet(new osg::DrawArrays(GL_TRIANGLES, 0, 3)); osg::ref_ptr geode(new osg::Geode); geode->addDrawable(geometry); geode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); geode->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON); geode->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); // prevent z-fighting. osg::ref_ptr polyOffset = new osg::PolygonOffset; polyOffset->setFactor(-1.0f); polyOffset->setUnits(-1.0f); osg::ref_ptr polyMode = new osg::PolygonMode; polyMode->setMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::FILL); geode->getOrCreateStateSet()->setAttributeAndModes(polyOffset, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON); geode->getOrCreateStateSet()->setAttributeAndModes(polyMode, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON); flags->addChild(geode); } } If you have any feedback on the methodology, I'd love to hear it. Thanks, Sam[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74070#74070 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Visualizing triangle data
Hi All, I am working on reverse engineering a mesh format. I've managed to successfully get the mesh to draw and texture. I'm now working on visualizing the walkable data that is against the mesh. I think I've dissected the section of the format that stores that information and it looks like such: [image: image.png] The actual mesh itself is made out of vertex and indexs. However, this section for each walkable triangle seems to not share any vertices. My question is, what is the best way to visualize this data in OSG? I'd like to be able to toggle them on and off when the entire map is rendered to view the flags. Solid colored triangles would be preferable. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Announcement: VulkanSceneGraph and SceneGraphTestBed!
Hi Robert, Regarding SceneGraphTestBed are we looking to have a library to help facilitate testing? What is the current vision for the test repository. Thanks, Sam On Tue, Jun 5, 2018 at 1:35 AM Robert Osfield wrote: > Hi Julien, > > On 4 June 2018 at 18:03, Julien Valentin > wrote: > > Glad to hear vsg is on the grill. As Remo wrote, MoltenVk should be > taken into consideration in the design of VSG for the Mac/IOS compatibility. > > I haven't investigated MoltenVk yet, are there gotcha's involved in > supporting it? > > > @Robert classic Vulkan resources I read (if you don't already have them): > > -Vulkan Programming Guide (Graham Sellers) > > -per feature examples: https://github.com/SaschaWillems/Vulkan > > Thanks, have the book and have done a bit of diving into Sascha's > resources. > > > -fill the gap between gl: https://www.youtube.com/watch?v=PPWysKFHq9c > > Excellent, I've added it to my list of resources. > > > I have nothing to share yet about my thoughts on vsg but believe most of > the osg Node abstraction can be kept... > > While many of the osg Node abstractions could be replicated, at this > point I'm doing it clean room both conceptually and implementation > wise. It's likely you'll see things in VulkanSceneGraph that will be > like old friends, but many other places I'll changes things > drastically, either that's what Vulkan requires or to improve > performance or flexibility a new approach is required. > > Cheers, > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] CMake can not find include files
If you're generating the cmake file through the cmake application then it should be generated in your build folder. If you are using cmake on the command line then you will need to pass cmake -G "Visual Studio XX" to the command line, where XX is your Visual Studio version. On Sun, Jun 3, 2018 at 4:19 PM Peter Klose wrote: > Hi, > it seems my fault was to look into the "src" directory for the sources. > With the cmakelists.txt file in the base directory openscenegraph cmake > worked succesfully. > Now it is only to find out how to find the project file for VC++ which > might load the project into the IDE? > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=73934#73934 > > > > > > ___ > 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] CMake can not find include files
Hi Peter, Not sure how you're attempting to compile OSG but I'd recommend you'd do the following: [image: osg1.png] >From here I would hit Configure and then Generate. Open up the ALL_BUILD project and right-click OpenThreads and hit build. This will ensure all the dependencies are in place. On Sun, Jun 3, 2018 at 9:49 AM Robert Osfield wrote: > HI Peter, > > It's the OpenSceneGraph/CMakeLists.txt that it the one you should open > in CMakeSetup. All the CMakeLists.txt below this will rely upon all > the setting/includes that it sets up. > > Robert. > > > On 3 June 2018 at 13:30, Peter Klose wrote: > > > > robertosfield wrote: > >> Hi Peter, > >> > >> You shouldn't need to compile OpenThreads independently, just point > >> CMakeSetup at OpenSceneGraph/CMakeLists.txt and OpenThreads will be > >> built alongside the rest of the OSG. > >> > >> Robert. > >> > >> -- > >> Post generated by Mail2Forum > > > > > > Hi Robert, > > i have changed the source path in Cmake to the "osg" subdirectory as you > suggested, but now comes another error unknown cmake command > > "SETUP_LIBRARY" > > > > The C compiler identification is MSVC 18.0.21005.1 > > The CXX compiler identification is MSVC 18.0.21005.1 > > Check for working C compiler: C:/Program Files/Microsoft Visual Studio > 12.0/VC/bin/cl.exe > > Check for working C compiler: C:/Program Files/Microsoft Visual Studio > 12.0/VC/bin/cl.exe -- works > > Detecting C compiler ABI info > > Detecting C compiler ABI info - done > > Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio > 12.0/VC/bin/cl.exe > > Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio > 12.0/VC/bin/cl.exe -- works > > Detecting CXX compiler ABI info > > Detecting CXX compiler ABI info - done > > Detecting CXX compile features > > Detecting CXX compile features - done > > CMake Error at CMakeLists.txt:460 (SETUP_LIBRARY): > > Unknown CMake command "SETUP_LIBRARY". > > > > > > CMake Warning (dev) in CMakeLists.txt: > > No cmake_minimum_required command is present. A line of code such as > > > > cmake_minimum_required(VERSION 3.11) > > > > should be added at the top of the file. The version specified may be > lower > > if you wish to support older CMake versions for this project. For more > > information run "cmake --help-policy CMP". > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > Configuring incomplete, errors occurred! > > See also > "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log". > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=73926#73926 > > > > > > > > > > > > ___ > > 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] 'fatal error C1128: number of sections exceeded object file format limit' under MSVC2015
Hi Robert, Enabling -bigobj just changes the address space for obj files. The default is 2^16 and /bigobj will enable 2^32. The only con that I'm aware of is linker's that shipped prior to Visual C++ 2005 cannot read .obj files that were produced with /bigobj. https://msdn.microsoft.com/en-us/library/ms173499.aspx Looks like most of the projects now force it on in CMAKE. Thanks, Sam On Thu, Apr 19, 2018 at 1:14 PM, Robert Osfield <robert.osfi...@gmail.com> wrote: > Hi Jason, > > On 18 April 2018 at 20:59, Jason Beverage <jasonbever...@gmail.com> wrote: > > I'm compiling the master in debug with MSVC 2015 and running into this > issue > > again: > > http://forum.openscenegraph.org/viewtopic.php?t=16012; > start=0=0=asc= > > > > This time it's with Geode.obj > > > > I've added /bigobj just to get it building here locally. Not sure if > there > > is anything else we can take out of the headers to slim it down or not. > > > > This is my first time seeing this issue so I'm not 100% sure if it's a > good > > idea to just enable /bigobj all the time or not. > > I don't have any VisualStudio expertise so have to defer to Windows > devs as how best to guide the build with VisualStudio. So if you feel > adding /bigobj is required then submit a PR to add this. > > What are the cons about enabling /bigobj? > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] converting node coordinates
When you zoom your mouse feel forward it's possible that the new sphere is outside the camera's view and thus being culled out of the drawing. Check to make sure the sphere doesn't end up behind the camera. On Thu, Jun 22, 2017 at 10:38 AM, Bruno Oliveira < bruno.manata.olive...@gmail.com> wrote: > I am almost sure I am making some mistake on setting the node's bounding > sphere. Is my code correct on that example I gave? > > 2017-06-22 18:29 GMT+01:00 Bruno Oliveira <bruno.manata.olive...@gmail.com > >: > >> Sorry I'm not sure what you're asking. >> >> I manipulate my scene with a Mouse Manipulator (Trackball), hence the >> view is refreshed and I can see my nodes, but if I zoom in they disappear >> >> 2017-06-22 18:23 GMT+01:00 Sam Brkopac <brko...@gmail.com>: >> >>> Hi Bruno, >>> >>> After you manipulate the coordinates do the new bounds result in the >>> node getting culled by the camera? >>> >>> Thanks, Sam >>> >>> > On Jun 22, 2017, at 10:12, Bruno Oliveira < >>> bruno.manata.olive...@gmail.com> wrote: >>> > >>> > Hello, >>> > >>> > I have some osg::Nodes with some initial geometry coordinates. >>> > >>> > Then, after some rendering, at some point I need to transform those >>> initial coordinates. I do something like this: >>> > >>> > >>> > void MyNodeGeometry::convertCoordinates() { >>> > >>> > auto* vert = this->getVertexArray(); >>> > >>> > for (int i = 0; i < vert->size(); i++) { >>> > convertCoordinate(vert->operator[](i)); >>> > } >>> > >>> > this->setVertexArray(vert); >>> > >>> > this->setInitialBound(this->computeBound()); >>> > this->firtyBound(); >>> > >>> > } >>> > >>> > >>> > Also, in all parent Nodes I call >>> > >>> > parentNode->setInitialBound(this->computeBound()); >>> > parent->firtyBound(); >>> > >>> > >>> > >>> > However, when I do this, I can see my points, BUT when I try to >>> manipulate my scene with the mouse, the data disappears if I zoom in, and >>> appears again if I zoom out again. >>> > This seems like my node's bounds are not well set, But I manually >>> verified all node's bounds and they are correct >>> > >>> > Any idea? >>> > ___ >>> > osg-users mailing list >>> > osg-users@lists.openscenegraph.org >>> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens >>> cenegraph.org >>> ___ >>> osg-users mailing list >>> osg-users@lists.openscenegraph.org >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens >>> cenegraph.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] Displaying Geode Bounding Box
Hi All, Is there a simple way to display the bounding box of Geode or Geometry? Or will I have to write up something to do it? Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Thoughts on Vulkan
Hi Guys, Sorry to hijack this thread a little bit. What would you guys consider the best source of information for Vulkan? Primarily focusing on the fundamentals. Thanks, Sam On Mon, Feb 13, 2017 at 5:43 AM, Robert Osfield <robert.osfi...@gmail.com> wrote: > On 13 February 2017 at 12:17, Nickolai Medvedev <raizel@yandex.ru> > wrote: > > So, Robert, if you if you are going to use C++11, it means that > > OpenThreads won't be used anymore(use std::thread)? > > One of the reasons to use C++11 is avoid the need to external > dependencies such as OpenThreads. > > However, C++11 threading is still a bit too primitive for serious > threading work as there is no support for processor affinity so we'd > need to implement this. > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Having problems running the osgViewerWX example (GLExtensions returning as null)
Hi, I'm trying to get the osgViewerWX example to work. I am using wxWidgets 3.1.0 and OSG 3.4.0. Everything has been compiled under VS2015 for x86. When I first attempted to compile the example there were two errors, the signatures for two functions had changed. One was easy to fix (parameters had moved around) whilst the other is not so clear cut. osgViewerWX.cpp bool GraphicsWindowWX::makeCurrentImplementation(): Code: _canvas->SetCurrent(); This isn't valid anymore as SetCurrent() requires a wxGLContext to be passed to it. I just passed _canvas to the function since it seemed like that was intended originally. It doesn't seem to make a difference if I comment it out. So once I got it compile, on running, I found that an exception would be thrown in Renderer::initialize(osg::State* state). Upon inspection it seems that NULL is being returned when trying to retrieve the extension from the current state: Code: osg::GLExtensions* ext = state->get-osg::-GLExtensions-(); replaced gt and lt symbols with dashes, html filter removes them :( I'm still learning on using OSG so I don't really know what needs to be changed to fix this or if this is actually a problem with my hardware. I would appreciate any help. Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69490#69490 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 3.4 + FFmpeg
Hi Gianni, Does 3.0.2 still have the deprecated functions that are used in OSG 3.4? I check against 2.8.6 and I don't get any unidentified function errors. I will try 3.0.2 and give an update. Thanks, Sam On Wed, Nov 16, 2016 at 11:51 PM, Gianni Ambrosio <g.ambrosio+...@gmail.com> wrote: > Hi Sam, > if you don't have a pre-built libraries than you can choose the FFmpeg > version you like since you have to build them on your own. > With OSG 3.4 now I build ffmpeg 3.0.2. > > Cheers, > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69413#69413 > > > > > > ___ > 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] OSG 3.4 + FFmpeg
Hi Guys, What was the version of FFmpeg that OSG 3.4 was developed against? Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Disabling plugins via CMake
Hi Alberto, No. I was hoping to avoid hacking the CMakeFiles up. I will give this a try. Thanks! On Tue, Nov 8, 2016 at 5:07 AM, Alberto Luaces <alua...@udc.es> wrote: > sam writes: > > > Hi All, > > > > Is there a simple way to disable the plugin project files from being > generated via CMake? > > > > Hi, Sam. Did you try to comment or delete the 31st line of > src/CMakeLists.txt? > > https://github.com/openscenegraph/OpenSceneGraph/ > blob/master/src/CMakeLists.txt#L31 > > -- > Alberto > > ___ > 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] Disabling plugins via CMake
Hi All, Is there a simple way to disable the plugin project files from being generated via CMake? Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Left handed scene
If you need to rotate your entire scene you can add a single transform to the root node and do the rotation. Then can treat that transform as the new root node. > On Aug 2, 2016, at 10:27, Antoine Rennuitwrote: > > Hi all, > > > My problem is solved my I flip my FrameBuffer vertically (in Qt), which I > should not be doing. > > > So anyone has an idea of what can flip my OSG view vertically? > > > Thanks, > > Antoine. > > > From: osg-users on behalf of > Antoine Rennuit > Sent: 02 August 2016 18:37 > To: osg-users@lists.openscenegraph.org > Subject: Re: [osg-users] Left handed scene > > Hi all, > > > Going a bit forward with my left handedness problem... > > > My viewport actually appears upside down vertically: the HUD coordinate > system on the left is up when it should be down and the text is also written > upside (see joined picture). It behaves as if the viewport had its y origin > at the bottom of the viewport (and not at the top as usual). > > > Any idea? > > > Kind regards, > > > Antoine. > > > From: osg-users on behalf of > Antoine Rennuit > Sent: 02 August 2016 14:36 > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] Left handed scene > > Hi all, > > > I have a QtWidget app which I am converting to QtQuick. My app works well > with QtWidget but after transitioning to QtQuick I have observed that the > whole scene is now left handed: not only the geometry is left handed (the z > axis is down when it should be up - check joined file) but also the > TrackballManipulator behavior (e.g. when I pan up with the mouse the scene > goes down, and it's the same opposite reaction for rotate). > > > I do not understand where this is coming from. I was able to easily put the > geometry back right handed using a scale -1 on Z but I should not have to do > that and this does not solve the TrackballManipulator behavior. > > > I have used https://bitbucket.org/leon_manukyan/qtquick2osgitem as a starting > point and my code does the following: > > > I have a RendererImpl class, created by an OsgItem and which is responsible > for maintaining the osgViewer::Viewer and the osgViewer::GraphicsWindow, here > is its init method: > > > void RendererImpl::init() > { > m_sceneRoot = new osg::Group(); > > m_viewer = new osgViewer::Viewer; > m_viewer->setThreadingModel(osgViewer::ViewerBase::SingleThreaded); > m_viewer->setSceneData(m_sceneRoot); > m_viewer->setCameraManipulator(new osgGA::TrackballManipulator); > m_viewer->getCameraManipulator()->setHomePosition(osg::Vec3d(4.0, -4.0, > 2.0), osg::Vec3d(0.0, 0.0, 1.0), osg::Vec3d(0.0, 0.0, 1.0)); > m_viewer->home(); > > m_sceneRoot->addChild(setupLight()); > m_sceneRoot->addChild(setupGrid(6.0f, 2.0f)); > > m_window = new FrameBufferWindow(this); > updateSize(); > > osg::Camera* camera = m_viewer->getCamera(); > camera->setGraphicsContext( m_window.get() ); > > camera->setClearColor( osg::Vec4(0.2, 0.2, 0.6, 1.0) ); > } > > And its update method on window size change: > > > void RendererImpl::updateSize() > { > m_window->getEventQueue()->windowResize(0, 0, osgItem().width(), > osgItem().height() ); > m_window->resized(0, 0, osgItem().width(), osgItem().height()); > > osg::Camera& camera = *m_viewer->getCamera(); > const osg::GraphicsContext::Traits& t = *m_window->getTraits(); > camera.setViewport( 0, 0, t.width, t.height ); > double aspectRatio = t.height ? (double)t.width / (double)t.height : 1.0; > camera.setProjectionMatrixAsPerspective(30.0f, aspectRatio, 1.0f, > 1.0f ); > } > > And I have an item which streams the events to the window, e.g.: > > void OsgItem::mouseMoveEvent(QMouseEvent *event) > { > m_renderer->m_window->getEventQueue()->mouseMotion(event->x(), > event->y()); > > update(); > } > > Does anyone have an idea of what is wrong in my code? I have looked for days > and I am stuck! > > > Thanks, > > > Antoine. > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Collada in VS2013
Hi, I'm having some trouble getting .dae files to load in a program I've been writing in VS2013. The OpenSceneGraph .dae plugin actually builds and has been building without hitch for a while now-- however, it does nothing (when loading a .dae file I am given the generic error which I wrote into my program). I have checked my CMAKE configuration and all fields related to COLLADA are pointing to the correct places. So, I decided to peel a bit further back and go back to getting COLLADA itself to build on the computer, as this is part of what is advised on the OpenSceneGraph website. I switched to working on building the COLLADA DOM library, v2.2. Their package provides solution files for Visual Studio up to v2010, so I did some digging around and was working on getting a running solution going in VS2013: got all the requisite dependencies built in 2013, updated the links, etc...however, could not get a solution to build. I also couldn't find much reference to other folks having done so; perhaps this is not necessary. So I set up VS2010 and built COLLADA as it came with, as predicted, no problems, and re-adjusted OSG's CMAKE configuration to point to this build, instead-- this still does not work, which I was not expecting it to as my understanding the libraries being used should be built using the same toolchains for both OSG and the program being written. I've increased the verbosity of debugging messages, but haven't been able to follow them to anything useful. It could just be that I've done something else wrong somewhere else, but I was wondering if any of you had any pointers on Collada with OSG in VS2013. Thank you! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68163#68163 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Odd Text Distortion (Which Does Not Appear to Be Due to the 3.2 Bugfix)
Hi, Thanks Robert! Your suggestion was exactly it! I kept trying for a solution involving the camera or something more complicated, completely dismissing that the problem could have been much simpler. Ha. I figured perhaps the text looking strange and also being off-center were related problems-- this was not the case. Getting freetype working correctly fixed the appearance of the font, and then some bit later I dug up where the offset issue was coming from and fixed that. For the curious, the offset was being caused by using the dimensions of the text's bounding sphere in a calculation to center the text, instead of the dimensions of the text's bounding box (I thought we'd been using the bounding box, but I was incorrect). Since the bounding sphere has a radius presumably determined by the longest dimension of the text, the longer a line of text was along its longest axis, the further offset it turned out along its shorter axis. Thank you guys for the suggestions! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68127#68127 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Odd Text Distortion (Which Does Not Appear to Be Due to the 3.2 Bugfix)
Hi, I have been having an issue with the display of text for a few days now (where the correct font is not used), while updating a project from pre-3.0 OSG to the latest version. I know about this bug fix from 3.2 where, now, creating a camera and assigning it to the viewer without initialising it properly or setting it to global defaults will give you exactly what you're asking for. It seems that past posters have had problems with text rendering in a blocky or unusual way, and have traced it to this bugfix, however, I have not found this project to have any improperly initialised cameras. Does anyone have any suggestions? (I have attached an image). Thank you! Cheers, Sammy J (I should mention, this is on a Win7 machine, building a project in Win32 Release mode; I have made sure that I am using the correct, non-debug dlls) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67921#67921 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Disabling plugins via CMake
Hi All, Is there a simple way to disable the plugins from building in OSG? I'd like to be able to just build the OSGCore without having to uncheck the boxes in visual studio. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Draw Instanced
Do you have an example of the shader that you used? On Mon, Apr 18, 2016 at 12:40 PM, Glenn Waldron <gwald...@gmail.com> wrote: > That I do not know. But I do recall that my original DI implementation > tried to use UBOs, and I ditched them in favor of TBOs because of the size > limitations. > > Glenn Waldron > > On Fri, Apr 15, 2016 at 6:09 PM, sam <brko...@gmail.com> wrote: > >> Would there be a big performance difference between using a TextureBuffer >> Object and a UniformBuffer object? >> >> Thanks, Sam >> >> On Fri, Apr 15, 2016 at 1:15 PM, sam <brko...@gmail.com> wrote: >> >>> Doh! Thanks, Glenn. Unfortunately I still have some holes in the map but >>> its starting to look considerably better. I will definitely looking to >>> using a TextureBuffer. >>> >>> On Fri, Apr 15, 2016 at 12:50 PM, Glenn Waldron <gwald...@gmail.com> >>> wrote: >>> >>>> Sam, >>>> I think you are not calling setNumElements() on your uniform array. You >>>> could also do that in the osg::Uniform constructor. >>>> >>>> Anyway, a uniform array of matrices is going to be limiting in terms of >>>> scale and speed -- I'd recommend a buffer object instead. (osgEarth uses an >>>> osg::TextureBuffer.) >>>> >>>> >>>> Glenn Waldron >>>> >>>> On Fri, Apr 15, 2016 at 2:35 PM, sam <brko...@gmail.com> wrote: >>>> >>>>> Hi All, >>>>> >>>>> I'm having some trouble getting my code to use hardware instancing. >>>>> I've referenced OSGEarth, DrawInstanced example, and a few different code >>>>> samples on the web. I've gotten pretty close but I seem to be at a bit of >>>>> an impasse. >>>>> >>>>> This screenshot shows what the map looks like with the default >>>>> rendering: >>>>> >>>>> http://imgur.com/fKvunfd >>>>> >>>>> This screenshot shows what the map looks like after I apply my >>>>> instance rendering code to it: >>>>> >>>>> http://imgur.com/zZCzurr >>>>> >>>>> The map is composed of a lot of little nodes. I figured instanced >>>>> rendering would be helpful in this case. The map has ~4000 individual >>>>> nodes. Two of the nodes are repeated 465 and 266 times. I have trimmed >>>>> down >>>>> my code and it is posted here: >>>>> >>>>> http://pastebin.com/ifSVSzD6 >>>>> >>>>> From what it looks like. Its rendering one copy of every nodes but not >>>>> anymore that that. I have commented out lines 215 to 224 as it doesn't >>>>> work >>>>> at all. Any insight or help would be greatly appreciated. >>>>> >>>>> Thanks, Sam >>>>> >>>>> ___ >>>>> 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 > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Draw Instanced
Would there be a big performance difference between using a TextureBuffer Object and a UniformBuffer object? Thanks, Sam On Fri, Apr 15, 2016 at 1:15 PM, sam <brko...@gmail.com> wrote: > Doh! Thanks, Glenn. Unfortunately I still have some holes in the map but > its starting to look considerably better. I will definitely looking to > using a TextureBuffer. > > On Fri, Apr 15, 2016 at 12:50 PM, Glenn Waldron <gwald...@gmail.com> > wrote: > >> Sam, >> I think you are not calling setNumElements() on your uniform array. You >> could also do that in the osg::Uniform constructor. >> >> Anyway, a uniform array of matrices is going to be limiting in terms of >> scale and speed -- I'd recommend a buffer object instead. (osgEarth uses an >> osg::TextureBuffer.) >> >> >> Glenn Waldron >> >> On Fri, Apr 15, 2016 at 2:35 PM, sam <brko...@gmail.com> wrote: >> >>> Hi All, >>> >>> I'm having some trouble getting my code to use hardware instancing. I've >>> referenced OSGEarth, DrawInstanced example, and a few different code >>> samples on the web. I've gotten pretty close but I seem to be at a bit of >>> an impasse. >>> >>> This screenshot shows what the map looks like with the default rendering: >>> >>> http://imgur.com/fKvunfd >>> >>> This screenshot shows what the map looks like after I apply my instance >>> rendering code to it: >>> >>> http://imgur.com/zZCzurr >>> >>> The map is composed of a lot of little nodes. I figured instanced >>> rendering would be helpful in this case. The map has ~4000 individual >>> nodes. Two of the nodes are repeated 465 and 266 times. I have trimmed down >>> my code and it is posted here: >>> >>> http://pastebin.com/ifSVSzD6 >>> >>> From what it looks like. Its rendering one copy of every nodes but not >>> anymore that that. I have commented out lines 215 to 224 as it doesn't work >>> at all. Any insight or help would be greatly appreciated. >>> >>> Thanks, Sam >>> >>> ___ >>> 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] Draw Instanced
Doh! Thanks, Glenn. Unfortunately I still have some holes in the map but its starting to look considerably better. I will definitely looking to using a TextureBuffer. On Fri, Apr 15, 2016 at 12:50 PM, Glenn Waldron <gwald...@gmail.com> wrote: > Sam, > I think you are not calling setNumElements() on your uniform array. You > could also do that in the osg::Uniform constructor. > > Anyway, a uniform array of matrices is going to be limiting in terms of > scale and speed -- I'd recommend a buffer object instead. (osgEarth uses an > osg::TextureBuffer.) > > > Glenn Waldron > > On Fri, Apr 15, 2016 at 2:35 PM, sam <brko...@gmail.com> wrote: > >> Hi All, >> >> I'm having some trouble getting my code to use hardware instancing. I've >> referenced OSGEarth, DrawInstanced example, and a few different code >> samples on the web. I've gotten pretty close but I seem to be at a bit of >> an impasse. >> >> This screenshot shows what the map looks like with the default rendering: >> >> http://imgur.com/fKvunfd >> >> This screenshot shows what the map looks like after I apply my instance >> rendering code to it: >> >> http://imgur.com/zZCzurr >> >> The map is composed of a lot of little nodes. I figured instanced >> rendering would be helpful in this case. The map has ~4000 individual >> nodes. Two of the nodes are repeated 465 and 266 times. I have trimmed down >> my code and it is posted here: >> >> http://pastebin.com/ifSVSzD6 >> >> From what it looks like. Its rendering one copy of every nodes but not >> anymore that that. I have commented out lines 215 to 224 as it doesn't work >> at all. Any insight or help would be greatly appreciated. >> >> Thanks, Sam >> >> ___ >> 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] Draw Instanced
Hi All, I'm having some trouble getting my code to use hardware instancing. I've referenced OSGEarth, DrawInstanced example, and a few different code samples on the web. I've gotten pretty close but I seem to be at a bit of an impasse. This screenshot shows what the map looks like with the default rendering: http://imgur.com/fKvunfd This screenshot shows what the map looks like after I apply my instance rendering code to it: http://imgur.com/zZCzurr The map is composed of a lot of little nodes. I figured instanced rendering would be helpful in this case. The map has ~4000 individual nodes. Two of the nodes are repeated 465 and 266 times. I have trimmed down my code and it is posted here: http://pastebin.com/ifSVSzD6 >From what it looks like. Its rendering one copy of every nodes but not anymore that that. I have commented out lines 215 to 224 as it doesn't work at all. Any insight or help would be greatly appreciated. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Linker errors when building with OSG_USE_QT
Hi, I have built OSG with CMake3.4.1 and VS2015 on Windows 10 already, however, I now want to build it to use Qt so I can incorporate it into Qt projects. I check off the OSG_USE_QT variable in CMake (I use the GUI) and generate just fine. However, when I build the solution in VS2015, I get a whole bunch of linker errors for the Qt and Qt-related projects (I was going to post a pastebin link to the errors, but I can't post links here, so here are a few of the errors; there are ~1400 of them): 2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMutex::QMutex(enum QMutex::RecursionMode)" (__imp_??0QMutex@@QAE@W4RecursionMode@0@@Z) referenced in function "public: __thiscall osgQt::GLWidget::GLWidget(class QGLFormat const &,class QWidget *,class QGLWidget const *,class QFlags,bool)" (??0GLWidget@osgQt@@QAE@ABVQGLFormat@@PAVQWidget@@PBVQGLWidget@@V?$QFlags@W4WindowType@Qt_N@Z) 2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMutex::~QMutex(void)" (__imp_??1QMutex@@QAE@XZ) referenced in function __unwindfunclet$??0GLWidget@osgQt@@QAE@ABVQGLFormat@@PAVQWidget@@PBVQGLWidget@@V?$QFlags@W4WindowType@Qt_N@Z$1 2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QMutex::lock(void)" (__imp_?lock@QMutex@@QAEXXZ) referenced in function "protected: void __thiscall osgQt::GLWidget::enqueueDeferredEvent(enum QEvent::Type,enum QEvent::Type)" (?enqueueDeferredEvent@GLWidget@osgQt@@IAEXW4Type@QEvent@@0@Z) 2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMutexLocker::~QMutexLocker(void)" (__imp_??1QMutexLocker@@QAE@XZ) referenced in function "protected: void __thiscall osgQt::GLWidget::enqueueDeferredEvent(enum QEvent::Type,enum QEvent::Type)" (?enqueueDeferredEvent@GLWidget@osgQt@@IAEXW4Type@QEvent@@0@Z) 2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QByteArray::~QByteArray(void)" (__imp_??1QByteArray@@QAE@XZ) referenced in function "public: static struct osg::GraphicsContext::Traits * __cdecl osgQt::GraphicsWindowQt::createTraits(class QGLWidget const *)" (?createTraits@GraphicsWindowQt@osgQt@@SAPAUTraits@GraphicsContext@osg@@PBVQGLWidget@@@Z) Any help is greatly appreciated. Thank you! Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66043#66043 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Multiple meshes with different animations
Hi All, I have successfully implemented the ability to setup my skeleton, geometry, rig geometry and weighting for a custom format. However, I'm unsure of how best to add multiple meshes to the scene graph that have independent animations. Currently I am loading a mesh file and then doing a clone using DEEP_COPY_ALL - this feels incorrect. Ultimately I'd like to be able to share the geometry across all the meshes in the scene but still have them animate independently. Is there an example that can point me in the right direction? Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Issue with texturing label
Hi Robert, The issue was with our image loader and not with the GUI itself. Once we managed to track that down the fix was pretty straight forward. Thanks. On Mon, Oct 26, 2015 at 1:02 PM, Robert Osfield <robert.osfi...@gmail.com> wrote: > Hi Sam, > > On 26 October 2015 at 17:52, sam <brko...@gmail.com> wrote: > >> What is the best way to send a small example through the mailing list? >> Pastebin? Inline? I'm not very familiar with how the mailing lists formats. >> > > One can normally just attach a .cpp file to post. > > Robert. > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSGWidget and Multiple Textures
Hi All, We are looking to do multi-texturing on OSG Widgets. For example we have a button with a left texture, a center texture, and a middle texture. What is the best way to go about applying all 3 to the button? Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Issue with texturing label
Hi Robert, What is the best way to send a small example through the mailing list? Pastebin? Inline? I'm not very familiar with how the mailing lists formats. Thanks, Sam On Mon, Oct 26, 2015 at 4:25 AM, Robert Osfield <robert.osfi...@gmail.com> wrote: > Hi Sam, > > > It's hard to know what is wrong without more concrete information on > exactly how you are setting things up, so I can only provide general > thoughts. > > First up, could well be blending as you suspect. Have a look at making > sure the texture quad doesn't have blending enabled somewhere, or blending > being enabled further up in the scene graph which is overriding the local > state. Another issue might be texture clamping of the texture. Clamp to > border, or setting the border colour of the texture. This is just > clutching at straws though, really don't know enough about the specifics of > how you are doing things to know what it might be. > > Robert. > > On 25 October 2015 at 19:56, sam <brko...@gmail.com> wrote: > >> Hi All, >> >> I'm struggling with finding out why I have some discrepancy between my >> texture and what my osg is drawing. I have setup a label and put a texture >> against it as follows: >> >> [image: Inline image 1] >> >> But unfortunately I get that thin white bar at the bottom of the label. >> It seems to change color based on what is below it. I have tried to turn >> off blending and change the blend function but no luck thus far. Any help >> would be greatly appreciated. Here is the original texture image: >> >> [image: Displaying b_gui_cmn_button5_center_up.png] >> >> Thanks, Sam >> >> ___ >> 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] Issue with texturing label
Hi All, I'm struggling with finding out why I have some discrepancy between my texture and what my osg is drawing. I have setup a label and put a texture against it as follows: [image: Inline image 1] But unfortunately I get that thin white bar at the bottom of the label. It seems to change color based on what is below it. I have tried to turn off blending and change the blend function but no luck thus far. Any help would be greatly appreciated. Here is the original texture image: [image: Displaying b_gui_cmn_button5_center_up.png] Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgWidget and Canvas
Hi All, When dealing with the osgWidget is it only intended to have one canvas? So when I create my window manager and other components is safe to also create the canvas? I guess some clarify of the canvas is what I'm after. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ffmpeg library version expected for OSG 3.2.3
Hi Robert, I'm attempting to use the latest git build of ffmpeg ( http://ffmpeg.zeranoe.com/builds/). I am going to try with 2.5.2 next. Would it be possible to get ffmpeg added to the dependencies package for OSG? I'll let you know how it goes. Thanks, Sam On Wed, Sep 9, 2015 at 7:45 AM, Robert Osfield <robert.osfi...@gmail.com> wrote: > Hi Sam, > > On 9 September 2015 at 00:24, sam <brko...@gmail.com> wrote: > >> What version of ffmpeg is required to use the plugin for OSG 3.2.3? When >> trying to use the latest build of ffmpeg; I get some undeclared identifier >> errors which seem to be caused by deprecation of some functions within >> ffmpeg. >> > > I don't have an official version number for which version the plugin will > work with - we try to get it compiling with what contributors have access > to/using at the time of release, but sometimes with projects like ffmpeg > the API can change so rapidly, or is distributed in different forms that it > ends up breaking quite soon. Thankfully there are very few API's out there > as rapidly changing as ffmpeg. > > Which version of ffmpeg are you trying to use? > > Robert. > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ffmpeg library version expected for OSG 3.2.3
Using ffmpeg 2.5.2 cleans up the compilation issues. I used a precompiled version of ffmpeg which was compiled with a prior version of VS so I do get a SAFESH warning. On Wed, Sep 9, 2015 at 9:26 AM, sam <brko...@gmail.com> wrote: > Hi Robert, > > I'm attempting to use the latest git build of ffmpeg ( > http://ffmpeg.zeranoe.com/builds/). I am going to try with 2.5.2 next. > Would it be possible to get ffmpeg added to the dependencies package for > OSG? I'll let you know how it goes. > > Thanks, Sam > > On Wed, Sep 9, 2015 at 7:45 AM, Robert Osfield <robert.osfi...@gmail.com> > wrote: > >> Hi Sam, >> >> On 9 September 2015 at 00:24, sam <brko...@gmail.com> wrote: >> >>> What version of ffmpeg is required to use the plugin for OSG 3.2.3? When >>> trying to use the latest build of ffmpeg; I get some undeclared identifier >>> errors which seem to be caused by deprecation of some functions within >>> ffmpeg. >>> >> >> I don't have an official version number for which version the plugin will >> work with - we try to get it compiling with what contributors have access >> to/using at the time of release, but sometimes with projects like ffmpeg >> the API can change so rapidly, or is distributed in different forms that it >> ends up breaking quite soon. Thankfully there are very few API's out there >> as rapidly changing as ffmpeg. >> >> Which version of ffmpeg are you trying to use? >> >> Robert. >> >> >> ___ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] ffmpeg library version expected for OSG 3.2.3
What version of ffmpeg is required to use the plugin for OSG 3.2.3? When trying to use the latest build of ffmpeg; I get some undeclared identifier errors which seem to be caused by deprecation of some functions within ffmpeg. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Visual Studio 2013 and OSG Header Files
Hey All, This isn't directly related to OSG but hopefully someone has the quick fix for this. How do I get visual studio intellisense to pick up the OSG header files and treat them as hpp files. Currently they are just treated as plain text. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visual Studio 2013 and OSG Header Files
Thank you, Chris. > On Sep 4, 2015, at 13:50, Chris Hanson <xe...@alphapixel.com> wrote: > > http://trac.openscenegraph.org/projects/osg//wiki/Support/FAQ#WhatcanIdotomakemyeditorrecognizeOSGheadersasCfiles > >> On Fri, Sep 4, 2015 at 2:47 PM, sam <brko...@gmail.com> wrote: >> Hey All, >> >> This isn't directly related to OSG but hopefully someone has the quick fix >> for this. How do I get visual studio intellisense to pick up the OSG header >> files and treat them as hpp files. Currently they are just treated as plain >> text. >> >> Thanks, Sam >> >> ___ >> 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 > Legal/IP • Code Forensics • Digital Imaging • GIS • GPS • osgEarth • Terrain > • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • > Android > @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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding custom updater to the Viewer
So I should keep it out of the viewer then? I guess I'm still a little unclear on how to integrate the rest of the systems so they get updated every frame. On Sun, Aug 30, 2015 at 7:50 PM, Tony Vasile ming...@gmail.com wrote: Hi Sam You probably don't want all you networking code in the same thread as the viewer thread, especially if the networking code could block. You would be better off using Update Callbacks to modify the scene when something changes. Tony -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64946#64946 ___ 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] Adding custom updater to the Viewer
Hi All, In my application class I'm currently inheriting the osg::Viewer and doing my own run function. It is basically a copy paste of the osg::Viewer function just so I can add my own custom update code for networking, entities, etc... Is there a way in osg I can do that without having to do this override? Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Animating Textures
Hi Laurens, I created a osg::StateSetCallback that took a osg::TexMat in the ctor and a delay variable. In the operator () I do a check to see if the delay has occurred and then I do a texMax-setMatrix with some incrementing variables. I then attach the callback to the geometries stateset. Thanks, Sam On Thu, Aug 27, 2015 at 12:48 AM, Voerman, L. l.voer...@rug.nl wrote: Hi Sam, I once solved this with an sequence of textureMatices, (example attached). Wat solution did you find? Regards, Laurens. On Thu, Aug 27, 2015 at 12:12 AM, sam brko...@gmail.com wrote: Nevermind! As always, simply searching OSG popped up what I needed. Thanks! On Wed, Aug 26, 2015 at 3:10 PM, sam brko...@gmail.com wrote: I can appreciate your stance on going to shaders, and I completely agree. I'd like to quickly prototype this up and swapping to shaders will, unfortunately, take me a little bit. Is there an example of modifying the texture matrix? Also would I be better of attaching an update callback to the state set itself? Thanks, Sam On Wed, Aug 26, 2015 at 3:04 PM, Sebastian Messerschmidt sebastian.messerschm...@gmx.de wrote: As always I'd suggest shaders, as fixed function pipeline has been deprecated 10 years ago ;-) You could use the osg_SimulationTime uniform to modify the uv-coordinates based on the time passed. Else you will need to modify the texture matrix each frame (like in the suggested callback) Cheers Sebastian Hi All, I have individual nodes that have textures on them that animate; That's to say the texture moves not the actual mesh. I've been trying to figure out how to accomplish this in OSG. Is there a way to define a texture matrix that does movement? The only other way I can think of is manipulating the UV coordinates in an update callback. Thanks, Sam ___ osg-users mailing listosg-users@lists.openscenegraph.orghttp://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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Animating Textures
Nevermind! As always, simply searching OSG popped up what I needed. Thanks! On Wed, Aug 26, 2015 at 3:10 PM, sam brko...@gmail.com wrote: I can appreciate your stance on going to shaders, and I completely agree. I'd like to quickly prototype this up and swapping to shaders will, unfortunately, take me a little bit. Is there an example of modifying the texture matrix? Also would I be better of attaching an update callback to the state set itself? Thanks, Sam On Wed, Aug 26, 2015 at 3:04 PM, Sebastian Messerschmidt sebastian.messerschm...@gmx.de wrote: As always I'd suggest shaders, as fixed function pipeline has been deprecated 10 years ago ;-) You could use the osg_SimulationTime uniform to modify the uv-coordinates based on the time passed. Else you will need to modify the texture matrix each frame (like in the suggested callback) Cheers Sebastian Hi All, I have individual nodes that have textures on them that animate; That's to say the texture moves not the actual mesh. I've been trying to figure out how to accomplish this in OSG. Is there a way to define a texture matrix that does movement? The only other way I can think of is manipulating the UV coordinates in an update callback. Thanks, Sam ___ osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] Animating Textures
Hi All, I have individual nodes that have textures on them that animate; That's to say the texture moves not the actual mesh. I've been trying to figure out how to accomplish this in OSG. Is there a way to define a texture matrix that does movement? The only other way I can think of is manipulating the UV coordinates in an update callback. Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Animating Textures
I can appreciate your stance on going to shaders, and I completely agree. I'd like to quickly prototype this up and swapping to shaders will, unfortunately, take me a little bit. Is there an example of modifying the texture matrix? Also would I be better of attaching an update callback to the state set itself? Thanks, Sam On Wed, Aug 26, 2015 at 3:04 PM, Sebastian Messerschmidt sebastian.messerschm...@gmx.de wrote: As always I'd suggest shaders, as fixed function pipeline has been deprecated 10 years ago ;-) You could use the osg_SimulationTime uniform to modify the uv-coordinates based on the time passed. Else you will need to modify the texture matrix each frame (like in the suggested callback) Cheers Sebastian Hi All, I have individual nodes that have textures on them that animate; That's to say the texture moves not the actual mesh. I've been trying to figure out how to accomplish this in OSG. Is there a way to define a texture matrix that does movement? The only other way I can think of is manipulating the UV coordinates in an update callback. Thanks, Sam ___ osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] Visual Studio Community 2015 Build Issues
Hi Robert, I successfully compiled OSG-3.4 RC 8 with Visual Studio 2015. I'll be sure to report let you know if I find any issues with the build. Thanks! On Sun, Aug 2, 2015 at 12:16 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Sam, Fixes these compile errors and warnings will requires binary changes to the OSG-3.2 branch so I think we'll need to just say that the OSG-3.2 branch works with prior versions of VS, such as VS2013 and before. In the prep for the OSG-3.4 release I have been able to make the required changes to VS2015 support so could you please try out OSG svn/trunk, the OSG-3.4 branch or one of the OSG-3.4 release candidate 8 that I tagged last Friday. Cheers, Robert. On 2 August 2015 at 06:52, sam brko...@gmail.com wrote: Hi All, I am trying to compile OSG 3.2.1 and running into the below issues: 1-- Build started: Project: osgViewer, Configuration: Debug Win32 -- 1 AcrossAllScreens.cpp 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(55): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(55): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(81): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(81): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(85): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(85): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgUtil/UpdateVisitor(99): warning C4456: declaration of 'callback' hides previous local declaration 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgUtil/UpdateVisitor(93): note: see declaration of 'callback' 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgViewer/ViewerBase(338): error C2249: 'osg::Object::operator =': no accessible path to private member declared in virtual base 'osg::Object' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/Object(197): note: see declaration of 'osg::Object::operator =' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/Object(52): note: see declaration of 'osg::Object' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgViewer/ViewerBase(338): note: This diagnostic occurred in the compiler generated function 'osgViewer::ViewerBase osgViewer::ViewerBase::operator =(const osgViewer::ViewerBase )' 1 PanoramicSphericalDisplay.cpp 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(55): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(55): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(81): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(81): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(85): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(85): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgUtil/UpdateVisitor(99): warning C4456: declaration of 'callback' hides previous local declaration 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgUtil/UpdateVisitor(93): note: see declaration of 'callback' 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgViewer/ViewerBase(338): error C2249: 'osg::Object::operator =': no accessible path to private member declared in virtual base 'osg::Object' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/Object(197): note: see declaration of 'osg::Object::operator =' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/Object(52): note: see declaration of 'osg::Object' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgViewer/ViewerBase(338): note: This diagnostic occurred in the compiler generated
[osg-users] Visual Studio Community 2015 Build Issues
=(const osgViewer::ViewerBase )' 1 GraphicsWindowWin32.cpp 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(55): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(55): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(81): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(81): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(85): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/OperationThread(85): note: virtual base classes are only initialized by the most-derived type 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgUtil/UpdateVisitor(99): warning C4456: declaration of 'callback' hides previous local declaration 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgUtil/UpdateVisitor(93): note: see declaration of 'callback' 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgViewer/ViewerBase(338): error C2249: 'osg::Object::operator =': no accessible path to private member declared in virtual base 'osg::Object' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/Object(197): note: see declaration of 'osg::Object::operator =' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osg/Object(52): note: see declaration of 'osg::Object' 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\include\osgViewer/ViewerBase(338): note: This diagnostic occurred in the compiler generated function 'osgViewer::ViewerBase osgViewer::ViewerBase::operator =(const osgViewer::ViewerBase )' 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\src\osgViewer\GraphicsWindowWin32.cpp(1641): warning C4838: conversion from 'int' to 'DWORD' requires a narrowing conversion 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\src\osgViewer\GraphicsWindowWin32.cpp(1641): warning C4838: conversion from 'unsigned int' to 'BYTE' requires a narrowing conversion 1D:\Programming\Libraries\OpenSceneGraph-3.2.1\src\osgViewer\GraphicsWindowWin32.cpp(2705): warning C4457: declaration of 'lParam' hides function parameter 1 D:\Programming\Libraries\OpenSceneGraph-3.2.1\src\osgViewer\GraphicsWindowWin32.cpp(2460): note: see declaration of 'lParam' 1 Generating Code... == Build: 0 succeeded, 1 failed, 7 up-to-date, 0 skipped == Is this an OSG issue or Visual Studio 2015? Thanks, Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] 2d Rectangle to 3d position
Hi All, I have a gui that I'm trying to convert over to the osgWidget system and I'm having an issue with understanding exactly how this will work. My 2d elements are stored as: rect = left, top, right, bottom rect = 0,449,640,480; How would I go about converting the above into the proper 3d points to pass to the add widget? Do I need to translate 2d screen space into some 3d coordinates, or? I feel like I'm missing something fundamental. Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Non-clamped texture coordinates
Hi All, I seem to be having an issue with texturing a mesh. The file format is not my own and its pretty obscure. I've gotten the format to load in a few other engines, but I'm struggling with the texturing in OSG. I've noticed the texture coords on the mesh don't clamp to [0,1]. Could this be causing me some issues and is there anything I have to do to get OSG to handle this correctly? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Approaching regions with many nodes
Hi Sebastian, Is this approach still valid with lots of little nodes that have no LOD detail against them? Or should I just tell my brain that the LOD part of the node isn't really applicable for what I'm doing and continue with your advice? Thanks, Sam On Mon, Jul 6, 2015 at 8:14 AM, Sebastian Messerschmidt sebastian.messerschm...@gmx.de wrote: Hi Sam, Hi All, I'm attempting to formulate the best way to stream in nodes that make up regions. These regions normally consist of anywhere between 4,000 to 6,000 nodes and end getting stitched together. My question is: Is the PagedLOD node what I want to use? I'm a little confused as to how the paging stuff works in OSG. Do I need to generate a tree (KD? Quad?). Do I then need to populate the tree and allow OSG to do its thing? Any guidance would be much appreciated. The paging is done via DataBase pager. You can leverage its power by using osg::PagedLOD. Try to organize your nodes in a quadtree and reference the contained regions with an pagedLOD. The pager will load them in the background. Cheers Sebastian Thanks. ___ osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] QT + OSG Performance Issues
When running the example osgViewerQt there is some serious lag / performance issues. Is there something I have to tweak or change in order to get a smooth QT + OSG integration? I'm running QT 5.4.1 and OSG 3.2.1. Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Approaching regions with many nodes
Hi All, I'm attempting to formulate the best way to stream in nodes that make up regions. These regions normally consist of anywhere between 4,000 to 6,000 nodes and end getting stitched together. My question is: Is the PagedLOD node what I want to use? I'm a little confused as to how the paging stuff works in OSG. Do I need to generate a tree (KD? Quad?). Do I then need to populate the tree and allow OSG to do its thing? Any guidance would be much appreciated. Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] File loading and reading
When it comes to OSG, is there a reader type class that will handle all the endianness of a file for you? Or is it up to the responsibility of the programmer creating the plugin to do the data reading? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trouble with transitioning to OSG
Hi All, I have a snippet of code that I am trying to reproduce using OSG, it was originally written in pretty raw gl with glm. You can view it here: http://pastebin.com/PYphHLYE I currently have the following snippet and the geometry references are all over the place. If somebody could take a quick look and see if I'm missing something fundamental, that would be great: http://pastebin.com/nhSzZGdu Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trouble with transitioning to OSG
I thought that would be taken care of when I do: auto pos = osg::Vec3(relPos[0], relPos[2], relPos[1]); That should swap the Z accordingly? Or am I missing the boat on this one. On Wed, Jun 24, 2015 at 3:25 PM, Jan Ciger jan.ci...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/06/15 00:13, sam wrote: Ah, I see. Throwing the parent matrix at the end of the multiplication puts the debug data in the correct place! Thanks, Jan. Only other issue is the model is coming in on its side compared to the basic viewer camera. OSG uses z-up convention, likely your model is exported y-up. You may want to rotate it by 90 degrees around the x axis. Regards, J. -BEGIN PGP SIGNATURE- Version: GnuPG v2 iD8DBQFViy5nn11XseNj94gRApweAKDIAGNUw4sUIb/OxJg5yB9fK3GB3gCfeUxN B75nRtPoU+Eibxo0W+tvnwY= =HlPi -END PGP SIGNATURE- ___ 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] Trouble with transitioning to OSG
Ah, I see. Throwing the parent matrix at the end of the multiplication puts the debug data in the correct place! Thanks, Jan. Only other issue is the model is coming in on its side compared to the basic viewer camera. On Wed, Jun 24, 2015 at 2:47 PM, Jan Ciger jan.ci...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24/06/15 22:50, sam wrote: Hi All, I have a snippet of code that I am trying to reproduce using OSG, it was originally written in pretty raw gl with glm. You can view it here: http://pastebin.com/PYphHLYE I currently have the following snippet and the geometry references are all over the place. If somebody could take a quick look and see if I'm missing something fundamental, that would be great: http://pastebin.com/nhSzZGdu If nothing else, be careful that OSG uses row major matrices and premultiplies - if v is a vertex, then its transformation is usually expressed as v' = M * v but in OSG you will have it as v' = v * M (and the matrices are transposed). J. -BEGIN PGP SIGNATURE- Version: GnuPG v2 iD8DBQFViyWFn11XseNj94gRAtTeAKCWh8pvzgVV/NKtNEBXpo0G2Ug0nwCeK2C+ 3y37pxcENvMBY2614Z4DvSA= =/ff0 -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] loading .obj file from c++
Hi, Sorry for this probably naive question, but I just started working with OSG. I've set up a VC++ project and I'm trying to load an obj file. I get an Unhandeled exception std::bad_alloc at memory location error. I tried to open the obj file using osgviewer and it works fine. The exception happens in the ReadFile file, at this statement: Code: return readNodeFile(filename,Registry::instance()-getOptions()); This is my basic code in c++: Code: #include osg\Node #include osgDB\ReadFile using namespace osg; int main(){ ref_ptrNode node = osgDB::readNodeFile(C:/Users/Sam/Debby.obj); return 0; } I'm thinking this might have to do with the plugins not activated or linked somehow? I'm attaching the obj file if anyone wants to test it. I also tried to run any other .osg files that come with the distribution, but with the same error. Thanks a lot for any pointers, and apologies in advance if this is too basic, but I tried to look for solutions with no luck. ... Thank you! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59086#59086 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] loading .obj file from c++
Thanks all. @Sebastian: I'm using Windows 7, 32bit, Visual Studio 2012. I'm using the binaries, this is the version: OpenSceneGraph-3.0.1-VS10.0.30319-x86-release-12741 The file size is 875KB. Attached is the obj file (with its mtl file) I only have one version of OSG on the machine. @Tialano: I did that now. But I don't get any additional information when running the code. This is the output on the console before the exception is thrown. Code: First-chance exception at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x004AF9E4. First-chance exception at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x004AF1A0. First-chance exception at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: [rethrow] at memory location 0x. Unhandled exception at at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x004AF1A0. OSG.exe has triggered a breakpoint. First-chance exception at 0x522A5BF4 (osg80-osgDB.dll) in OSG.exe: 0xC005: Access violation writing location 0x7453C7EC. Unhandled exception at 0x522A5BF4 (osg80-osgDB.dll) in OSG.exe: 0xC005: Access violation writing location 0x7453C7EC. ... Thank you! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59105#59105 Attachments: http://forum.openscenegraph.org//files/debby_182.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Writing to the Depth Buffer (Kinect)
Thanks guys, I ended up using a fragment shaders which was a new experience for me. Ran into a loss of precision problem as the Kinect produces a 16-bit depth image but when stored as GL_DEPTH_COMPONENT each RGB channel only has 8-bits of precision in the shader. I ended up having to store it with internal format GL_RGB5_A1 and datatype GL_UNSIGNED_SHORT_5_5_5_1 (any other 16-bit format/datatype pair would do) and manually unpack it in the shader to get the full precision. Cheers Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44634#44634 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Writing to the Depth Buffer (Kinect)
Hi, I am working on an augmented reality project using the Kinect. I am trying to occlude geometry based on the depth image produced by Kinect. To do this I thought I'd write the depth image (after scaling the depth values appropriately) to the depth buffer. It looks as though I'd use glDrawPixels() with GL_DEPTH_COMPONENT if I was doing it in OpenGL, but how do I achieve this in OSG? I'm also open to a better way of using the Kinect to occlude geometry if anyone has any ideas. Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44352#44352 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Using the FBO to access and potentially modify pixels
Hi all, I'm fairly new to osg and graphics programming in general, so please bear with me :) I am looking to retrieve the pixels from my scene after everything (except the post processing/overlay stuff) has been rendered. I need to get this every frame to perform some simple image analysis of the scene which then will effect how the final frame is displayed. The main catch is I need this to be fast so that I don't take any major performance hits. I plan to use a PostDrawCallback, but does the FBO allow me to avoid calling glReadPixels or speed it up at all? If so how do I set it up to do so? Or are there any other ways to avoid copying to main mem? Also, after the PostDrawCallback is it possible to still use a frag shader to modify the scene after I perform my analysis, or do I have to modify the pixels in my callback function? Any suggestions or advice is greatly appreciated. Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44151#44151 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visitor concept. No finalize?
This would require the user to be aware of the fact that the Visitor has not finished its work after dtor is called. This is even more user unfriendly in my point of view. Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35988#35988 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visitor concept. No finalize?
Hi Robert, the second half of my post is about the second option you was talking about. The apply only gathers the nodes in question and does nothing else then there is another method that performs the removal from parent. But the issue with that is, that if I do not call this method, no removal is done. That was, what I was talking about. The visitor finished its work but as long as the user do not call an additional method the removal from parent has not been done yet. I was hoping for a finish method that is automatically called after the visitors work has been finished. This finish method could then perform the necessary removal operation (or any other). Thank you! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35944#35944 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visitor concept. No finalize?
Hi Robert, I am aware of the possibility to define my own methods in the visitor but the point I was trying to explain is, that if I apply a visitor on a scene I would except that this visitor has finished its work after calling the node-accept(myVisitor) If I have a RemoveXVisitor and I as the user and not the writer of it use this visitor as I am used to use them by Code: RemoveXVisitor v; node-accept(v); I would expect that the Visitor has done it's work, which it actually didn't since there is no finalize method I would need to write: Code: RemoveXVisitor v; node-accept(v); v.doTheJobActually(); So there is a discrepancy between what I would except from a visitor after it was passed to accept and what a visitor is able to do in it's apply method Greetings Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35950#35950 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visitor concept. No finalize?
Hi Robert, I suppose I expect that because let's say a RemoveGroupsVisitor should remove Groups from a given graph, when I apply this visitor to a scene by Code: RemoveGroupsVisitor r; scene-accept(r); I personally would expect that now the groups are removed, which they are not by the limitation of the apply methods Regards Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35952#35952 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visitor concept. No finalize?
Hi, that is exactly the point. My RemoveXVisitor SHOULD remove nodes but since it is not possible to do that in apply and there is no finalize method that gets automatically called after accept has finished, it is only possible to remove nodes by providing a custom member which the user must call manually. That is what I am talking about, it is not possible for a Visitor to do certain things without having the user explicitly call members of it after the accept call. I did not demand a finalize method and I understand Robert's statement that flexibility is achieved by relying on the user. Never the less would a finalize method decrease any flexibility and power of it. (Btw: I have never experienced that handing over responsibility to the user (which is the developer at this point) produced any good results, but this is only my experience) Thanks, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35965#35965 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Visitor concept. No finalize?
Hi, I was writing a Visitor that performed an extraction of certain elements from a scenegraph. My first try was to remove the nodes in question from their parents directly in the apply method which lead to some exceptions. So what am I doing wrong? I mean I would except some finalize method which is called when the visitor is finished. Currently the only remaining function is the getter function for the nodes, that should be extracted. So in apply I have stored references to the object which I can only extract when using the getter so that the removal logic can be executed. This works so far but if I do not call the getter no extraction code is executed and nothing really happened. What am I doing wrong? Thank you, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35941#35941 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv
Hi Yurii, I followed your instructions and rebuilt OSG libraries. Then I rebuilt my app and tried it. It worked. Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33476#33476 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] How to use the DatabasePager
Hi, I am converting an application that uses Performer to work with OpenSceneGraph in place of Performer. In my application, the paging is done by adding a Callback using pfDBaseFunc in which all paging is performed. I looked for a similar Callback in the DatabasePager class and could not find one. So, how can I convert the functionality of my pfDBaseFunc callback? Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33480#33480 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv
Hi Robert, I am linking with OpenThreads. About the Makfile: The application that I am trying run with intersection checks from OSG has its own Makefile that I do not want to change other than adding the includes and libraries from OSG. Since, that procedure is giving me the undefined symbol error I am now trying to compile and run the osgintersction example using your recommended build procedure for examples. I ran cmake and make in the OpenSceneGraph folder to create the libraries. However, there were no Makefiles generated for the examples. That's why I went to the OpenSceneGraph/examples/osgintersection folder and ran cmake. Then I run into cmake not recognizing SETUP_EXAMPLE project. What I like to know is whether you have the examples setup to have Makefiles created using cmake or we just write our own Makefile and link with the libraries just like I did with my application. If you have the examples set up to have Makefiles generated thru cmake, I probably am not following the correct procedure and that is probably why I am runni ng into the SETUP_EXAMPLE problem. Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33260#33260 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv
Hi, When I run my application (on Linux Debian) which has call to do intersection tests, I get: undefined symbol: ZN11OpenThreads6AtomicmmEv when the application is trying to call addIntersector() function of the osgUtil::IntersectorGroup. In my application's Makefile I only link with libOpenThreads.so, libosgDB.so and libosgTerrain.so. Is that not enough or is it some other problem? Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33104#33104 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv
Hi Robert, My debian version is 5.0.2. When I type gcc -v on my system the response is (along with bunch of other information): gcc version 4.3.2 (Debian 4.3.2-1.1). Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33150#33150 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv
Hi Robert, The problem may be in the way I am linking with OSG libs in my Makefile. To check that I tried to create a Makefile for the osgintersection example. when I run cmake I get the following: The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at CMakeLists.txt:7 (SETUP_EXAMPLE): Unknown CMake command SETUP_EXAMPLE. CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run cmake --help-policy CMP. This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred! Please help to get this resolved. Then I can check whether I can run this example in my system. If I am successful I will compare the Makefiles and hopefully that will resolve the udefined symbol problem. Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33157#33157 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Swapping ref_ptr
Hi, I am in a situation where I receive a osg::ref_ptrGroup to which I should add a Transform Node (or basically prepend it) Usually the group I receive is in a hierarchy of nodes, so I was thinking about getting parents of this group, removing this group as a child and add the Transform instead. But is there a better way? Since I actually do not know anything about the parents of the group it is also possible that there is no parent yet so the exchange is getting difficult. Now I am wondering if it is possible and safe to swap the inner pointer of the ref_ptr. Basically my functions looks like Code: void foo (osg::ref_ptrosg::Group myGroup) { // do something osg::ptr_refosg::MatrixTransform mat = new MatrixTransform; // change myGroup.swap(mat); } Which is called from a parent function like Code: void parentFoo() { osg::ref_ptrosg::Group myGroup = new osg::Group; foo(myGroup); // now I need myGroup to point to MatrixTransform without noticing it } Is this going to work? I have no compiler on this maschine to test right now so I am just assuming and browsing the docs. Thank you! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29515#29515 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Swapping ref_ptr
Hi, passing a ref_ptr by reference. This sounds somehow strange to me. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29517#29517 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] gDebugger see memory leaks in 14 lines of set up code when FBOs are used
Hi, I spent the whole day chasing a weird memory leak on my GPU. The following code is part of a (not working well) FBO render solution. Code: #include osg/CameraNode #include osgViewer/ViewerEventHandlers void foo() { osg::ref_ptrosg::Camera c = new osg::Camera(); c-setCullingMode(osgUtil::CullVisitor::VIEW_FRUSTUM_CULLING); // Disable SMALL_FEATURE_CULLING c-setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR); c-setClearColor( osg::Vec4(1.0, 1.0, 1.0, 0.0) ); // default white c-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); c-setReferenceFrame(osg::Transform::ABSOLUTE_RF); c-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); c-setRenderOrder(osg::Camera::PRE_RENDER); osg::ref_ptrosg::Group topg = new osg::Group; topg-addChild( c); osgViewer::Viewer viewer; viewer.setSceneData(topg); viewer.realize(); viewer.frame(); } int main(int argc, char* argv[]) { { { foo(); } } return 0; } When I run this with dDebugger I get memory leaks. Call stack: osgViewer::GraphicsWindow::makeContextCurrentImplementation - osg55-osgViewerd.dll osgViewer::GraphicsWindow::makeContextCurrentImplementation - osg55-osgViewerd.dll osgViewer::GraphicsWindow::makeContextCurrentImplementation - osg55-osgViewerd.dll osgViewer::GraphicsWindow::makeContextCurrentImplementation - osg55-osgViewerd.dll osg::LineSegment::start - osg55-osgd.dll osgViewer::GraphicsWindow::makeContextCurrentImplementation - osg55-osgViewerd.dll osgViewer::GraphicsWindow::makeContextCurrentImplementation - osg55-osgViewerd.dll foo - osg_viewer_leak_test.cpp, line 22 main - osg_viewer_leak_test.cpp, line 31 __tmainCRTStartup - crtexe.c, line 597 mainCRTStartup - crtexe.c, line 413 RegisterWaitForInputIdle - kernel32.dll These are two render buffers and one FBO when I change the Code: c-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); from FRAME_BUFFER_OBJECT to FRAME_BUFFER - Code: -setRenderTargetImplementation(osg::Camera::FRAME_BUFFER); No leak occurs. Win XP Pro, SP 2, GeForce GTX 285, Driver 191.07 gDebugger 5.2.1 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28363#28363 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple Loading Tutorial
Hi, Thanks Paul, just a question - where you are loading cow.osg - how do i define where this is kept? Ive just got the pdf you linked so will have a read. ... Thank you! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20514#20514 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple Loading Tutorial
Thanks for that- I have tried to get the osg wiki FAQ/tutorials but the site has been down since Wednesday so having trouble getting to them at the moment. When I run the code to load a simple object (that you supplied above) with a direct path, I get no errors but osgviewer seems to load nothing, just the default blue background with no model. Ive tried different .osg and .obj files but no luck. Thanks for your help to a newbie! Sam. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20520#20520 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Simple Loading Tutorial
Hi all, I've recently been trying to get my head around OSG, been trying the inbuilt examples and am not getting very far. I thought i'd check out the OSG tutorials but the site seems to have been down for the last few days now. Is there any specific example that I should be looking at just to learn how to load a model into OSG, as some seem a little more complex than this. Hopefully that made sense, cheers ... Thank you! Cheers, s -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20490#20490 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] zbuffer issue
Hi, thanks for all the reply like colin noted, the render problem vanished as i stripped off the offsets which caused the large coordinates and work now with localized coordinates. if i ever need to display the real coordinates in an text-insert, i can re-add the stripped offset before display them. Thank you! Cheers, Christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13990#13990 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] zbuffer issue
i forgot three things to mention: 1.) as i mentioned above, i place adjacent trees into one geometry. e.g. a geometries' vertex-array has numberOfAdjacentTrees*8 (=double quads ) entries. but i use only one primitiveSet to construct the geometry. i hope this is okay. geometry-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS, 0, vertices-size())); 2.) the geometries aren't generated from back to front. 3.) the problem also occurs when i don't use blending, alphafunc or even textures. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13968#13968 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] zbuffer issue
Sorry, for another posting: i just tested the original one drawable per tree implementation with such large coordinates again and noticed that it also tends to flicker, as well hidden faces were revealed also. i couldn't encounter the outer mentioned problems. thanks in advance, christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13970#13970 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] get the x-axis angle of a rotation
Hi james, regarding your last post, did you mean that you also tried to extract angles from a rotation with the website's matrixToEuler or a similar approach, but you encountered problems that were depended on your current camera-orientation? i think the same happened to me: i wanted to get the pitch-angle of the camera-orientation, to adjust the camera looking straight forward in certain cases. (think of some: reset view, but only for the pitch angle). i encountered that multiplying with the inverse rotation matrix of that angle didn't work if a left or right camera-rotation has been done before. (actualy these negative-effects were only obvious when left/right rotation was larger than 45°. so i don't know if also minor yaw-rotations did harm, or only rotations exceeding a 45° threshold) in the end, it put out that i had to build the adjustment-rotation matrix not with the pitch but the roll angle of the current camera-rotation in cases of previous left/right camera-rotations from 45° to 135° (respectively -45° to -135°) 3.) i'm not sure what you are meaning with ..it was not a success.. does the attachment you included work, and won't it suffers from symptoms, like described above? Thanks in advance, Christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13519#13519 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] get the x-axis angle of a rotation
Hi james, thanks for the quick reply, now everything is clear. Best regards, Christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13531#13531 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org