Re: [osg-users] Geographic earth in OSG?
Hi, True. There is no problem with osgearth as it has well wrapped with projection information. I did not face any issue with that. But the samething when tried with OSG alone, i observed some issues. I put the pbm this way, suppose for given latitude and longitude as 11.0 and 77.0 (to be in radians) and to the resultant (x,y,z) of ellipsoid->converLatLonHtToXYZ(..), an object was attached. The object placement is not exactly over that latitude and longitude. It lies totally somewhere else on the globe. I think it is projection issue. Is anybody tried this out??? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47738#47738 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Heading away for another trip
Hi All, I'm off on another trip for a few days, will be back catching up with public life of the OSG next Monday. Have fun :-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Lines not showing when zoomed in orthographic projection
My first suspicion would be that the modelview and projection matrices are configured incorrectly such that the clip coordinate geometry xyz values are ending up outside the -w to w range. But then you mentioned AutoTransform. Without looking at the code, I'd wager that scaling an object to a constant screen size almost certainly depends on the projection matrix. And, based on typical OSG usage, I imaging AutoTransform has had almost zero testing in an orthographic projection scenario. I suggest you try to replicate your issue without AutoTransform. If the problem goes away, then you would know that the issue is related to AutoTransform, and you can look at mods to AutoTransform.cpp to better support ortho. On the other hand, if the problem persists, then you know it's unrelated to AutoTransform, and you can go back and check the linear algebra you used to set up your matrices. -Paul On 5/15/2012 1:07 PM, Michael Schanne wrote: Hi, We have a scene with one osg-loaded object. When we load our scene, our camera projection (ortho) is zoomed such that the object is not visible in the graphic window. Our code then dynamically adds 2 new lines to the scene at a location corresponding to the center of the screen, but these lines are not visible. Only when we zoom out (by changing the camera ortho projection) to a level where the pre-loaded object appears, then the 2 lines appear on the screen. We also noticed a second scenario similar to this, in which we will first pan our camera far to the left, then zoom out, but the pre-loaded osg object does not show. It will only appear when we pan back near to the object location, and zoom in again. We are using AutoTransforms for our drawn objects to have them be a constant size and rotation as we pan and zoom the camera. We are not sure if this is a culling issue or something else. What could be causing this behavior? Thank you! Cheers, Michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47733#47733 ___ 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] Lines not showing when zoomed in orthographic projection
Hi, We have a scene with one osg-loaded object. When we load our scene, our camera projection (ortho) is zoomed such that the object is not visible in the graphic window. Our code then dynamically adds 2 new lines to the scene at a location corresponding to the center of the screen, but these lines are not visible. Only when we zoom out (by changing the camera ortho projection) to a level where the pre-loaded object appears, then the 2 lines appear on the screen. We also noticed a second scenario similar to this, in which we will first pan our camera far to the left, then zoom out, but the pre-loaded osg object does not show. It will only appear when we pan back near to the object location, and zoom in again. We are using AutoTransforms for our drawn objects to have them be a constant size and rotation as we pan and zoom the camera. We are not sure if this is a culling issue or something else. What could be causing this behavior? Thank you! Cheers, Michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47733#47733 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geographic earth in OSG?
Also, consider using osgEarth. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trying to build OSG terrain
Hi, If you're having build errors, make sure you're using the correct version of VPB (i.e. osgdem or vpbmaster) with the correct version of OSG. You cannot arbitrarily mix and match different versions... -Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47729#47729 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geographic earth in OSG?
osg::EllipsoidModel *ellipsoid = new osg::EllipsoidModel(); ellipsoid->convertLatLongHeightToXYZ(osg::DegreesToRadians(lat), osg::DegreesToRadian(lon), Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47728#47728 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Geographic earth in OSG?
Hi, I created virtual earth as follows, osg::Node* createEarth() { osg::TessellationHints* hints = new osg::TessellationHints; hints->setDetailRatio(5.0f); osg::ShapeDrawable* sd = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0,0.0,0.0), osg::WGS_84_RADIUS_POLAR), hints); osg::Geode* geode = new osg::Geode; geode->addDrawable(sd); std::string filename = osgDB::findDataFile("Images/land_shallow_topo_2048.jpg"); geode->getOrCreateStateSet()->setTextureAttributeAndModes(0, new osg::Texture2D(osgDB::readImageFile(filename))); osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode; csn->setEllipsoidModel(new osg::EllipsoidModel()); csn->addChild(geode); return csn; } But with the above ellipsoidal model I could not locate any geographic location accurately. Means that, not able to locate any position for given latitude and longitude accurately. What should be done more? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47727#47727 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ref_ptr with getParents
Thanks a lot, just what I needed. See ya, Bob -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47726#47726 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ref_ptr with getParents
Hi, Bob inside for(...) cycle: osg::ref_ptr parent(*parent_it); As for why parents are stored by regular ptrs - in this case it is like weak ptr... parent itself hold ref_ptr of childs, so when parent removed from graph child can be freed if not referenced in other places. If childs would hold parents ref_ptr this would create cycled dependencies for referenced objects. Cheers. 15.05.2012, 18:24, "Bob Slobodan" : > Hi, > > For my whole project I followed the advise in the start up guide and used > only ref_ptr (even when it's not necessary). And now I have some problem with > the getParents function of the class Node. > > I need to get the list of parents of a node and I use ref_ptr. The problem is > that the function seems to return only regular pointers and I can't get my > ref_ptr. > > Here is my code > > Code: > > parents = tmp->getParents(); > vector::iterator parent_it = parents.begin(); > vector::iterator parent_end = parents.end(); > > for( ; parent_it != parent_end ; parent_it++){ > osg::Group* parent = *parent_it; > //TODO > } > > Where tmp is a ref_ptr. And instead of having parent as a > osg::Group*, I want to have a ref_ptr (because I then store it > somewhere and I might need it later). > > So does anyone know what I could do ? > > Thanks, > Bob. > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47724#47724 > > ___ > 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] ref_ptr with getParents
Hi, For my whole project I followed the advise in the start up guide and used only ref_ptr (even when it's not necessary). And now I have some problem with the getParents function of the class Node. I need to get the list of parents of a node and I use ref_ptr. The problem is that the function seems to return only regular pointers and I can't get my ref_ptr. Here is my code Code: parents = tmp->getParents(); vector::iterator parent_it = parents.begin(); vector::iterator parent_end = parents.end(); for( ; parent_it != parent_end ; parent_it++){ osg::Group* parent = *parent_it; //TODO } Where tmp is a ref_ptr. And instead of having parent as a osg::Group*, I want to have a ref_ptr (because I then store it somewhere and I might need it later). So does anyone know what I could do ? Thanks, Bob. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47724#47724 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Error while running the Sample program in book
Hi, I'm reading OpenSceneGraph 3.0 Beginners Guide. When I tried to run the first sample program, I get the following error: "The program can't start because osg80-osgDBd.dll is missing " But I have configured all environment variables correctly as given. %OSG_BIN_PATH% is declared and also appended to PATH. I could locate the particular file inside /bin directory. Here's the code: #include #include int main(int argc, char** argv){ osgViewer::Viewer viewer; viewer.setSceneData(osgDB::readNodeFile("cessna.osg")); return viewer.run(); } PS: I'm also trying to figure out why calling "osgviewer" and "osgversion" didn't work in CMD. Any idea? Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Display the texture of the OSG modele on Android
Hi, Thank you for the advice. I'm currently developing an android application used to view osg models (containing textures). Can you just tel me if the shader programming will be made for each model separately or for the viewer to allow the display of textures. Thank you! Have a good day.:) Cheers, Rghima -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47722#47722 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Load images from resources file (rc)
Hi, Hector This solution is quite general and you dont need to change other code to load from different resource's locations (and for about two pages of code you can load all kind of objects loadable with osgDB, usually you need to override only 3-4 functions like readObject (f.e. used for ttf fonts loading), readNode, readImage, readShader). I successfully use this approach for loading from cyphered archives and qt resources. Cheers. 14.05.2012, 09:29, "Héctor Martínez" :Hi, thank you for your reply. Sorry I didn’t see the answer the other day. While I was waiting for an answer, I solved it by loading the resource with Qt and converting the image to OSG.Anyway, it is interesting the solution you provide, so I may try to implement it at some point. Thank you! Cheers! From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sergey PolischukSent: viernes, 11 de mayo de 2012 10:46To: OpenSceneGraph UsersSubject: Re: [osg-users] Load images from resources file (rc) As long as you know how to get raw data stream from wherever your resources are - you can write osgDB::ReadFileCallback where you override methods like MyReadFileCallback::result_tMyReadFileCallback::readObject(const std::string& filename, const osgDB::Options* options){ //create stream which contain unpacked data of your file int ext_pos; if ((ext_pos = filename.find_last_of(".")) > 0) { std::string fileext = filename.substr(ext_pos + 1); osgDB::ReaderWriter* rw = osgDB::Registry::instance()->getReaderWriterForExtension(fileext); if (rw) return rw->readObject(stream, options); } return MyReadFileCallback::result_t();} You should register your read file callback in osgDB::Registry with osgDB::Registry::instance()->setReadFileCallback(...) prior to loading stuff.Cheers,Sergey 11.05.2012, 11:07, "Héctor Martínez":Hi, does anybody know if it is possible to load images from a ‘.rc’ file in osg using osgDB::readImageFile? Thanks in advance___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___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
Re: [osg-users] Building new website, assistance appreciated!
Hi Tom, I have added some in your iOS article to get the colored quads and respect the style. It's something I have to write in the author's guide. Thanks for the help! :) Cheers. 2012/5/15 Thomas Hogarth > Hi Guys > > I have had a chance to finish the IOS CMake doc > > > http://www.openscenegraph.com/index.php/documentation/platform-specifics/ios/23-configuring-cmake-for-ios > > I went along with it as I wrote it (Robert I've submitted a small change > to CMakeLists.txt to make the tutorial simpler). > > I'll make a start moving the other platform specific sections to the new > site and update the migration tasks as I go. > > Cheers > Tom > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47701#47701 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Display the texture of the OSG modele on Android
Hi, Programming shaders is something that I can't teach to you, and is something related to OpenGL more than to OSG. I can point you to the OpenGL Orange book, hopefully you get more background of this general questions. I didn't code any environmental mapping shader so I cannot give you any code. But I think it's worth you learn basic OpenGL shaders and then go for something more complicated. Anyway, I guess at this point, probably, you don't need to show environmental mapping textures, only to show textures. So go and try other model which do not use environmental textures. Cheers. 2012/5/15 Rghima Ahlem > Hi, > > I'm a new an osg. Have you a sample of a shader? > > Thank you! > > Cheers, > Rghima > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47717#47717 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Display the texture of the OSG modele on Android
Hi, I'm a new an osg. Have you a sample of a shader? Thank you! Cheers, Rghima -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47717#47717 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT and new color_buffer binding per frame.
It was not sarcastic, I really thought it is a common case (looks like at least there is a special class: OverlayNode, which tries to address similar functionality ;) ). I will try to discover, what is osgSim::OverlayNode all about. But here we again face the documentation problem. The only real documentation is the source code, what is the best example to start with? The grep has found OverlayNode in osganimate.cpp, osgfadetext.cpp, osgsimulation.cpp and osgspheresegment.cpp. I am not the best candidate to documenting the osg -- I know far too less about it, and have myself far too many questions. But just in case: which way can the comments be contributed to the project? Thank you! Cheers, Alexej -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47716#47716 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Display the texture of the OSG modele on Android
Hi, This question has been aswered several times in this list. This is not a problem related to OpenSceneGraph. Environmental mapping is NOT SUPPORTED in GLES1, so if you want to show environmental mapping textures you have to code a shader yourself. Cheers. 2012/5/15 Rghima Ahlem > Hi, > > I have build OSG3.0.1 for android with GLES1 and armeabi.I build the > project osgAndroidExampleGLES1 and ruin it on the devise. > I can display the cow.osg but whithout texture. > No way to display the texture on Android. > I found that the Environmental mapping does not work. This problem is > fixed or not until now? > [Question] [Question] [Question] > > Thank you! > > Cheers, > Rghima > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47714#47714 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Display the texture of the OSG modele on Android
Hi, I have build OSG3.0.1 for android with GLES1 and armeabi.I build the project osgAndroidExampleGLES1 and ruin it on the devise. I can display the cow.osg but whithout texture. No way to display the texture on Android. I found that the Environmental mapping does not work. This problem is fixed or not until now? [Question] [Question] [Question] Thank you! Cheers, Rghima -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47714#47714 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT and new color_buffer binding per frame.
Hi Alexej, On 15 May 2012 10:41, Alexej Fink wrote: > Sorry for confusing, I thought the job of exchanging a color target in a > static rendering context is common enough. My bad. We don't need the sarcasm, it doesn't help solve anyone problems. > I have a GIS environment with mixed flat (2d) and 3d geometry. I want to > pre-render the flat geometry together with the ground images into the final > surface gl-textures, which I then use in the 3d scene-graph. The 2d geometry > is managed by a separate scene-graph, which I use to generate the ground > tiles by using a RTT camera. > > The ground-tile rendering happens by repositioning the RTT camera over the > dirty area and passing the related texture object reference to the > CullCallback, which tries to replace the color buffer binding with the passed > texture before the camera does the rendering. Then I call frame() on the > groundViewer instance to trigger the rendering. It all works, but the cheap > color buffer changing. Thanks for the explanation. It sounds like you are rendering the 2D data as an overlay, but backing into into the base texture. Might I recommend rather than baking it in you use mulit-texturing and considering using a feature like osgSim::OverlayNode to render the overlay texture that can then be rendered onto the terrain. I believe osgEarth has a similar feature as well, not sure if it reuses OverlayNode or provide a more advanced one. The advantage of decoupling is that you don't need to worry about tile alignment and can take advantage of view dependent texturing which is good to providing high quality texturing near the eye point. > Regarding the documentation, it would help a lot, if the member-functions and > their parameters would be documented (as usual for a public API). I know, > everybody has always less time for that, but it would be a great help for all > the OSG users, especially for the newbies. You sound like an ideal volunteer to help out with documentation ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] why is userData instance is not dereferenced on node deletion?
Hi folks, // OSG 3.0.1 I currently observe, that my userData instances (derived from osg::Referenced) are not dereferenced, if I delete the carrying node instance. The ref counter in myUserData instance gets incremented by calling node->setUserData(myUserData). But if delete the node (by calling parent->removeChildren(0,childCount)), the ref counter remains as is. Is this behavior intended (cannot imagine that)? The same is observed, if using osg::UserDataContainer. I would expect the ref counter be decremented, if the carrying node has been deleted. And the userData instance deleted (on ref_count==0). Do I something wrong? Thank you! Cheers, Alexej -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47712#47712 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT and new color_buffer binding per frame.
robertosfield wrote: > Hi Alexej, > The main question I have, and I'm sure others have is, what are you > trying to do and why. Providing low level advice when one doesn't know > the high level context is likely to be mis-directed and mis-informed. Sorry for confusing, I thought the job of exchanging a color target in a static rendering context is common enough. My bad. I have a GIS environment with mixed flat (2d) and 3d geometry. I want to pre-render the flat geometry together with the ground images into the final surface gl-textures, which I then use in the 3d scene-graph. The 2d geometry is managed by a separate scene-graph, which I use to generate the ground tiles by using a RTT camera. The ground-tile rendering happens by repositioning the RTT camera over the dirty area and passing the related texture object reference to the CullCallback, which tries to replace the color buffer binding with the passed texture before the camera does the rendering. Then I call frame() on the groundViewer instance to trigger the rendering. It all works, but the cheap color buffer changing. Regarding the documentation, it would help a lot, if the member-functions and their parameters would be documented (as usual for a public API). I know, everybody has always less time for that, but it would be a great help for all the OSG users, especially for the newbies. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47710#47710 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT and new color_buffer binding per frame.
Hi Alexej, On 15 May 2012 09:58, Alexej Fink wrote: > The problem is not the re-rendering of a single tile. The job is to re-render > a tile subset from a collection of tiles (each tile has an unique texture > object bound to it). So why are you re-rendering tiles? Shadows? Other effects? You'll need to provide some context for others to understand what you are trying to do. A single sentence doesn't cut it when you are talking about a very custom technique that you have in your head. > Assuming I will do it this way. > > 1. Will I have to enable/disable cameras in relation with the dirty state of > the tile? (otherwise all cameras will re-render the tiles, even these, with > no changes). NodeMask's, osg::Switch or custom Node callbacks that override the traversal all can be used to toggle on/off the RTT Camera's at runtime. > 2. What about the rendering context for each camera? Does it not produce > extra costs? E.g. the depth RenderBuffer (which could be shared using > render-target exchange approach) and other meta data (as I understand from > RenderStage::runCameraSetUp(..)) When your use FBO's each Camera shares the main graphics context that they are assigned to, so there is no context switching. The only state changes that are made when reusing Camera is what you'll have when rendering any RTT Camera, there is no additional overhead. > It may be wrong: osg is not easy to understand, especially since the most > classes do not even describe their main purpose (in doxygen). Advanced scene graphs with lots of functionality won't always be easy to understand. The lower level and more custom usage the more you'll need to understand the internal complexities. This isn't easy to master, more/better documentation will help but in the end it's still pretty complicated, especially if you are trying to come up with unusual and non standard techniques. This is why I'm trying to push you to explain what and why you are trying to do, often users come up with overly complicated ways to solve problems they are easy to solve if only they stop premature deciding what the best solution is to their problem. > But for me, the approach with changing the render color target looks still > more efficient, assuming I can change the color binding in a fast and > light-way manner. Um I know the scene graph better than you, and perhaps you know your problem better than I, but without you telling us what you are trying to achieve rather than how we have no way to judge this. > Because all camera parameters stay constant all the time except the position > and color-target. Otherwise it requires one frame() call per tile > re-rendering, here I don't know, how expensive that is compared to hundreds > of possible cameras approach (but usually only few tiles needs to be > re-rendered). > > The main question remains: is there a light-way possibility to change the > color binding in an already existing RenderStage/FBO context ? That's your question, as I said the RTT Camera/FBO support hasn't been written specifically for you usage model, changing the FBO might be possible, but you'd need to look at the internals. The main question I have, and I'm sure others have is, what are you trying to do and why. Providing low level advice when one doesn't know the high level context is likely to be mis-directed and mis-informed. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT and new color_buffer binding per frame.
robertosfield wrote: > Hi Alexej, > You don't need to change the render-target to re-render a tile. I > can't work out exactly what you mean in your scheme but it sounds a bit odd. The problem is not the re-rendering of a single tile. The job is to re-render a tile subset from a collection of tiles (each tile has an unique texture object bound to it). robertosfield wrote: > > While I do understand what you are specifically doing or how/why you > are trying to achieve it as general notes I would say: > > You can have many RTT osg::Camera in the scene and these scene graph > objects themselves are pretty small compared the texture/buffer data > assigned to them, also it's possible to share subgraphs under Cameras > so the scene graph specific costs are likely to be very small, so no > need to go to lengths to try and avoid creating them. Assuming I will do it this way. 1. Will I have to enable/disable cameras in relation with the dirty state of the tile? (otherwise all cameras will re-render the tiles, even these, with no changes). 2. What about the rendering context for each camera? Does it not produce extra costs? E.g. the depth RenderBuffer (which could be shared using render-target exchange approach) and other meta data (as I understand from RenderStage::runCameraSetUp(..)) It may be wrong: osg is not easy to understand, especially since the most classes do not even describe their main purpose (in doxygen). But for me, the approach with changing the render color target looks still more efficient, assuming I can change the color binding in a fast and light-way manner. Because all camera parameters stay constant all the time except the position and color-target. Otherwise it requires one frame() call per tile re-rendering, here I don't know, how expensive that is compared to hundreds of possible cameras approach (but usually only few tiles needs to be re-rendered). The main question remains: is there a light-way possibility to change the color binding in an already existing RenderStage/FBO context ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47708#47708 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Volume image cannot display properly on MFC
Hi Clement, On 14 May 2012 17:32, wrote: > After I increased sample density, the aliasing issue seems decrease. If I > increased too much sample density, the image movement become very difficult. > Also the surface will become very dark. Anyway to make the surface more > brighter. This is the problem I mentioned before and you suggested me to use > TransferFunction to control light intensity. Is that right? I don't have the data so can't say why it's getting dark, could it be simply that the boundary is dark and being sampled better by higher density. As for aliasing issues, this something you always have to contend with when sampling textures. As for transfer functions controlling light intensity - they just control how the intensity from the 3D texture map to colours, the colours can change the brightness but can also reduce it, it's something completely under your control. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org