Re: [osg-users] intersection with quad mesh: only 3 verticesreturned

2011-08-02 Thread Chris 'Xenon' Hanson
On 8/2/2011 2:49 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: > It is true that QUAD is an OpenGL primitive but the GL driver > tessellates it into two triangles underneath the hood. > As for how OSG handles quads relative to intersections, it is my > understanding that the intersector

[osg-users] Reading in geotiff for Texture

2011-08-02 Thread Cary, Karl A.
I need to be able to read in a geotiff and use it as an osg::Texture. I made sure I had libgdal built and installed and then rebuilt OSG against it. I am then making a call to osgDB::readImageFile(pathToGeotiff). But it always returns NULL. What am I missing here? Shouldn't I be able to do this?

Re: [osg-users] using ClipNode to cut a model in two, then cap the open side

2011-08-02 Thread Alessandro Terenzi
I'm trying the Javier's "CappingEffect" example and it seems to work fine...but only when I look at the scene from one side...if I move the camera to the opposite side I still see the cappings that are drawn over my geometry (they should be hidden instead)...please refer to the attachments to se

Re: [osg-users] intersection with quad mesh: only 3 verticesreturned

2011-08-02 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
It is true that QUAD is an OpenGL primitive but the GL driver tessellates it into two triangles underneath the hood. As for how OSG handles quads relative to intersections, it is my understanding that the intersector works with line/triangle intersections. If you're trying to intersect a quad, how

[osg-users] Custom Drawables

2011-08-02 Thread Jeremy Moles
Hello all! I am writing a custom Drawable that uses some new OpenGL extension functions. I have an Extensions class (essentially copied from the one defined in PixelBufferObject) that does the standard binding of extension name string to function pointer. However, these are members of the Extensio

[osg-users] osgb vs. ive ProxyNode database path

2011-08-02 Thread Pecoraro, Alexander N
I noticed that in the osgb format the database path of the ProxyNode is no longer determined at runtime. This is different than the ive format, which if you don't set the database path it will determine the database path by using the osgDB::Options' database path list. This was nice because it e

Re: [osg-users] intersection with quad mesh: only 3 vertices returned

2011-08-02 Thread Torben Dannhauer
Hi S2LR, I thought QUAD is a OpenGL primitive. Your statement make sence to me. But then OSG hides the substitution by 2 triangles quite good, also in the wiremode of osgViewer the quads are displayed. I thought (even when not to often used as triangles) that quads are natively supported and w

Re: [osg-users] intersection with quad mesh: only 3 vertices returned

2011-08-02 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Torben, My guess is that the quads are geometrically represented by two triangles with a shared edge. I believe the intersector is returning a ray/triangle intersection so one (that is hit) of the two triangles that make up the quad is being returned. This probably doesn't solve your problem but

[osg-users] intersection with quad mesh: only 3 vertices returned

2011-08-02 Thread Torben Dannhauer
Hi, I have a mesh of quads. If i intersect them, it hits the face and returns me the results (osgUtil::LineSegmentIntersector::Intersection& result) As I tried to access the indices I realized that it only returns 3 vertices. ( result.indexList.size() == 3 ) Is this a bug or do I miss something

[osg-users] [build] Missing CURL_DEBUG_LIBRARY for Windows

2011-08-02 Thread Thomas Lerman
OSG-3.0.0: In CMAKE, it only has CURL_LIBRARY (no DEBUG version). To get debug to work without crashing (heap corruption) in Windows (I am using VS2008), I had to go to the solution file and manually caused the debug version of osgdb_curl to use the debug version of curllib. I am not sure if I

[osg-users] Can't get osgText to display text using osgViewer::GraphicsWindow

2011-08-02 Thread Pau Estalella
Hi, I'm trying to add text labels, and I haven't been able to get osgText to display what I want. The rest of the scene shows correctly, it's only that text does not appear. I can display the bounding box and the alignment mark, not the text. A reduced version of my code is attached. I am usi

Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Sergey Polischuk
Once i spend several hours resolving same problem, now i know :D 02.08.2011, 20:10, "Jason Daly" : > On 08/02/2011 05:35 AM, Joe Abreu wrote: > >>  hybr wrote: >>>  Seems like you mess up sampler uniforms setup. You unit declared as >>> unsigned int, and osg uses different gl functions to set uni

Re: [osg-users] NodeCallback

2011-08-02 Thread Jason Daly
On 08/02/2011 07:44 AM, Martin Haffner wrote: Hi, Guys, you are great! Thanks to both of you for your good explanations! :D Another little question: I guess a Camera::DrawCallback is a callback that gets added to a osg::Camera and that gets called (operator()) every time the camera renders t

Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Jason Daly
On 08/02/2011 05:35 AM, Joe Abreu wrote: hybr wrote: Seems like you mess up sampler uniforms setup. You unit declared as unsigned int, and osg uses different gl functions to set uniform with int and unsigned values (which is right thing), and samplers uniforms must be set with signed int versi

Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Sergey Polischuk
Hi all PSM technique with double sided projection transform dont have this problems and dont require scene analysis, there are article about it in gpugems 3. It is not implemented in osgShadows though. I have osg implementation, but cant share source. But if you are up to writing osgShadow psm

Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Cyril Bondue
Thank you for your answers. I tried all LightSpacePerspective shadow techniques with the same result :/ Changing the MinLightMargin didn't solve the problem either. Can it be a setting on the light or the camera? I wanted to write a short program you could try, but i couldn't reproduce the probl

Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Sebastian Messerschmidt
Hi Cyril, have you tried setting the MinLightMargin of the shadowmap to a high value? I didn't look to closely, but i recall having such problems when using the standard settings. Also the LightSpacePerspective shadow mapping works very well for me, so maybe try this one for the bigger outdoor

[osg-users] Question about TerrainManipulator

2011-08-02 Thread caijun2002108
Hello everyone! I'm trying to write a Manipulator like TerrainManipulator.And My Manipulator is written by TerrainManipulator.When I read the codes in TerrainManipulator,I felt confused by some codes,such as: CoordinateFrame coordinateFrame = getCoordinateFrame(_center);

Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Robert Osfield
Hi Cyril, I'm afraid I don't have an immeditate solutions for you but if you can wait a few weeks I should hopefully have an improved view depedent shadow technique implemented. Robert. On Tue, Aug 2, 2011 at 1:45 PM, Cyril Bondue wrote: > Hello fellow coders :) > > I'm asking for you help one

Re: [osg-users] OSG Format : some explanations

2011-08-02 Thread Robert Osfield
Hi Thomas, On Tue, Aug 2, 2011 at 1:38 PM, Thomas Canipel wrote: > Actually, the main thing is just to understand the way the .osg format is > holding the informations. I would recommend targetting to the new .osgx or .osgt formats supported by OpenSceneGraph-3.0 as these formats are support by

Re: [osg-users] osgWidget documentation?

2011-08-02 Thread Daniel Cámpora
Hi Jeremy :) Just a follow up. Finally I went for a custom Event Handler, it made more sense to me to keep the GUIAction and Event adapters, seems more flexible. I didn't try the getEventQueue, it might be another possibility to implement this if only the generation of events are needed. Yet I

[osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Cyril Bondue
Hello fellow coders :) I'm asking for you help one more time. I have a problem with shadows, it seems like I have a "view dependent shadow clipping plane". I have an osgShadow::ShadowedScene with a city and a light following the player in it. The problem is that, when we move the camera, the sha

Re: [osg-users] OSG Format : some explanations

2011-08-02 Thread Thomas Canipel
Actually, the main thing is just to understand the way the .osg format is holding the informations. I dont know yet what I will have to export so as the main information to show something (doesnt matter of the tech) are the positions,the coord,the normals and the indices I tried to understand w

Re: [osg-users] OSG Format : some explanations

2011-08-02 Thread Torben Dannhauer
Hi Thomas, Do you want ot parse the textfile? I think it would be more robust if you link against the OSG libraries and use the native acess functions instead parsing the plain file format yourself. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/

[osg-users] OSG Format : some explanations

2011-08-02 Thread Thomas Canipel
Hi all, Just getting into a new convert for an exporter : What I need : vertexPosition vertexTextureCoords vertexNormals indices I was able to find the vertexPosition easily, as for the texture coords and the normal ( taking for example the cow.osg) but I got an issue trying to deduce the ind

Re: [osg-users] Tessellation

2011-08-02 Thread Sergey Kurdakov
Hi Michael, you might want to use http://tetgen.berlios.de/ it has examples - the triangulation will take just one call (it allows to define contstrains in natural way ), or http://gts.sourceforge.net/ or as it was advised use osgUtil::DelauneyTriangulator ( thouht I personally never tried it

Re: [osg-users] Tessellation

2011-08-02 Thread Glenn Waldron
Michael, Perhaps you could use the osgUtil::DelauneyTriangulator to triangulate your point mesh. This will create a convex mesh. You can try to use the Constraints to define the boundaries, and then remove the exterior triangles afterwards. Just an idea. Glenn Waldron / Pelican Mapping / @glennwa

Re: [osg-users] Difference between textures and images

2011-08-02 Thread Sergey Polischuk
Hi, Martin Texture classes is just handle to opengl textures, they store filtering modes, texture coords wrap settings etc. They dont have buffer with actual texture data - thats what image for. You can load osg::Image data to opengl texture with use of osg::Texture, but image still hold data o

Re: [osg-users] NodeCallback

2011-08-02 Thread Martin Haffner
Hi, Guys, you are great! Thanks to both of you for your good explanations! :D Another little question: I guess a Camera::DrawCallback is a callback that gets added to a osg::Camera and that gets called (operator()) every time the camera renders the scene? Thank you! Cheers, Martin

[osg-users] Difference between textures and images

2011-08-02 Thread Martin Großer
Hello, there are a class image and a class texture (texture2D) in OpenSceneGraph. I would like to know what is the generell difference between an image and a texture? Why don't you only provide a texture class? Is the reason the texture is on the graphics card memory and the image on the cpu me

Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Joe Abreu
hybr wrote: > Seems like you mess up sampler uniforms setup. You unit declared as unsigned > int, and osg uses different gl functions to set uniform with int and unsigned > values (which is right thing), and samplers uniforms must be set with signed > int version. So just cast it to int when us

[osg-users] OSG 3.0.1 on MacOSX 10.7 release issues

2011-08-02 Thread Marco Fiocco
Hi, I'm trying to compile OSG 3.0.1 on MacOSX Lion (10.7). I got errors at compile time due to changes in some framework API. But I haven't got any error if I define CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk If I compile using Makefiles and also define CMAKE_BUILD_TYPE=Debug CMAKE_OSX_A

Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Sergey Polischuk
Hi, Joe Seems like you mess up sampler uniforms setup. You unit declared as unsigned int, and osg uses different gl functions to set uniform with int and unsigned values (which is right thing), and samplers uniforms must be set with signed int version. So just cast it to int when use uniform->s