Re: [osg-users] Single scene, multiple viewers : problem with texture
Hi, Can you explain what you mean by dynamically linking the node ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44088#44088 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom osg::NotifyHandler problems and multi-threading
Hi George, On a first read your LogFileHandler looks OK, the Mutex should in theory resolve multi-threading issues. From the details you've provide one can't pinpoint what the problem might be so you'll need to work through iteratively to see what the problem areas might me. One test I'd do is comment out the _log message; to see if it's the file handling that is suspect. Also general things to check would be the VS issue with mixing release and debug builds at one time. Finally if are able to build and test your application on another platform. Robert. On 28 November 2011 12:03, George Bekos bekos...@live.com wrote: Hello everyone! :] I am trying to redirect all OSG notifications to a file by creating my own notify handler class (inheriting from osg::NotifyHandler) but I get some random crushes. Mostly during run-time and sometimes when I close the application. All of them reporting some kind of heap corruption. Sometimes it might take about 5-10 minutes in order to crush. Here is my code: Code: class LogFileHandler : public osg::NotifyHandler { public: LogFileHandler(const std::string filename) { _log.open( filename.c_str() ); _validFile = _log.is_open(); } void notify( osg::NotifySeverity severity, const char* message ) { OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex); if(!_validFile) return; _log message; } protected: ~LogFileHandler(void) { _log.close(); } protected: std::ofstream _log; OpenThreads::Mutex _mutex; bool _validFile; }; In order to test this class I set the handler like this: osg::setNotifyHandler( new LogFileHandler(log.txt) ); Why do I get crushes reporting an invalid heap? Am I doing something wrong? OSG notes: Note that osg notification API is not thread safe although notification handler is called from many threads. When incorporating handlers into GUI widgets you must take care of thread safety on your own. Isn't the ScopedLock I have at the top of my notify() function enough? If I set the osgViewer threading mode to SingleThreaded, the problem goes away. This makes me believe that my problem has something to do with multithreading. I am using OSG 3.0.0 and Visual Studio 2008 SP1. Thanks a lot for your time. Cheers, George -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44063#44063 ___ 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] cdash site down
Hi Jason, On 22 November 2011 16:10, Jason Daly jd...@ist.ucf.edu wrote: Just happened to notice that cdash.openscenegraph.org is unreachable from here (Orlando, FL, USA). cdash was done for a day, not sure of the case, perhaps J.L spotted the problem and fixed it. Just checked it now and cdash.openscenegraph.org is working fine. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CullCallback problem
Hi Filip, On 15 November 2011 10:17, Filip Arlet fili...@seznam.cz wrote: I think I have similar problem. I studied osg code and find out, that NodeCallback set as Node-CullCallback is called only if node is not culled therefore (osgUtil::CullVisitor*)(nv-isCulled(node)) always return false. I want to implement dynamic line style lod, where shoud I start ? You'll need to make sure that the bounding volume of the geometry you are updating is being updated as well - call geometry-dirtyBound() and it'll updated the itself whole parental path that it's size has changed and needs recomputing. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] NVIDIA Driver Problem?
Hi Paul, On 15 November 2011 13:04, Paul Palumbo paul1...@yahoo.com wrote: The probably is evident when the X server is restarted between these calls to create the osgViewer::Viewer. I don't think it matters any if the restart is inside the program or not as long as it happens when no osgViewer::Viewer is active. The only GLX code in osgViewer is in GraphicsWindowX11.cpp and PixelBufferX11.cpp. Each of GraphicsWindowX11 and PixelBufferX11 keep their own local handles to X11 objects and should be cleaning these up when they are closed/destructed, I don't recall any global handles that will need cleaning up. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Terrain Height as Texture
Hi Jonathan, On 15 November 2011 13:21, Jonathan Klein jonathan_kl...@web.de wrote: Well, the problem is, that I need the surrounding heights. It is a terrain visualisation project and i need to calculate things like openness (some Ambient Occlusion related thing) or terrain roughness, for which I need for example a 5x5 kernel around my pixel, so a heightmap lookup would be the easiest.. It seams that there is no way to extract that information just form the vertex data (because the vertex shader only processes one vertex at a time). osgTerrain and VPB are set up to do what you are asking of them - they are set up to use HeightField for elevation data that is the source of the geometry tiles, and use image layers for the textures that are assigned to the geometry tiles. However, perhaps you could assign a HeightField as a image layer and have it be textured on to your tile? I'm not sure how this would all work out, but go have a look at the code and see how you might be able to co-opt it to do what you require. If there are small tweaks you can make to osgTerrain and VPB to make it all hang together cleanly then just post these into osg-submissions and I can review them what I get back to do doing a submissions purge. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to: Adding blurring effect to my moving osg::Node/Geode?
Hi Atillia, On 15 November 2011 17:00, Atilla Selem ase...@havelsan.com.tr wrote: In osgmotionblur example, blurring effect is added to the single instance of osgViewer::Viewer:Windows by adding a derived MotionBlurOperation. How can i add that blurring effect to my individual geode/Node in my scene? i want some of my moving objects blur so i need to set some of them with blurring when they move and remove blurring when they stop moving. Can osg::Operation instances be added other than Windows or Viewers? Should i use some other callbacks for nodes or geodes? osgmotionblur works by using the accumulation buffer to blend previous frames colour buffer with the current frame, this means it's a whole window effect and not one that can be used for individual objects. To do motion blur on individual objects you'll need to take a very different tack - you'll need to come up with a custom scheme that suits the type of scene that you have. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] kdTree and sphere intersection
Hi Peter, KdTree is currently only handles line segment intersections, this is provided directly in the internals. To implement other types of intersections one would either need to add it directly to KdTree as has been done with the line segment intersection or have an external traverser class that walks through the KdTree. Robert. On 16 November 2011 12:02, Peter Wraae Marino marino.pe...@gmail.com wrote: Hi, I have create a sphereintersector which works fine, but goes through all triangles on the geometry. I would like to use the kdTree to help me to do a sphere - triangle intersection tests on as few triangles as possible. Is this possible? When I look at the kdTree object it looks like it is hardcoded to handle only line segments? anyone have some comments on this? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43908#43908 ___ 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] osgText::Text is quite a heavyweight (memory-wise)
Hi Christian, With rendering applications you almost always want to avoid just created data before rendering as this causes a frame stall when it's most critical. It's best to create the data and set all the values as much as possible on start up. As for the expense of osgText::Text, I'm afraid this is required for all the various features that it provides. If you have very specific needs and require hundreds of thousands of text labels than a custom scheme, such are create your own equivalent osgText::Text class might be appropriate. With a custom class you can do things in a way that is very specific to your needs. Robert. On 17 November 2011 15:14, Christian Buchner christian.buch...@gmail.com wrote: Hi, even though sizeof(osgText::Text) is rather small, the object allocates quite a lot of memory in its constructors, most of it being caused by osgText::TextBase. #include osgText/ void main(int argc, char **argc) { osgText::Text tmp; // sizeof(tmp) is small, but about 10 times that memory is allocated in the constructor hierarchy. }; I was wondering if it would make sense to defer part of the dynamic initialization until the Text object is actually used for the first time (e.g. rendered) ? Christian ___ 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] [vpb] osgdem --no-terrain-simplification : what exactly is it doing?
Hi Ethan, VPB is built around the idea of creating large paged database, scaling up to terrabytes in size, rather than single tiles, and render the terrains at a solid 60Hz. These requirements mean that one has to tile and LOD the terrain, which is where the default size you are seeing is coming in. You can change the default size is you want but typically you wouldn't want to increase it as this will impact performance. For you needs it may well be that just creating a geometry and texture directly rather than using VPB would be appropriate. Robert. On 17 November 2011 16:13, Ethan Fahy ethanf...@gmail.com wrote: Hello all, I start with dted data and use gdal_translate to convert this data to a geotiff. This geotiff has 278x305 pixels. The lat-lon bounding box has right angles in lat-lon space, but due to the mercator projection being used, the geotiff has some no-data areas along the edges. I then run osgdem using the following command: osgdem --geocentric -d elevation.tif -l 1 -o elevation.osg --POLYGONAL When I view this elevation.osg file in wireframe I see that the primitives that make up the terrain are large if there is a small elevation gradient and small if there is a large elevtion gradient. This makes sense; it's only using as much detail as needed. For my purposes, I want a set of primitives that is in the same grid as the original pixel map. So, I repeat the osgdem command above but add the --no-terrain-simplification flag. When I look at this osg file in wireframe, I see that it has created a 63x63 pixel terrain, with each pixel made up of two triangles. There is also a second primitiveset that is simply a quadstrip that wraps around the edge of my terrain. This is close to what I want, but my questions is this: Why is the osg terrain 63x63 when the source geotiff was 278x305? What process is osgdem using to determine how many of these two-triangle-pixels to put in each direction in the output product? Do I have any control over these parameters without modifying the osgdem src? I've looked at all the osgdem flags and nothing jumped out at me. Thanks so much for any help you can give me. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43931#43931 ___ 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] NVIDIA Driver Problem?
Hi, On 29/11/2011 11:34, Robert Osfield wrote: Hi Paul, On 15 November 2011 13:04, Paul Palumbopaul1...@yahoo.com wrote: The probably is evident when the X server is restarted between these calls to create the osgViewer::Viewer. I don't think it matters any if the restart is inside the program or not as long as it happens when no osgViewer::Viewer is active. The only GLX code in osgViewer is in GraphicsWindowX11.cpp and PixelBufferX11.cpp. Each of GraphicsWindowX11 and PixelBufferX11 keep their own local handles to X11 objects and should be cleaning these up when they are closed/destructed, I don't recall any global handles that will need cleaning up. can it have something to do with: static RegisterWindowingSystemInterfaceProxy createWindowingSystemInterfaceProxy; in GraphicsWindowX11? rgds jp Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgParticles one frame latency ?
Hi Eric, I could be that you are updating the nodes position after the osgParticle classes have executed. You don't say how you've constructed your scene graph and how you update so there is little others can recommend specificallly. Robert. On 15 November 2011 10:01, Eric Pouliquen epouliq...@on-x.com wrote: Hi, I'm using osgParticles to make a smoke trail on a node moving very fast in the scene. It seems particles have one frame latency so that the starting point of the trail is late on the trajectory compared to the moving node. Is it something due to particles architecture ? How to avoid this because I need absolutely to move my node very fast, with a NodeTrackerManipulator pointing to it, and the rendering problem of particles is very visible :( Cheers, Eric -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43888#43888 ___ 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] osgText and GLES2
Hi Thomas, On 18 November 2011 20:36, Thomas Hogarth thomas.hoga...@gmail.com wrote: I should be able to implement any fix needed, just need a bit of guidance as I'm not too familiar with the internals of osgText. I do hope you've been able to make progress as I can't spot what the problem might be from the details provided - it's the type of problem that really needs one to sit down with a GLES 2 implementation and debug it step by step. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera and Animation Path
Hi Paul, osgGA::AnimationPathManipulator is pretty simply to use and it's setup is illustrated in applications/osgviewer/osgviewer.cpp, just search for AnimationPathManipualtor. Robert. On 21 November 2011 15:15, Paul Leopard paul.leop...@gmail.com wrote: Hi, Has anyone found any good example code for attaching the camera to an animation path? Unfortunately all of the example code I have found is very dated and due to a deadline I am unable to go back and learn Producer and then how to port it to osgGA. I'm trying to find some example code so I can quickly achieve the animation ... any example code would be greatly appreciated. I have a trajectory of a missile that I have animated with an animation path and all works well. Now I need to put the camera on the head of the missile and orient it according to the direction the missile seeker is pointing. Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43979#43979 ___ 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] OSG 2.9.10 on iOS
Hi Büsra, 2011/11/22 Büsra Gülten busragul...@hotmail.de: I really need some information about CMake variables. Could you please give me any advice? These CMake variables change the build of the OSG so that it does or doesn't use any of the traditional OpenGL fixed function pipeline, this also applies to shaders. You'll see places where these variables are use within the OSG source code, in particular in src/osg/*.cpp. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking for a guide on renderbins
Hi Sean A nice tutorial about StateSethttp://www.bricoworks.com/articles/stateset/stateset.htmland StateGraph http://www.bricoworks.com/articles/stategraph/stategraph.html have a part on renderleaf and renderbin thank to Tim Moore for this HTH David Callu 2011/11/18 Sean Sullivan sullivan0s...@gmail.com Hey guys, Does anybody know about some sort of guide for how the renderbins work? I'm having to use them quite a bit lately but am having trouble finding in depth coverage of the subject. Cheers, Sean -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43945#43945 ___ 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] Single scene, multiple viewers : problem with texture
I found the solution : Using the osgUtil::Optimizer::TextureVisitor to set all textures to UnrefImageAfterApply = false -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44104#44104 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom osg::NotifyHandler problems and multi-threading
Hello Robert, Thank you very much for your reply. I did remove the _log message; line and the problem goes away. When I get the crush, in which VStudio reports heap corruption, I use the debugger to have a look at the corrupted memory block, and it always points to some region where the notice strings are saved. In my program I do not do anything fancy. It is an extremely simple case: Code: #include cstdlib #include osg/Group #include osgViewer/Viewer #include LogFileHandler.h // - class MyUpdateCallback : public osg::NodeCallback { virtual void operator()( osg::Node* node, osg::NodeVisitor* nv) { for(size_t i = 0; i 1000; ++i) { osg::notify( osg::NOTICE ) hello!;// std::endl; } } }; // - int main( int agc, char** argv ) { osg::setNotifyLevel(osg::DEBUG_FP); osg::Group* root = new osg::Group(); LogFileHandler* fileHandler = new LogFileHandler(log.txt); osg::setNotifyHandler(fileHandler); root-setUpdateCallback(new MyUpdateCallback()); osgViewer::Viewer viewer; viewer.setSceneData(root); viewer.setUpViewInWindow(50,50,800,600); viewer.run(); return EXIT_SUCCESS; } When I check the corrupted memory block sometimes I see something like hello!!hello!!hel«þîþîþ..þîþþîþþîþþîþ. Which looks corrupted to me. If I add an std::endl at the end of my message in the above callback the problem still appears but not very often. I have tried this program on 2 different PCs but both of them had windows7x64. I checked my lib and dll files, I do not mix release and debug builds. The problem is very strange... I guess I am missing something. Thanks for your help! Cheers, George -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44106#44106 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] git mirrors broken?
Hi, I just noticed that the git mirrors stopped following svn Nov 17. Did the mirroring scripts somehow die? Cheers, -Marius ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgCompute] Problems with CMake Script
Hi Jonathan, thanks for your post. Jona wrote: First of all, the installing Taget doesn't work: 1 -- Up-to-date: C:\Visual Studio 2010\Projects\Libs\osgCompute\install/lib/osgComputed.lib 1 CMake Error at src/osgCompute/cmake_install.cmake:47 (FILE): 1file INSTALL cannot find C:/Visual Studio 12010/Projects/Libs/osgCompute/VC/bin/Debug/../osgComputed.dll. 1 Call Stack (most recent call first): 1src/cmake_install.cmake:32 (INCLUDE) 1cmake_install.cmake:32 (INCLUDE) The file was build, but is in VC/bin/Debug/osgComputed.dll and not in VC/bin/Debug/../osgComputed.dll (mind the ../). I tried to find the problem in the cmake file, but I got a bit confused about how the installing actually works. Maybe some of you guys can help me with that. Actually, I'm not quite sure if we tested under MSVC 2010. Strange... Did the install-script work before? Do you use the current SVN version? I will try to get a VS 2010 machine and do some testing... Jona wrote: Then I tried the findosgcompute Module in my application. But it has a pretty obvious bug in finding the osgCompute Include directory: Code: OSGCOMPUTE_FIND_PATH (OSGCOMPUTE osgCompute/Context) There is no such file as 'Context' in the subversion repository (rev 476). Replacing that by 'osgCompute/Computation' works well (I think Computation should be the most basic include file, as it is the only that that the Endianess Example includes). Thanks - of course you are right. I just updated the FIND-scripts which should find the new lib (osgCudaStats) too. Best regards, Mick SVT Group -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44112#44112 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Help: Data accuracy from Frame buffer is not very good
Hallo, I want to simulate laser scanner using osg camera. In Fragment shader the color information is converted into position information. And then the position information is accessed from this Fragment to be used to draw points in a view. But the points are not so accurate, as it is shown in the attached picture, which is composed of 11 cameras. The important codes are: osg::Program * program = new osg::Program(); program-addShader(osg::Shader::readShaderFile(osg::Shader::FRAGMENT, fragmentShaderPath)); program-addShader(osg::Shader::readShaderFile(osg::Shader::VERTEX, vertexShaderPath)); osg::Image * image = new osg::Image(); image-allocateImage(xRes, yRes, 1, GL_RGBA, GL_FLOAT); osg::ref_ptrosg::CameraNode camera(new osg::CameraNode()); camera-setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR); camera-setViewport(0, 0, xRes, yRes); camera-setClearColor(osg::Vec4(1000.0f, 1000.0f, 1000.0f, 1000.0f)); camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera-setProjectionMatrixAsFrustum(-tan( viewYaw), tan(viewYaw), -tan(viewPitch), tan(viewPitch), zNear,zFar); camera-setViewMatrix(osg::Matrix::lookAt(osg::Vec3d(0, 0, 1.0f), osg::Vec3d(-10.0f, 0.0f, 0), osg::Vec3d(0, 0, 1))); camera-setRenderOrder(osg::CameraNode::PRE_RENDER); camera-setRenderTargetImplementation(renderTargetImplementation); camera-attach(osg::CameraNode::COLOR_BUFFER, image); camera-getOrCreateStateSet()-setAttribute(program, osg::StateAttribute::ON); In vertex Shader, I write: void main() { x=(gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).x; y=(gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).y; z=(gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).z; gl_Position = ftransform(); } in Fragment shader, I write: gl_FragColor = vec4(abs(z/100),abs(x/17),abs(y/4),0.2); And I when get the position information, I will multiply them with the corresponding factors. However, the points are not that accurate. I seems that the Fragment shader does not calculate the point one by one, but assign a certain value to a certain amount of points. Can anybody give some advice? Thanks in advance! Shuiying attachment: osg.jpeg___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: Data accuracy from Frame buffer is not very good
Hi, I'd suggest attaching a texture with a GL_RGBA32F_ARB internal format to the camera as well (in addition to the image). I'm not sure you are getting a float FBO. See the osgprerender example with the --hdr switch. jp On 29/11/2011 16:12, wang shuiying wrote: Hallo, I want to simulate laser scanner using osg camera. In Fragment shader the color information is converted into position information. And then the position information is accessed from this Fragment to be used to draw points in a view. But the points are not so accurate, as it is shown in the attached picture, which is composed of 11 cameras. The important codes are: osg::Program * program = new osg::Program(); program-addShader(osg::Shader::readShaderFile(osg::Shader::FRAGMENT, fragmentShaderPath)); program-addShader(osg::Shader::readShaderFile(osg::Shader::VERTEX, vertexShaderPath)); osg::Image * image = new osg::Image(); image-allocateImage(xRes, yRes, 1, GL_RGBA, GL_FLOAT); osg::ref_ptrosg::CameraNode camera(new osg::CameraNode()); camera-setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR); camera-setViewport(0, 0, xRes, yRes); camera-setClearColor(osg::Vec4(1000.0f, 1000.0f, 1000.0f, 1000.0f)); camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera-setProjectionMatrixAsFrustum(-tan( viewYaw), tan(viewYaw), -tan(viewPitch), tan(viewPitch), zNear,zFar); camera-setViewMatrix(osg::Matrix::lookAt(osg::Vec3d(0, 0, 1.0f), osg::Vec3d(-10.0f, 0.0f, 0), osg::Vec3d(0, 0, 1))); camera-setRenderOrder(osg::CameraNode::PRE_RENDER); camera-setRenderTargetImplementation(renderTargetImplementation); camera-attach(osg::CameraNode::COLOR_BUFFER, image); camera-getOrCreateStateSet()-setAttribute(program, osg::StateAttribute::ON); In vertex Shader, I write: void main() { x=(gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).x; y=(gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).y; z=(gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).z; gl_Position = ftransform(); } in Fragment shader, I write: gl_FragColor = vec4(abs(z/100),abs(x/17),abs(y/4),0.2); And I when get the position information, I will multiply them with the corresponding factors. However, the points are not that accurate. I seems that the Fragment shader does not calculate the point one by one, but assign a certain value to a certain amount of points. Can anybody give some advice? Thanks in advance! Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting modelview matrix with viewer.getCamera()-setViewMatrix(modelViewMatrix) not working
From the Viewer header file... /** Execute a main frame loop. * Equivalent to while (!viewer.done()) viewer.frame(); * Also calls realize() if the viewer is not already realized, * and installs trackball manipulator if one is not already assigned. */ virtual int run(); If you don't want a TrackballManipulator, you'll need to *not* use Viewer::run(). -Paul On 11/28/2011 9:35 PM, Juan Fernando Herrera J. wrote: Hi, I want to set the modelview matrix with viewer.getCamera()-setViewMatrix(modelViewMatrix) like in the following code: int main(int argc, char **argv) { osgViewer::Viewer viewer; osg::Node* rootNode = createRootNode(); viewer.setSceneData(rootNode); return viewer.run(); } Later, in an osg::NodeCallback, I perform: viewer.getCamera()-setViewMatrix(modelViewMatrix); But the modelview matrix isn't modified at all. On the other hand, viewer.getCamera()-setProjectionMatrix(projectionMatrix) seems to work. What should I do to the viewer in order for setViewMatrix() to work? Thank you! Cheers, Juan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Single scene, multiple viewers : problem with texture
HI Aurelien, You should use multiple View's within a single CompositeViewer for doing this rather than multiple viewers. Robert. On 28 November 2011 16:15, Aurelien Albert aurelien.alb...@alyotech.fr wrote: Hi, I've got a problem when viewing the same scene from two different viewers : - Viewer A with Camera A - Viewer B with Camera B I load a node with : Code: osg::ref_ptrosg::Node pNode = osgDB::readNodeFile(...); Then I do : Code: p_viewerA-setCamera(p_cameraA); p_viewerA-setSceneData(pNode); p_viewerB-setCamera(p_cameraB); p_viewerB-setSceneData(pNode); Everything works fine, but when viewer B is deleted, pNode's textures are no more rendered in viewer A (geometry is still rendered correctly). Is there anything special to do to share data between two viewer ? Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44072#44072 ___ 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] osgexport for blender?
Hi, Yes, I installed this one. After reading some posts, I understand that there are two OSG exporters for Blender: 1. yours, which does not support animation at the moment, if I understand; 2. and the one from Damyon: https://code.google.com/p/blender-osgexport-25/ which supports animations and armatures. Am I right ? Which one is more robust and more mature at this moment ? Also, those two exporters work for Blender 2.5x, does someone try exportation with the latest Blender version 2.6 ? Thank you very much for your work, Maia Cedric Pinson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Did you try this https://github.com/cedricpinson/osgexport ? Cedric On 11/25/2011 11:46 PM, Maia Randria wrote: Hi, Sorry, but I am very confused with the OSG exporter from Blender. Which OSG exporter works for Blender 2.6 (the latest version) ? Could you the right website to download it ? Thanks, Maia Jeremy Moles wrote: On Fri, 2011-09-23 at 16:38 +0200, Alberto Luaces wrote: Benjamin Gehmlich writes: Hi Alberto, thanks for your answer, but there is a Problem with blender. When I want to add the osgExport file (Install Add-On), there happens nothing. What I have done 1.) put the osg folder in blender-2.59/2.59/scripts/addons 2.) the osgExport.py in blender-2.59 3.) started Blender - User Preferences - Install Add-On 4.) then chose osgExport.py By the other versions I used, after this I saw an entry. Is there a mistake? The other versions worked good for normaly exports, but when I chose Armatur by the mesh as parent it did not export. Therefore I used the Modifier Armatur and i could export as osg but the mesh was not correct. Benjamin, I don't fully understand how you are installing the add-on, but you have to take into consideration that the plugin doesn't only need osgExport.py, but the `osg' directory as well. Also, start Blender from the command line in order to check if the script is not found by your Python installation. The state of the Blender export(s) requires some explanation... Some history: Alberto wrote the first osgexport.py. A few years later, Cedric and myself came along and improved (?) it, in a very general sense. Another year later, Cedric wrote animtk, which eventually became osgAnimation, and added support for that as well into the exporter. Then, along came Blender 2.5. It drastically changed the way data is represented and enumerated in Python internally. Cedric adapted the Mesh exports easily enough, but the Animation exporting remains non-functional. You can find all of this code here (git): https://github.com/cedricpinson/osgexport.git HOWEVER, another exporter has come into light. I'm not sure WHY this individual chose to start over (rather than add to the existing exporter), I do not know. The code base has become quite large however, so perhaps that is the reason. There are also comments in the source to the main exporter that he actually did work on it at some point. His code DOES support animation export, but it isn't as robust as the original in other ways. You can find that code here (git): https://code.google.com/p/blender-osgexport-25/ To be completely honest, the state of all of this is a total mess. We now have 2 exporters, each possessing features the other lacks, and neither of which are (anymore) particularly clean or usable code bases. I've talked with Cedric about the future of the original exporter, and it certainly hasn't been forgotten, but he is an extremely, EXTREMELY busy person and it may be a while before anything happens. I also tried adapting the code from Wiese's exporter myself, but I can't follow either of the exporters anymore, so no luck there... ___ osg-users mailing list 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=44047#44047 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org - -- Cedric Pinson Provide OpenGL, WebGL and OpenSceneGraph services +33 659 598 614 - http://plopbyte.com - http://osgjs.org - http://showwebgl.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7Q8zoACgkQs6ZHzVQN0IhImgCeMHwNyBsRsmTKG9MsS53Bnxtr d4sAn0bL+WKkUFWdkW95rsrRuatiKOKY =0xoX
Re: [osg-users] osgText and GLES2
Hi Robert Made some progress in the end, the subload errors were a red herring. Seems perhaps some of the glyphs for the particular font I was using didn't load properly, but the rest worked fine. So after a little digging I realised mipmapping was probably the issue and that's when I remembered this post from way back http://forum.openscenegraph.org/viewtopic.php?t=6482 That has fixed the issue for me and I now have text rendering with drop shadows in gles2 on IOS. I will give the fix a little more testing then submit, as it seems the original poster rti didn't get round to sending the fix for inclusion. Thanks for popping your head in, thought I was all alone on this one :) Tom ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Single scene, multiple viewers : problem with texture
Hi Robert, In my application, there is a main viewer to edit the scene, and the user can open/close secondary viewer windows. These secondary viewer windows are not limited in number (sure, there is hardware limits...) and the camera is independant from the other viewers (to see different point of view). So when user open a new secondary viewer window, I create a new viewer instance, a new camera, and the context is shared with the main window. When user close a secondary window, I delete the associated viewer to release some resources. The secondary windows can also be resized, so the viewport is also independant. Each viewer (main and secondary) are embeded in a Qt widget. Is there any way to do this with a composite viewer ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44119#44119 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] osgdem --no-terrain-simplification : what exactly is it doing?
Thanks for the reply Robert. When you mention default size I assume you are referring to the 63x63 pixel resolution that I mentioned? Is that the default size for a tile? I did a grep on the entire VPB src package for 63 and didn't find anything related to default size values; am I misinterpreting you? You may be right about VPB not being the optimal solution for my needs, but I am very hesitant to try to start from scratch because I am making extensive use of the fact that osgdem creates a geocentric database that i am able to place objects onto using lat-lon coordinates. I also wouldn't know where to begin when it comes to interpreting dted data in C++ and creating a geocentric database. When you say that I might want to generate geometries and textures myself do you mean writing all of that logic from scratch or did you have other osg utilities in mind? I could also try to start from VPB src and modify osgdem to create double-triangle-pixels according to the number of pixels in the source geotiff file but i don't know how straight-forward that would be. I'm not looking for extensive help or anything but if I could at least know what a good starting point would be to sink my teeth into I would be much better off. Thanks again, -Ethan robertosfield wrote: Hi Ethan, VPB is built around the idea of creating large paged database, scaling up to terrabytes in size, rather than single tiles, and render the terrains at a solid 60Hz. These requirements mean that one has to tile and LOD the terrain, which is where the default size you are seeing is coming in. You can change the default size is you want but typically you wouldn't want to increase it as this will impact performance. For you needs it may well be that just creating a geometry and texture directly rather than using VPB would be appropriate. Robert. On 17 November 2011 16:13, Ethan Fahy wrote: Hello all, I start with dted data and use gdal_translate to convert this data to a geotiff. This geotiff has 278x305 pixels. The lat-lon bounding box has right angles in lat-lon space, but due to the mercator projection being used, the geotiff has some no-data areas along the edges. I then run osgdem using the following command: osgdem --geocentric -d elevation.tif -l 1 -o elevation.osg --POLYGONAL When I view this elevation.osg file in wireframe I see that the primitives that make up the terrain are large if there is a small elevation gradient and small if there is a large elevtion gradient. This makes sense; it's only using as much detail as needed. For my purposes, I want a set of primitives that is in the same grid as the original pixel map. So, I repeat the osgdem command above but add the --no-terrain-simplification flag. When I look at this osg file in wireframe, I see that it has created a 63x63 pixel terrain, with each pixel made up of two triangles. There is also a second primitiveset that is simply a quadstrip that wraps around the edge of my terrain. This is close to what I want, but my questions is this: Why is the osg terrain 63x63 when the source geotiff was 278x305? What process is osgdem using to determine how many of these two-triangle-pixels to put in each direction in the output product? Do I have any control over these parameters without modifying the osgdem src? I've looked at all the osgdem flags and nothing jumped out at me. Thanks so much for any help you can give me. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43931#43931 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list 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=44120#44120 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Qt GraphicsWindow on Linux
I am not sure if this is by design or an inconsistency. I have a Qt application that I can change a #define to decide whether to use GraphicsWindow or GraphicsWindowQt. Both work great in Windows. However, when I go to Linux, several keys or mouse binding to actions do not work under GraphicsWindow (such as Page Up/Down, arrow keys, etc.). It is possible this is by design, but seems like it would be an inconsistency. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44121#44121 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ShadowMapping in a multipass deferred setup
okay, I've gotten a bit further with this one. I realized that what I really need are two separate things. The first one is to specify the texture the shadow-pass renders in by myself so I can bind the appropriate texture object and set the render order individually. The second step is to tell the shadow pass not to apply the shadow texture to the scene, but instead just guarantee that is finished after the render-pass and must be able to pass me the matrices used for shadow calculation so I can transform my scene's depth into light-view space on my own. I've taken a look into the DebugShadowMap which curiously seems to be the place where the shadow-camera for the ViewDependentTechniques is declared. So my general idea was to provide a public function to set the camera/render texture from the outside and tell the init function only to create it if the cam wasn't setup from the outside. Honestly I found the split up code for the different shadow implementations hard to understand, as they are scattered a bit too much to get the idea. Has anyone a better idea to render the shadow map to a predefined FBO-attached texture and let my own shader do the reprojection in order to do shadow mapping in a deferred setup? cheers Sebastian Hello, I have used the osg shadow implementations with great success in state of the art forward rendering. Right now I'm trying to implement shadowmapping into my deferred rendering approach. Can anyone point me into the right direction, regarding the correct usage of the view dependent shadow mapping algorithms in a RTT environment? What I need to perform is to render the shadowmap in to depth texture and apply it later in separate pass. But how do I setup the shadowmapping graph to only render the shadow texture so I can use it later on in my lighting/combine pass? any hints are welcome cheers Sebastian ___ 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] How to: Adding blurring effect to my moving osg::Node/Geode?
Hi Atilla, take a look at osgPPU. Its created for such post render effects. You can create a subgraph for your blured objects, render them to a ppu unit und use a shader to do the bluring. There is an PPU version of the motionblur you are talking about, but unfortunatelly not as example, but as PPU file ( .ppu ). This is just as the osg format but for ppu nodes. You'll find a Motionblur.ppu in the Data folder. With this Motionblur.ppu ( in the Data Folder ), its just a matter of creating your subgraph, loading this file, applying it to the subgraph and composite the blured and non-blured renders. Cheers, Peter Hi, In osgmotionblur example, blurring effect is added to the single instance of osgViewer::Viewer:Windows by adding a derived MotionBlurOperation. How can i add that blurring effect to my individual geode/Node in my scene? i want some of my moving objects blur so i need to set some of them with blurring when they move and remove blurring when they stop moving. Can osg::Operation instances be added other than Windows or Viewers? Should i use some other callbacks for nodes or geodes? ... Thx.. Atilla. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43898#43898 ___ 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] Help: Data accuracy from Frame buffer is not very good
Hello, J.P. Delport I followed your advice but it still doesn't work well. And I also changed the internal format of the Image as GL_RGBA32F_ARB, but the points remain the same. What is the name of the osgprerender example with the --hdr switch ? Thank you very much ! Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting modelview matrix with viewer.getCamera()-setViewMatrix(modelViewMatrix) not working
You could also prevent the trackballmanipulator from being created and used by doing something like this: Code: osg::Camera* cam = viewer.getCamera(); cam-setAllowEventFocus(false); // Prevent the manipulator being used and taking over -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44126#44126 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] osgdem --no-terrain-simplification : what exactly is it doing?
Hi, If you increase the -l numOfLevels argument to 4, you'll at least preserve all the original heightmap points at the highest LOD tiles when you zoom in (albeit in a series of tiles). If you search for 64 instead of 63 you'll see where the default tile size is coming from. If you just want a single terrain tile from your projected geotiff, then you could simply create an osgTerrain::TerrainTile using your projected image as a heightmap. You can ignore your NODATA values by setting a osgTerrain::NoDataValue in your TerrainTile's elevationlayer ValidDataOperator. Cheers, jamie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44127#44127 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgexport for blender?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, You get it. Damyon has work on his one to experiment and have something working quickly mine comes from blender 2.49 and is done to be able to make other exporter on top of it. Like a custom exporter that export osg data but user can tweak the exporter. Ideally if you dont need armature/animation it would be better to use mine. The work of Daymon (thank you a lot man) should be reported asap to mine on github. Same thing about bugs if you find bugs please report it on github. Off course if you need armatures/animations use Daymon exporter. It should work fine with blender 2.6 but I have not tried yet, so if you have problem report it I should be reactive for small fix. Regards, Cedric On 11/29/2011 04:45 PM, Maia Randria wrote: Hi, Yes, I installed this one. After reading some posts, I understand that there are two OSG exporters for Blender: 1. yours, which does not support animation at the moment, if I understand; 2. and the one from Damyon: https://code.google.com/p/blender-osgexport-25/ which supports animations and armatures. Am I right ? Which one is more robust and more mature at this moment ? Also, those two exporters work for Blender 2.5x, does someone try exportation with the latest Blender version 2.6 ? Thank you very much for your work, Maia Cedric Pinson wrote: Did you try this https://github.com/cedricpinson/osgexport ? Cedric On 11/25/2011 11:46 PM, Maia Randria wrote: Hi, Sorry, but I am very confused with the OSG exporter from Blender. Which OSG exporter works for Blender 2.6 (the latest version) ? Could you the right website to download it ? Thanks, Maia Jeremy Moles wrote: On Fri, 2011-09-23 at 16:38 +0200, Alberto Luaces wrote: Benjamin Gehmlich writes: Hi Alberto, thanks for your answer, but there is a Problem with blender. When I want to add the osgExport file (Install Add-On), there happens nothing. What I have done 1.) put the osg folder in blender-2.59/2.59/scripts/addons 2.) the osgExport.py in blender-2.59 3.) started Blender - User Preferences - Install Add-On 4.) then chose osgExport.py By the other versions I used, after this I saw an entry. Is there a mistake? The other versions worked good for normaly exports, but when I chose Armatur by the mesh as parent it did not export. Therefore I used the Modifier Armatur and i could export as osg but the mesh was not correct. Benjamin, I don't fully understand how you are installing the add-on, but you have to take into consideration that the plugin doesn't only need osgExport.py, but the `osg' directory as well. Also, start Blender from the command line in order to check if the script is not found by your Python installation. The state of the Blender export(s) requires some explanation... Some history: Alberto wrote the first osgexport.py. A few years later, Cedric and myself came along and improved (?) it, in a very general sense. Another year later, Cedric wrote animtk, which eventually became osgAnimation, and added support for that as well into the exporter. Then, along came Blender 2.5. It drastically changed the way data is represented and enumerated in Python internally. Cedric adapted the Mesh exports easily enough, but the Animation exporting remains non-functional. You can find all of this code here (git): https://github.com/cedricpinson/osgexport.git HOWEVER, another exporter has come into light. I'm not sure WHY this individual chose to start over (rather than add to the existing exporter), I do not know. The code base has become quite large however, so perhaps that is the reason. There are also comments in the source to the main exporter that he actually did work on it at some point. His code DOES support animation export, but it isn't as robust as the original in other ways. You can find that code here (git): https://code.google.com/p/blender-osgexport-25/ To be completely honest, the state of all of this is a total mess. We now have 2 exporters, each possessing features the other lacks, and neither of which are (anymore) particularly clean or usable code bases. I've talked with Cedric about the future of the original exporter, and it certainly hasn't been forgotten, but he is an extremely, EXTREMELY busy person and it may be a while before anything happens. I also tried adapting the code from Wiese's exporter myself, but I can't follow either of the exporters anymore, so no luck there... ___ osg-users mailing list 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=44047#44047 ___ osg-users
Re: [osg-users] Help: Data accuracy from Frame buffer is not very good
Hi, On 29/11/2011 23:46, wang shuiying wrote: Hello, J.P. Delport I followed your advice but it still doesn't work well. And I also changed the internal format of the Image as GL_RGBA32F_ARB, but the points remain the same. What is the name of the osgprerender example with the --hdr switch ? the example is called osgprerender, look at the code of it. It has a command line switch that enables HDR rendering to texture, but I'm not sure this is your problem anymore. What resolution are you expecting from the FBO and in what range are the vertex data you are using? Are you sure you are not converting to integers somewhere along the line? Are you using the osg::Image at all, or are you using the texture directly? rgds jp Thank you very much ! Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org