Re: [osg-users] OSG website unresponsive
Hi , @ Chris I have a physical root server, and I use XEN for my own virtualization. In some month I plan to upgrade to a newer version with more RAM (http://www.hetzner.de/en/hosting/produkte_rootserver/ex4) It has a 100Mbit connection with 5 TB traffic per month. All above has only a 10Mbit connection. For me and my customers I need round about .5 TB Nevertheless, for permanent hosting I would like to know in detail about the requirements. Just an offer to solve the issue with the current hosting - especcially because Robert wrote that the funding is gone and the server will be closed for OSG. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44568#44568 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?
Hi, On 03/01/2012 23:39, wang shuiying wrote: Hello, (1)to J.P. the related source code is as following: // camera and image setup osg::Camera::RenderTargetImplementation renderTargetImplementation; renderTargetImplementation = osg::CameraNode::FRAME_BUFFER; ^ If you want FBO, you probably want FRAME_BUFFER_OBJECT here. 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((int)XRes, (int)YRes, 1, GL_RGBA, GL_FLOAT); osg::ref_ptr camera(new osg::CameraNode()); camera->setClearColor(osg::Vec4(1000.0f, 1000.0f, 1000.0f, 1000.0f)); camera->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); camera->setRenderOrder(osg::CameraNode::PRE_RENDER); camera->setRenderTargetImplementation(renderTargetImplementation); camera->attach(osg::CameraNode::COLOR_BUFFER, image); OpenGL would happily convert from one render target pixel format on the GPU to another one on the CPU when transferring data. So you must make sure that the formats are what you expect. The easiest way is to attach both a texture and an osg::Image to the camera and explicitly set the internal texture format and data type. See the osgprerender example. You can also inspect the code in RenderStage::runCameraSetUp to see exactly how OSG determines the format of the render target. Also, if you want values outside of [0.0, 1.0] you must attach to osg::CameraNode::COLOR_BUFFER0 and use gl_FragData in your shaders. camera->getOrCreateStateSet()->setAttribute(program, osg::StateAttribute::ON); // access data (only for instance) osg::Vec4f * fragments = (osg::Vec4f *)(image->data()); osg::Vec4f color= distances[10]; float color_a= distances[3]; As can be seen from the source code, I attach an image to the camera, and access data from the image, I am rendering to an FBO. I don't think you are rendering to an FBO with the above code. So would you please give me some advice further? Thank you very much! *(2) to Paul* Refer to (1) of this message, does osg::CameraNode::COLOR_BUFFER imply a RGB or RGBA buffer ? or it doesn't even matter? It does not imply anything. 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
Re: [osg-users] Shader that can calculate pixel depth in meters
Hi Ethan, I did this a little while back using information from that page as well. I'm guessing "real" depth here just means that it's in whatever units you've modeled your world in. For instance, if the near plane is at 1.0, what are the units of 1.0? My purpose was to make sure that clouds fade out before they hit the far plane so that it isn't obvious that my clouds are just a flat plane. Here are my shaders: .vert Code: varying float eyeDistance; //This vertex shader is meant to perform the per vertex operations of per pixel lighting //using a single directional light source. void main() { //Pass the texture coordinate on through. gl_TexCoord[0] = gl_MultiTexCoord0; gl_FrontColor = gl_Color; eyeDistance = -(gl_ModelViewMatrix * gl_Vertex).z; //Compute the final vertex position in clip space. gl_Position = ftransform(); } .frag Code: uniform sampler2D baseTexture; varying float eyeDistance; void main(void) { vec4 alphaColor = texture2D(baseTexture, gl_TexCoord[0].st); vec4 color = gl_Fog.color; color.a = gl_Color.a * alphaColor.a; float A = gl_ProjectionMatrix[2].z; float B = gl_ProjectionMatrix[3].z; float zFar = B / (1.0 + A); float zNear = - B / (1.0 - A); A = -(zFar + zNear) / (zFar - zNear); B = -2.0 * zFar * zNear / (zFar - zNear); // scale eyeDistance to a value in [0, 1] float normDepth = (eyeDistance - zNear) / (zFar - zNear); // Start fading out at 70% of the way there normDepth = max(normDepth - 0.7, 0.0) / 0.3; normDepth = clamp(normDepth, 0.0, 1.0); gl_FragColor = vec4(color.rgb, (1.0 - normDepth) * color.a);//color; } -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44565#44565 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Sony Move.me
Greetings All! I was wondering if anyone has done anything about developing a Camera manipulator for the Sony Move.me software. I have been experimenting with this on an unrelated project and engine and I was wondering if anyone out there was doing any experimentation with OSG? ... D Glenn David Glenn --- D Glenn 3D Computer Graphics & Media Systems. www.dglenn.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44564#44564 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] 64 bits windows Sample programs osggeometry.exe and osgtexture2D.exe crash
Hi, Manage to fix the problem by changing the default setting within the vs2010 sln. Thank you! Cheers, Long -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44563#44563 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Loading 16-bit Image under Mac with imageio
Hi, I had trouble loading 16-bit tiff Images under Mac, but with a short workaround in the imageio plugin it should be possible if you set the right data OpenGL types. But what I was wondering is, why do you make "osg_image->flipVertical();" at the end of the function "osg::Image* CreateOSGImageFromCGImage(CGImageRef image_ref)"? Because as far as I see pictures are loaded in the correct orientation, even pngs or jpegs. Thanks you! Cheers, Thoenu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44391#44391 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] 64 bits windows Sample programs osggeometry.exe and osgtexture2D.exe crash
Hi, I am having problem with osggeometry.exe and osgtexture2D.exe compiled as 64bit windows executable. Both crash when calling osgdb_gif.dll. Is this a known bug. 32 bit version work fine. Thank you! Cheers, tol -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44510#44510 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] What callback for setting the viewMatrix of the camera every frame?
Hi, I am trying to write a plugin for an osg-based application with an TrackballManipultor for the camera. It is no problem to get und set the camera's viewmatrix of the main application if I do not use a camera manipulator like the TrackballManipulator. But how is it possible to change the viewmatrix every frame WITH an attached camera manipulator? I was wondering if this is possible without writing an own camera manipulator. My idea is to change the viewmatrix AFTER the camera manipulator sets the viewmatrix, so that my changed viewmatrix is used for rendering instead of the viewMatrix the camera manipulator sets. Therefore I tried to attach callbacks to the camera. Problem is I am not sure which callback I have to use. I already tried an initialDrawCallback and an updateCallback. Both callbacks are called and they also change the viewMatrix but the cameraManipulator seems to overwrite the viewMatrix every frame. The callbacks are attached to the camera with the methods setUpdateCallback() or setInitialDrawCallback. Code: ...->getViewerCamera()->setUpdateCallback(new MyNodeCallback()); ...->getViewerCamera()->setInitilDrawCallback(new MyInitialDrawCallback()); I am sure that my callbacks are working. Did I try the wrong callbacks? Which callback is the right one for my purpose? Thank you very much! Cheers, Sebas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44542#44542 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?
Hello, Sorry, the third line of 'access data' part should be : float color_a= color[3]; Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?
Hello, (1)to J.P. the related source code is as following: // camera and image setup osg::Camera::RenderTargetImplementation renderTargetImplementation; renderTargetImplementation = osg::CameraNode::FRAME_BUFFER; 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((int)XRes, (int)YRes, 1, GL_RGBA, GL_FLOAT); osg::ref_ptr camera(new osg::CameraNode()); camera->setClearColor(osg::Vec4(1000.0f, 1000.0f, 1000.0f, 1000.0f)); camera->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); camera->setRenderOrder(osg::CameraNode::PRE_RENDER); camera->setRenderTargetImplementation(renderTargetImplementation); camera->attach(osg::CameraNode::COLOR_BUFFER, image); camera->getOrCreateStateSet()->setAttribute(program, osg::StateAttribute::ON); // access data (only for instance) osg::Vec4f * fragments = (osg::Vec4f *)(image->data()); osg::Vec4f color= distances[10]; float color_a= distances[3]; As can be seen from the source code, I attach an image to the camera, and access data from the image, I am rendering to an FBO. So would you please give me some advice further? Thank you very much! *(2) to Paul* Refer to (1) of this message, does osg::CameraNode::COLOR_BUFFER imply a RGB or RGBA buffer ? or it doesn't even matter? 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] More Information about the osgAndroid [help]
Dear Martino, Happy new year Can you please help me with the osg android example On 20/12/11 22:06, osg-users-requ...@lists.openscenegraph.org wrote: -- Message: 2 Date: Tue, 20 Dec 2011 19:16:56 +0200 From: Nearchos To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osg-users Digest, Vol 54, Issue 20 Message-ID: Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Hi Martino, Thanks for the quick reply I compiled the (make/ make install) in the following directory /home/nearchos/OpenSceneGraph_Android/make_test The sample is in another directory /home/nearchos/OpenSceneGraph_Android/test_osg2_1 I modified the Android.mk in the /jni folder OSG_ANDROID_DIR:= /home/nearchos/OpenSceneGraph_Android/make_test And i have the following errors In file included from jni/osgNativeLib.cpp:7: jni/OsgMainApp.hpp:21:18: error: osg/GL: No such file or directory jni/OsgMainApp.hpp:22:28: error: osg/GLExtensions: No such file or directory jni/OsgMainApp.hpp:23:21: error: osg/Depth: No such file or directory jni/OsgMainApp.hpp:24:23: error: osg/Program: No such file or directory jni/OsgMainApp.hpp:25:22: error: osg/Shader: No such file or directory jni/OsgMainApp.hpp:26:20: error: osg/Node: No such file or directory jni/OsgMainApp.hpp:27:22: error: osg/Notify: No such file or directory jni/OsgMainApp.hpp:29:24: error: osgText/Text: No such file or directory jni/OsgMainApp.hpp:31:31: error: osgDB/DatabasePager: No such file or directory jni/OsgMainApp.hpp:32:26: error: osgDB/Registry: No such file or directory jni/OsgMainApp.hpp:33:26: error: osgDB/ReadFile: No such file or directory jni/OsgMainApp.hpp:34:27: error: osgDB/WriteFile: No such file or directory jni/OsgMainApp.hpp:36:28: error: osgViewer/Viewer: No such file or directory jni/OsgMainApp.hpp:37:30: error: osgViewer/Renderer: No such file or directory jni/OsgMainApp.hpp:38:41: error: osgViewer/ViewerEventHandlers: No such file or directory jni/OsgMainApp.hpp:40:33: error: osgGA/GUIEventAdapter: No such file or directory jni/OsgMainApp.hpp:41:48: error: osgGA/MultiTouchTrackballManipulator: No such file or directory jni/OsgMainApp.hpp:42:38: error: osgGA/TrackballManipulator: No such file or directory jni/OsgMainApp.hpp:43:35: error: osgGA/FlightManipulator: No such file or directory jni/OsgMainApp.hpp:44:34: error: osgGA/DriveManipulator: No such file or directory jni/OsgMainApp.hpp:45:44: error: osgGA/KeySwitchMatrixManipulator: No such file or directory jni/OsgMainApp.hpp:46:37: error: osgGA/StateSetManipulator: No such file or directory jni/OsgMainApp.hpp:47:42: error: osgGA/AnimationPathManipulator: No such file or directory jni/OsgMainApp.hpp:48:36: error: osgGA/TerrainManipulator: No such file or directory jni/OsgMainApp.hpp:49:38: error: osgGA/SphericalManipulator: No such file or directory In file included from jni/OsgMainApp.hpp:51, from jni/osgNativeLib.cpp:7: jni/OsgAndroidNotifyHandler.hpp:17: error: expected initializer before ':' token In file included from jni/osgNativeLib.cpp:7: jni/OsgMainApp.hpp:54: error: expected constructor, destructor, or type conversion before '(' token jni/OsgMainApp.hpp:134: error: 'osg' has not been declared jni/OsgMainApp.hpp:134: error: ISO C++ forbids declaration of 'ref_ptr' with no type jni/OsgMainApp.hpp:134: error: expected ';' before '<' token jni/OsgMainApp.hpp:135: error: 'osg' has not been declared jni/OsgMainApp.hpp:135: error: ISO C++ forbids declaration of 'ref_ptr' with no type jni/OsgMainApp.hpp:135: error: expected ';' before '<' token jni/OsgMainApp.hpp:136: error: 'osg' has not been declared jni/OsgMainApp.hpp:136: error: ISO C++ forbids declaration of 'ref_ptr' with no type jni/OsgMainApp.hpp:136: error: expected ';' before '<' token jni/OsgMainApp.hpp:137: error: 'osg' has not been declared jni/OsgMainApp.hpp:137: error: ISO C++ forbids declaration of 'ref_ptr' with no type jni/OsgMainApp.hpp:137: error: expected ';' before '<' token jni/OsgMainApp.hpp:145: error: ISO C++ forbids declaration of 'OsgAndroidNotifyHandler' with no type jni/OsgMainApp.hpp:145: error: expected ';' before '*' token jni/OsgMainApp.hpp:147: error: ISO C++ forbids declaration of 'vector' with no type jni/OsgMainApp.hpp:147: error: invalid use of '::' jni/OsgMainApp.hpp:147: error: expected ';' before '<' token jni/OsgMainApp.hpp:148: error: ISO C++ forbids declaration of 'vector' with no type jni/OsgMainApp.hpp:148: error: invalid use of '::' jni/OsgMainApp.hpp:148: error: expected ';' before '<' token jni/OsgMainApp.hpp:149: error: ISO C++ forbids declaration of 'vector' with no type jni/OsgMainApp.hpp:149: error: invalid use of '::' jni/OsgMainApp.hpp:149: error: expected ';' before '<' token jni/OsgMainApp.hpp:177: error: 'osg' has not been declared jni/OsgMainApp.hpp:177: error: expected ',' or '...' before 'color' jni/OsgMainApp.hpp:178: error: 'osg' has not been declared jni/OsgMainApp.hpp:178: error: ISO C++ forbids d
Re: [osg-users] Newbie Questions re: Camera control (I think)
I already built one using VirtualPlanetBuilder and some GeoTIFF files I got from the USGS Seamless server. I've been looking at that using the example programs, trying to learn what's what.. VPB makes things so simple, it's pretty amazing. --Matthew On Tue, Jan 3, 2012 at 9:33 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: > Do you have a database to fly around in? If not, take a look at > VirtualPlanetBuilder to build one...:) > > -Shayne > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo > Sent: Tuesday, January 03, 2012 9:37 AM > To: OpenSceneGraph Users > Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) > > I'm just working on a project to learn OSG, etc. For now, I've written > a plugin for a flight simulator that will give me the GPS coords, > altitude, heading etc.. and I wanted to see if I could get OSG to > follow along with that data feed on my laptop. > > That's why I was asking about positioning the camera in space - I > wanted to look at the same thing I was looking at in XPlane. I > figured this would be a fun way to combine my interest in programming > and aviation, while learning OpenGL/C++/OSG in the process. > > For now, I'll check out the EllipsoidModel. At first glance, it looks > like I'll be good friends with this method by the end of things: > > void osg::EllipsoidModel::convertLatLongHeightToXYZ > > Going from the little I know, I could take those XYZ coords and place > them into a matrix and then use that in the Viewer. I just need to > work backwards from the input to Camera->setViewMatrix to find the > APIs for creating that matrix.. > > --Matthew > > On Tue, Jan 3, 2012 at 8:01 AM, Tueller, Shayne R Civ USAF AFMC 519 > SMXS/MXDEC wrote: >> Matthew, >> >> Perhaps you can elaborate a bit more on what you're trying to accomplish >> with OSG. That way the community can be in a better position to offer some >> advice and help. >> >> There are plenty of resources online that can help with understanding the >> OpenGL transformation pipeline. There's always the OpenGL "redbook" >> http://www.opengl.org/documentation/red_book/. Paul Martz has a great book >> as well that you can read for introduction http://www.opengldistilled.com/. >> This is a good place to start. >> >> If you google "OpenGL transformation pipline", many hits and resources will >> come up that can help you. >> >> As for converting geodetic to geocentric coordinates, OSG can help you with >> that. Take a look at the EllipsoidModel class in OSG... >> >> Regards, >> -Shayne >> >> -Original Message- >> From: osg-users-boun...@lists.openscenegraph.org >> [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo >> Sent: Tuesday, January 03, 2012 8:32 AM >> To: OpenSceneGraph Users >> Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) >> >> Hello - >> >> I really appreciate your reply... part of my problem is not knowing the >> proper terms to even be able to search for what I want... I think you're >> correct in suggesting she reading about OpenGL as well. Do you happen to >> have any suggestions? >> >> I'll look around for converting the geodetic coordinates to cartesian >> coordinates, which I assume must be based on the GeoTIFF scale I used as >> input.. That gives me something to search for! >> >> I'll also look up the view matrix discussions you mentioned here.. thanks! >> >> If course, any links to code, sample code, etc that you can provide would be >> a great help for jumping off. Its much easier to search for class and method >> names rather than abstract ideas.. >> >> Again, thank you! >> >> Matthew >> >> On Jan 3, 2012 7:19 AM, "Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC" >> wrote: >> >> >> Matthew, >> >> Geodetic coordinates (lat,lon,alt) are typically mapped into some sort >> of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). >> Setting the view matrix will operate in the latter CS. >> >> The projection matrix does not control where you are looking. The view >> matrix determines that. The projection matrix controls the viewing >> frustum. Perhaps a review of the OpenGL transformation pipeline is >> appropriate here. >> >> Orientation (h,p,r) and position are concatenated together to form the >> view matrix. This topic has been discussed on how to manually set the >> view matrix to your liking. >> >> If you need some code snippets to get started, that can be >> provided...:) >> >> -Shayne >> >> -Original Message- >> From: osg-users-boun...@lists.openscenegraph.org >> [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of >> Matthew >> Runo >> Sent: Monday, January 02, 2012 10:18 AM >> To: osg-users@lists.openscenegraph.org >>
Re: [osg-users] Newbie Questions re: Camera control (I think)
Do you have a database to fly around in? If not, take a look at VirtualPlanetBuilder to build one...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Tuesday, January 03, 2012 9:37 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) I'm just working on a project to learn OSG, etc. For now, I've written a plugin for a flight simulator that will give me the GPS coords, altitude, heading etc.. and I wanted to see if I could get OSG to follow along with that data feed on my laptop. That's why I was asking about positioning the camera in space - I wanted to look at the same thing I was looking at in XPlane. I figured this would be a fun way to combine my interest in programming and aviation, while learning OpenGL/C++/OSG in the process. For now, I'll check out the EllipsoidModel. At first glance, it looks like I'll be good friends with this method by the end of things: void osg::EllipsoidModel::convertLatLongHeightToXYZ Going from the little I know, I could take those XYZ coords and place them into a matrix and then use that in the Viewer. I just need to work backwards from the input to Camera->setViewMatrix to find the APIs for creating that matrix.. --Matthew On Tue, Jan 3, 2012 at 8:01 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: > Matthew, > > Perhaps you can elaborate a bit more on what you're trying to accomplish with > OSG. That way the community can be in a better position to offer some advice > and help. > > There are plenty of resources online that can help with understanding the > OpenGL transformation pipeline. There's always the OpenGL "redbook" > http://www.opengl.org/documentation/red_book/. Paul Martz has a great book as > well that you can read for introduction http://www.opengldistilled.com/. This > is a good place to start. > > If you google "OpenGL transformation pipline", many hits and resources will > come up that can help you. > > As for converting geodetic to geocentric coordinates, OSG can help you with > that. Take a look at the EllipsoidModel class in OSG... > > Regards, > -Shayne > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo > Sent: Tuesday, January 03, 2012 8:32 AM > To: OpenSceneGraph Users > Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) > > Hello - > > I really appreciate your reply... part of my problem is not knowing the > proper terms to even be able to search for what I want... I think you're > correct in suggesting she reading about OpenGL as well. Do you happen to have > any suggestions? > > I'll look around for converting the geodetic coordinates to cartesian > coordinates, which I assume must be based on the GeoTIFF scale I used as > input.. That gives me something to search for! > > I'll also look up the view matrix discussions you mentioned here.. thanks! > > If course, any links to code, sample code, etc that you can provide would be > a great help for jumping off. Its much easier to search for class and method > names rather than abstract ideas.. > > Again, thank you! > > Matthew > > On Jan 3, 2012 7:19 AM, "Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC" > wrote: > > > Matthew, > > Geodetic coordinates (lat,lon,alt) are typically mapped into some sort > of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). > Setting the view matrix will operate in the latter CS. > > The projection matrix does not control where you are looking. The view > matrix determines that. The projection matrix controls the viewing > frustum. Perhaps a review of the OpenGL transformation pipeline is > appropriate here. > > Orientation (h,p,r) and position are concatenated together to form the > view matrix. This topic has been discussed on how to manually set the > view matrix to your liking. > > If you need some code snippets to get started, that can be > provided...:) > > -Shayne > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of > Matthew > Runo > Sent: Monday, January 02, 2012 10:18 AM > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] Newbie Questions re: Camera control (I think) > > Hi, > > I found the CameraControl wiki page, but it has a warning that it's out > of date.. and I don't know how to update it to the osgViewer class > because I can't get to the documentation (that, and I'm reasonably new > to C++). > > - Given a point in 3d space with World Coordinates (eg, Latitude, > Longitude, Altitude), how can I position the viewe
Re: [osg-users] Kinect(OpenNI) / Blender - Character / Animation
Hi Cedric, by the version 2.59 it doesn't work. I install the the script and see the entry, but I can not enable the addon. [Image: http://www7.pic-upload.de/thumb/03.01.12/xum28nx4h7fr.png ] (http://www.pic-upload.de/view-12504262/blender2_59.png.html) By the Version 2.60a it works good. Thanks. ___ Now I have two skeletons (blender, kinect) with different size. How can I match this? Or is it enough to copy the Rotation from the Bones? In a simple test I create a funktion like this. update(XnSkeletonJointTransformation jointT) { //fill Matrix with the value from jointT ::osg::Matrix mat(values); Bone->setMatrix(mat); } Thank you! Cheers, Benjamin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44555#44555 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Newbie Questions re: Camera control (I think)
I'm just working on a project to learn OSG, etc. For now, I've written a plugin for a flight simulator that will give me the GPS coords, altitude, heading etc.. and I wanted to see if I could get OSG to follow along with that data feed on my laptop. That's why I was asking about positioning the camera in space - I wanted to look at the same thing I was looking at in XPlane. I figured this would be a fun way to combine my interest in programming and aviation, while learning OpenGL/C++/OSG in the process. For now, I'll check out the EllipsoidModel. At first glance, it looks like I'll be good friends with this method by the end of things: void osg::EllipsoidModel::convertLatLongHeightToXYZ Going from the little I know, I could take those XYZ coords and place them into a matrix and then use that in the Viewer. I just need to work backwards from the input to Camera->setViewMatrix to find the APIs for creating that matrix.. --Matthew On Tue, Jan 3, 2012 at 8:01 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: > Matthew, > > Perhaps you can elaborate a bit more on what you're trying to accomplish with > OSG. That way the community can be in a better position to offer some advice > and help. > > There are plenty of resources online that can help with understanding the > OpenGL transformation pipeline. There's always the OpenGL "redbook" > http://www.opengl.org/documentation/red_book/. Paul Martz has a great book as > well that you can read for introduction http://www.opengldistilled.com/. This > is a good place to start. > > If you google "OpenGL transformation pipline", many hits and resources will > come up that can help you. > > As for converting geodetic to geocentric coordinates, OSG can help you with > that. Take a look at the EllipsoidModel class in OSG... > > Regards, > -Shayne > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo > Sent: Tuesday, January 03, 2012 8:32 AM > To: OpenSceneGraph Users > Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) > > Hello - > > I really appreciate your reply... part of my problem is not knowing the > proper terms to even be able to search for what I want... I think you're > correct in suggesting she reading about OpenGL as well. Do you happen to have > any suggestions? > > I'll look around for converting the geodetic coordinates to cartesian > coordinates, which I assume must be based on the GeoTIFF scale I used as > input.. That gives me something to search for! > > I'll also look up the view matrix discussions you mentioned here.. thanks! > > If course, any links to code, sample code, etc that you can provide would be > a great help for jumping off. Its much easier to search for class and method > names rather than abstract ideas.. > > Again, thank you! > > Matthew > > On Jan 3, 2012 7:19 AM, "Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC" > wrote: > > > Matthew, > > Geodetic coordinates (lat,lon,alt) are typically mapped into some sort > of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). > Setting the view matrix will operate in the latter CS. > > The projection matrix does not control where you are looking. The view > matrix determines that. The projection matrix controls the viewing > frustum. Perhaps a review of the OpenGL transformation pipeline is > appropriate here. > > Orientation (h,p,r) and position are concatenated together to form the > view matrix. This topic has been discussed on how to manually set the > view matrix to your liking. > > If you need some code snippets to get started, that can be > provided...:) > > -Shayne > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of > Matthew > Runo > Sent: Monday, January 02, 2012 10:18 AM > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] Newbie Questions re: Camera control (I think) > > Hi, > > I found the CameraControl wiki page, but it has a warning that it's out > of date.. and I don't know how to update it to the osgViewer class > because I can't get to the documentation (that, and I'm reasonably new > to C++). > > - Given a point in 3d space with World Coordinates (eg, Latitude, > Longitude, Altitude), how can I position the viewer at that point? I'm > thinking that I need to create a matrix with my points in it, and then > call camera.setViewMatrix(..). Is that correct? How do I convert my > world coordinates into coordinates that will work in the camera? > > - Once I'm at that point, do I use camera.setProjectionMatrix to > control > where I'm looking? For example, say I want to look due Nor
Re: [osg-users] Newbie Questions re: Camera control (I think)
Matthew, Perhaps you can elaborate a bit more on what you're trying to accomplish with OSG. That way the community can be in a better position to offer some advice and help. There are plenty of resources online that can help with understanding the OpenGL transformation pipeline. There's always the OpenGL "redbook" http://www.opengl.org/documentation/red_book/. Paul Martz has a great book as well that you can read for introduction http://www.opengldistilled.com/. This is a good place to start. If you google "OpenGL transformation pipline", many hits and resources will come up that can help you. As for converting geodetic to geocentric coordinates, OSG can help you with that. Take a look at the EllipsoidModel class in OSG... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Tuesday, January 03, 2012 8:32 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) Hello - I really appreciate your reply... part of my problem is not knowing the proper terms to even be able to search for what I want... I think you're correct in suggesting she reading about OpenGL as well. Do you happen to have any suggestions? I'll look around for converting the geodetic coordinates to cartesian coordinates, which I assume must be based on the GeoTIFF scale I used as input.. That gives me something to search for! I'll also look up the view matrix discussions you mentioned here.. thanks! If course, any links to code, sample code, etc that you can provide would be a great help for jumping off. Its much easier to search for class and method names rather than abstract ideas.. Again, thank you! Matthew On Jan 3, 2012 7:19 AM, "Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC" wrote: Matthew, Geodetic coordinates (lat,lon,alt) are typically mapped into some sort of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). Setting the view matrix will operate in the latter CS. The projection matrix does not control where you are looking. The view matrix determines that. The projection matrix controls the viewing frustum. Perhaps a review of the OpenGL transformation pipeline is appropriate here. Orientation (h,p,r) and position are concatenated together to form the view matrix. This topic has been discussed on how to manually set the view matrix to your liking. If you need some code snippets to get started, that can be provided...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Monday, January 02, 2012 10:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Newbie Questions re: Camera control (I think) Hi, I found the CameraControl wiki page, but it has a warning that it's out of date.. and I don't know how to update it to the osgViewer class because I can't get to the documentation (that, and I'm reasonably new to C++). - Given a point in 3d space with World Coordinates (eg, Latitude, Longitude, Altitude), how can I position the viewer at that point? I'm thinking that I need to create a matrix with my points in it, and then call camera.setViewMatrix(..). Is that correct? How do I convert my world coordinates into coordinates that will work in the camera? - Once I'm at that point, do I use camera.setProjectionMatrix to control where I'm looking? For example, say I want to look due North at lat 26, long -119, altitude 52. - Given a set of rotations that should happen to the camera (roll 3 degrees right, pitch 4 degrees up, etc), are those best handled by looking at the examples from osgGA::FirstPersonManipulator and going from there by building up a Matrix to use somewhere to rotate the camera's view? As of right now I've been tinkering with the code for the various implementations of the osgGA::FirstPersonManipulator and learning quite a bit - I just wanted to get these questions in my mind cleared up. I'm sorry that they're so basic =\ Thank you very much for your help, and for this community full of knowledge! Thank you again, Matthew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44529#44529 ___ osg-users mailing list
Re: [osg-users] OSG website unresponsive
On 1/3/2012 8:31 AM, Robert Osfield wrote: >> If have a (rented) root server in south Germany, if it helps I would help >> out with resources (psql database or whole virtual machine) and you can >> relocate the Database or whole site if you want. > Thanks for the offer. I have an dreamhost account that might be a > suitable candidate as well. One issue would be how much memory, disk space, bandwidth and CPU assets does the web site currently consume? To do your own mailing list software, you typically need a static IP on a VPS (Virtual Private Server). Similarly, you can't run SVN on most shared instances, but a VPS can. Dreamhost, while inexpensive (I have an account with them to run some legacy sites) can be kind of skimpy on the memory and CPU. Large CMSes can have trouble running on the resources they provide. I don't know if Trac is considered large nor not, but Drupal doesn't recommend Dreamhost for this reason. > Robert. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Newbie Questions re: Camera control (I think)
Hello - I really appreciate your reply... part of my problem is not knowing the proper terms to even be able to search for what I want... I think you're correct in suggesting she reading about OpenGL as well. Do you happen to have any suggestions? I'll look around for converting the geodetic coordinates to cartesian coordinates, which I assume must be based on the GeoTIFF scale I used as input.. That gives me something to search for! I'll also look up the view matrix discussions you mentioned here.. thanks! If course, any links to code, sample code, etc that you can provide would be a great help for jumping off. Its much easier to search for class and method names rather than abstract ideas.. Again, thank you! Matthew On Jan 3, 2012 7:19 AM, "Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC" < shayne.tuel...@hill.af.mil> wrote: > Matthew, > > Geodetic coordinates (lat,lon,alt) are typically mapped into some sort > of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). > Setting the view matrix will operate in the latter CS. > > The projection matrix does not control where you are looking. The view > matrix determines that. The projection matrix controls the viewing > frustum. Perhaps a review of the OpenGL transformation pipeline is > appropriate here. > > Orientation (h,p,r) and position are concatenated together to form the > view matrix. This topic has been discussed on how to manually set the > view matrix to your liking. > > If you need some code snippets to get started, that can be provided...:) > > -Shayne > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew > Runo > Sent: Monday, January 02, 2012 10:18 AM > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] Newbie Questions re: Camera control (I think) > > Hi, > > I found the CameraControl wiki page, but it has a warning that it's out > of date.. and I don't know how to update it to the osgViewer class > because I can't get to the documentation (that, and I'm reasonably new > to C++). > > - Given a point in 3d space with World Coordinates (eg, Latitude, > Longitude, Altitude), how can I position the viewer at that point? I'm > thinking that I need to create a matrix with my points in it, and then > call camera.setViewMatrix(..). Is that correct? How do I convert my > world coordinates into coordinates that will work in the camera? > > - Once I'm at that point, do I use camera.setProjectionMatrix to control > where I'm looking? For example, say I want to look due North at lat 26, > long -119, altitude 52. > > - Given a set of rotations that should happen to the camera (roll 3 > degrees right, pitch 4 degrees up, etc), are those best handled by > looking at the examples from osgGA::FirstPersonManipulator and going > from there by building up a Matrix to use somewhere to rotate the > camera's view? > > As of right now I've been tinkering with the code for the various > implementations of the osgGA::FirstPersonManipulator and learning quite > a bit - I just wanted to get these questions in my mind cleared up. I'm > sorry that they're so basic =\ > > Thank you very much for your help, and for this community full of > knowledge! > > Thank you again, > Matthew > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44529#44529 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or > g > ___ > 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 website unresponsive
Hi Torben et. al, On 3 January 2012 09:44, Torben Dannhauer wrote: > what are the current plans regarding the website changes (new server, new > software)? We didn't come to any conclusions why I raised the topic last year. I'll ping Jose L. about current server status and to join the discussion. > If have a (rented) root server in south Germany, if it helps I would help out > with resources (psql database or whole virtual machine) and you can relocate > the Database or whole site if you want. Thanks for the offer. I have an dreamhost account that might be a suitable candidate as well. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Newbie Questions re: Camera control (I think)
Matthew, Geodetic coordinates (lat,lon,alt) are typically mapped into some sort of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). Setting the view matrix will operate in the latter CS. The projection matrix does not control where you are looking. The view matrix determines that. The projection matrix controls the viewing frustum. Perhaps a review of the OpenGL transformation pipeline is appropriate here. Orientation (h,p,r) and position are concatenated together to form the view matrix. This topic has been discussed on how to manually set the view matrix to your liking. If you need some code snippets to get started, that can be provided...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Monday, January 02, 2012 10:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Newbie Questions re: Camera control (I think) Hi, I found the CameraControl wiki page, but it has a warning that it's out of date.. and I don't know how to update it to the osgViewer class because I can't get to the documentation (that, and I'm reasonably new to C++). - Given a point in 3d space with World Coordinates (eg, Latitude, Longitude, Altitude), how can I position the viewer at that point? I'm thinking that I need to create a matrix with my points in it, and then call camera.setViewMatrix(..). Is that correct? How do I convert my world coordinates into coordinates that will work in the camera? - Once I'm at that point, do I use camera.setProjectionMatrix to control where I'm looking? For example, say I want to look due North at lat 26, long -119, altitude 52. - Given a set of rotations that should happen to the camera (roll 3 degrees right, pitch 4 degrees up, etc), are those best handled by looking at the examples from osgGA::FirstPersonManipulator and going from there by building up a Matrix to use somewhere to rotate the camera's view? As of right now I've been tinkering with the code for the various implementations of the osgGA::FirstPersonManipulator and learning quite a bit - I just wanted to get these questions in my mind cleared up. I'm sorry that they're so basic =\ Thank you very much for your help, and for this community full of knowledge! Thank you again, Matthew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44529#44529 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?
If you are trying to read the alpha value from a framebuffer that has only RGB, then you will always read 1.0 for alpha, per OpenGL spec. -Paul On 1/3/2012 6:55 AM, wang shuiying wrote: Hello, In my programme, the fourth element of gl_FragColor is changed by fragment shader to be a random number between 0 and 1. But when I access this element by the corresponding image, the element is always 1. I got to know that in the rendering pipeline after fragment operation, there should be alpha test and blend and so on. When I turn off all those functions, the fourth element of gl_FragColor, which corresponds to the value of alpha, should not be affected by those tests, right? But it remains to be 1. Is there anybody who can give me some advice on that? I want to make use of the fourth element to record the material index of the objects attached to the camera in question. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] is there an osgEarth tutorial?
Hi Tolga, There isn't any specific tutorial on osgEarth. We do have the documentation on osgearth.org, plenty of example applications and demonstrative .earth files in the tests directory. You can use the EarthManipulator with the setTetherNode option to attach it to a Node if you're looking to make the manipulator follow a node. Thanks, Jason On Mon, Jan 2, 2012 at 7:29 AM, Tolga Yilmaz wrote: > Hi, > Is there any tutorial about osgEarth? i especialy need a node track > manipulator but any tutorial will be appreciated.. > > ... > > > Thank you! > > Cheers, > Tolga > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44520#44520 > > > > > > ___ > 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: can the fourth element of gl_FragColor be changed by shader?
Hi, On 03/01/2012 15:55, wang shuiying wrote: Hello, In my programme, the fourth element of gl_FragColor is changed by fragment shader to be a random number between 0 and 1. But when I access this element by the corresponding image, the element is always 1. What image are you talking about here? Are you saving an image? How are you accessing the data? What target are you rendering to? An FBO? Normal frame buffer? We are using the fourth channel in FBO as pure data stores, so this should work. jp I got to know that in the rendering pipeline after fragment operation, there should be alpha test and blend and so on. When I turn off all those functions, the fourth element of gl_FragColor, which corresponds to the value of alpha, should not be affected by those tests, right? But it remains to be 1. Is there anybody who can give me some advice on that? I want to make use of the fourth element to record the material index of the objects attached to the camera in question. Thank you 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
[osg-users] Help: can the fourth element of gl_FragColor be changed by shader?
Hello, In my programme, the fourth element of gl_FragColor is changed by fragment shader to be a random number between 0 and 1. But when I access this element by the corresponding image, the element is always 1. I got to know that in the rendering pipeline after fragment operation, there should be alpha test and blend and so on. When I turn off all those functions, the fourth element of gl_FragColor, which corresponds to the value of alpha, should not be affected by those tests, right? But it remains to be 1. Is there anybody who can give me some advice on that? I want to make use of the fourth element to record the material index of the objects attached to the camera in question. Thank you in advance! Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] New QT 4.8 integration ?
Hi, Does anyone working on a QT 4.8 integration of OSG with support of this: http://labs.qt.nokia.com/2011/06/03/threaded-opengl-in-4-8/ Cheers, Remo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44538#44538 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
Hi, Robert et Al, what are the current plans regarding the website changes (new server, new software)? If have a (rented) root server in south Germany, if it helps I would help out with resources (psql database or whole virtual machine) and you can relocate the Database or whole site if you want. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44536#44536 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org