Re: [osg-users] Converting TerraPage to IVE

2011-09-20 Thread Ben Cain
It's puzzling why the initial page-in of the highest LOD is so slow.  My 
apologies for long post (trying to be complete in description).

As a test, I removed all the directory children nodes except for 1 cell.  The 
original directory structure consisted of 2 levels (1st containing 26 children 
subdirectories, and each of those children containing 15 additional children 
subdirectories) ... for a total of 390 cells (26x15=390).

My assumption was that removing the other nodes would cause the 1 remaining 
cell to load much more quickly, since the remaining cells wouldn't be available 
to load.

Unfortunately, the 1st time to load the highest LOD for the 1 remaining cell 
still took over 30 seconds.  It seems removing the other cells had no effect.

I've noticed there are many buildings used that are OpenFlight format.  They 
all reside at the top-level of the directory tree.  Is it the compile time to 
load the buildings that's the problem ... rather than the terrain itself?  If 
so, I wish I could tweak the TerraPage files to reference IVE versions of the 
buildings rather than FLT.

Am I missing something here?  Is it possible to edit the top-level TerraPage 
file and remove the references to all the other nodes and change to IVE 
buildings -- without terrain tools?  For now, I only care about one cell.

BTW, the render frame rate is at a steady 60Hz.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42902#42902





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Converting TerraPage to IVE

2011-09-19 Thread Ben Cain
Hello,

Is there a way (e.g. using osgconv or similar) to convert a TerraPage format 
database (.txp, txf, tpf) to OSG native format (.ive)?

Note that the TerraPage database (in this case) has a multi-level directory 
tree structure containing many children.

The file paging is horrendous with the raw TerraPage format.  I'm wondering if 
the paging might be more efficient with an OSG native optimized format.

Thanks,
  Ben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42882#42882





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] OSG and SDL

2010-09-28 Thread Ben Cain
If you just want to use SDL to read joystick inputs, you don't have to
use SDL windows.  You can use SDL for joystick inputs, and render OGS
to windows managed by Qt, CEGUI, or whatever meets your needs.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Logitech Joystick Extreme 3D pro USB OSG

2010-09-24 Thread Ben Cain
I've used SDL (Simple Direcmedia Layer) alongside OSG with success
(for the Joystick you mentioned as well as gamepads, etc.).  SDL is
lightweight and simple to use.

http://www.libsdl.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Scaling an Object - Normals

2010-06-11 Thread Ben Cain
// Normalize normals to correct lighting from the scaling operation.
object-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON);

On Fri, Jun 11, 2010 at 4:27 PM, Thomas Canipel
thomas.cani...@gmail.com wrote:
 Hi,

 I would like to know how I can re-scale the normal of an object loaded after 
 scale the object ?

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Scaling an Object - Normals

2010-06-11 Thread Ben Cain
Mail got formated oddly ... trying again.

// Normalize normals to correct lighting from the scaling operation.
object-getOrCreateStateSet()-setMode(GL_NORMALIZE,osg::StateAttribute::ON);


On 6/11/10, Ben Cain brca...@gmail.com wrote:
 // Normalize normals to correct lighting from the scaling operation.
 object-getOrCreateStateSet()-setMode(GL_NORMALIZE,
 osg::StateAttribute::ON);

 On Fri, Jun 11, 2010 at 4:27 PM, Thomas Canipel
 thomas.cani...@gmail.com wrote:
 Hi,

 I would like to know how I can re-scale the normal of an object loaded
 after scale the object ?


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to perform a linesegmnt intersection technique?

2010-05-26 Thread Ben Cain
Here's a utility I wrote ... hope it helps

#include limits
#include iostream
// ...
bool intersect(osg::Node * node, osg::Vec3 pos1, osg::Vec3 pos2,
osg::Vec3  impactPos)
{

   bool impact(false);
   impactPos = osg::Vec3(std::numeric_limitsdouble::signaling_NaN(),
 std::numeric_limitsdouble::signaling_NaN(),
 std::numeric_limitsdouble::signaling_NaN());

   osgUtil::IntersectVisitor findIntersectionVisitor;
   osg::LineSegment * tgtLocSegment(new osg::LineSegment);

   tgtLocSegment-set(pos1, pos2);

   findIntersectionVisitor.addLineSegment(tgtLocSegment);
   node-accept(findIntersectionVisitor);

   osgUtil::Hit heightTestResults;

   if(findIntersectionVisitor.hits() == true)
   {
  osgUtil::IntersectVisitor::HitList tgtLocHits =
 findIntersectionVisitor.getHitList(tgtLocSegment);
  if(!tgtLocHits.empty())
  {
 impact = true;
 heightTestResults = tgtLocHits.front();
 impactPos = heightTestResults.getWorldIntersectPoint();

 std::cout  intersection @ (
   impactPos.x()  , 
   impactPos.y()  , 
   impactPos.z()  )  std::endl;
  }
   }

   return impact;
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Use namespace...

2010-04-13 Thread Ben Cain
I have found it much safer/easier (in the long run) to not collapse
the namespaces.  It's a lot of trouble to go back and correct the
problem when you start integrating other toolkits.

Just my 2 cents worth.

 On 13 April 2010 17:12, mas oug mas...@gmail.com wrote:

 Hi,
 Just curious, I noticed that in a lot of the code, we use stuff like
 osg::someFunctio() and etc...
 Could we use a namespace using namespace osg; to avoid having to write
 osg:: every single time?

 THANKS!!
 -Masoug

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer and multiple QGLWidgets

2010-04-09 Thread Ben Cain
Thanks J-S,

I think I have it working now.  Although, like you said, the adapter
widget will force me to use single-threading mode.  My real goal is to
have one scene with shared textures, etc. (in shared context) used
across multiple windows in a QWorkspace.

I wish there was a osgQt library of sorts ... rather than having to
tweak example code to get the OSG/Qt support.

The Delta3D community provides some Qt/OSG help with their dtQt
library.  I think it grew out of the Delta3D STAGE development effort
(having followed it's code somewhat).  They mentioned submitting some
of this back to OSG.  Here's hoping.

Cheers,
   Ben
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer and multiple QGLWidgets

2010-04-09 Thread Ben Cain
On 4/9/10, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote:
 Hi Ben,

 I wish there was a osgQt library of sorts ... rather than having to
 tweak example code to get the OSG/Qt support.

 Funny you should mention it, there is now :-)


KUDOS!!!  :)   Whoo hoo!

Btw, I have a great deal of Qt experience.  I'll definitely do what I
can to contribute back.

I've actually been using Qt for quite a while too, but have struggled
at times with the Qt/OSG and Qt/Delta3D integration.

Cheers,
   Ben
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] CompositeViewer and multiple QGLWidgets

2010-04-08 Thread Ben Cain
Can osgViewer::CompositeViewer be used to manage views in different QGLWidgets?

I'm trying to develop an application with a CAD-like interface ...
showing multiple views of the same scene (e.g. MDI look-and-feel).  In
this case, the context is to be shared across all the views ...
referencing just one scene.

Each view should be able to have it's own camera manipulator, event
handlers, etc.

Any help much appreciated!

Cheers,
   Ben
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer and multiple QGLWidgets

2010-04-08 Thread Ben Cain
Guys, much thanks for the inputs!  I am getting very confused with
shared context using Qt and OSG.  I've done this many times over the
years with straight OpenGL ... just too stupid tonight to figure out
what I'm messing up.

BTW, I've been using the OSGAdapterWidget ... trying to specify
sharedContext with traits.

Unfortunately, everything except the first view is outside of its
parent Qt widget (that is in a QWorkspace) ... odd.  It shows up on
the main desktop with no window decorations.  Probably not describing
this well.  Sorry, it's late.

I've looked at all the OSG examples as well as some Delta3D examples,
but I can't find one that is Qt based and sharing the graphics context
and a single scene.

Do you have a simple example?  I'd give a weeks salary :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG and QT example

2010-04-07 Thread Ben Cain

mgb_osg wrote:
 Not sure if it's what you mean but you can easily create multiple OSGWidget 
 windows with the same osg scene data in each of them and have different views 
 into the same model in different windows.
 

There are issues thut must be addressed: multi-threading, thread-safety, Qt 
keyboard mapping, and context management.  The Delta3D dtQt plug-in provides a 
wrapper for these issues.  I was wondering if someone had a simple example 
using these (or similar).

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26531#26531





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG and QT example

2010-04-06 Thread Ben Cain

LEgregius wrote:
 Hi,
 Yes, it does fix the keyboard issues, at least most of them, and I have done 
 some minor testing with the threading and it seems to work.
 

Hey David,

I'm not sure if this thread is still alive, but have you tested the case of 
rendering a single OSG scene-graph in multiple Qt windows (i.e. sharing the 
same graphics context)?

If so, do you have a Hello, World example of this with the dtQt elements you 
referenced?

Cheers,
   Ben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26498#26498





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Publicly Available TerraPage Database

2010-04-01 Thread Ben Cain

Ryan.H.Kawicki wrote:
 We currently have a publicly available database.  It is small and not very 
 complex, [...]  If you like, I can also make this available to the OSG 
 community.  In its uncompressed form, it is about 150 MB.

Hi Ryan,

I'd be very interested in a sample TerraPage database (simple or not).

Can you provide URL?  Any compressed format is good (e.g. RAR, ZIP, TAR, ...).

Thanks,
   Ben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26368#26368





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rapidly updating texture data

2010-03-03 Thread Ben Cain
Yep, now I can use the full camera resolution of 1024x768.

I knew OpenGL 2.x could handle non-power of two textures ... didn't
realize it was possible to circumvent the resize.

Thanks much Jason.  Kudos!

On 3/3/10, Jason Daly jd...@ist.ucf.edu wrote:

 Both Texture2D and TextureRectangle can work with non-power of two
 textures, if your graphics hardware supports it.  Every OpenGL
 2.0-compatible graphics card should handle this without a problem.

 The simplest thing to do is to call setResizeNonPowerOfTwoHint(false) on your
 Texture2D object, and all should be well.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rapidly updating texture data

2010-03-02 Thread Ben Cain
Oh my goodness ... did something really stupid.  I was taking the
camera image which is a non-power-of-2 (1024x768).  It had to be
scaled down to 1024x512.

Doh!

It's working quite well now.

On 3/2/10, J.P. Delport jpdelp...@csir.co.za wrote:
 Hi Ben,

 I rechecked our code and we are using setImage without problem for 5
 simult 1360x1024 cameras each at 20Hz.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rapidly updating texture data

2010-03-01 Thread Ben Cain
Thanks J.P.

You say that I can call myim-dirty() or myim-setImage(), but
wouldn't calling myim-setImage() cause a slow update?  That's what I
seem to be experiencing.  I need to update based on the sensor around
30Hz.

The imagery data (from sensor) is in system memory ... just trying to
get a view that shows it without dropping so many frames.

Thanks again,
   Ben

On Fri, Feb 26, 2010 at 12:23 AM, J.P. Delport jpdelp...@csir.co.za wrote:
 Hi Ben,

 we also pump data from cameras into the GPU. To enable PBOs is simple:

 // make image
 osg::ref_ptrosg::Image myim = new osg::Image();
 // attach pbo
 myim-setPixelBufferObject(new osg::PixelBufferObject(myim.get()));

 // point im to data, avoid copying (mod format here for your app)
 myim-setImage(ImageFormat_[i].getWidth(),

 ImageFormat_[i].getHeight(),
                                                          1, 1, GL_LUMINANCE,
 GL_UNSIGNED_BYTE,
                                                          my_data_pointer,

 osg::Image::NO_DELETE);

 // assign to texture
 mytexture-setImage(myim.get());

 Now, when the data update, just call myim-dirty() and all should update.
 You can also call setImage again.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Rapidly updating texture data

2010-02-25 Thread Ben Cain
Hello,

Is there a way to repeatedly/efficiently update an OSG texture's data
... for example imagery data that is being updating in system memory
(e.g. from a sensor capture device).

I've tried updating an OSG texture using texture2D-setImage(data) ...
but it is very slow.  Again, the image data is already in memory.

Thanks,
   Ben
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rapidly updating texture data

2010-02-25 Thread Ben Cain
Thanks Jason.

I've used FBOs before for render-to-texture.  I'll take a look at PBOs.

On Thu, Feb 25, 2010 at 3:05 PM, Jason Daly jd...@ist.ucf.edu wrote:

 You might try using PBOs (pixel buffer objects).  I think the
 osgscreencapture example shows them in action.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Multi-colored osgSim::SphereSegment?

2009-02-24 Thread Ben Cain
Hello,

What's the best way to draw a sphere with the ability to color some of the 
surface's segments differently?   What I'm trying to do ... I'd like to change 
the color of a given segment if it is intersected by a ray (leaving the rest of 
the sphere color the same).

I've used the osgSim::SphereSegment, but I don't think it allows for explicitly 
coloring a specified segment.  It looks like the entire Surface is added as one 
drawable.

Would be easy to change how the way the Surface drawable is added ... creating 
a different drawable for every segment ... and enabling them to be indexed by 
azimuth/elevation angle (or range)?

I could start from scratch, but I was hoping to leverage osgSim::SphereSegment 
in some way.

Any suggestions will be greatly appreciated!

Thanks,
   Ben

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgCal shader question

2009-02-18 Thread Ben Cain
Hello,

Do you know why a shader might not be affecting osgCal nodes?

I apply a black-and-white shader to the scene root, but it isn't affecting the 
CAL3D characters.  Everything else is fine.

   scene-getOrCreateStateSet()-setAttributeAndModes(prog.get(), 
osg::StateAttribute::ON);

Does osgCal has its own shader?  If so, it will override the one that I'm 
applying at the scene root.  What are my options?

Thanks,
   Ben

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Is OSG tied to OpenGL?

2009-01-13 Thread Ben Cain
Cory,

Answering the last portion of your question ... OSG is UI toolkit agnostic.

But, if your asking a general question of which toolkit is better supported on 
its own right ... then ...

Just my 2 cents (take it for what it's worth), but for strictly C++ development 
I highly recommend Qt.  I sometimes use other toolkits for very simple examples 
though.  And I might use CEGUI for a simple hardware-accelerated UI.

You can do your own comparison.  I've done GUI programming in one form or 
another for over 15 years (e.g. Qt, MFC, X/Xt/Motif, Forms, CEGUI, Tcl/Tk, and 
others) and have found Qt much superior (for C++ anyways).  Admittedly, I've 
not done much with wxWidgets other than a survey and simple examples.

Again, just my 2 cents ;)

Cheers,
  Ben

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Cory Riddell
Sent: Tuesday, January 13, 2009 9:12 AM
To: OpenSceneGraph Users
Subject: [osg-users] Is OSG tied to OpenGL?

The subject line says it all- if other renderers (in my case DirectX)
are available on a system, can they be used?

A second question- are some of the UI toolkits better supported than
others? I'm specifically thinking about comparing the wx stuff with Qt
and MFC.


-cr
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgFX and RTT?

2007-12-21 Thread Ben Cain
Rob,

 

What’s your personal email address?  I can send the examples to you.

 

Cheers,

  Ben

 

   _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Hansford
Sent: Friday, December 21, 2007 11:10 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgFX and RTT?

 

Ben,
That sounds like exactly what I'm trying to do.  I'd be interested in seeing
how you set up the post effect class.  Could you send me a link to the
Delta3D thread?

Rob.

On Dec 19, 2007 11:00 PM, Ben Cain  wrote:

Rob,

 

I've written some classes that implement RTT and post-filtering using OSG
and GLSL shaders.  Let me know if interested.  I thought about putting in
Wiki when I get time.

 

You can take the output of one RTT stage and apply it as an input to the
next stage … ganging them together … allowing as many filters as needed
(e.g. for creating a night vision scene … RTT of main scene - color
amplification stage - bright pass stage - horizontal Gauss blurring -
vertical Gauss blurring - composition with original RTT of main stage -
noise - change of resolution).

 

The technique is from an idea of one of the users on Delta3D forum.

 

Cheers,

  Ben

 

 

   _  

From: HYPERLINK mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] [mailto:HYPERLINK
mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] On Behalf Of Robert Hansford
Sent: Wednesday, December 19, 2007 3:26 PM
To: HYPERLINK mailto:osg-users@lists.openscenegraph.org;
[EMAIL PROTECTED]
Subject: [osg-users] osgFX and RTT?

 

Hi all,
For one of the projects I'm working on I need to have several render passes
which operate on the rendered scene as a texture.  I was wondering if I
could base the implementations on the osgFX::Effect class.  I know the
existing effects are all based around simply using different statesets, but
would it be an inappropriate use of the Effect class to write Techniques
which contain a render-to-texture camera and then operate on that texture? 

A few examples of the sort of thing I'm doing are as follows:
1) blurring the image using a Gaussian kernel.
2) computing the min and max pixel value in the image in order to
downgrade HDR imagery to get the expected effects when an unusually bright
object appears in the field of view. 
3) adding noise to the image to simulate a poor quality camera.

I am a little concerned that this may not be a proper use for the Effect
class as this sort of process probably has to be done at the root of the
scene graph, where as the existing effects can be applied to any subgraph.
However, I do like the idea of implementing these processes as nodes in the
graph that can be saved out to .osg files etc, but I can probably achieve
this by writing my own class rather than extending Effect (though that would
take me more time). 

I would greatly appreciate hearing people's thoughts on this matter.

Thanks in advance,

Rob.

 

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.17.5/1190 - Release Date: 12/19/2007
7:37 PM


___
osg-users mailing list
HYPERLINK
mailto:osg-users@lists.openscenegraph.org[EMAIL PROTECTED]
g
HYPERLINK
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org;
\nhttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

 

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.6/1192 - Release Date: 12/21/2007
1:17 PM


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.17.6/1192 - Release Date: 12/21/2007
1:17 PM
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgCal or osgCal2?

2007-12-19 Thread Ben Cain
Hello,

Are there compatibility issues with osgCal or osgCal2 when using OSG 2.X?

Also, since osgCal2 is LGPL, is it “preferred” by OSG developers?  If memory
serves me correctly, osgCal is GPL.

Thanks,
  Ben


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.17.4/1189 - Release Date: 12/18/2007
9:40 PM
 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgFX and RTT?

2007-12-19 Thread Ben Cain
Rob,

 

I’ve written some classes that implement RTT and post-filtering using OSG
and GLSL shaders.  Let me know if interested.  I thought about putting in
Wiki when I get time.

 

You can take the output of one RTT stage and apply it as an input to the
next stage … ganging them together … allowing as many filters as needed
(e.g. for creating a night vision scene … RTT of main scene - color
amplification stage - bright pass stage - horizontal Gauss blurring -
vertical Gauss blurring - composition with original RTT of main stage -
noise - change of resolution).

 

The technique is from an idea of one of the users on Delta3D forum.

 

Cheers,

  Ben

 

 

   _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Hansford
Sent: Wednesday, December 19, 2007 3:26 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] osgFX and RTT?

 

Hi all,
For one of the projects I'm working on I need to have several render passes
which operate on the rendered scene as a texture.  I was wondering if I
could base the implementations on the osgFX::Effect class.  I know the
existing effects are all based around simply using different statesets, but
would it be an inappropriate use of the Effect class to write Techniques
which contain a render-to-texture camera and then operate on that texture? 

A few examples of the sort of thing I'm doing are as follows:
1) blurring the image using a Gaussian kernel.
2) computing the min and max pixel value in the image in order to
downgrade HDR imagery to get the expected effects when an unusually bright
object appears in the field of view. 
3) adding noise to the image to simulate a poor quality camera.

I am a little concerned that this may not be a proper use for the Effect
class as this sort of process probably has to be done at the root of the
scene graph, where as the existing effects can be applied to any subgraph.
However, I do like the idea of implementing these processes as nodes in the
graph that can be saved out to .osg files etc, but I can probably achieve
this by writing my own class rather than extending Effect (though that would
take me more time). 

I would greatly appreciate hearing people's thoughts on this matter.

Thanks in advance,

Rob.


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.17.5/1190 - Release Date: 12/19/2007
7:37 PM
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCal or osgCal2?

2007-12-19 Thread Ben Cain
Thanks Jan,

Do you know where I can get a Visual Studio project to build the latest
version of osgCal2 obtained via Subversion ... version 0.3.0?

Cheers,
  Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan Ciger
Sent: Wednesday, December 19, 2007 3:19 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgCal or osgCal2?

osgCal2 works with current OSG

Regards,

Jan 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.17.5/1190 - Release Date: 12/19/2007
7:37 PM
 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] CameraNode cull masks

2007-12-11 Thread Ben Cain
Hello,

Do cull masks work with osg::CameraNode?  The interface is there ... so I'm
thinking should work.

I'm having trouble getting the culling to work for a CameraNode that's used
with RTT.  Is there anything inherently wrong with trying to do this?  I'm
assuming cull/node masking still applies with RTT.

Without having to send too much code, I'm using RTT with post-filtering to
emulate a sensor scene.  The first stage is the one that actually traverses
the root scene graph (one containing 3D geometry) ... the following stages
just work off of the RTT image from the previous stage ... applying image
shader functions.

Anyways, it's the first stage that sets the cull mask.  Any idea why not
working?

Note this particular application is using OSG 1.2.  I'm thinking of bringing
it up-to-date ... using latest, non-Producer version.

Thanks in advance,
  Ben


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.17.0/1180 - Release Date: 12/10/2007
2:51 PM
 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RTT CameraNode and cull mask

2007-12-07 Thread Ben Cain
Hello,

I'm having trouble getting culling to work for a CameraNode that's used with
RTT.  Is there anything inherently wrong with trying to do this?  I'm
assuming cull/node masks still apply with RTT.

Without having to send too much code, I'm using RTT with post-filtering to
emulate a sensor scene.  The first stage is the one that actually traverses
the root scene graph ... the following stages just work off of the RTT image
from the previous stage ... applying image shader functions.

Anyways, it's the first stage that sets the cullmask.  Any idea why not
working?

   // Some node to render ...
   osg::ref_ptrosg::Node node =
osgDB::readNodeFile(mMission-getEnvSpec().terrainFile);
   node -setNodeMask(NODE_MASK_IR);
   scene-addChild(node .get());

   //...

   // Render-to-texture stage
   {
   mNightvisionStage0 = boost::shared_ptrcRtt(
  new cRtt(root, scene, mMsl-getSensor()-getRes(),
mMsl-getSensor()-getRes(),
 osg::Vec4(1.0, 1.0, 1.0, 1.0)));
   mNightvisionStage0-setName(SensorNightVision);
   mNightvisionStage0-setCullMask(CULL_MASK_SENSOR_NIGHTVISION);
   mNightvisionStage0-setInheritanceMask(osg::CameraNode::ALL_VARIABLES 
~osg::CameraNode::CULL_MASK);
   }

   // Color amplification stage
   {
   std::vectorosg::ref_ptrosg::Uniform uniformVars1;
   uniformVars1.push_back(new osg::Uniform(tex, 0));
   uniformVars1.push_back(new osg::Uniform(fAmp, 2.0f));
   mNightvisionStage1 = boost::shared_ptrcRttPostfilterStage(
  new cRttPostfilterStage(root, mMsl-getSensor()-getRes(),
mMsl-getSensor()-getRes(),
 mNightvisionStage0-getTexture(), osg::ref_ptrosg::Texture2D(),
 amplifier, ./resources/models/amplifier.vert,
./resources/models/amplifier.frag, uniformVars1));
   }

   // Color amplification stage
   // Bright pass stage
   // Horizontal smoothing stage
   // Vertical smoothing stage
   // Composition stage
   // ...

Thanks,
  Ben


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.17/1177 - Release Date: 12/7/2007
1:11 PM
 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org