Re: [osg-users] how to do culling with shader tranformed geometry?

2012-08-28 Thread Alexej Fink
Hellor Robert, Every day I try to think a bit less, but it does not work for me... ;) But seriously: OSG is a framework, which tries to fit several different use cases. And it is natural, that it will not fit perfect for every possible job. Thus I want to figure out, how I can use it in the

Re: [osg-users] how to do culling with shader tranformed geometry?

2012-08-28 Thread Alexej Fink
Hello Sebastian, unfortunately I cannot create bigger sets with more GL geometry in them, cause I need the geometry to be addressable. :( Sebastian Messerschmidt wrote: Hello Alexej, Robert I think the reason for Alexej to think that disabling the culling would improve render time in

Re: [osg-users] how to do culling with shader tranformed geometry?

2012-08-24 Thread Alexej Fink
Hello Sebastian. Sebastian Messerschmidt wrote: For this i used the setComputeBoundingBoxCallback on the geometry in question to set it to the correct bounding box. Maybe you could use this on your first-class Node? Hm, maybe. Unfortunately the documentation to

Re: [osg-users] how to do culling with shader tranformed geometry?

2012-08-24 Thread Alexej Fink
Sebastian Messerschmidt wrote: The callback will be called if the bounds are marked as dirty. (i.e. if a new PrimitiveSet is added). In my use case I simple set the callback, called getBounds once on the parent and then removed the callback after loading and before attaching the node to

Re: [osg-users] how to do culling with shader tranformed geometry?

2012-08-24 Thread Alexej Fink
gwaldron wrote: No, you need to apply it on the drawables, otherwise they will still get culled. I created some utilities to support DrawInstanced usage in osgEarth, including a visitor that will apply the static bounding box to drawables. Perhaps it would be useful to you:

Re: [osg-users] how to do culling with shader tranformed geometry?

2012-08-24 Thread Alexej Fink
hybr wrote: there are problem: cullvisitor grabbing drawables for later drawing, and if you dont go deeper, nothing would be drawed Cheers. The point is: At the group node it can be already decided, if the underlying nodes are visible or not. Thus no need to compare against each single

[osg-users] how to do culling with shader tranformed geometry?

2012-08-23 Thread Alexej Fink
Hello, I need an advice regarding the culling setup. In my application I use a vertex shader to transform 3d geometry from the flat-world scene graph to the related position on a sphere (globe). Having a normal camera, which hovers over the transformed spheric world breaks the culling stage,

Re: [osg-users] how to do culling with shader tranformed geometry?

2012-08-23 Thread Alexej Fink
Hello Robert, tank you for the fast replay! Grep-ing the includes reported, that two classes have the setInitialBound() interface: Drawable and Node. I would like to avoid setting this initial-bound for each single peace of geometry (~ Drawable). Can I just put the initial-bounds on the

Re: [osg-users] RTT and new color_buffer binding per frame.

2012-05-15 Thread Alexej Fink
robertosfield wrote: Hi Alexej, You don't need to change the render-target to re-render a tile. I can't work out exactly what you mean in your scheme but it sounds a bit odd. The problem is not the re-rendering of a single tile. The job is to re-render a tile subset from a collection of

Re: [osg-users] RTT and new color_buffer binding per frame.

2012-05-15 Thread Alexej Fink
robertosfield wrote: Hi Alexej, The main question I have, and I'm sure others have is, what are you trying to do and why. Providing low level advice when one doesn't know the high level context is likely to be mis-directed and mis-informed. Sorry for confusing, I thought the job of

[osg-users] why is userData instance is not dereferenced on node deletion?

2012-05-15 Thread Alexej Fink
Hi folks, // OSG 3.0.1 I currently observe, that my userData instances (derived from osg::Referenced) are not dereferenced, if I delete the carrying node instance. The ref counter in myUserData instance gets incremented by calling node-setUserData(myUserData). But if delete the node (by

Re: [osg-users] RTT and new color_buffer binding per frame.

2012-05-15 Thread Alexej Fink
It was not sarcastic, I really thought it is a common case (looks like at least there is a special class: OverlayNode, which tries to address similar functionality ;) ). I will try to discover, what is osgSim::OverlayNode all about. But here we again face the documentation problem. The only

Re: [osg-users] RTT and new color_buffer binding per frame.

2012-05-14 Thread Alexej Fink
Hello Robert, the reason for changing the FBO attachment is generating dynamic ground tiles on the fly in a separate ground-scene-graph. Each ground-tile is a separate, location bound texture (with allocated image). If the tile location gets dirty I want to re-render the ground tile (the

Re: [osg-users] RTT and new color_buffer binding per frame.

2012-05-11 Thread Alexej Fink
Hello, unfortunately this does not work for me. Maybe I have to do something special in the FirstPass_ or setup the camera in a special way -- I don't know. Can someone clarify is here something special missed or what is right way to exchange the FBO render target the light-way (without

Re: [osg-users] RTT and new color_buffer binding per frame.

2011-10-12 Thread Alexej Fink
Hello together, Thanks for the help! I will try the cheaper approach next. But in general, the current behavior of ignoring the color_buffer binding looks more like a bug to me. Cause having such essential changes on the camera settings, I would expect the renderer to be aware of that!?

Re: [osg-users] RTT and new color_buffer binding per frame.

2011-10-11 Thread Alexej Fink
Hi folks, additional observation: In case, where for each frame in the update-callback the color-buffer attachment is bound to new Image instance, and all outcoming pictures are all gray, except the first one -- I now store the reference to the initial color-buffer bound image, and write it's

Re: [osg-users] RTT and new color_buffer binding per frame.

2011-10-11 Thread Alexej Fink
Hi hybr, yes, it works now! I was already on finding out, how can I change RenderStage::_cameraRequiresSetUp per frame. You've shorten this a lot! Many thanks for your help!!! Cheers, Alexej -- Read this topic online here:

[osg-users] RTT and new color_buffer binding per frame.

2011-09-23 Thread Alexej Fink
Hello folks, the main intention is to use an off screen RTT scene setting to generate textures for the main scene asynchronously. The RTT base seems to work, but rebinding the color_buffer at each frame to a new target (image or texture) does not work. (During the development osg::Image

Re: [osg-users] fatal error on simple programm

2010-04-13 Thread Alexej Fink
Hi, finally I found the bug. The build framework was using the /MTd libc parameter per default. Adding OSG (which seems to force the use of /MDd libc) caused the heap corruption. Cheers, lexar -- Read this topic online here:

Re: [osg-users] fatal error on simple programm

2010-04-09 Thread Alexej Fink
litllechicken wrote: Hi, thanks for triing to help me, i found i was not due to OSG but to my visual config witch failed. Hi, seems that I have a similar problem: crashing in Intersection destructor with corrupted heap. Can you please explain, what was wrong with your VS config? // I use

Re: [osg-users] osgviewerqt game loop

2009-12-09 Thread Alexej Fink
Hi folks, Unfortunately this is not an answer, but a similar question: I'm also playing with Qt integrated OSG (as the osgViewQt suggested) and ask me, how to modify the scene-graph in safe way? Cause there is no explicit rendering loop (as mentioned in many examples): Code: while(

Re: [osg-users] osgviewerqt game loop

2009-12-09 Thread Alexej Fink
Hi Robert, thanks for fast replay! The qt-example comes with osg-2.8.2 for windows (and does not contain a real rendering loop, just the frame() call). It's not about a game project, it's about a GUI tool. The ViewerBase::frame(..) function seems to contain the whole rendering sequence