Re: [osg-users] Please suggest ways to get PagedLOD nodes to pre-load when switching nodes.

2011-09-21 Thread Eric Heft
Hi, For anyone searching for answer for how to preload a pageLOD this is what I hacked together which was 'good enough' for a proof of concept. Using osgCompositeViewer.cpp I was able to set up a second viewport and slaved the camera to the primary view. Then I was able to shrink the viewport

[osg-users] Texture two faces of a triangle independently

2011-09-21 Thread James Klink
Hi, I'm having problems texturing triangles. Currently I'm using setState along with an osg::Texture2D to texture a series of triangles. The thing is, I want one face of the triangle to have one texture, and the other face of the triangle to have a different texture. So when looking at two diff

Re: [osg-users] performance problems in OSG 2.8.2 tried LOD, Culling etc.

2011-09-21 Thread Chris 'Xenon' Hanson
On 9/21/2011 1:57 PM, Vincent Bourdier wrote: > Hi, > Did you had a look on the result of the simplifier ? > I'm not OSG'simplifier master but sometimes simplifiers just cannot simplify > more, so the > results remains nearly the same. Also, osgWorks http://code.google.com/p/osgworks/ has a

Re: [osg-users] performance problems in OSG 2.8.2 tried LOD, Culling etc.

2011-09-21 Thread Vincent Bourdier
Hi, Did you had a look on the result of the simplifier ? I'm not OSG'simplifier master but sometimes simplifiers just cannot simplify more, so the results remains nearly the same. Maybe you could create your own simplified geometries for example a (colored) cube for a building (6 faces, even 5 if

Re: [osg-users] Lighting problem when using help or stats handler

2011-09-21 Thread Poirier, Guillaume
After some more digging I kind of have a feeling for what is happening but again I have too little knowledge of the OSG internals to really understand what is going on... When looking at the culling phase I see that there is the root render stage, then 2 levels of pre render bins (excluding roo

Re: [osg-users] performance problems in OSG 2.8.2 tried LOD, Culling etc.

2011-09-21 Thread Marcus Rabe
Hi, Paul you are right I forgot to write the hole code for the LOD implementation, sorry. Code: osg::ref_ptr lodLevel3 = originalGeode; osg::ref_ptr lodLevel2 = dynamic_cast( lodLevel3->clone( osg::CopyOp::DEEP_COPY_ALL ) ); osg::ref_ptr lodLevel1 = dynamic_cast( lodLevel3->clone( osg::CopyOp

[osg-users] "GraphicsWindow has not been created successfully"

2011-09-21 Thread Yann Blaudin de Thé
Hi, Hope somebody will be able to help me :s I am under Mac OS X 10.7, and I have OSG 3.0.1, that I compiled with g++ (and not LLVM) I can run osgviewer, and my own program which loads a 3d model. But when I want to create a sphere (still my old sphere problem :-) ) OSG yields : GraphicsWindow

Re: [osg-users] RTT multipass on same geometry

2011-09-21 Thread Thrall, Bryan
Sebastian Messerschmidt wrote on 2011-09-21: > Thank you Paul, > > It seems a little bit more obvious now. Basically I need to write some > additional value to one of the COLOR attachments alpha channel, which is > derived from the first pass. So my second approach (which seems to be > failing) i

Re: [osg-users] [osgCompute] Experiences with osgCompute

2011-09-21 Thread Mick Keller
Hi Bart! We try to give you some answers to your questions. Please let us know if you need more details in some areas. Actually, a lot of the design decisions are based on the internal and detailed knowledge about OSG and GL. Bart wrote: > > 1) OsgCompute does not seem to support CUDA const

Re: [osg-users] RTT multipass on same geometry

2011-09-21 Thread Sebastian Messerschmidt
Thank you Paul, It seems a little bit more obvious now. Basically I need to write some additional value to one of the COLOR attachments alpha channel, which is derived from the first pass. So my second approach (which seems to be failing) is somehow to write only to those texels in my color att

Re: [osg-users] RTT multipass on same geometry

2011-09-21 Thread Paul Martz
On 9/21/2011 10:54 AM, Sebastian Messerschmidt wrote: Hello, I've have a question regarding RenderToTexture in a multipass setup. I have to RTT cameras, the first one has DEPTH and 3 color attachments, while the second has only one color attachment. I need to use the data from the first RTT-pas

[osg-users] RTT multipass on same geometry

2011-09-21 Thread Sebastian Messerschmidt
Hello, I've have a question regarding RenderToTexture in a multipass setup. I have to RTT cameras, the first one has DEPTH and 3 color attachments, while the second has only one color attachment. I need to use the data from the first RTT-pass in the second camera, so the renderorder is set acco

Re: [osg-users] performance problems in OSG 2.8.2 tried LOD, Culling etc.

2011-09-21 Thread Paul Martz
On 9/20/2011 7:32 AM, Marcus Rabe wrote: This was again a little bit faster but was not enough. Than I used LODNodes: Code: osg::ref_ptr lodLevel3 = originalGeode; osg::ref_ptr lodLevel2 = dynamic_cast( lodLevel3->clone( osg::CopyOp::DEEP_COPY_ALL ) ); osg::ref_ptr lodLevel1 = dynamic_cast(

Re: [osg-users] Intersector optimization

2011-09-21 Thread Sergey Polischuk
Hi Jean-Charles Another option is render occlusion geometry to depth texture from P point of view (like in shadowmap generation), then draw buffer with points that u need to test with visibility testing against depth map in vertex or geometry shader, streaming out result via transform feedback.

Re: [osg-users] Intersector optimization

2011-09-21 Thread Robert Osfield
Hi Jean-Charles, On Wed, Sep 21, 2011 at 1:34 PM, Jean-Charles Quillet wrote: > Thanks a lot for your quick answer Robert, > > I didn't know this structure was implemented in OSG. That would be the way to > go. Unfortunately my application uses OSG 2.8.2 and KD-Tree support is not > present yet

Re: [osg-users] Intersector optimization

2011-09-21 Thread Jean-Charles Quillet
Thanks a lot for your quick answer Robert, I didn't know this structure was implemented in OSG. That would be the way to go. Unfortunately my application uses OSG 2.8.2 and KD-Tree support is not present yet in this version. So it'll be worth upgrading. I don't want to have much trouble upgrad

Re: [osg-users] performance problems in OSG 2.8.2 tried LOD, Culling etc.

2011-09-21 Thread Robert Osfield
Hi Marcus, Performance optimization is a huge topic and most of the time it comes down to creating a well balanced scene graph. You really need to make sure that the whole scene graph is built with performance in mind, one typically can't just enable something or apply some high level trick to su

Re: [osg-users] Intersector optimization

2011-09-21 Thread Robert Osfield
Hi Jean-Charles, The OSG supports KdTrees for ray intersections with geometry in the scene, this improves performance an enormous amount. You can enable KdTree generation for loaded models with the osgDB::Options::BuildKdTreesHint or osgDB::Registry::setBuildKdTreesHint(..), or the OSG_BUILD_KDTR

Re: [osg-users] [osgCompute] Experiences with osgCompute

2011-09-21 Thread Mick Keller
Dear Bart, thanks a lot for your very detailed annotations. Many of your comments are based on the combination of CUDA and OSG which is sometimes not an easy task since interoperability with GL is still tricky. We try to answer the questions later in the day. Best regards, Mick --

Re: [osg-users] [osgCompute] Question about map() of index buffer

2011-09-21 Thread Mick Keller
Dear Zhen, yes you are right. osgCompute::MAP_DEVICE_INDICES is already documented and it will be included in the code in the upcoming release. We are sorry for any confusion. Best regards, Mick SVT Group -- Read this topic online here: http://forum.op

[osg-users] performance problems in OSG 2.8.2 tried LOD, Culling etc.

2011-09-21 Thread Marcus Rabe
Hi, I am using "OSG version 2.8.2" on a Windows XP x64 System (i7 system, 8GB RAM) and I am trying to implement a driving simulator with OSG. First I testet all the scene with a small city and had no performance problems when I was driving thru the city. But now I loaded the hole city into the

Re: [osg-users] PolytopeIntersector "distance" and Transform

2011-09-21 Thread Nick McEvoy
Peter Hrenka wrote: > > I had a partial fix which helped as long as there is no projection involved. > Unfortunately that is probably the main use-case... I think the proper way to > do this involves storing the inverse matrices in the result-structure and > back-transforming the intersection

[osg-users] Intersector optimization

2011-09-21 Thread Jean-Charles Quillet
Hi, I'm working on an application that manipulates a 3d terrain (one big single geometry). I'm using OSG for 3d rendering as well as for internal data manipulation. I need to calculate the visibility of each point of a result grid from a certain position P. I have setup the simplest algorithm