[osg-users] WordEditor, TerraGear, FlightGear --> OSG ??

2016-12-22 Thread Daniel Schmid
Hi there I was just reading about the capapilities of terrain building using the tools that go with the flightgear. There is TerraGear (http://wiki.flightgear.org/Using_TerraGear) that can be used to generate full world scenery based on elevation, textures and shapefiles (similar to VPB, I gues

Re: [osg-users] looking for a terrain database building toolchain

2016-12-22 Thread Daniel Schmid
Hi Martin How do you bring the TerraGear scenery to OSG? I was just reading about TerraGear and its capabilities of generating airports and stuff. But its all in the the proprietary DSF file format... Cheers, Daniel -- Read this topic online here: http://forum.openscenegraph.or

Re: [osg-users] [osgPlugins] AC3D Loader

2016-12-22 Thread Nikolai Christensen
Hi, thank you for your reply. Cheers, freqfly -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69748#69748 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org

Re: [osg-users] Tearing hair out over simple GLSL instancing

2016-12-22 Thread Andrew Cunningham
Thanks for the help I got it working by adding this to the StateSet osg::VertexAttribDivisor *divisor = new osg::VertexAttribDivisor(1, 1); ss->setAttribute(divisor); And changing my loop to add one offset per primitive to my vertexArray And thanks again!! I would never have figu

Re: [osg-users] Tearing hair out over simple GLSL instancing

2016-12-22 Thread Glenn Waldron
You can use osg::VertexAttribDivisor (set to 1) to tell the shader to use one attribute index per instance. Glenn Waldron On Thu, Dec 22, 2016 at 12:35 PM, Andrew Cunningham wrote: > On thinking about this issue, I see the problem. I really only have 4 > vertices, so the value d in my vertex s

Re: [osg-users] Tearing hair out over simple GLSL instancing

2016-12-22 Thread Gedalia Pasternak
you might want to look into glVertexAttribDivisor https://www.opengl.org/sdk/docs/man4/html/glVertexAttribDivisor.xhtml That would let you make a vbo with 100 offsets in it and then each instanced draw call would get a different offset. you can even send down a 4x3 transform matrix by using more at

Re: [osg-users] Tearing hair out over simple GLSL instancing

2016-12-22 Thread Andrew Cunningham
On thinking about this issue, I see the problem. I really only have 4 vertices, so the value d in my vertex shader just is always pulled from locations 0-3 in my array. What I really need to do is access an array of offsets in my shader indexed by glInstanceID -- Read this topic

[osg-users] Tearing hair out over simple GLSL instancing

2016-12-22 Thread Andrew Cunningham
OSG 3.4.0 I am trying to use "instancing" (starting from the example osgdrawinstanced) to draw simple square geometry at multiple locations. I am getting all of my instances sitting on top of each other at (0,0,0). That is they are not offset to their expected locations. I know my shader is wo

[osg-users] Intersect Point Cloud wth precision

2016-12-22 Thread Bruno Oliveira
Hello, I have a point cloud and need to get the intersection of my mouse with that point cloud. For that I use a PolytopeIntersector. I use this intersector because I found out that a LineSegmentIntersector will not do the trick. I set the polytope width and height to 5.0 and therefore I get lots

Re: [osg-users] Texture projection on terrain and gl_TextureMatrix[0...7]

2016-12-22 Thread Glenn Waldron
Ekaterina, The model you are loading has a lot of state in it, like blending, textures, etc. When you use a shader to render it, your shader needs to support all the things that OSG would otherwise render using the GL fixed-function pipeline. For example, the texture does not show up because your

Re: [osg-users] Texture projection on terrain and gl_TextureMatrix[0...7]

2016-12-22 Thread Trajce Nikolov NICK
Hi Ekaterina, post your code ... We can fix it when time permits ;-) On Thu, Dec 22, 2016 at 4:27 PM, Christian Buchner < christian.buch...@gmail.com> wrote: > Just some wild guesses: > > You might have to enable blending in the state set, and set an appropriate > blend function as (depending on

Re: [osg-users] Texture projection on terrain and gl_TextureMatrix[0...7]

2016-12-22 Thread Christian Buchner
Just some wild guesses: You might have to enable blending in the state set, and set an appropriate blend function as (depending on whether your projective texturing is done in a 2nd render pass or not) On hardware that does not support opengl border colors (ARB_texture_border_clamp) in hardware,

Re: [osg-users] Texture projection on terrain and gl_TextureMatrix[0...7]

2016-12-22 Thread Ekaterina Fokina
Thank you your answers! Attached there is a printscreen what I get. For the terrain I am using lz.osgt and the image for the texture file is osg128.png. I set the border to transparent, but unfortunatelly it didnĀ“t help... Guys, could you please give me a hint how is it possible to relocate the