Re: [osg-users] zbuffer issue

2009-06-15 Thread Christian Sam
Hi, thanks for all the reply like colin noted, the render problem vanished as i stripped off the offsets which caused the large coordinates and work now with localized coordinates. if i ever need to display the real coordinates in an text-insert, i can re-add the stripped offset before display

Re: [osg-users] zbuffer issue

2009-06-14 Thread Christian Sam
i forgot three things to mention: 1.) as i mentioned above, i place adjacent trees into one geometry. e.g. a geometries' vertex-array has numberOfAdjacentTrees*8 (=double quads ) entries. but i use only one primitiveSet to construct the geometry. i hope this is okay.

Re: [osg-users] zbuffer issue

2009-06-14 Thread Christian Sam
Sorry, for another posting: i just tested the original one drawable per tree implementation with such large coordinates again and noticed that it also tends to flicker, as well hidden faces were revealed also. i couldn't encounter the outer mentioned problems. thanks in advance, christian

Re: [osg-users] get the x-axis angle of a rotation

2009-06-04 Thread Christian Sam
Hi james, regarding your last post, did you mean that you also tried to extract angles from a rotation with the website's matrixToEuler or a similar approach, but you encountered problems that were depended on your current camera-orientation? i think the same happened to me: i wanted to get

Re: [osg-users] get the x-axis angle of a rotation

2009-06-04 Thread Christian Sam
Hi james, thanks for the quick reply, now everything is clear. Best regards, Christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13531#13531 ___ osg-users mailing list

[osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Christian Sam
Hi, i have a manipulator which stores the rotation in a quaternion. i would like to extract the angle of the, in matrix-words, x-axis of that rotation. (think of a firstperson-view - i would like to extract the angle which defines how much i look up/down) is there an easy way to get this done?

Re: [osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Christian Sam
Hi max, thanks for the hint i needed some time to inform myself about quaternions, because like you, i tried to avoid using them. you mentioned Your X-rotation is pure in the quaternion., nevertheless i don't know how to get only the Pitch-rotation (to say it in euler words) out of them.

Re: [osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Christian Sam
Hi, i had to do a little further research on the web because first i didn't understand what your code-snippet is doing. i found a website which describes the whole topic: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm; thank you james and max for

Re: [osg-users] Q for getCoordinateFrame in special and matrixManipulator in general

2009-06-02 Thread Christian Sam
Hi robert, thanks for replying. after some thoughts about it, i will ask the second question another way. how can i get a coordinateframe from only providing a position? Code: CoordinateFrame eyePointCoordFrame = getCoordinateFrame( eye ) - respectively holds a coordinateFrame in case of

Re: [osg-users] FirstPersonManipulator

2009-06-02 Thread Christian Sam
Hi simon, i got it working, i added the osgGA namespace to the parameters of the function below. i had to remove the outer enclosing namespace declaration, because the compiler complained: virtual void init(const GUIEventAdapter ,GUIActionAdapter); - virtual void init(const

Re: [osg-users] Q for getCoordinateFrame in special and matrixManipulator in general

2009-06-02 Thread Christian Sam
Hi, okay, after some examples debugging i think i got it: a CoordinateSystem is a user added node, which provides methods that allow to setup a matrix with lat/lon instead of cartesian coordinates. on flat environments, there is no need to setup a CoordinateSystem. when getCoordinateFrame(pos)

[osg-users] Q for getCoordinateFrame in special and matrixManipulator in general

2009-06-01 Thread Christian Sam
Hi community, i'm currently trying to understand how the various camera-manipulators work (trackball, terrain, ufo, etc.) and several questions arrived: - the first thing that confused me was, that Y/Z-vector directions are now the openGL-way. (is there a reason why OSG normally uses Y as

Re: [osg-users] FirstPersonManipulator

2009-05-29 Thread Christian Sam
Hi, i included the following lines in my applicationcode: #include ../include/FirstPersonManipulator.h viewer.setCameraManipulator(new osgGA::FirstPersonManipulator); and got: 1 Creating library D:\workspace\test-osg\sln\graz\Debug\graz.lib and object

[osg-users] ordered assignment of textures recommended?

2009-05-20 Thread Christian Sam
Hi community, i have a bunch of categorized roof-types. out of a handful of different textures (small dimensioned), i want to assign - depending on the rooftype, a texture per roof. the roofs are not ordered per rooftype, and i hardly expect a roof to have the same texture assigned like the

Re: [osg-users] ordered assignment of textures recommended?

2009-05-20 Thread Christian Sam
hi paul, thanks for the reply Paul Martz wrote: OSG already sorts by state at runtime... this is i wanted to know. (i wasn't sure if the optimizer is responsible for things like that) best regards, christian -- Read this topic online here:

[osg-users] set new vertexarray. automatic deallocation of the old one?

2009-05-16 Thread Christian Sam
Hi community, i have three questions: - if i want to replace a geometry's vertexarray, which was defined through an imported .osg nodefile, does it suffice to just call setVertexArray(newArray)? - will the previous array be automatically deallocated? - does this also apply in a case when

Re: [osg-users] light, normals

2009-05-15 Thread Christian Sam
Hi, i wanna thank the two posters for clarifying which different approaches are possible for this issue, because problems like that weren't covered in the basic opengl books i have read. Cheers, Christian -- Read this topic online here:

[osg-users] light, normals

2009-05-14 Thread Christian Sam
Hi, i need a little help with some lighting issues. the geometry, a roof, consists of a drawable with one primitive (DrawElement TRIANGLES) and associated normal vectors per vertex. the problem is, the resulting shading of the rendering is not what i have expected. [Image:

Re: [osg-users] light, normals

2009-05-14 Thread Christian Sam
Hi, okay, i think i figured out that the odd shading is only a result of my missunderstanding of the normals BIND_PER_VERTEX concept. my geometry has 9 vertices - i thought if i use a drawElement index with index swaps to revist a vertex, this would give me the opportunity to use more than

[osg-users] fast path with these settings?

2009-05-13 Thread Christian Sam
Hi, according to documentation: Fast paths use vertex arrays, and glDrawArrays/glDrawElements. - what is the difference between vertex arrays and glDrawArrays, or is it meant as generic term for glDrawArrays/glDrawElements? will the use of something like this drop me into slow path mode?

Re: [osg-users] fast path with these settings?

2009-05-13 Thread Christian Sam
hi bryan, thank you for your reply. according to documentation: Fast paths use vertex arrays, and glDrawArrays/glDrawElements. Which documentation? - sorry, i meant according to (doxygen) reference

Re: [osg-users] constructing geometry using position, normal and uv coord arrays

2009-05-11 Thread Christian Sam
FLATSHADING. i know this is not the same like the above mentioned in SMOOTHSHADING, but i think it would certainly better than the average normals. so what do you think of that approach, or maybe you might have some other ideas? Best Regards, Christian Sam -- Read this topic online here

Re: [osg-users] constructing geometry using position, normal and uv coord arrays

2009-05-11 Thread Christian Sam
, pointing north) this will result in two exact overlying, seperate triangle_strips so no difference will be noticed, [Image: http://www.spatiality.at/osg/roof.jpg ] but wouldn't their faces z-fighting? Best regards, christian sam -- Read this topic online here: http

Re: [osg-users] constructing geometry using position, normal and uv coord arrays

2009-05-11 Thread Christian Sam
Hi, okay, now i think i understand you. first step: construct the roof in conjunction with a normalarray that defines normals for as much as complete faces as possible. for the remaining ones, construct further primitives, which overlap the faces where the right normals weren't defined till

Re: [osg-users] constructing geometry using position, normal and uv coord arrays

2009-05-11 Thread Christian Sam
Hi, update: i'm now using another concept. (i think thats the one you recommended at the beginning of the thread) instead of my original indexlist: 0, 1, 4, 2, 5, 3, 4, 0 which prevents me from assigning more than one normal per vertex, i'm using index swaps to (re)visit a vertex more than

Re: [osg-users] constructing geometry using position, normal and uv coord arrays

2009-05-10 Thread Christian Sam
Hi, i have a similar situation like the threadstarter longa...@gmail.com. i think i understand what you are recommending, but i dont know how to apply duplicate vertices (i also want to use different normals) for a triangle_strip primitive. Thank you! Cheers, Christian Sam

Re: [osg-users] osgtessellate example question

2009-04-30 Thread Christian Sam
btw. after retessellation a geometry, where are the additional created vertices stored? are they added to the end of the existing vertexarray? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=11143#11143

Re: [osg-users] when to use VertexBufferObjects or DisplayLists

2009-04-06 Thread Christian Sam
thank you all for the performance hints, as far as i have understood you, i should try to move from a geode-addDrawable(createSingleTreeSprite) to a geode-addDrawable(createMultiTreeGeometry(Cell)). with that approach also different tree geometry (width/size) should be possible without

[osg-users] when to use VertexBufferObjects or DisplayLists

2009-04-05 Thread Christian Sam
Hi, i have a question about using VBOs and Display Lists in osg according to my OpenGL book, both methods will optimize rendering due geometry is moved to the graphics-hardware. it also says, a constraint when using display lists is, that data can't be changed afterwards. so its great for

Re: [osg-users] when to use VertexBufferObjects or DisplayLists

2009-04-05 Thread Christian Sam
hi, refering to osgforest as example, is a method like createTransformGraph, where the different looking trees are based on the same (scaled) tree model better from a performance point of view? i mean better than the two other fixed pipeline methods in this example thanks in advance,

[osg-users] VertexArray from a loaded .osg file.

2009-04-05 Thread Christian Sam
Hi, i'm using osggis to convert an esri shape file to an .osg file. i want to use the scenedata, more precisely the vertex positions from that file. i need them for an analyzing function, and won't add that loaded file directly into my scenegraph, because i don't want to display it before

[osg-users] osg proxynode

2009-03-29 Thread Christian Sam
Hi, could someone tell me in a few sentences what a proxynode (or is it just proxy?) in osg is, and what it is used for? thanks in advance, christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9434#9434

[osg-users] better use smart-pointers or plain pointers in this case?

2009-03-26 Thread Christian Sam
Hi, i'm working on a point-in-polygon test. my current implementation has a list with plain pointers that hold references to the polygons' properties. (i use them to ease the calculating of an inside-result for that polygons) Code: class FetchedPolygon { public:

[osg-users] where can i find the vertex positions?

2009-03-18 Thread Christian Sam
Hi, i' m looking for a way to get the vertex positions of my geometry. i know there are methods, provided by osg, to access these vertex positions, but i wanted to get some insight how they are handled by osg, so i debugged a simple scene. i found the geometry object along with the _primitives

Re: [osg-users] where can i find the vertex positions?

2009-03-18 Thread Christian Sam
hi, thanks for the hints, after searching for some of the terms i stumbled over http://www.openscenegraph.org/projects/osg/wiki/Support/ProgrammingGuide/AnalysingAScenegraph; which proved very helpful. (maybe someone references it in the tutorial section) best regards, christian

[osg-users] [vpb] osgdem and shapefiles (for --forest/--building)

2009-03-15 Thread Christian Sam
hi, i'm using vpb-0.9.9 and osg-2.8.0. as long as i don't use shape files with the --forest/buidling option, osgdem works flawless, but when i use it, it crashes at the following line: Code: D:\workspace\test-geodata\vpb\grazosgdem -t ortho\test.tif -d dem\test.tif --forest forest\test.shp

[osg-users] i want to update a 3rdParty library, does this effect osg builds?

2009-03-15 Thread Christian Sam
hi i have built osg against fwtools-2.0.4. now i'm planning to install the latest fwtools version - what steps will i have to take referring my osg library ? * does it suffice to update my %PATH% systemvariable from ...program files\fwtools2.0.4\bin;... to ...program

[osg-users] [vpb] forest/building outlines

2009-03-13 Thread Christian Sam
hi, i just noticed that osgdem provides --forest/--buidling outline options. whats the effect of that in the generated file? best regards, christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8438#8438

[osg-users] questions about boundingBox and contains()

2009-03-10 Thread Christian Sam
hi, as far as i understand every Drawable object in the scenegraph does have a _boundingBox data member. * does the user have to manually initalize this boundingBox (with a call like myDrawableOject.computeBound()), or has it already been set by osg to nodes' geometry extent (xmin, xmax,

[osg-users] osgtessellate example question

2009-03-02 Thread Christian Sam
hi, i have a question concerning the osgtessellate example. why vanishes the TRIANGLE_STRIP primitives constructed in the function makePolsTwo() after TESS_WINDING_NEGATIVE? as far as i understand, a similiar primitive, constructed in makePols() is created with same settings, like the one in

[osg-users] osg debugging question

2009-03-02 Thread Christian Sam
hi, i wanted to debug an osg example (osgtessellate) to see how the number of primitives changes inside a Geode instance while tessellation is done. first of all, let me tell you that i'm not only new to osg, but also to debugging c++ applications, so if something seems strange the way i have

[osg-users] extend osgforest with a tree position raster mask

2009-02-27 Thread Christian Sam
hi, i would like to extend the example-program osgforest in a way so that the placement of trees becomes user-controllable via an additional raster mask. in detail: a 1bit rasterfile should mark treeless areas with a value of 0 and tree-covered areas with a value of 1. subsequent this

[osg-users] basic terrain querstions

2009-02-23 Thread Christian Sam
hi i would like to get a better understanding of osg's various possibilities in terrain-visualization. currently i'm using osggis/virtualplanetbuilder to display georeferenced, common gis rasterfiles which work wonderful. but as an osg-newbie i also would like to know what are the approaches