Hi Robert,
Thanks for the explanation. I don't think your needs are particular
different from most who are writing games/simulators with the OSG. While
large scenes LOD's is crucial, and for massive scenes Paging is also
crucial. The OSG supports both so should scale to larger scenes.
Hi Robert,
The most general approach is the best, and the performance differences will
almost certainly be negligible between your suggest SwitchStateSetNode and
my suggest Layer node with nodemask. Feel free to implement both and test
them against each other w.r.t cull traversal time
Hi Robert,
I really can't comment without the actual problem and solutions in front of
me, it's just too complex a topic to accumulate a whole thread and then
generate in my head what the possible code and scene graph you have going on
at your side. One thing I can say is that the
Hi Robert,
By default I would expect it to traverse all children. One variation I
considered was to have a NodeMask + StateSet per Child, with this
combination you'd be able to select different combinations for different
traversal masks.
If I set up the LayerNode to have one child for
Solution suggestion: StateSetSwitchNode
Motivation: - I need to render with different shader-programs and
state-sets, on the same geometry, during one tick.- Example of when I need
this is explained in the EXAMPLE section below.
I hope from this e-mail to get feedback:- Is this
/Switch and
StateSet's as required - its just a bit more wordy w.r.t lines of code.
Robert. On Wed, Nov 19, 2008 at 1:32 PM, Viggo Løvli [EMAIL PROTECTED]
wrote: Solution suggestion: StateSetSwitchNode Motivation: - I
need to render with different shader-programs and state-sets
Hi,
I have written a new class which inherit from osg::Group.
I have written a plugin for the .osg file format, that works fine.
I need to write a plugin for the .ive file format.
My initial thought was to copy-paste the ive::LOD code and replace the actual
read/write parts according to my
Hi,
Cool, nice to know that this happen for others too.
Additional note:
- FRAME_BUFFER instead of FRAME_BUFFER_OBJECT only works if you want to
render to only one texture.
- Output will be stored both on frame-buffer and on the texture you point to
(at least this happens for me).
Hi Adrian,
I have experienced a similar problem.
First, check that you set a decent radius for the Ephemeris dome. Example: 5000
meters...
Ensure that your far-clip is at least that far away.
Ephemeris can be set to follow camera.
If you do not set this then you must have camera inside the
Good morning,
I did some RTT research some weeks ago and found an interesting problem:
Running the pre-render OSG example with osg::Camera::RenderTargetImplementation
set to osg::Camera::FRAME_BUFFER results in a nice 60 fps on my hardware.
Running the pre-render OSG example with
Hi,
I am setting up my camera to render to a texture with the following commands:
camera.setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT );
camera.attach( osg::Camera::BufferComponent( osg::Camera::COLORBUFFER0 ),
myBuffer );
camera.setDrawBuffer(
Hi,
I have seen a strange thing about framerate...
I have a complex city where I have 20fps (not optimized yet)...
I set the following:
- Render target implementation = osg::Camera::FRAME_BUFFER
- I attach a RGBA buffer that is the same size as the frame-buffer.
Result:
- Framerate
Date: Wed, 13 Aug 2008 17:27:14 +0100
From: [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Help! I have a render target problem.
No bug, you are just trying to do something in a completely wrong
way As I said NodeMask works just fine, if you want
.
In general I'd say 20fps frame rate is very poor and needs to be
addressed before other areas such as FBOs are looked at. You need to
start by looking at what is the bottlenecks - CPU, GPU etc. The
osgviewer stats can help reveal this.
Robert.
On Wed, Aug 13, 2008 at 2:55 PM, Viggo
Hi,
I need to automatically check the rendering capabilities of the current
hardware and chose rendering techniques from that. I want to find the best
practical way to do this.
I have looked into the OSGShaderTerrain example.
It uses a osg::GraphicsOperation class to do actual capability
have. Maybe this could help you to solve the problem. Best regards,
Art On Thursday 31 July 2008 08:48:19 Viggo Løvli wrote: Hi, I
am trying to write an intersect post-processing function that will read
the alpha value of the hit-location. I have so far managed to get the
texture
Hi,
I am trying to write an intersect post-processing function that will read the
alpha value of the hit-location.
I have so far managed to get the texture coordinates for each collision point.
I have also managed to find which texture (in unit 0) that is used by the
object that I collide
Hi,
I want to do a ray-intersection toward a tree model (as an example) and ignore
the hit-location if it contain zero alpha value. Basically this is a
line-of-sight-check that take textures into consideration.
I think a good way is to use the existing intersection system and thus produce
Hi Kaiser,
I have just done parts of what you need.
Make yourself a group node which you place as the root of the scene-graph that
you need to list objects from.
Override it's traverse function and post process the cull-visitor:
void yourGroupClass::traverse( osg::NodeVisitor nv )
{
] Pick color from
scene Hi Viggo, Some time ago there was a thread called How to
retrieve a U, V texture coordinate from a picking action ?.
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/26306/focus=26352
Regrads, Brede On Tue, Jul 29, 2008 at 9:23 AM, Viggo Løvli [EMAIL
Hi Shayne,
Add your sky node where-ever you want it in your scene-graph (not as child of
camera). Override the sky's transform node's traverse function and do something
like this:
void yourNode::traverse( osg::NodeVisitor nv )
{
switch( nv.getVisitorType() )
{
case
Forgot one thing...
At end of traverse function:
osg::Group::traverse( nv );
My sky is a osg::Group which hold a pointer to the postionTransfor object, so I
am therefore calling osg::Group::traverse and not something else :-)
Viggo
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 30
@lists.openscenegraph.org Subject: Re: [osg-users] Robert: I
figured it out :-) (was: Is it possible to know when the node-graph is
'dirty'?) On Thu, Jul 24, 2008 at 3:08 PM, Viggo Løvli [EMAIL PROTECTED]
wrote: The only thing that annoy me now is the call to new(). Creating
one bin as a member
Hi Robert,
Hi Viggo, The rendering backend uses ref_ptr's so there shouldn't be any
leak, assigning the new RenderBin will lead to the previous one being
deleted.
Yep I figured out that one :-)
Rather than second guess what will be need might I suggest you maintain a
recycling list of
Hi Robert, I have a very strange bug. The code I have written to render one bin
twice works fine in the project code-base that I am working on. I took the
class and integrated into the OSGForest example, and there it does not work as
expected. In the OSGForest example:- The bin is rendered two
am trying to get a release out the door. I'm
afraid I don't have the the time tot go chasing up experimental user code.
Robert. On Fri, Jul 25, 2008 at 1:33 PM, Viggo Løvli [EMAIL PROTECTED]
wrote: Hi Robert, I have a very strange bug. The code I have
written to render one bin twice
Hi Robert :-D
Thanx a lot for pointing in the right direction!!!
I can now enforce render-bin 10 to be rendered twice each frame with the needed
stateset changes. No node-mask stuff is needed. This is a completely
stand-alone fix :-)
This is what I did:
Camera is set up with a callback:
Hi Robert,
I followed your advice added the code into the traverse function of my root
node.
Much of the code could now be removed, and I got rid of the 0..1 loop-hack
that I had to do earlier.
I think the new code looks very good. Do you see anything you would do
differently?
The new
Hi Robert,
I have changed the code a bit.
Now I create my statset (_myPreCreatedStateSet) at class construction.
I no longer clone bin 10.
I now only do this inside the inner check:
if( binList.find(10) != binList.end() )
{
binList[9] =
code, but if you are adding a sub-node then you
have code already that is called for adding the sub-node and
thereby you know when the scene-graph has been modified?
regards,
Peter
http://osghelp.com
On Wed, Jul 23, 2008 at 7:51 AM, Viggo Løvli [EMAIL PROTECTED] wrote:
Hi, My code is currently
Hi,
I am on the quest to figure out when the node-tree is dirty.
I have found a way... But I do not know if this way is a too dirty hack to
actually use.
I have a class that inherit osg::Group.
I use this as the root of my scene-graph.
Each time someone add a node to the world, then the
I am doing it because I want to be able to set node-masks on nodes that is
added to the scene-graph after I have initialized my scene. I am trying to
avoid having to specialize the code where we add to the tree. I want the code
module that set node-masks to be completely standalone.
The hack
as they are being made by
your app? The only part of the OSG which which would add nodes to the scene
graph is the DatabasePager, and you can catch all loads from this via a
Registry::ReadFileCallback. Robert. On Wed, Jul 23, 2008 at 11:35 AM,
Viggo Løvli [EMAIL PROTECTED] wrote: Hi, I am
to the scene graph as they are being made by your app?
The only part of the OSG which which would add nodes to the scene graph is the
DatabasePager, and you can catch all loads from this via a
Registry::ReadFileCallback. Robert. On Wed, Jul 23, 2008 at 11:35 AM,
Viggo Løvli [EMAIL PROTECTED
? unless you are
trying somekind of render pass?
regards,
Peter
http://osghelp.com
On Wed, Jul 23, 2008 at 11:00 AM, Viggo Løvli [EMAIL PROTECTED] wrote:
Hi Peter, What you say is true in most cases. The 'simplest' way to do this
would be to tell my system that the node-tree need re-formatting
tackle it is to
customize the rendering backend so that the bins you require are built for
you. One one for instance would be to post process the RenderStage and its
contents after the CullVisitor has filled it in. Robert. On Wed, Jul
23, 2008 at 2:52 PM, Viggo Løvli [EMAIL PROTECTED] wrote
Hi,
My code is currently formatting the node-masks of the whole scene-graph before
we start rendering. The formatting code is only ran once.
If a sub-node is added to the node-tree afterwards then I want to run my
formatting code again.
Is there any way to know whether or not the
Hi,
I want to save some CPU-cycles by ignoring collision-detection on some of my
scene nodes.
Is the following code the best way to do it?
void MyGroup::traverse( osg::NodeVisitor nv)
{
switch( nv.getVisitorType() )
{
case osg::NodeVisitor::NODE_VISITOR:
if(
Hi Mathias,
Thanx, your way is much better. :-)
Cheers,
Viggo
From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Date: Mon,
21 Jul 2008 10:43:24 +0200 Subject: Re: [osg-users] Avoiding the
intersection visitor Hi, On Monday 21 July 2008 10:37, Viggo Løvli
wrote: I
for this then remember to turn off
alpha-clipping (set alpha-func to always).
Viggo
Date: Mon, 2 Jun 2008 10:05:24 +0200 From: [EMAIL PROTECTED] To:
osg-users@lists.openscenegraph.org Subject: Re: [osg-users] I get errors
when trying to render to a luminance buffer... Hi, Viggo Løvli
to render to a
luminance buffer...
Hi,
Viggo Løvli wrote:
Ok, that make sense.
It happens every time I render with a floating point texture.
The fall in framerate does not happen when I run the OSG multi render
target example using HDR. My code does however use additive
Hi,
I want to render to a floating point buffer, and I set things up like this:
tex-setInternalFormat( GL_LUMINANCE16F_ARB );
tex-setSourceFormat( GL_RED );
tex-setSourceType( GL_FLOAT );
camera-setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT );
camera-attach(
vendors specs to see what will
be hardware accelerated.
Robert.
On Fri, May 30, 2008 at 2:16 PM, Viggo Løvli [EMAIL PROTECTED] wrote:
Hi Robert,
I modified my code as you suggested.
The warning is gone :-)
The framerate is now 10 seconds per frame instead of 30 frames per second
Hi Robert,
I've wondering about making it possible to have a composite StateSe to
provide switch and layer functionality, but have never tackled this as
it complicates the basic API quite a bit for functionality that only a
very small proportion of users will ever require.
That being
want to
multi-thread multi-context rendering. Robert. On Thu, May 22, 2008 at
9:11 PM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi Eric, It looks to
me like using the switch could be the solution for my needs. I think that
it would either have to be a switch, or a mask. An example
Hi,
My scene contains models that use one or many textures, some use vertex and
fragment shaders of different kinds. Complex but good looking :-)
I need to render the scene many times each frame.
The first render is a normal one, so I need no change in textures, states or
shaders.
The
your graph
between to passes.
I hope it helps you.
Eric Z.
De :
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Viggo Løvli
Envoyé : jeudi 22 mai 2008
15:57
À :
osg-users@lists.openscenegraph.org
Objet : [osg-users] Rendering
the scene multiple times
47 matches
Mail list logo