Re: [osg-users] Abstraction Layer (Viewer)

2007-07-18 Thread Robert Osfield

Hi Adrian,

On 7/18/07, Adrian Egli [EMAIL PROTECTED] wrote:

Could you finally achieve any progress in implementing the abstraction
layer.


No coding progress, but I have been mulling the issues over.  I am now
inclined to follow your example of going for a Configuration object
that can be passed to the Viewer classes to help initialize them.
The Configuration object could be expanded to include lists of Traits
use to set up windows, camera set up etc.

I would also like to have a public interface on osg::Camera for
specifying the means for doing cull and draw traversals and do this by
a Renderer object or similar class.  For those want to get the
SceneView then if the Renderer is a based on SceneView one could
something like dynamic_castSceneViewRenderer*(..)-getSceneView().
To do this though I'll need allow SceneView not to own the Camera that
its renderering otherwise we'll end up with circular references.  The
Configuration object could also be involved in the set up of the
Renderer as it could provide the prototypes that are cloned and
attached to the Camera.

Later this week I might have a chance to try some coding on this.

In the mean time stick with your changes as they won't be too far off
from where I'll probably end up heading.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Re: osg-users Digest, Vol 34, Issue 30

2007-07-18 Thread Robert Osfield

HI Siddarth,

Its not good form to reply to a message and then highjack it for
another topic entirely, even worse to do so on a digest post.

Please post a message to the list with an appropriate subject line.

Robert.

On 7/17/07, Siddharth Palaniappan [EMAIL PROTECTED] wrote:

hey guys,

Can anyone tell me how i can run the osgSlide example? It seems it needs a dds 
texture as an input? I dont see any sample file given along the source. I was 
looking for the usage of SceneView for multiple viewports in MFC. Can someone 
direct me to such sample codes and also let me know what osgSlice does and 
where i can find a sample file to run it with?

Siddharth

- Original Message 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: osg-users@openscenegraph.net
Sent: Tuesday, July 17, 2007 3:00:04 PM
Subject: osg-users Digest, Vol 34, Issue 30

Send osg-users mailing list submissions to
osg-users@openscenegraph.net

To subscribe or unsubscribe via the World Wide Web, visit
http://openscenegraph.net/mailman/listinfo/osg-users
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than Re: Contents of osg-users digest...


Today's Topics:

   1. Re: Using OSG in Dev C++ (Renan Mendes)
   2. Re: TexGenNode and TexGen (Alan Harris)
   3. Re: Using OSG in Dev C++ (Jean-S?bastien Guay)


--

Message: 1
Date: Tue, 17 Jul 2007 11:01:29 -0700
From: Renan Mendes [EMAIL PROTECTED]
Subject: Re: [osg-users] Using OSG in Dev C++
To: osg users osg-users@openscenegraph.net
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

OK, then.

I've downloaded CMake and, when I was installing it, I was asked about the
location of the source code. Is it where I'm saving my .cpp files?

Also the installation asks me where to build the binaries. Is the a specific
location?


Thanks,

Renan
-- next part --
An HTML attachment was scrubbed...
URL: 
http://openscenegraph.net/pipermail/osg-users/attachments/20070717/6e9c27a8/attachment-0001.html

--

Message: 2
Date: Tue, 17 Jul 2007 19:20:05 +0100
From: Alan Harris [EMAIL PROTECTED]
Subject: Re: [osg-users] TexGenNode and TexGen
To: osg users osg-users@openscenegraph.net
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Paul

Yes I have an NVidia so that's the reason.

Any pointers as to a suitable method to produce the bases for a
(possibly) large number of forests?

Thanks
Alan

Paul Martz wrote:
 What hardware are you using? NVIDIA graphics cards support only texture
 units 0-3, anything beyond that is not supported (except when using a
 fragment shader.)
-Paul



 I created a forest base using TexGenNode to representing the
 shading on the landscape.

 It works fine, but when trying to do a number using texture
 units from 1 to n, I cannot get more than 3 bases to appear.

 Is this related to the limit GL_MAX_TEXTURE_UNITS or
 something  more subtle that I am missing.

 I am on v1.2.

 --

 Regards
 Alan Harris

 ReSoft Ltd
 Cornwallis, Burycroft Road
 Hook Norton
 Banbury, OX15 5PR, UK
 Tel: +44 (0) 1608 730707
 Email: [EMAIL PROTECTED]
 Web: www.resoft.co.uk
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



--

Message: 3
Date: Tue, 17 Jul 2007 14:44:12 -0400
From: Jean-S?bastien Guay[EMAIL PROTECTED]
Subject: Re: [osg-users] Using OSG in Dev C++
To: osg-users@openscenegraph.net
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; DelSp=Yes; format=flowed

Hello Renan,

 I've downloaded CMake and, when I was installing it, I was asked about the
 location of the source code. Is it where I'm saving my .cpp files?
 Also the installation asks me where to build the binaries. Is the a specific
 location?

If you're on Windows, this page will explain all:

http://www.openscenegraph.com/osgwiki/pmwiki.php/PlatformSpecifics/VisualStudio

Note that this is only for building OSG itself. Once you're coding
your own application which *uses* OSG, you can make your project
however you want, and just tell it where to find the OSG includes
(.../OpenSceneGraph/include) and to link in the relevant OSG library
or libraries. That is dependent on your development environment, so
you can read the Dev-C++ docs for that.

Good luck,

J-S
--
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 

Re: [osg-users] Usage of osgSlice and SceneView sample code

2007-07-18 Thread Robert Osfield

Same problem, please post to  osg-users@openscenegraph.net directly,
do not use the lazy reply to button as it just fills you email with
irrelevant text.

On 7/17/07, Siddharth Palaniappan [EMAIL PROTECTED] wrote:

hey guys,

Sorry for the wrong subject message last time...

Can anyone tell me how i can run the osgSlide example?
It seems it needs a dds texture as an input? I dont see any sample file
given along the source. I was looking for the usage of SceneView for
multiple viewports in MFC. Can someone direct me to such sample codes
and also let me know what osgSlice does and where i can find a sample
file to run it with?

Siddharth


- Original Message 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: osg-users@openscenegraph.net
Sent: Tuesday, July 17, 2007 3:00:04 PM
Subject: osg-users Digest, Vol 34, Issue 30

Send osg-users mailing list submissions to
osg-users@openscenegraph.net

To subscribe or unsubscribe via the World Wide Web, visit
http://openscenegraph.net/mailman/listinfo/osg-users
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than Re: Contents of osg-users digest...


Today's Topics:

   1. Re: Using OSG in Dev C++ (Renan Mendes)
   2. Re: TexGenNode and TexGen (Alan Harris)
   3. Re: Using OSG in Dev C++ (Jean-S?bastien Guay)


--

Message: 1
Date: Tue, 17 Jul 2007 11:01:29 -0700
From: Renan Mendes [EMAIL PROTECTED]
Subject: Re: [osg-users] Using OSG in Dev C++
To: osg users osg-users@openscenegraph.net
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

OK, then.

I've downloaded CMake and, when I was installing it, I was asked about the
location of the source code. Is it where I'm saving my .cpp files?

Also the installation asks me where to build the binaries. Is the a specific
location?


Thanks,

Renan
-- next part --
An HTML attachment was scrubbed...
URL: 
http://openscenegraph.net/pipermail/osg-users/attachments/20070717/6e9c27a8/attachment-0001.html

--

Message: 2
Date: Tue, 17 Jul 2007 19:20:05 +0100
From: Alan Harris [EMAIL PROTECTED]
Subject: Re: [osg-users] TexGenNode and TexGen
To: osg users osg-users@openscenegraph.net
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Paul

Yes I have an NVidia so that's the reason.

Any pointers as to a suitable method to produce the bases for a
(possibly) large number of forests?

Thanks
Alan

Paul Martz wrote:
 What hardware are you using? NVIDIA graphics cards support only texture
 units 0-3, anything beyond that is not supported (except when using a
 fragment shader.)
-Paul



 I created a forest base using TexGenNode to representing the
 shading on the landscape.

 It works fine, but when trying to do a number using texture
 units from 1 to n, I cannot get more than 3 bases to appear.

 Is this related to the limit GL_MAX_TEXTURE_UNITS or
 something  more subtle that I am missing.

 I am on v1.2.

 --

 Regards
 Alan Harris

 ReSoft Ltd
 Cornwallis, Burycroft Road
 Hook Norton
 Banbury, OX15 5PR, UK
 Tel: +44 (0) 1608 730707
 Email: [EMAIL PROTECTED]
 Web: www.resoft.co.uk
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



--

Message: 3
Date: Tue, 17 Jul 2007 14:44:12 -0400
From: Jean-S?bastien Guay[EMAIL PROTECTED]
Subject: Re: [osg-users] Using OSG in Dev C++
To: osg-users@openscenegraph.net
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; DelSp=Yes; format=flowed

Hello Renan,

 I've downloaded CMake and, when I was installing it, I was asked about the
 location of the source code. Is it where I'm saving my .cpp files?
 Also the installation asks me where to build the binaries. Is the a specific
 location?

If you're on Windows, this page will explain all:

http://www.openscenegraph.com/osgwiki/pmwiki.php/PlatformSpecifics/VisualStudio

Note that this is only for building OSG itself. Once you're coding
your own application which *uses* OSG, you can make your project
however you want, and just tell it where to find the OSG includes
(.../OpenSceneGraph/include) and to link in the relevant OSG library
or libraries. That is dependent on your development environment, so
you can read the Dev-C++ docs for that.

Good luck,

J-S
--
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 

Re: [osg-users] Clipping visitor

2007-07-18 Thread Robert Osfield

HI Matt,

Why are you needing to clip your model?  Do you have change the
clipping at all during the  life of your application?  How many
clipping planes are you looking at?

As a general note I's suggest using ClipNode where you can, if it
gives you the performance you need it will certainly be easier to
write an maintain.  You will be limited to the number of clip planes
that your OpenGL driver supports though - this is a minimum of 6, but
may not be any more than this even on sophisticated modern hardware.

Robert.

On 7/17/07, Matt Franklin [EMAIL PROTECTED] wrote:

I wanted a class that I could use to clip my models prior to rendering and
provided a resulting node set that I could save to file. Since I couldn't
find one I have implemented a class that works on some of my basic models. I
am hoping that the community may advise me on wether it is worth developing
the class or whether there is a more obvious approach to take with ClipNode
and prerendering etc. If developing the class makes sense then I would
welcome some advice as to how I should take it forward. I know the class is
ugly but its just a starter for ten.

Segment (header)
#ifndef OSGUTIL_Segment
#define OSGUTIL_Segment 1

#include osg/NodeVisitor
#include osg/Geode
#include osg/Geometry
#include osg/Transform

#include osgUtil/Export

namespace osgUtil {

/** A Segment for reducing the number of traingles in osg::Geometry.
  */

class OSGUTIL_EXPORT Segment : public osg::NodeVisitor
{
public:

Segment(osg::Plane* clipplane);

virtual void apply(osg::Geode geode);


bool checkvertice(osg::Vec3 vertice);

osg::Vec3 getIntersection(osg::Vec3 validpoint, osg::Vec3
pointtoremove, double ratio);

/** simply the geometry, whilst protecting key points from being
modified.*/

void modGeometry(osg::Geometry* geometry,osg::Matrixd*
ltowmatrix,osg::Matrixd* wtolmatrix);

protected:
osg::Plane* _clipplane;
};


}

#endif



Segment.cpp

#include osgUtil/Segment


#include set
#include list
#include algorithm

using namespace osgUtil;

void Segment::apply(osg::Geode geode)
{
// osg::Matrixd* ltowmatrix;
// ltowmatrix = getWorldCoords(geode);
osg::Matrix ltowmatrix;
osg::Matrix wtolmatrix;
ltowmatrix =
osg::computeLocalToWorld(this-getNodePath(), false);
wtolmatrix =
osg::computeWorldToLocal(this-getNodePath(), false);
// ltowmatrix = ltowmatrix.identity();
for(unsigned int i=0;i geode.getNumDrawables();++i)
{
osg::Geometry* geometry = geode.getDrawable(i)-asGeometry();
if (geometry)
{
modGeometry(geometry, ltowmatrix, wtolmatrix);
}
}
}


Segment::Segment(osg::Plane* clipplane):

osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
_clipplane(clipplane)
{
}

bool Segment::checkvertice(osg::Vec3 vec)
{
// osg::Plane plane =
osg::Plane(osg::Vec3(0.0,0.0,1.0),osg::Vec3(0.0,0.0,1.0));
if (_clipplane-distance(vec)  0) return true;
return false;
}

osg::Vec3 Segment::getIntersection(osg::Vec3 validpoint,
osg::Vec3 pointtoremove, double u)
{
// osg::Plane plane =
osg::Plane(osg::Vec3(0.0,0.0,1.0),osg::Vec3(0.0,0.0,1.0));

osg::Vec4 planevec = _clipplane-asVec4();

double denominator = (planevec[0] * (validpoint.x() - pointtoremove.x
())) + (planevec[1] * (validpoint.y() - pointtoremove.y())) + (planevec[2] *
(validpoint.z() - pointtoremove.z()));
double numerator = (planevec[0]*validpoint.x()) +
(planevec[1]*validpoint.y()) + (planevec[2]*validpoint.z ()) + planevec[3];

osg::Vec3 intersection;
if ( fabs(denominator)  0.0001 )
{
// parrallel to plane
intersection = pointtoremove;
u = 1.0;
}
//else if ( denominator  1 )
//{
// no intersection
//intersection = pointtoremove;
//u =1.0;
//}
else
{
u = numerator/denominator;
osg::Vec3 diff = pointtoremove - validpoint;
osg::Vec3 newdiff;
newdiff.set(diff.x()*u, diff.y()*u, diff.z()*u);
intersection = validpoint + newdiff;
}

return intersection;
}

void Segment::modGeometry(osg::Geometry*
geometry,osg::Matrixd* ltowmatrix, osg::Matrixd* wtolmatrix)
{

int numvertices =
geometry-getVertexArray()-getNumElements();
int numtexcoordarrays =
geometry-getNumTexCoordArrays();
int numnormals =
geometry-getNormalArray()-getNumElements();
printf (Num vertices %i\n, numvertices);
printf (Num texcoord arrays %i\n, numtexcoordarrays);
printf (Num normals %i\n, numnormals);

osg::Array* texset = NULL;
if (numtexcoordarrays  0)
{
texset = geometry-getTexCoordArray(0);
int numtexcoords = texset-getNumElements();
printf (Num texcoords %i\n, numtexcoords);
}

int numprimitivesets = geometry-getNumPrimitiveSets();
printf (Num prim sets %i \n, numprimitivesets);
for ( int p = 0; p  numprimitivesets; p++)
{
osg::PrimitiveSet* primset = 

Re: [osg-users] Example osgTerrain compile error

2007-07-18 Thread Robert Osfield

Oopps, missed the export symbol.  Pesky brain dead VS.  Pesky brain dead ME ;-)

Fixed and now checked in.



On 7/18/07, Jean-Sébastien Guay [EMAIL PROTECTED] wrote:

Hello Sherman,

 I'm having the same linker problem, but OSGUTIL_EXPORT is there.
 Here's the first few lines of the header:
 [...]
 class OSGUTIL_EXPORT GLObjectsVisitor : public osg::NodeVisitor
 [...]
 What gives? Everythng compiles, but I'm getting the same linker error as you.


Look lower, there's another class declaration in that file:

class GLObjectsOperation : public osg::GraphicsOperation
{
// ...
}


You need to change that to

class OSGUTIL_EXPORT GLObjectsOperation : public osg::GraphicsOperation


Good luck,

J-S

--
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osgconv render window

2007-07-18 Thread Robert Osfield

Hi Zach,

On 7/18/07, Zach Deedler [EMAIL PROTECTED] wrote:

Is creating a render window necessary with osgconv?  Sometimes I am running
osgconv in the background while viewing other osg files with osgviewer.
Somehow this causes the conversion to fail.  I haven't tried = osg2.0,
though.


osgconv uses a OpenGL graphics context to do texture compression.

In 2.1.x osgconv is able to use a pbuffer to do the compilation.

I don't know if this will affect the failure you've seen though - it
should be possible to run two OSG apps with two contexts in parallel,
soI have no clue as to what caused the failure but might be worth a
try of 2.1.x or the SVN version.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osg vs. directx

2007-07-18 Thread Robert Osfield

Hi Zach,

Direct3D and OpenGL are comparable.  OpenGL isn't generally open
source though...

Direct3D and OSG aren't really, the former is low level immediate mode
graphics API , the later is higher level retained mode scene graph
API.

Open source API's like SDL actually build on top of native libraries
like DirectInput/DirectSound, so its really a case of using a portable
layer ontop of native libs or using the native libs directly.

As with all these comparisons the key is that you can do pretty well
everything in OpenGL and related open API's that you can do with
DirectX API's, and much more besides, and importantly you can do it on
any platform you like.  Direct3D 10 is a good example, it only works
on Vista, while OpenGL extensions provide the same features on all
platforms that support these extensions - this means XP, Visia, OSX,
Linux.

So its really a case of do you want to be tied to particular versions
of Windows or not, its not a case of do I want this piece of function
or not.  In the case of real-time graphics Windows really isn't a good
platform, the file system sucks and the multi-processing side is
little better.  This means even if DirectX competes on all the aspects
you pick out, being tied to Windows makes you non competitive because
you are stuck with the rest Windows that drags everything else down
with it.

Its far more sensible to go for Open Standards and Open Source API's
across the board, it gives you the freedom to develop on the platform
which best suits your needs, and deliver on the platform that suits
the end users needs.  This might mean Windows all the way through one
year, but the next delivering under Linux or OSX is far better the
next, and perhaps the following year pinging back to Windows.  You
have the choice to pick best of breed, and remain nibble and
competitive.

Robert.

On 7/18/07, Zach Deedler [EMAIL PROTECTED] wrote:



Hello osg-users,

I saw some discussion about osg vs. directx in some emails.  I was wondering
if we could examine this some more to find some advantages/disadvantages.
Actually, open source vs. directx:
OpenSourceDirectX
osg  direct3d
openal  directsound
sdl   directinput
scene graph  n/a
multiple files  .x format
cal3ddirect3d

Please add/modify the list as you see fit
I think the only open source disadvantage that I found is the character
animation is more efficient/easier with directx.  Other things to examine
are special effects, weather, celestial, lighting, shading, and text.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] How do I generate wrappers ?

2007-07-18 Thread Robert Osfield

Hi Manu,

Have search on the wiki for genwrapper.

On 7/18/07, Emmanuel Roche [EMAIL PROTECTED] wrote:

Hello !!

Concerning osgIntrospection, I'm reading everywhere that I can generate the
wrappers for my own classes, can someone tell me where I can find
information on how to do this ? (and where can i find the wrapper
generator...)

Manu.



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] RTT with a HUD

2007-07-17 Thread Robert Osfield

Hi Blenn,

Just adding the RTT Camera above the scene should work as is, no
need to change the render order of the HUD Camera.  What should be
happening is the HUD camera should be a post render to the RTT Camera,
but still drawn as part of the draw traversal of the RTT Camera.

FYI, each of these Camera will have its own RenderStage, the RTT one
will have is RenderStage as a pre draw of the main RenderStage, and
the HUD will have its own RenderStage, which is drawn at the end of
the RTT RenderStage.  The exception is when you do NESTED_RENDER on
the HUD Camera, this will use the RTT RenderStage instread of its own.

Now... the question is why isn't this working... in what way are you
using the result form the RTT Camera?  Are you rendering to an Image?
To a Texture that is used in the main frame?

My guess is that there is some bug in RenderStage w.r.t handling of
post draw RenderStage.  But then it could be something else, there is
a complex type of set up, without putting in debugging code and
stepping through it its hard to guess what is going on.

Robert.


On 7/16/07, Glenn Waldron [EMAIL PROTECTED] wrote:

Hi all,
My brain's not working today so maybe you can help with this one.

I have a scene with a HUD:

scene - HUD camera - HUD geom

The HUD camera is POST_RENDER, ABSOLUTE_RF, and works great. Now I want to
render this graph to a texture. So I have:

RTT camera - scene - HUD camera - HUD geom

The RTT camera is PRE_RENDER.

The scene renders to texture, but the HUD does not appear. Well of course
not; it is POST_RENDER. So I tried PRE_RENDER with an adjusted render
number, but no luck. With NESTED_RENDER I do see the HUD, but alpha blending
is wrong and it appears that the ortho projection matrix gets mangled.

What is the proper way to combine a HUD with RTT? Thanks much. -gw

--
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] aspect ratio problem in OSG 2.0 MFC example

2007-07-17 Thread Robert Osfield

Hi Xinguo,

I did a bug fix relating to the QT example and aspet ratios since 2.0
so try out the SVN version.  I can't recall if this might have an
knock on effect to MFC example, SVN will reveal what changes I made.

Robert.

On 7/16/07, Xinguo Liu [EMAIL PROTECTED] wrote:

Hi~

I wrote an OSG+Qt viewer, but found that the object is elongated
horizontally.
I think it may be related to aspect ratio not correctly set.

By the way, I found similar problems with the MFC example of OSG 2.0.
Is it a known issue? Can anyone point out a way to address it?

Thanks!

Xinguo

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] RTT with a HUD

2007-07-17 Thread Robert Osfield

HI Glenn,

As an experiment it might be just worth trying 2.0 as a lot of
improvements have been made in the way that Camera's are managed w.r.t
the front end and the back-end like RenderStage.

Robert.

On 7/17/07, Glenn Waldron [EMAIL PROTECTED] wrote:

Robert,
I neglected to mention that I am using osg::CameraNode under 1.2 at the
moment, if that makes a difference.


 FYI, each of these Camera will have its own RenderStage, the RTT one
 will have is RenderStage as a pre draw of the main RenderStage, and
 the HUD will have its own RenderStage, which is drawn at the end of
 the RTT RenderStage.  The exception is when you do NESTED_RENDER on
 the HUD Camera, this will use the RTT RenderStage instread of its own.

So to make sure I understand NESTED_RENDER -- after I quick peek at
CullVisitor.cpp it looks like NESTED_RENDER will apply a new projection
matrix and reference frame, but will ignore things like viewport, render
order, target impl, etc. Is that correct?

 Now... the question is why isn't this working... in what way are you
 using the result form the RTT Camera?  Are you rendering to an Image?
 To a Texture that is used in the main frame?

I am rendering to an Image using an FBO (as in osgprerender) in order to
send video frames down a DirectShow pipeline. (I was also rendering the
resulting texture to a single quad in the main scene with an ortho camera,
but if I remove this subgraph the issue remains.)

 My guess is that there is some bug in RenderStage w.r.t handling of
 post draw RenderStage.  But then it could be something else, there is
 a complex type of set up, without putting in debugging code and
 stepping through it its hard to guess what is going on.

 Robert.

Thanks, I will continue to poke at it and see if I can spot anything. -gw

 On 7/16/07, Glenn Waldron [EMAIL PROTECTED]  wrote:
  Hi all,
  My brain's not working today so maybe you can help with this one.
 
  I have a scene with a HUD:
 
  scene - HUD camera - HUD geom
 
  The HUD camera is POST_RENDER, ABSOLUTE_RF, and works great. Now I want
to
  render this graph to a texture. So I have:
 
  RTT camera - scene - HUD camera - HUD geom
 
  The RTT camera is PRE_RENDER.
 
  The scene renders to texture, but the HUD does not appear. Well of
course
  not; it is POST_RENDER. So I tried PRE_RENDER with an adjusted render
  number, but no luck. With NESTED_RENDER I do see the HUD, but alpha
blending
  is wrong and it appears that the ortho projection matrix gets mangled.
 
  What is the proper way to combine a HUD with RTT? Thanks much. -gw
 
  --
  Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
703-652-4791
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/
 
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/




--

Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Using OSG in Dev C++

2007-07-17 Thread Robert Osfield

On 7/17/07, Renan Mendes [EMAIL PROTECTED] wrote:

I'm sorry, I couldn't quite understand the link you've sent me. The OSG
website had this sugestion for my question:
3.3 Compiling under Windows with Dev-C++ Import the .dsp files into dev-c++
and compile.

Could explain what should I do?


That references sounds out of date.  We've now moved to  using CMake
to generate the build system (OSG-1.9.x onwards), CMake allows you to
build projects for a wide range of targets.  I don't know if it
supports Dev C++ but have a look at the cmake.org.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Deriving from OSG:Drawable.

2007-07-16 Thread Robert Osfield

Hi Amal,

You might be able to do everything you want just with a standard
osg::Geometry and do all the parametric work in shaders.  See the
osgparametric example (its very simply shader but might give you a bit
of inspiration.)

Robert.

On 7/15/07, Amal [EMAIL PROTECTED] wrote:



Basically Iam deriving a class called osgCubic from osgDrawable . This class
will use shaders to render a cubic equation (any genera cubic equation) . So
can I know what all functions should I be implementing in the class.

 Actually Iam trying to implement only the drawImplementation function in
which Iam trying to use the osgShader. Is it a right method to go about
doing it ?

Amal.


-- Forwarded message --
From: Paul Martz [EMAIL PROTECTED]
Date: Jul 15, 2007 6:11 PM
Subject: RE: [osg-users] Deriving from OSG:Drawable.
To: osg users osg-users@openscenegraph.net







 If i derive a class from osg:drawable ( say like osg::Text ) what are the
functions that I should surely overload ?. One is DrawImplementation
function. Are ther any other Functions that i should surely overload .

 You only need override pure virtual methods, and drawImplementation() is
the only pure virtual method in the Drawable class.

Depending on what you're doing, you might also want to override the
destructor, or computeBound(), but this isn't strictly required and, as I
said, depends on what you're doing.


Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
303 859 9466
___
osg-users mailing list
osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] get level of mipmap with osg::texture2D

2007-07-16 Thread Robert Osfield

Hi Benoit,

The OpenGL FBO extension does support mip-map generation, but when I
tried to add support for it last year I wasn't able to get it working.
I haven't tried it recently though, the drivers might have moved on
since then.

Robert.

On 7/16/07, Benoit bossavit [EMAIL PROTECTED] wrote:

Hi,

That's possible retrieve the lower level of a mipmap when I attach an
osg::Texture2D with the FrameBufferObject? (I don't want attach an image
because it's coster)
I want to do Render To Texture and retrieve the texture 1*1. How can I do?

thanks,
bnua

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Deriving from OSG:Drawable.

2007-07-16 Thread Robert Osfield

On 7/16/07, Amal [EMAIL PROTECTED] wrote:

Hi Robert,
 I saw the osgTerrain::TerrainNode  and I saw that It Uses a geometry
Technique and the Geometry Technique in turn had TerrainGeometry thich has
the drawImplementation function. I will also try to derive the Cubics class
from the osgNode or osgGroup only and hide the implementation.

Actually I will like to see a example in the drawimplementation of the
osg::Drawable just calls a shader code and does nothing else . Is there any
example for that ?


In general you don't want to mix state calls like shaders inside
Drawables as the OSG is designed to do all state handling within
osg::StateSet's and vertex array + primitive drawing calls kept within
Drawables.  The reason for this separation is to enable efficient
state sorting and lazy state updating, break this and you break the
ability to scale your applications performance.   So... you won't see
shaders mixed directly into Drawables as its not a good practice.

W.r.t subclass osg::Drawable just search the source code and osgteapot example.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Deriving from OSG:Drawable.

2007-07-16 Thread Robert Osfield

On 7/16/07, Amal [EMAIL PROTECTED] wrote:

So Since I have only Shader code to be used to draw the Cubic I was thinking
I should be implementing the drawImplementation Function of the
osg::Drawable after subclassing it.

But Now I understand that I can just subclass from the osg::Node and which
can use the Shader and render the cubic and i need not have the
osg::Drawable at all .

Am I right ?


Yes, you want a custom Node that provides the public methods for
controlling the cubic and have this set up the Uniform and Shaders and
subgraph with osg::Geometry appropriate for these settings.  As far as
the user is concerned they would just have a CubicNode or whetever you
want to call it, and they set the values on it add it to the scene
graph and hey presto pretty graphics appear.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: Re: [osg-users] Graphic pipeline latency question

2007-07-16 Thread Robert Osfield

Hi Claudio,

osgNV has nothing to do with the stats, you don't need it.

As the orange bar is missing it looks like the OpenGL extension for
querry pipe stats is not available.  It could be that your old
handward doesn't support it or the driver doesn't.  Try upgrading the
later.

Robert.


On 7/16/07, Claudio Arduino [EMAIL PROTECTED] wrote:

Hi Robert,
how you intend for NVidia hardware though due to use of extensions to get
this time? i have already seen the statistics but  i dont have a orange
bar...
i have download osgNV but i dont say how to use it...
my graphics card is Nvidia GeForce Ti 4600 with drivers version
6.13.10.3082..
I attach the screenshot of statistics..
please note that our model and our application are very simple and that when
V-sync is disabled the frame rate is higher than 75 fps... could you please
explain us if time between the two marks in the image attached  is for GPU
computation?

thanks!!!
ps sorry for my English




 Hi Claudio,

If you run osgviewer and then press 's' a couple of times to full
stats you see the various phases of operation, the last phase is the
orange bar which represents the time on the GPU (this is only
available on NVidia hardware though due to use of extensions to get
this time).  The GPU stats position is an best estimate (the extension
doesn't provide the absolute timing), but the length of the bar is
accurate.

Now try toggle the threading model by pressing 'm', SingleThreaded
will actually give you the lowest latency if everything is rendering
comfortable within one frame.  Threading models like
DrawThreadPerContext scale very well so can handle big models better
but it does add a frame latency due to the double buffering of the
rendering backend.

Robert.

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] When I drag left mouse botton I don't want to change the view position, how can I do?

2007-07-16 Thread Robert Osfield

Do you want any camera manipulation?  If so just don't add a camera
manipulator or write your own that uses different mouse/keyboard
strokes.



On 7/16/07, litingbaotou [EMAIL PROTECTED] wrote:



Hi,

I want to define drag left mouse botton another type of event but not
change the view position? I use OSG 2.0 and MFC, develop in VC 2005. I want
to define my event in OnLButtonDown() but I can not stop the message of
change view position from osgViewer. In osgViewer, there is
addEventHandler(new osgViewer::StatsHandler);

Hope someone can help me. Thanks.

--LiTing
 

litingbaotou
2007-07-16
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Texture loading in a multi context composite viewer

2007-07-16 Thread Robert Osfield

On 7/16/07, Karl Heijdenberg [EMAIL PROTECTED] wrote:

Hello again,

Thanks for your reply!

I have now tried the suggestions concerning both preDrawCallback and
osg::Operation and they result in the same behaviour. I still get one
context with correct terrain textures and one with black textures.
Everything else in the scene shows up as expected in both contexts.

When using the osg::Operation I had to add the operation after
viewer.realize(), otherwise it wasn't performed.

What to try next?


I'm sorry I don't know what's wrong.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osgmotionblur on ati x1400 mobile

2007-07-16 Thread Robert Osfield

On 7/16/07, Yanling Liu [EMAIL PROTECTED] wrote:

Hi, there are opengl errors produced by osgmotionblur in osg 2.0 on ati
mobile x1400 video card. Is this a known problem? Is it related to ati
opengl driver?


Does it support an OpenGL accumulation buffer?
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] MultiTextureControl

2007-07-16 Thread Robert Osfield

On 7/16/07, christophe loustaunau [EMAIL PROTECTED] wrote:

Hello,

I have generated a database with  4 layers, with VPN, .
I wan't to display sometimes one layer and sometimes 4.

I use osgFX::MultiTextureControl for that. But I have look into the source
code
of MultiTextureControl::updateStateSet(), and the code
exist for 1, 2 or 3 layers.

Is this limitation because of OpenGL ?


Reviewing the updateStateSet code the limit is the OSG right now, if
should be possible to extend the code to handle 4 layers, or more, by
simply chaining the TexEnvCombine together as the layer 3 block does.
Alternatively one could implement it using shaders.  Have a bash at
adding the 4 layer or n layer implementation to the updateStateSet
using the existing TexEnvCombine.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Dynamic update of the scene graph?

2007-07-16 Thread Robert Osfield

There are a lot of ways one could update the scene graph, most of
which are perfectly safe to do during the update traversal.  There are
some however that you need to be mindful - such as adding/removing
children of a group as this can invalidate iterators held by the
calling code. It safe to change your children but not your siblings or
parents during traversal.  If you have to do modify ones that are not
sensible to do during traversal save all these changes up and do them
on batch after the update traversal.

On 7/16/07, Benjamin Cabut [EMAIL PROTECTED] wrote:



Hello,

I am working on a bench application that do this:
using DepthPartitionNode, I fly in a starfield.

Stars are Point, Point Smooth or Point Sprite dependind magnitude
(calculated depending distance)
I want to be able to draw 3D Sphere (and in the future more complex
object) when I am near enough to a star.

I tryed in the update of this StarsCatalog Object to add a Child to my
SceneRoot when I'm close to a star, but as soon as I go in the travers
application crash...
I don't understand why... I tough update was done for this, dynamic
modification, so I tough it was possible to dynamicaly add an object to the
scene.

Is it forbiden to change the scene graph in an update function? is there
limitations?
Is it the best way to do what I want or do you think of another
technics?

I tought to instance one or two spheres and change the MatrixTransform
when needed in the Updates, but I would like to know if you have better
idea...

The scene has got currently 12 Stars but should go to 4 000 000...

Regards.


CABUT Benjamin
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Using OSG just for model rendering

2007-07-16 Thread Robert Osfield

On 7/16/07, Paul Martz [EMAIL PROTECTED] wrote:

It'd be easier for you to use the osgUtil::SceneView class. Attach your
loaded model, then call SceneView update(), cull(), and draw() each frame.
There are some gotchas with this approach, but this seems like the least
invasive way for you to proceed. Unfortunately, SceneView will be deprecated
in a future OSG release.


You can use osgViewer::Viewer as embedded viewer instead of SceneView.
See the osgviewerSDL and osgviewerGLUT examples to illustrate how
this is done.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: Re: [osg-users] Graphic pipeline latency question

2007-07-16 Thread Robert Osfield

On 7/16/07, Claudio Arduino [EMAIL PROTECTED] wrote:

hi Robert,
ok i try in another Pc with Quadro card..
for the question could you please explain us if time between the two marks
in the image attached  is for GPU computation? i attach you the correct
image...for error the old don't have the marks...thank you!!


?? I know really know what you are asking.

The larger vertical lines are the frame boundaries.  The little ticks
are milliseconds.  Is this what you mean?
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osgparametric example.

2007-07-16 Thread Robert Osfield

On 7/16/07, Amal [EMAIL PROTECTED] wrote:

 In the CreateModel function  in the osgparametric example , geometric data
is being set. in. Can i know what is the geometry data that is being set in
that ?


?? What do you mean?  What do you want to know about the geometry?  Is
this a general question about setting up osg::Geometry, or question of
how you examine goemetry once its in the scene graph?
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] not compiling net plugin in mac

2007-07-14 Thread Robert Osfield

Hi Rafa,

Arggh, a submission made by Mathias to fix build problems on other
platforms has obviously broken it here..  You could revert this fix
temporarily, or if you can find a workable modification of Mathias'
change then please post the compete file to me.

Cheers,
Robert.

On 7/14/07, Rafa Gaitan [EMAIL PROTECTED] wrote:

Hi Robert,

Recent changes in net plugin have broken compilation in mac, I've realized
that the this define is not correctly in my system:

#if (defined(__APPLE__)(__GNUC__4)) ||
(defined(WIN32)!defined(__CYGWIN__)) ||
!defined(_XOPEN_SOURCE_EXTENDED)
#define socklen_t int
#endif

This is defined in sockinet.cpp and sockstream.cpp

I have Tiger, so I think many mac users with tiger will have the same problem.
I have gnu 4.0.1, so the problem could be the
!defined(_XOPEN_SOURCE_EXTENDED), commenting the last or, compiles
ok.. I don't know if this will break the compilation
in other system.. but needed for mac! ;)

Thanks.
Rafa.

--
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] MultiThreaded problem in latest SVN

2007-07-14 Thread Robert Osfield

On 7/13/07, Robert Osfield [EMAIL PROTECTED] wrote:

The changes I made since 7117 aren't major changes, I don't know yet
exactly what went wrong, but at least I know roughly where to look.
I'll do this over the weekend.


OK, hang now fixed and checked into SVN.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] building on windows 64

2007-07-13 Thread Robert Osfield

On 7/13/07, Andy Skinner [EMAIL PROTECTED] wrote:

Yes, my OpenThreads is inside OpenSceneGraph/src.

Could someone explain to me the win32 subdirectory in OpenThreads?  Is
that supposed to work with Windows 64?


Yes.  Many win32 API's are still applicable to 64 bit build.

Others have reported success on building the OSG on 64 windows so I
don't believe there is any major issue.


Maybe my problem is just that the compile is using one machine
architecture, and the link is using another.


When you say link, you mean you app that links to the OSG is built on
a machine with another architecture?

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Texture loading in a multi context composite viewer

2007-07-13 Thread Robert Osfield

HI Karl,

To do the graphics work you should do all the ops from the thread that
the graphics context has.  The easist way to this by adding in pre or
post draw callback to the camera.  Alternatively you can add an custom
osg::Operation to the GraphicsWindow and this will be called during
the standard frame.

In the SVN version of the OSG you also have the option of using a
CompileContext, which is a pbuffer created per main graphics context
and is shared with this context.  This CompileContext can have its own
GaphicsThread that you can pass a custom osg::Operation to do the
compile.  Its effectively the same approach as adding it to the main
GraphicsWindow except its done in a separate thread.

The src/applications/osgviewer.cpp has some code in place that
illustrates how to create the compile contexts.

Another things you might consider is using the OSG standard database
paging support, this way you won't need to do any tricky stuff
yourself, it'll all be done for you.

Robert.

On 7/13/07, Karl Heijdenberg [EMAIL PROTECTED] wrote:

Hello,

I have a tricky problem with composite viewer. I will try to explain it.

We are developing an application for flight simulation with both terrain and
texture paging.
The problem occurs for the texture paging in a callback that loads textures
to the graphics card.

First of all I create two contexts and using one camera per context.
For each camera I add an update callback, for texture loading.

The callback class, that is called, holds a pointer to the graphics context.
Upon a callback call I
only get filled black polygons, when textures are loaded (for both
contexts). If I add a call to makeCurrent()
on the graphics context in the called method, my textures are shown for the
first
context as expected. However in the second context the textures are still
black.

// Setup composite viewer
  viewer_ = new CompositeViewer;

viewer_-setThreadingModel(osgViewer::CompositeViewer::ThreadPerContext);

  osg::ref_ptrosg::GraphicsContext::Traits traits = new
osg::GraphicsContext::Traits;
  traits-x = 0;
  traits-y = 0;
  traits-width =  1280;
  traits-height = 480;
  traits-windowDecoration = false;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;

  traits-screenNum = 0;


//Create first context and add first View to the composite viewer
 {
osg::ref_ptrosg::GraphicsContext gc =
osg::GraphicsContext::createGraphicsContext(traits.get ());
gc-createNewContextID();

if(gc.valid())
  {
osgViewer::View* view = new osgViewer::View;
viewer_-addView(view);

//std::cout  gc-createNewContextID();  gc-createNewContextID()
 std::endl;
view-addEventHandler(keyboardHandler_.get());
view-setSceneData(getSceneRoot());
view-addEventHandler(MouseFly::Instance());
view-getCamera()-setViewport(new osg::Viewport(0,0,
traits-width, traits-height));
view-getCamera()-setProjectionMatrixAsPerspective(45,
traits-width/traits-height, 10, 100);
view-getCamera()-setGraphicsContext(gc.get());
view-getCamera()-setNearFarRatio( 0.5/3.0);

osg::ref_ptrUpdateTRAMCallback TRAMupdateCallback =
new UpdateTRAMCallback();
osg::ref_ptrSubloadTRAMCallback TRAMsubloadCallback =
new SubloadTRAMCallback(gc.get());

osg::ref_ptrosg::NodeCallback nc = new
osg::NodeCallback;
nc-addNestedCallback(TRAMsubloadCallback.get()); // once every
graphical context
nc-addNestedCallback(TRAMupdateCallback.get());

view-getCamera()-setUpdateCallback(nc.get());

  }
  }

  traits-x = 0;
  traits-y = 800;

//Create second context and add second View to the composite viewer
   {
osg::ref_ptrosg::GraphicsContext gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
gc-createNewContextID();
if(gc.valid())
  {
osgViewer::View* view = new osgViewer::View;
viewer_-addView(view);

view-addEventHandler(keyboardHandler_.get());
view-setSceneData(getSceneRoot());
view-addEventHandler(MouseFly::Instance());
view-getCamera()-setViewport(new osg::Viewport(0,0,
traits-width, traits-height));
view-getCamera()-setProjectionMatrixAsPerspective(45,
traits-width/traits-height, 10, 100);
view-getCamera()-setGraphicsContext(gc.get());
view-getCamera()-setNearFarRatio( 0.5/3.0);

osg::ref_ptrUpdateTRAMCallback TRAMupdateCallback =
new UpdateTRAMCallback();
osg::ref_ptrSubloadTRAMCallback TRAMsubloadCallback =
new SubloadTRAMCallback(gc.get());

osg::ref_ptrosg::NodeCallback nc = new
osg::NodeCallback;
nc-addNestedCallback(TRAMsubloadCallback.get()); // once every
graphical context
nc-addNestedCallback(TRAMupdateCallback.get());

view-getCamera()-setUpdateCallback(nc.get());
  }
  }

  viewer_-realize();



//Callback class methods
  void SubloadTRAMCallback::operator()( osg::Node *node,
osg::NodeVisitor *nv )
  {
// gc_-makeCurrent(); //If this is called we get a desired behaviour
for the first context.
TextureController::Instance()-subload((gc_.valid() 

Re: [osg-users] ive Plugin Copyright Holder

2007-07-13 Thread Robert Osfield

On 7/12/07, Feyerchak, Chris [EMAIL PROTECTED] wrote:

The source files for the ive plugin contain a Copyright 2003 VR-C
statement.  How can I contact VR-C (e-mail, phone, and/or mailing address)?
What does VR-C stand for?  Does VR-C still exist?


It VR-Lab at a university in Denmark:

 http://www.uni-c.dk/generelt/english/research/vr-c.html

The engineers at VR-C, Rune Schmidt Jensen  Michael Gronager,  who
contributed to the OSG moved on from VR-C a number of years ago.

The IVE plugin is released under the OSGPL like the rest of the OSG.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] building on windows 64

2007-07-13 Thread Robert Osfield

Hi Andy,

Are you build OpenThreads from within the OSG build?

FYI, I haven't removed the old GNUmakefile and VisualStudio files from
OpenThreads, I'm rather more cautious about doing this than I am with
the OSG, while I am the now effectively  the project lead OpenThreads,
its more out of lack of anyone else taking responsibility for it than
a formal adoption...

It probably is time to get rid of the old build system elements within
OpenThreads, it not as capable as the new one and can cause confusion.
The problems you are trying to resolve right now might not having
anything to do with the old project files, but its just having them
around will make you think twice about whether they still have some
influence.

Robert.

On 7/12/07, Andy Skinner [EMAIL PROTECTED] wrote:

I'm sure I did this (built OSG on Windows 64 bit) before.  I think I
used CMake on my 32-bit machine and then brought the solution into
visual studio and build on a 64-bit machine.

But now I'm having a problem as I try to build the whole thing on
Windows 64.  OpenThreads seems to be built for 32 bits.

I'm getting an error:
\openthreads.dir\release\WIN32Condition.obj : fatal error LNK1112:
module machine type 'x64' conflicts with target machine type 'X86'

The fact that I'm building in this win32 directory itself makes me
nervous.  Should there be a 64-bit equivalent?

The link command has an option /MACHINE:I386.  That seems to be in dsp
files in the downloaded source for OpenThreads, so it isn't set by the
CMake options.

I don't know if I'm going down a minor wrong turn (I need to specify a
flag somewhere) or a big one (I'm not building the right part of
OpenThreads, and the right one doesn't exist).

Anybody recognize my problem?

Thanks,

andy

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Graphic pipeline latency question

2007-07-13 Thread Robert Osfield

Hi Claudio,

If you run osgviewer and then press 's' a couple of times to full
stats you see the various phases of operation, the last phase is the
orange bar which represents the time on the GPU (this is only
available on NVidia hardware though due to use of extensions to get
this time).  The GPU stats position is an best estimate (the extension
doesn't provide the absolute timing), but the length of the bar is
accurate.

Now try toggle the threading model by pressing 'm', SingleThreaded
will actually give you the lowest latency if everything is rendering
comfortable within one frame.  Threading models like
DrawThreadPerContext scale very well so can handle big models better
but it does add a frame latency due to the double buffering of the
rendering backend.

Robert.

On 7/13/07, Claudio Arduino [EMAIL PROTECTED] wrote:



I have a question about the latency between when an instruction changing the
scene graph is issued and when the effect of that instruction is visible on
the screen.

I'm using a very simple application (OSG 2.0) with a very simple scene graph
made by a square with a white face and a black face, running at 75 fps with
vsync enabled on the graphic card; ever every 30 frames two instruction are
issued:

1 a rotation instruction provoking a color change from black to white on the
whole screen

2 a character is sent on the serial port

I'm measuring whith an oscilloscope the time elapsed from the beginning of
the electric signal on the serial port and the pattern change in the
electric signal on the VGA Red signal line due to the black to white
transition; the result is that it takes two frames for a change to be
visible on the screen (the measured time is around 26 ms) when OSG viewer is
configured in single thread.

Does someone know why there are two frames of delay instead of one? (please
note that we are not using triple buffering on the graphic card)
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] MultiThreaded problem in latest SVN

2007-07-13 Thread Robert Osfield

Hi Adrian,

Could you try forcing the OSG to use different threading models using
the OSG_THREADING env var, then see which ones are OK, which ones are
suspect. i.e.:

 set OSG_THREADING=SingleThreaded
 osgviewer mymodel.osg

There has been changes to GraphicsThread/OperationThread classes over
the past few weeks, to enable support for thread pools.  These a
mainly structural changes in the classes rather than alterations in
their way they work overall, there were a couple of places where I
came across possible threading problems in the original implementation
that should now be solved, but... as with any new implementation that
is room for errors being introduced.

Could you also explain the circumstances of the crash, was it crash on
start up, running, on exit?  Was it with your app?  Did it occur with
OSG examples at all?   What were the database types?

Robert.

On 7/13/07, Adrian Egli [EMAIL PROTECTED] wrote:

hi


i just came from checking out the latest SVN version, an rebuild it. About
one week ago i still get same behaviour, i'll mention in the next
few lines. but still today i just  ignored it, becaue i believed it cames
from wrong build or may ati driver is buggy, but i got i also under an other
system today for the first time.

I am working on windows based computer with dual core and an ati graphic
card (GPU). after rebuilding i tried
to run the examples and everyone seams to work well. But suddenly i got a
crash and windows was forced to reboot. (black screen)
i dont know what was happened, but the rebuild seems to be that we have an
GPU based crash and the system can not restart nor catch
the fault. may we have some mutlithreaded crash, because same example or
same osgviewer database.ive runs many time without
crashing. but in one run it suddenly crashs, may i have to rebuild it under
os/X, because at the moment under windows i don^t get any information about
the crash, so i can not say anything more clear. may under os/x we have same
problem, and then may the os/x system will be able to catch
the crash location.

* get someone other same crash ?
- if yes, what kind of CPU, GPU you work on
- if  yes, what SVN version you first got such a crash

unfortunately i can't say what SVN version work fine, i was for a while off
the svn check outs.

robert: i you need more information, i will be back from the mountains
monday. :-) so i hope others will get same crashes and may someone could
located where the crash is from.

/adegli
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] How to display an osg::image in an additional osg window?

2007-07-13 Thread Robert Osfield

Hi Tobias,

You have a couple of options.

First up you could create a slave Camera that renders into a separate
window, and have this Camera not share the main View's scene data, and
also separate the view and projection matrix settings by setting the
slave Camera ReferenceFrame to ABSOLUTE_RF.  See the osghud example as
this will provide a bit of inspriation in this direction.

Alternatively you could use a CompositeViewer and have two View's one
for the main 3D view and one for the 2d image view.  Again osghud has
a code path that uses CompositeViewer so its a good example to use for
this approach.

W.r.t rendering the image, have a look at the osgdistortion example as
it provides an example of rendering an image full screen by rendering
a quad in orthographic view.  Again this related to osghud.

Robert.

On 7/13/07, Tobias Münch [EMAIL PROTECTED] wrote:

Hello at all

 I want to create an additional window besides my standard osg::viewer
window that displays an osg::image. I allready created a window with
osg::GraphicsContext. Does anybody know how to put an osg::image into an osg
window? Moreover it should be possible to update the image content at each
frame of the osg::viewer window.

 Best regards, Tobias

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Build a new machine, comments?

2007-07-13 Thread Robert Osfield

Hi Leif,

On 7/13/07, Leif Delgass [EMAIL PROTECTED] wrote:

A word of warning: you might consider looking at a roomier case or at
least check the dimensions carefully.  The new GeForce cards (even the
GTS) are quite long and you may be in danger of bumping up against the
drive cage with that case.  I have a Tsunami case as well, and
although I haven't tried the GeForce 8 cards yet, I am considering a
larger case to accomodate the newer boards, since the 7900GTs I have
are already a tight fit.


I have Thermaltake Tsunami already at it comfortably house my twin
7800GT's so made the assumption that it'd work fine for 8800GTS...
thank for the heads up.

Now need to find out how big the 8800GTS is...
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Saving/Loading QuickTime ImageStreams

2007-07-13 Thread Robert Osfield

On 7/13/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:

I'm using the QuickTime plugin to create a video texture.  I'm having
trouble saving/loading the video texture to/from an IVE file.  The save
process seems to work correctly.  But when I load the IVE file, all I
see is a single video frame.  When I try to cast the loaded osg::Image
to an osg::ImageStream, it fails.  Does anyone know if it's even
possible to do what I'm trying?


The loader won't automatically call play on the ImageStream, in fact
the .ive and .osg plugins won't even know that the files are not
standard Image objects so will just treat as so.

You'll need to traverse through the scene to find the ImageStream and
call play on them.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Saving/Loading QuickTime ImageStreams

2007-07-13 Thread Robert Osfield

On 7/13/07, Bradford, Chase [EMAIL PROTECTED] wrote:

ImageStreams aren't currently supported by the ive reader/writer.  They
safely cast to Image, so the plugin treats them according to the
osg::Image interface.


Ahh forgot about the storing of images inline to a .ive file, yes this
will cause then to be treated as a normal osg::Image and saved that
way.

If you set the ReaderWriter::Option to not inline image files then
just the filename will be written, and on reading back in again the
file will be loaded by the quicktime/xine-lib plugin as an
ImageStream, but you'll still need to call play...

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] MultiThreaded problem in latest SVN

2007-07-13 Thread Robert Osfield

Hi Adrian,

I did some testing this evening and found that when running in the
CullThreadPerCameraDrawThreadPerContext thread model I get a hang on
start up.  All the rest of the threading models works fine,
CullThreadPerCameraDrawThreadPerContext even works fine when I run on
a single head.

I have isolated this particular problem to being in revision 7118 and
later, 7117 works fine in all threading models, at least on my
machine.  I don't know if this issue is related to the one you've seen
but perhaps it might be and you'll at least know which revision to go
back to.

The changes I made since 7117 aren't major changes, I don't know yet
exactly what went wrong, but at least I know roughly where to look.
I'll do this over the weekend.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Triying to create objects and receiving Warning Messages

2007-07-12 Thread Robert Osfield

Hi Carlos,

This type or error usually comes from picking code that is trying to
handle models of zero radius.  I can't see any picking code in your
app though...

Could you try upgrading to 2.0 and see if the warning persists.

Robert.

On 7/11/07, Carlos Nava [EMAIL PROTECTED] wrote:

I´m trying to make a very simple SceneGraph, with a model and 3 planes, but
when I run it I get ha next warning twice:
 Warning: invalid line segment passed to IntersectVisitor::addLine
Segment..
  0 0 0 0 0 0 segment ignored
and then get a blank console...

I saw many other mails about this kind of error but none of them seems to
apply, here's y code:



#include osg/Node
#include osg/Geometry
#include osg/Geode
#include osg/Notify
#include osg/MatrixTransform
#include osg/BlendFunc
#include osg/ColorMask
#include osgDB/ReadFile
#include osgUtil/Optimizer
#include osgProducer/Viewer

osg::Node* createMirrors(float xMin,float xMax,float zMin,float zMax,float
y)
{

// set up the Geometry.
osg::Geometry* geom = new osg::Geometry;

osg::Vec3Array* coords = new osg::Vec3Array(6);
   coords-push_back( osg::Vec3(   0,0,zMax) ); // front top
   coords-push_back( osg::Vec3(xMin,0,zMin) ); // front left
   coords-push_back( osg::Vec3(xMax,0,zMin) ); // front right
   coords-push_back( osg::Vec3(   0,y,zMax) ); // back top
   coords-push_back( osg::Vec3(xMin,y,zMin) ); // back left
   coords-push_back( osg::Vec3(xMax,y,zMin) ); // back right
   geom-setVertexArray(coords);

   osg::DrawElementsUInt* espejoBase =
  new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
   espejoBase-push_back(4);
   espejoBase-push_back(5);
   espejoBase-push_back(2);
   espejoBase-push_back(1);
   geom-addPrimitiveSet(espejoBase);

   osg::DrawElementsUInt* espejoIzq =
  new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
   espejoIzq-push_back(1);
   espejoIzq-push_back(0);
   espejoIzq-push_back(3);
   espejoIzq-push_back(4);
   geom-addPrimitiveSet(espejoIzq);

   osg::DrawElementsUInt* espejoDer =
  new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
   espejoDer-push_back(2);
   espejoDer-push_back(5);
   espejoDer-push_back(3);
   espejoDer-push_back(0);
   geom-addPrimitiveSet(espejoDer);

   osg::Vec3Array* norms = new osg::Vec3Array(1);
(*norms)[0].set(0.0f,0.0f,1.0f);
geom-setNormalArray(norms);
geom-setNormalBinding(osg::Geometry::BIND_OVERALL);

osg::Vec4Array* colours = new osg::Vec4Array(1);
(*colours)[0].set(1.0f,1.0f,1.0,1.0f);
geom-setColorArray(colours);
geom-setColorBinding(osg::Geometry::BIND_OVERALL);

osg::Geode* geode = new osg::Geode;
geode-addDrawable(geom);

return geode;
}

osg::Node* createCaleidoscope(osg::Node* model)
{

// calculate where to place the mirror according to the
// loaded models bounding sphere.
const osg::BoundingSphere bs = model-getBound();

float xMin = bs.center().x()-bs.radius()*.9129;
float xMax = bs.center().x()+bs.radius()*.9129;
float zMin = bs.center().z()-bs.radius();
float zMax = bs.center().z()+bs.radius()*1.5;
float y = bs.center().y()-bs.radius()*10.5;

osg::Group* rootNode = new osg::Group;
// create a textured, transparent node at the appropriate place.
osg::Node* mirrors = createMirrors(xMin,xMax,zMin,zMax,y);

rootNode-addChild(mirrors);

return rootNode;
}

int main( int argc, char **argv )
{

// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(argc,argv);

// construct the viewer.
osgProducer::Viewer viewer(arguments);

// set up the value with sensible default event handlers.
viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);

// any option left unread are converted into errors to write out later.
arguments.reportRemainingOptionsAsUnrecognized();

// report any errors if they have occured when parsing the program
aguments.
if (arguments.errors())
{
arguments.writeErrorMessages(std::cout);
return 1;
}

if (arguments.argc()=1)
{

arguments.getApplicationUsage()-write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
return 1;
}


// read the scene from the list of file specified commandline args.
osg::ref_ptrosg::Node loadedModel = osgDB::readNodeFiles(arguments);

// if no model has been successfully loaded report failure.
if (!loadedModel)
{
std::cout  arguments.getApplicationName() : No data loaded 
std::endl;
return 1;
}


// optimize the scene graph, remove rendundent nodes and state etc.
osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel.get());

// add a transform with a callback to animate the loaded model.
osg::ref_ptrosg::MatrixTransform loadedModelTransform = new
osg::MatrixTransform;
loadedModelTransform-addChild(loadedModel.get());

osg::ref_ptrosg::Node rootNode =

Re: [osg-users] Determining value of potentially overridden uniform value

2007-07-12 Thread Robert Osfield

Hi Brian,

It sounds like you are going in the right direction w.r.t checking
osg::State for the current value of a uniform.  I haven't ever used
State for checking current uniform values though, its really not a
common thing that one would want to do.  If you can't get access to
the values you need then feel free to add a public method to
osg::State for access it and submit the change.

A big but though... using a uniform value to determine if you are
rendering in the main viewer camera or within a RTT camera doesn't
seem appropriate.  This type of querry is probably based handled via
the RenderInfo data structure introduced in 2.0, not
drawImplementation() now takes a RenderInfo object which has the
current osg::State object.  RenderInfo also has the current View.  In
your case both Cameras are rendering the same view so will be sharing
the same View.  Adding in the current active Camera to RenderInfo
seems resonable, perhaps a stack of cameras would be most suitable.
src/osgUtil/RenderStage.cpp would need to push/pop Cameras off this
stack as it does the draw traversal.  Again feel free to code such as
solution and submit it to me.

Robert.



On 7/11/07, Brian [EMAIL PROTECTED] wrote:

Hi,

I have a scene in which I have a main camera and a camera node that renders to 
texture.  Both cameras render the same basic scene with the main difference 
being the RTT scene is rendered gray scale.  The gray scale is accomplished via 
a shader.  The scene renders fine, but I have recently added a custom drawable 
to the mix and would like to determine the state of the uniform that toggles 
the gray scale.  In my camera node, I have this uniform overridden to 1, 
otherwise it is set to 0.

How can I determine the active state of this uniform in my drawImplementation?  
I've tried getting the active stateset and querying for the uniform.  The query 
returns NULL.  However, if I set a breakpoint inside my drawImplementation and 
set a watch deep within the state's _uniformMap, I can verify that the value of 
this uniform is toggling from 0 to 1 like it should.  How do I get to this 
information since a majority of it is protected?  I need it to determine which 
camera is rendering the scene.

Thanks,
Brian
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] ImageStream Projection

2007-07-12 Thread Robert Osfield

HI Andrew,

Most likely its simply that your tex coords are off.  If you are using
a TextureRectangle then the tex coords go from 0,0 to width,height
rather than 0,0 to 1,1 like on normal textures.

Robert.

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:

Hi,

My goal is to project an ImageStream onto some geometry.  I'm using the
QuickTime plugin to read an AVI file as an ImageStream.

I can successfully project an Image onto my geometry by using a
TexGenNode and TexEnv.  My code for projecting an ImageStream is
identical, except that I cast the Image to an ImageStream and then call
play().  The problem is that I never see the movie; instead, I see a
solid gray image projected where the movie should be.

Is it possible to do what I'm attempting?

Thanks,
Andrew
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] I've added you as a friend on Facebook...

2007-07-12 Thread Robert Osfield

Sadly spam that got through.  The facebook email is the first bit of spam
for many years has somehow got onto osg-users.  Mailiman is set up to reject
all posts from non members, and the William Law [EMAIL PROTECTED]  is
not a member of the lists so I don't know how it got through.  Spam is
despicable intrusion and waste of time and earth resources.  Please feel
free to pass this William Law's email address on to spam bots.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Problem when enabling GL_POINT_SMOOTH and using a fragment shader...

2007-07-12 Thread Robert Osfield

Hi Benjamin,

For an answer to your questions you are best search NVidia developer forums.

Robert.

On 7/12/07, Benjamin Cabut [EMAIL PROTECTED] wrote:

Hello Robert,

Thanks again for you disponibility...

So  I work on a labtop that have a NVIDIA GeForce Go 7600.

And the driver is NVIDIA Version 8.3.9.0 build 09/02/2006

So nothing so old...

I think I can found another method to do what I was doing in my fragment
shader, but I would like to understand if there is a limitation or not, and
why this limitation exist.

If anybody have an idea...

Best regards.

Benjamin

- Original Message -
From: Robert Osfield [EMAIL PROTECTED]
To: osg users osg-users@openscenegraph.net
Sent: Wednesday, July 11, 2007 7:31 PM
Subject: Re: [osg-users] Problem when enabling GL_POINT_SMOOTH and using a
fragment shader...


 Hi Benjamin,

 On 7/11/07, Benjamin Cabut [EMAIL PROTECTED] wrote:
  I've got a problem (frame rates goes near 0 fps!) when I use a
fragment
  shader and when I enable GL_POINT_SMOOTH...
 
  Does someone know something about this?
 
  I've seen on another forum someone that have got the same problem,
but
  no solution was offered...

 The solution is... don't enable point smoothing :-)

 BTW, what hardware are you using?  Its likely to be a hardware or
 driver specific limitation.

 Robert.
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] updateTraversal and camera manipulators

2007-07-12 Thread Robert Osfield

On 7/12/07, Lionel Lagarde [EMAIL PROTECTED] wrote:

Hi,

Why does the update visitor traversal is done before the camera view matrix
modification (by the matrix manipulator) ?


If your camera is tacking a node in the scene that is being moved by
an update callback then... you obviously have to do to the view matrix
computation after the update traversal.

You could if you wish subclass from osgViewer::Viewer and override
updateTraversal() and re-arrange things to suit yourself.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osg::ClipNode

2007-07-12 Thread Robert Osfield

On 7/12/07, Mathias Froehlich [EMAIL PROTECTED] wrote:

Ok, so the cull callback should do so?
Do you have an example for that?


No afraid not.


I remember you telling me adding a post render camera to get a new render
stage, but having a clipped part of the normal scene drwawn in the post
render stage has other drawbacks ...

So it would defeinitely be useful to be able to reuse positional state
attributes for different subtrees.


If it was easy to code and solution would have already been checked
in.  There are many many things pressing on my time, this is just one
more loitering in the background.  If you'd like to see it happen in
the near term then I'm afraid members of the community will need to
roll their sleeves up.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] envvars in OSG 2.x

2007-07-12 Thread Robert Osfield

Hi John,

You can configure when the build system installs things via ccmake or
a cmake command line option.  CMAKE_INSTALL_PREFIX is probably the one
you are looking for.

We could possible add the checking of the OSG_INST_LOCATION in the
root CMakeLists.txt to provide backward compatibility.

Robert.

On 7/12/07, John Kelso [EMAIL PROTECTED] wrote:

Hi,

For the usual reasons, we can't install OSG in the default location.

We set the OSG_INST_LOCATION envvar to specify where it's installed.  We
use other OSG-related envvars too:  OPENTHREADS_INC_DIR,
OPENTHREADS_LIB_DIR, OSG_FILE_PATH.

What envvars can we use in OSG 2.x to let our software's Makefiles
determine where OSG's installed?  Grepping through the rev 7107 code only
shows OSG_FILE_PATH being used from the above list.

Is there an equivalent of a osg-config which can be put in the PATH to
find out this information?

Thanks,

-John






___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] envvars in OSG 2.x

2007-07-12 Thread Robert Osfield

On 7/12/07, John Kelso [EMAIL PROTECTED] wrote:

Hi back,

I'm looking for an envvar or command that a package which uses OSG can use
to determine where OSG is installed, so the package can find OSG's
library, include files, and so forth.

OSG_INST_LOCATION would do the trick.   Can you let us know if this ever
gets added?


I better route might be to have an osg-config script.

There might be standard CMake approaches to this as well.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] compiling VirtualPlanetBuilder

2007-07-12 Thread Robert Osfield

Hi Christophe,

Luigi sent a post a few days about about build VPB under Windows using
the new Cmake build.  He mentioned that he had to make a few changes
to CMakeLists.txt files and source files but hasn't submitted any
changes yet though.

Robert.

On 7/12/07, christophe loustaunau [EMAIL PROTECTED] wrote:

Hello,

I try to compile VPN, I have generated the binaries with CMake without
problems.
CMake told me that it can't find some variables :
GDAL_INCLUDE_DIR
GDAL_LIBRARY
OSGDB_LIBRARY
OSGFX_LIBRARY
OSGUTIL_LIBRARY
OSGVIEWER_LIBRARY
OSG_INCLUDE_DIR
OSG_LIBRARY

So I give it all the path, and I generate the binaries successfully !
But when I try to compile the projet virtualplanetbuilder.sln, I have somme
errors .
I'm under windows 2000, with visuel studio 8 2005.

If someone have an idea it will be helpfull !
Thanks.

Christophe.




2DataSet.obj : error LNK2001: symbole externe non résolu public: virtual
char const * __thiscall
GDALMajorObject::GetDescription(void)const 
([EMAIL PROTECTED]@@UBEPBDXZ)

22DataSet.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) public: void __thiscall
vpb::DataSet::setDestinationTileExtension(class
std::basic_stringchar,struct std::char_traitschar,class
std::allocatorchar  const )
(__imp_?setDestinationTileExtension@
[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@2@@std@@@Z)
référencé dans la fonction public: void __thiscall
vpb::DataSet::setDestinationName(class
std::basic_stringchar,struct std::char_traitschar,class
std::allocatorchar  const ) (
[EMAIL PROTECTED]@vpb@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@2@@std@@@Z
)

2DataSet.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) public: void __thiscall
vpb::DataSet::CompositeDestination::setSubTilesGenerated(bool)
([EMAIL PROTECTED]@DataSet @vpb@@[EMAIL PROTECTED])
référencé dans la fonction protected: void __thiscall
vpb::DataSet::_writeRow(class std::mapunsigned int,class
vpb::DataSet::CompositeDestination *,struct
std::lessunsigned int,class std::allocatorstruct std::pairunsigned int
const ,class vpb::DataSet::CompositeDestination *   )
(
[EMAIL PROTECTED]@vpb@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@std@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@vpb@@@std@@@5@@std@@@Z
)

..

2DataSet.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) public: class std::basic_stringchar,struct
std::char_traitschar,class std::allocatorchar  const  __thiscall
vpb::DataSet::getDirectory(void)const 
(__imp_?getDirectory@
[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@2@@std@@XZ)
référencé dans la fonction public: void __thiscall
WriteImageFilesVisitor::apply(class osg::StateSet ) (
[EMAIL PROTECTED]@@[EMAIL PROTECTED]@@@Z)

..

2DataSet.obj : error LNK2019: symbole externe non résolu __declspec

(dllimport) public: enum vpb::DataSet::CompositeType __thiscall
vpb::DataSet::CompositeSource::getType(void)const 
([EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@XZ)
référencé dans la fonction public: bool __thiscall
vpb::DataSet::CompositeSource::LODSourceAdvancer::advanceToNextSource(class
vpb::DataSet::CompositeSource const ,int ) (
[EMAIL PROTECTED]@[EMAIL PROTECTED]@vpb@@[EMAIL PROTECTED]@Z)

3ReaderWriterGDAL.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) public: virtual int __thiscall
OpenThreads::Mutex::lock(void) ([EMAIL PROTECTED]@OpenThreads@@UAEHXZ)
référencé dans la fonction public: virtual int __thiscall
OpenThreads::ReentrantMutex::lock(void) (?lock@
[EMAIL PROTECTED]@@UAEHXZ)

4osgdem.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) public: void __thiscall
vpb::DataSet::Source::setGeoTransformPolicy(enum vpb::

3ReaderWriterGDAL.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) public: virtual int __thiscall
OpenThreads::Mutex::trylock(void)
([EMAIL PROTECTED]@OpenThreads@@UAEHXZ) référencé dans la fonction
public: virtual int __thiscall
OpenThreads::ReentrantMutex::trylock(void) (
[EMAIL PROTECTED]@OpenThreads@@UAEHXZ)

3D:\VPN Binaries\lib\vpbPlugins-0.9.0\Debug\osgdb_gdald.dll : fatal error
LNK1120: 6 externes non résolus

4osgdem.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) public: virtual __thiscall
vpb::DataSet::Source::~Source(void)
([EMAIL PROTECTED]@vpb@@[EMAIL PROTECTED]) référencé dans la fonction public:
virtual void * __thiscall vpb::DataSet::Source::`scalar deleting
destructor'(unsigned int) (??_GSource@ [EMAIL PROTECTED]@@[EMAIL PROTECTED])



4osgdem.obj : error LNK2019: symbole externe non résolu
__declspec(dllimport) protected: virtual __thiscall
vpb::DataSet::~DataSet(void) ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) référencé 
dans
la fonction protected: virtual void * __thiscall vpb::DataSet::`scalar
deleting destructor'(unsigned int) ( [EMAIL PROTECTED]@@[EMAIL PROTECTED])


___
osg-users mailing list

Re: [osg-users] MultiTextureControl

2007-07-12 Thread Robert Osfield

Hi Christophe,

Its a while since I wrote/last used MultTextureControl.  The code you
have written looks ok.

What problem do you see?

Robert.

On 7/12/07, christophe loustaunau [EMAIL PROTECTED] wrote:

Hello,

I have generated a database with osgdem, witch have 2 layers.
I wan't to display only the first layer, and sometimes the two layers.
I have read that we could do this with MultiTextureControl, but i haven't
see any example.

But this doesn't work...I must make some errors !

Here is my code for displaying only the first layer :

osg::ref_ptr osg::Group root (new osg::Group());
osg::ref_ptr osg::Node node = osgDB::readNodeFile(D:/earth.ive);

osgFX::MultiTextureControl * Multi= new osgFX::MultiTextureControl;
root-addChild(Multi);
Multi-addChild(node.get());

Multi-setTextureWeight (0,1);
Multi-setTextureWeight (1,0);


If someone see what I make wrong.

Thanks !


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


[osg-users] Build a new machine, comments?

2007-07-12 Thread Robert Osfield

Hi All,

Its a year and half since I built my present Atlhon 3800 X2 + 2x
Gefore7800GT, 2GB machine.  Its been a excellent base for development,
but times move on, the user base are now moving on to quad core
systems, 8800 series has been with us for a while.  I also have
projects that will require the ability to test extra CPU cores and
latest OpenGL extensions.

So far I've put together the following shopping list of components, I
thought I'd though it out there to see if follow PC builders might be
able to suggest better component combination. The system will be
running Linux so compatibility here is obviously key.  If you know of
any gotchas then please shout.

A couple of items specific items to query:

  are going for 4 x 1GB memory modules, should I prefer higher latency
  2 X 2GB memory modules?

  Use of solid state drive for my main working disks - for the OS and
compilation.
  Anybody had experience of this?  Its sure an expensive option but fast...

  Anybody tried 3 graphics cards in such a motherboard as below?  It has
  three PCI express slots.  I have now clue how well linux OpenGL
drivers will cope,
  especially if I mix and match the card types.. i.e. 2x 8800 GTS + 7800GT.


Thanks in advance,
Robert.
---

Disks:
Samsung MC8DE16G5APP-0XA00 16GB 2.5 Solid State Hard Drive
Samsung SpinPoint T HD501LJ 500GB SATA-II 16MB Cache - OEM

Case:
Thermaltake VA3000SNA Tsunami Dream SuperMidi Aluminium Tower - Silve

Graphics cards
2 x Leadtek GeForce 8800 GTS 640MB GDDR3 HDTV/Dual DVI (PCI-Express) -
Retail

DVD drive:
Pioneer DVR-112DBK 18x18 DVD±RW Dual Layer ReWriter - (Black) OEM   Pioneer

Power supply:
Enermax Infiniti 720W EIN720AWT ATX2.2 Modular SLI Compliant PSU
Enermax Infiniti

Memory:
2 x OCZ 2GB (2 x 1GB) PC2-6400C4 800MHz SLI-Ready Edition Low Latency
Dual Channel

Motherboard:
Asus P5N32-E PLUS SLi nForce (Socket 775) PCI-Express DDR2 Motherboard
Asus P5N32-E PLUS SLi nForce (Socket 775) PCI-Express DDR2
Motherboard

Processor:
Intel Core 2 Quad Pro Q6600 LGA775 Kentsfield 2.40GHz (1066FSB) - Retail
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] ImageStream Projection

2007-07-12 Thread Robert Osfield

Hi Andrew,

It shouldn't make any difference whether the data is an ImageStream or
an straight Image.  Try getting what you are doing working with a
normal image and then see how you get on.

Also have a look at example that use TexGenNode such as osgspotlight.

Robert.

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:

Robert,

I am not using a TextureRectangle or specifying any texture coordinates.
That is because I'm using a TexGenNode.  I use the following code to
specify the projection plane, which works when projecting an Image:

tex_gen_node-getTexGen()-
setPlanesFromMatrix( osg::Matrixd::ortho2D( upper_left_x,
lower_right_x,
lower_right_y,
upper_left_y ) *
 osg::Matrix::translate( 1.0, 1.0, 1.0 ) *
 osg::Matrix::scale( 0.5, 0.5, 0.5 ));

Will this code have to change to accommodate the ImageStream?  Or does
my problem lie elsewhere?

Thanks!
Andrew


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, July 12, 2007 1:30 AM
To: osg users
Subject: Re: [osg-users] ImageStream Projection

HI Andrew,

Most likely its simply that your tex coords are off.  If you are using
a TextureRectangle then the tex coords go from 0,0 to width,height
rather than 0,0 to 1,1 like on normal textures.

Robert.

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:
 Hi,

 My goal is to project an ImageStream onto some geometry.  I'm using
the
 QuickTime plugin to read an AVI file as an ImageStream.

 I can successfully project an Image onto my geometry by using a
 TexGenNode and TexEnv.  My code for projecting an ImageStream is
 identical, except that I cast the Image to an ImageStream and then
call
 play().  The problem is that I never see the movie; instead, I see a
 solid gray image projected where the movie should be.

 Is it possible to do what I'm attempting?

 Thanks,
 Andrew
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] ImageStream Projection

2007-07-12 Thread Robert Osfield

Hi Andrew,

Are you able to see the video OK with osgmovie?

Something else you might want to try is enabling debug info via the
env var OSG_NOTIFY_LEVEL, setting it to DEBUG.


Robert.

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:

Hi Robert,

My program does work with a straight Image.  For example, I can project
a JPG or GIF onto my geometry and it looks great.  But when I replace
the Image with an ImageStream, all I get is a gray rectangle.  See
attached image.

Thanks for your help.

Andrew


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, July 12, 2007 8:26 AM
To: osg users
Subject: Re: [osg-users] ImageStream Projection

Hi Andrew,

It shouldn't make any difference whether the data is an ImageStream or
an straight Image.  Try getting what you are doing working with a
normal image and then see how you get on.

Also have a look at example that use TexGenNode such as osgspotlight.

Robert.

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:
 Robert,

 I am not using a TextureRectangle or specifying any texture
coordinates.
 That is because I'm using a TexGenNode.  I use the following code to
 specify the projection plane, which works when projecting an Image:

 tex_gen_node-getTexGen()-
 setPlanesFromMatrix( osg::Matrixd::ortho2D( upper_left_x,
 lower_right_x,
 lower_right_y,
 upper_left_y ) *
  osg::Matrix::translate( 1.0, 1.0, 1.0 ) *
  osg::Matrix::scale( 0.5, 0.5, 0.5 ));

 Will this code have to change to accommodate the ImageStream?  Or does
 my problem lie elsewhere?

 Thanks!
 Andrew


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert
 Osfield
 Sent: Thursday, July 12, 2007 1:30 AM
 To: osg users
 Subject: Re: [osg-users] ImageStream Projection

 HI Andrew,

 Most likely its simply that your tex coords are off.  If you are using
 a TextureRectangle then the tex coords go from 0,0 to width,height
 rather than 0,0 to 1,1 like on normal textures.

 Robert.

 On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:
  Hi,
 
  My goal is to project an ImageStream onto some geometry.  I'm using
 the
  QuickTime plugin to read an AVI file as an ImageStream.
 
  I can successfully project an Image onto my geometry by using a
  TexGenNode and TexEnv.  My code for projecting an ImageStream is
  identical, except that I cast the Image to an ImageStream and then
 call
  play().  The problem is that I never see the movie; instead, I see a
  solid gray image projected where the movie should be.
 
  Is it possible to do what I'm attempting?
 
  Thanks,
  Andrew
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/
 
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] ImageStream Projection

2007-07-12 Thread Robert Osfield

Hi Andrew,

If you use Texture2D the OSG will resize to a power of two unless you
switch off the resize non power of two texture hint.  From
include/osg/Texture:

   /** Sets whether to force the texture to resize images that
have dimensions
 * that are not a power of two. If enabled, NPOT images will
be resized,
 * whether or not NPOT textures are supported by the
hardware. If disabled,
 * NPOT images will not be resized if supported by hardware. */
   inline void setResizeNonPowerOfTwoHint(bool flag) {
_resizeNonPowerOfTwoHint = flag; }

This shouldn't affect the image being grey though.

Also try making sure you have mip mapping off.

Robert.

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:

Hi Robert,

I can see the video on the texture rectangle when I run osgMovie.  I
just can't see it in my own program that uses a TexGenNode.

I set the notify level to DEBUG, but I don't see anything out of the
ordinary.  In fact, it looks like the movie is playing:

Quicktime initialized successfully
QT-ImageStream: loading quicktime movie from C:\data\test\circle.avi
MovieData :: opening movie 'C:\data\test\circle.avi'
movietime: 0 rate: 0 state 1 playing: 0 done 0  1/1
new cmd: 1
applying loop mode 1
movietime: 0.017 rate: 1 state 0 playing: 1 done 0  1/1
movietime: 0.033 rate: 1 state 0 playing: 1 done 0  1/1
Scaling image 'C:\data\test\circle.avi' from (320,240) to (256,256)
movietime: 0.05 rate: 1 state 0 playing: 1 done 0  1/1
Scaling image 'C:\data\test\circle.avi' from (320,240) to (256,256)
movietime: 0.067 rate: 1 state 0 playing: 1 done 0  1/1
Scaling image 'C:\data\test\circle.avi' from (320,240) to (256,256)
movietime: 0.083 rate: 1 state 0 playing: 1 done 0  1/1

The Scaling image and movietime lines keep repeating while my movie
plays.  I have no idea why I can't see it!

Andrew


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, July 12, 2007 8:38 AM
To: osg users
Subject: Re: [osg-users] ImageStream Projection

Hi Andrew,

Are you able to see the video OK with osgmovie?

Something else you might want to try is enabling debug info via the
env var OSG_NOTIFY_LEVEL, setting it to DEBUG.


Robert.

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:
 Hi Robert,

 My program does work with a straight Image.  For example, I can
project
 a JPG or GIF onto my geometry and it looks great.  But when I replace
 the Image with an ImageStream, all I get is a gray rectangle.  See
 attached image.

 Thanks for your help.

 Andrew


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert
 Osfield
 Sent: Thursday, July 12, 2007 8:26 AM
 To: osg users
 Subject: Re: [osg-users] ImageStream Projection

 Hi Andrew,

 It shouldn't make any difference whether the data is an ImageStream or
 an straight Image.  Try getting what you are doing working with a
 normal image and then see how you get on.

 Also have a look at example that use TexGenNode such as osgspotlight.

 Robert.

 On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:
  Robert,
 
  I am not using a TextureRectangle or specifying any texture
 coordinates.
  That is because I'm using a TexGenNode.  I use the following code to
  specify the projection plane, which works when projecting an Image:
 
  tex_gen_node-getTexGen()-
  setPlanesFromMatrix( osg::Matrixd::ortho2D( upper_left_x,
  lower_right_x,
  lower_right_y,
  upper_left_y ) *
   osg::Matrix::translate( 1.0, 1.0, 1.0 ) *
   osg::Matrix::scale( 0.5, 0.5, 0.5 ));
 
  Will this code have to change to accommodate the ImageStream?  Or
does
  my problem lie elsewhere?
 
  Thanks!
  Andrew
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Robert
  Osfield
  Sent: Thursday, July 12, 2007 1:30 AM
  To: osg users
  Subject: Re: [osg-users] ImageStream Projection
 
  HI Andrew,
 
  Most likely its simply that your tex coords are off.  If you are
using
  a TextureRectangle then the tex coords go from 0,0 to width,height
  rather than 0,0 to 1,1 like on normal textures.
 
  Robert.
 
  On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:
   Hi,
  
   My goal is to project an ImageStream onto some geometry.  I'm
using
  the
   QuickTime plugin to read an AVI file as an ImageStream.
  
   I can successfully project an Image onto my geometry by using a
   TexGenNode and TexEnv.  My code for projecting an ImageStream is
   identical, except that I cast the Image to an ImageStream and then
  call
   play().  The problem is that I never see the movie; instead, I see
a
   solid gray image projected where the movie should be.
  
   Is it possible to do what I'm attempting?
  
   Thanks,
   Andrew

Re: [osg-users] Build a new machine, comments?

2007-07-12 Thread Robert Osfield

On 7/12/07, Jean-Sébastien Guay [EMAIL PROTECTED] wrote:

If you decide not to go with the solid state drive I guess you could
get two 8800GTX's, though they're not really worth the price
difference (the really high end rarely is).


I don't really need to performance in graphics as I need to keep the
machine quieter and less of a power hog.  The solid state drive beats
out the GTX upgrade on this count ;-)

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] ImageStream Projection

2007-07-12 Thread Robert Osfield

On 7/12/07, Weitz, Andrew C. [EMAIL PROTECTED] wrote:

Robert,

First, I tried resizing my video to 256x256.  And it worked!!!  Then I
tried projecting a NPOT video, but I called
setResizeNonPowerOfTwoHint(false).  And that worked too!!!

I don't completely understand why the resizing was causing my movie to
appear gray.  Maybe because the scaleImage() call couldn't keep up with
the frame rate?


scaleImage should work fine, I haven't seen problem with resizing
video images on the fly but perhaps the pixel format was one that it
couldn't cope with.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] createGraphicsContext problem

2007-07-12 Thread Robert Osfield

Hi Enrique,

osgViewer needs to be linked in for the graphics context to be
constructed.  The CMakeLists.txt file in osgdem does include the
osgViewer reference so should be pulled in.

Luigi has made some mods to the CMakeLists.txt for Windows build so
perhaps these might help you.

Robert.

On 7/12/07, Enrique Parodi [EMAIL PROTECTED] wrote:

Hi all.

I have a problem using VirtualTerrainBuilder when i try to generate a
terrain with textures. I have used the new osgdem source code as example
and i get the following error:

 Error: In Texture::Extensions::setupGLExtensions(..)
OpenGL version test failed,  requires valid graphics context.
 Scaling image 'model_L0_X0_Y0.dds' from (256,256) to (0,0)


Then it crashes.

I have done some tests and the class MyGraphicsContext provided in osgdem
never gets realized. In the code:

 MyGraphicsContext() {
 osg::ref_ptrosg::GraphicsContext::Traits
traits = new osg::GraphicsContext::Traits;

...

 _gc =
osg::GraphicsContext::createGraphicsContext( traits.get());

 if (!_gc)
 {
 osg::notify(osg::NOTICE)Failed to
create pbuffer, failing back to normal graphics window.std::endl;

 traits-pbuffer = false;
 _gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
 }

 if (_gc.valid())
 {
 _gc-realize();
 _gc-makeCurrent();
 std::coutRealized windowstd::endl;
 }
 }


When the constructor ends, the _gc.valid() stills false, so it never gets
realized. The old osgdem used the Producer::RenderSurface object to do the
same, but i would like to use the osg 2.0 approach in my next project.

I have not found a way to build my terrain with textures. With elevation
data i have no problem.

 If you have any clue please let me know... Thanks to all in advance.

 --
Enrique...
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] OSG T-shirts and other merchandise now available!

2007-07-12 Thread Robert Osfield

On 7/12/07, Gordon Tomlinson [EMAIL PROTECTED] wrote:

NO NO Mike.. I don't even want to have that thought near my mind ;)

Perhaps we could add a tag line, say

'The Future has Arrived' ;)


And on the back of the thog

What has Past was Smelly!

;-D
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Embedding a viewer inside another window

2007-07-12 Thread Robert Osfield

Hi Eron,

Have a look at the osgviewerGLUT, FLTK, SDL and QT examples as they
illustrate a viewer entirely embedded within an exisiting window.
These examples are setup slightly differntly than examples like
osgviewerMFC, and use GraphicsWindowEmbedded to adapt the Viewer to
work in this role.

Robert.

On 7/12/07, Eron Steger [EMAIL PROTECTED] wrote:

Hello,

I know the issue of embedding an osg viewer in a window as a component
has been addressed to some level, with examples like osgviewerMFC, but I
believe there are some major issues with this.

In particular, the GraphicsWindowWin32 does a fair amount of work in
order to convert Win32 events into OSG events.  However, if we want to
embed it, we are forced to rewrite this code.

Ideally, we should be able to create a viewer as a child window of some
already created parent window.  It should only require minor changes to
how events are handled for this to work.

My main goal in all this is to embed an osg viewer inside an SWT
window.  My understanding is it's not hard to get the HWND for the SWT
window, and thus use that as the parent window for the viewer.

-Eron

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Build a new machine, comments?

2007-07-12 Thread Robert Osfield

I guess the next question once I start building it is... what Linux
distribution to go for.  I'm not sticking with Suse as I had done for
the past 6 years.  Must admit I'm very tempted by a debian based
distribution as the I just believe in the approach package management,
it just seems the right way to tackle things in the 21st century.

Another requirement is that I much prefer KDE over Gnome.

Oh its also got to have good support from NVidia's OpenGL drivers.

Thoughts?
Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Embedding a viewer inside another window

2007-07-12 Thread Robert Osfield

Hi Eron,

Inheriting just the parent window is something I've considered - my
thought was to have both the parent and the window handles defined in
custom WindowData and then have the GraphicsWindow class check to see
if parent window and/or window handles have been defined and use which
ones have been defined, and fill in the ones that haven't.

Robert.

On 7/12/07, Eron Steger [EMAIL PROTECTED] wrote:

Hi Robert,

Although somewhat different, they also suffer from the problem that
events must be reimplemented.  I'd like to create an embedded window
that uses the code GraphicsWindowWin32 uses for event handling.

One option that would *almost* work is to create the window separately
and pass it in using the inheritedWindowData variable of the Traits
class.  However, since Win32WindowingSystem is a class whose definition
is not inside a .h file, it can't be used to lookup the associated
GraphicsContextWin32 of an HWND, thus not allowing one to use
GraphicsWindowWin32::handleNativeWindowingEvent to handle events.

The more ideal technique imo would be to have an option within the
Traits class, similar to 'inheritedWindowData', for supplying a parent
window.  Then each subclass of GraphicsWindow can use this as it sees
fit when creating its window.  I'm currently modifying my local osg
project to implement this for win32.

- Eron


Robert Osfield wrote:
 Hi Eron,

 Have a look at the osgviewerGLUT, FLTK, SDL and QT examples as they
 illustrate a viewer entirely embedded within an exisiting window.
 These examples are setup slightly differntly than examples like
 osgviewerMFC, and use GraphicsWindowEmbedded to adapt the Viewer to
 work in this role.

 Robert.

 On 7/12/07, Eron Steger [EMAIL PROTECTED] wrote:
 Hello,

 I know the issue of embedding an osg viewer in a window as a component
 has been addressed to some level, with examples like osgviewerMFC, but I
 believe there are some major issues with this.

 In particular, the GraphicsWindowWin32 does a fair amount of work in
 order to convert Win32 events into OSG events.  However, if we want to
 embed it, we are forced to rewrite this code.

 Ideally, we should be able to create a viewer as a child window of some
 already created parent window.  It should only require minor changes to
 how events are handled for this to work.

 My main goal in all this is to embed an osg viewer inside an SWT
 window.  My understanding is it's not hard to get the HWND for the SWT
 window, and thus use that as the parent window for the viewer.

 -Eron

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Cygwin mulit-thread crash on exit, might be fixed...

2007-07-11 Thread Robert Osfield

HI Brian,

Sorry to hear that the changes haven't stopped the hang, clearly the
problem lies elsewhere, and the osgconv also suggests this.

On 7/11/07, Brian Keener [EMAIL PROTECTED] wrote:

1) During the compile the make complained about not finding wsock32.lib. In
CMakeLists.txt (in the trunk of the source tree) if WIN32 is set we set:
 SET (OSG_SOCKET_LIBS wsock32.lib)

this is fine for Mingw but I think Cygwin needs wsock32.a or
mswsock.a.  I added the following 3 lines immediately after the above in
CMakeLists.txt and reran ccmake and this time it compiled fine.  Not sure if
mswsock.a would be a better choice but it worked.
 IF(CYGWIN)
SET (OSG_SOCKET_LIBS wsock32.a)
 ENDIF(CYGWIN)


Could you send the whole modified CMakeLists.txt file?


2) Once compiled and installed then osg could not find the plugins because it
installed them to /usr/local/bin/osgdb_whatever but it looks for
cygosgdb_whatever on Cygwin.  As soon as I renamed them (I would give you a
patch but I have no idea where Cmake puts this) then the examples coul;d find
the plugins no problem.  I know there has been some discussion of should they
be in a plugin directory or just in bin and I know problem with that but the
leading cyg was a gotcha - buit I knew from the past to look for it.


Its Registry.cpp that is hardwiring the cyg prefix in, and this
could easily be removed.  This was added by Cygwin contributors before
we moved to Cygwin.

Under minwin the prefix lib is used, which could also be removed.



3)  As you had previously advised I tried osgconv since that was one of the
simpler programs and I still got the hang but I also noticed something on the
file sizes when osgconv told me the file data had been copied.  The command I
execute and response was:

[EMAIL PROTECTED] /usr/local/bin
$ osgconv cow.osg /tmp/mycow.osg
Data written to '/tmp/mycow.osg'.

at which point it hangs and I wnet and looked at the data files both before and
after I kill the process and cow.osg is 653747 bytes and mycow.osg is only
645182 bytes.  Seems it didn't finish writing (or looks that way) even though
it says it wrote the data.

I also cleared my full build and everything I installed of osg and tried one
more ccmake.  This time I configured and left the X directories it found and
only added -DWIN32 (no -DDEBUG) to the CMAKE_CXX_FLAGS and CMAKE_C_FLAGS and
then generated my Makefiles.  Again it compiled and results were the same as
above in #2 and #3 - #1 I had already fixed.

Hopefully it fixes the multi thread crash for you but it didn't help the hang
although that file size sure makes me wonder what is hanging up.


The different size is probably just the a difference of when the
cow.osg was built and what the latest OSG version writes out for it.
The file is probably fine.

The hang will happening after writing the files out.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Layers in OSG and VirtualPlanetBuilder and culling performance.

2007-07-11 Thread Robert Osfield

HI Himar,

VPB already supports layers, you use --layer num to specify the
layer.  You can control the blending of the layers at runtime by
decorating the scene with a osgFX::MultiTextureControl node.

Robert.

On 7/11/07, Himar Carmona [EMAIL PROTECTED] wrote:

Hi,

   i read that VirtualPlanetBuilder will support Layers. I'm developing a
GIS component with OSG and i also have to incorporate layers. Unfortunately
i can't wait for the release of VPB with this feature, so i need to use OSG
and develop it myself.

   How can i control the rendering order of the layers or how can i control
the render order of the nodes? I know OSG does it automatically, rendering
first the opaque bins and then the transparent, and also ordering by z.

   My first approach was having the layer be a Group node, and add all the
contents of that layers like children. This approach failed when i did have
a lot of children, because of the culling, that dropped the framerate. So it
is a must to optimize how the children are added to the group, using an
structure like the quadtree for culling. So, another question is:

How can i control the culling process? How can i avoid the cull visitor
to traverse the children of a node? I tried to disable culling by setting
CullingActive to false, but the children were visited also. I tried that
because a had only a single instance of Geometry shared with all the
children. The difference was that each child had an AutoTransform node to
control the position of the geometry (and the screen alignment). The cull
was more than ten times slower than the draw (stats) even if all the
children were visible and not culled.

  Any comments or suggestions about the design of incorporating layers to
OSG will be also very helpful and appreciated. :)

Thanks in advance.


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] how to use camera in OSG2.0

2007-07-11 Thread Robert Osfield

Hi Wang,

You'll need to read the videostream using an API separate from the
OSG, and integrate it with the OSG via the osg::ImageStream class as
per the xine-lib and quicktime video plugins.

The ARToolkit has support for the OSG so it might well be the easist
way to get this functionality.  If not it should at least give you
some direction on what video reading API's to use.

Robert.

On 7/11/07, wang qin [EMAIL PROTECTED] wrote:


Hallo:

anyone who knows how to capture a videostream from webcam in OSG2.0.
Or is there any examples about that.
Must I conbined the ARToolkit into my project.

Thanks.

wang,qin

_
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Re: Can't disable external lighting?

2007-07-11 Thread Robert Osfield

On 7/11/07, Wangzhu [EMAIL PROTECTED] wrote:

Hi Robert,

Yes I used OSG itself and can switch off the lighting, but then I can't use 
OpenGL to switch on the lighting from exterior……
Does the OSG only use itself to control lighting?
Is there any other way to use OpenGL code to control OSG lighting on and off?


The OSG is not designed to inherit OpenGL state, doing so would
massively complicate the set up on each frame and would be extremely
inefficient.

Please  just set up the OSG so it knows about the state you want.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Texture - Resizing to PowerOfTwo causes white edge

2007-07-11 Thread Robert Osfield

Hi Richard,

The OSG uses glu to scale the image, and if its introducing a problem
then the bug is one which won't be easy to fix, without digging into
GLU.

The easiest solution would be rescale the image outside of the OSG, or
just rely on non power of two texture support.

Robert.

On 7/11/07, Schmidt, Richard, SDGE1 [EMAIL PROTECTED] wrote:

Hi,
we got a small problem with an image, which is transparent and does not
have a PowerOfTwo scale. When loaded it draws an white line on top of
the icon. When setting setResizeNonPowerOfTwoHint to false the error
disappears.

I guess the error is somewhere in the resizing code of the image...

Richard
PS.: Attached you see an image which causes that error.


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] texture osgdem

2007-07-11 Thread Robert Osfield

HI Crhistophe,

You'll need to step through all the tiles, loading each one in turn,
the using a custom NodeVisitor traverse through the loaded subgraph to
find the StateSet's that contain Textures then do with them what you
will.   Look at src/osgUtil/Optimizer.cpp for inspiration on the
NodeVisitor front.

Robert.

On 7/11/07, christophe loustaunau [EMAIL PROTECTED] wrote:

Hello,


I have generated a database with osgdem, and I need to find all the texture.
I know all the texture are .dds file include in the .ive file.

But how can I extract them from the .ive file ?
Or how can I generated with osgdem only the .dds file and not the .ive ?

If someone have an idea it will be helpfull !

Thanks !

Christophe Loustaunau




___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osgViewer + Fox Toolkit example

2007-07-11 Thread Robert Osfield

Hi Amalric,

I can put together the CMake file.  Could you repost the example to
osg-submissions with the fix applied.

Thanks,
Robert.

On 7/11/07, amalric alexandre [EMAIL PROTECTED] wrote:

Hi Robert and Markus,

I will be pleased that you submit this little example to the OSG
distribution itself, but I'm not very strong to make CMake et stuff like
that, so Robert I let you do the package, it's all yours ;-)

There is juste a little mistake in FOX_OSG.cpp in function :

GraphicsWindowFOX::onLeftBtnPress(FXObject *sender,
FXSelector sel, void* ptr)
you have to replace

getEventQueue()-mouseButtonPress(event-click_x,
event-click_x, 1);
by


getEventQueue()-mouseButtonPress(event-click_x,
event-click_y, 1);
2007/7/10, Markus Hein [EMAIL PROTECTED]:
 Hi Alexandre,

 amalric alexandre schrieb:
 
  I had to do this for my own application. In example's directory of
  osgViewer integration there is no example for FOX.
 
  It's quite simple but I hope it will help some people who wants to
  integrate OSG in their Fox application. I've attached a Visual 2005
  project similar to example osgViewerWX called example osgViewerFOX
  ;-)
 
 thanks for the  OSG-FOX example. I prefer using FOX-GUI, and your code
 worked  just fine. I took your sourcecode under a new  KDevelop3
 Project, and linked it against
 OSG-2.0 and FOX-1.7 Nice! Would be fine if it was part of the  OSG-2.0
 source package in future ? :-)

 Thanks, Markus


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] help needed in scientific project

2007-07-11 Thread Robert Osfield

Hi Mikko,

Try out osgdistortion example in 2.0 :

 osgdistortion --dome cow.osg

Robert.

On 7/11/07, Mikko Vähäsöyrinki [EMAIL PROTECTED] wrote:

Hi,

I work in the field of neuroscience and I'm currently building new piece of
research equipment for the visual stimulation. In this system observer is
placed in the center of a sphere and the image is projected to the inner
surface from the top with custom optics. We use DLP projector to produce
images. Configuration is following: system lens will be on the top (north
pole) and the optics is looking at 600 pixel diameter circle of the DLP
chip. Center pixel will go to the bottom (south pole) and rest will map
linearly from there on. Our problem is how to generate images/movies on the
projector so that they will be presented correctly on the spherical surface.
We would like to show different kinds of patters (light flashes at various
locations and moving bars), random checkerboard noise, movies etc. It seems
to me that this requires sampling of virtual environments that are further
on mapped correctly to the pixel arrays.

We also need very high frame rates so another trick we use is to display
monochromatic images using each of the RGB frames as new monochromatic
frame. This would also need to be implemented to the program.

The hardware is nearly finished and I'm trying to find someone to do the
programming. This person would be an author in the publication that will be
written about the system. We can also discuss other compensation options.

Please contact me if you are interested in the project. I'm happy to provide
further information.

Best Regards,
Mikko

Academy Research Fellow
Dr. Mikko Vähäsöyrinki, PhD
University of Oulu
Department of Physical Sciences
Division of Biophysics, PO.BOX 3000
90014 Oulun yliopisto, Finland
Phone: +358-8-553 1110
Mobile: +358-45-114 9188

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] particle sim on GPU

2007-07-11 Thread Robert Osfield

The osgParticle::PrecipitationEffect is implemented entirely with GLSL
so you could look at this for inspriation.

On 7/11/07, Crezy Elmo [EMAIL PROTECTED] wrote:


Hi all,

I'm trying to implement a particle system that runs entirely on the GPU by
storing positions and velocities as texture maps, and then using shaders to
do the physics calculations/updates.  I'm having difficulty figuring out how
to set up the use of a texture (position texture) as a source of vertex
data, as well as how to write the updated positions/velocities back to the
textures from within the pixel shader (if this is possible?).   Anyone have
any pointers?

I'm basically trying to do something like this: http://www.2ld.de/gdc2004/
only in GLSL w/OpenSceneGraph.

Thanks for any tips!



PC Magazine's 2007 editors' choice for best web mail—award-winning Windows
Live Hotmail. Check it out!
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Switching master Camera question

2007-07-11 Thread Robert Osfield

Hi Benny,

osgViewer::Viewer is really geared up for you to use the Camera
already assigned to it, rather than replacing it, if something don't
work when you do this then its because you are working off designed
for tested pathway.  It will be possible to get this work, but off
the top of the head I can't say what may need to be done, and I'm not
about to go off the beaten track to try and work how to help you do
this.  Instead just set the camera itself with the setting you wish to
apply.

BTW, Nouns have capitals, verbs typically have lower case, otherwise
the code reads like you are shouting.  Some getViewer() is nicer to
read that GetViewer() ;-)

Robert.

On 7/11/07, SCETBUN benjamin [EMAIL PROTECTED] wrote:

Hi all
I wonder if i could change my main camera with :

osg::ref_ptrosg::Camera cam =  new osg::Camera();

OSGManager::GetInstance()-GetViewer()-setCamera(cam.get());
// OSGManager is mine and GetViewer get me the present viewer.

When i do that i lost the mouse manipulation for the camera view. Did i
forget to do something?

Thanks for your helps

Benny

Ps: If I save and put back the camera made by the viewer, i get the mouse
control of the camera view back
Ps: I try on single window, in a single view to change the camera by
pressing c for exemple :P

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Excess Memory usage when using Sceneview

2007-07-11 Thread Robert Osfield

Hi Pradeep,

The problem is probably down to the double copy of texture data when
the OSG downloads its textures to OpenGL.  What you will have is the
OSG with its osg::Texture* with osg::Image attached in user space
memory, then an OpenGL object for this texture in driver space, then
when it gets drawn a copy of the texture down on the GPU memory too.

To help avoid this double memory requirement the OSG Texture class has
an option to unref the osg::Image from the osg::Texture once its been
download to OpenGL.  The osgUtil::Optimizer is what enables this
option and whe osgviewer doesn't exhibit the growth in memory that
your straight SceneView usage will be, its nothing to do with anything
that the Viewer class is doing though, its just osgUtil::Optimizer
making the difference.

As a general note, I'd recommend not using SceneView, and rather move
to osgViewer::Viewer now available in the 2.x of the OSG, its much
more poweful than SceneView.

Robert.

On 11 Jul 2007 12:36:26 -, Pradeep  S Kamath
[EMAIL PROTECTED] wrote:





 Hi!

 we are trying to render a 200 x 200 km database using Sceneview in our sim
application. The database is a single 8.5 Mb .osg file with about 442 Mb
textures

 in .rgb (and a few .rgba) format. We have many high resolution textures in
the database.
 The PC is a Core 2 Duo 1.86 GHz with 1 GB RAM, Win XP Professional, SP2,and
an nVidia GeForce 8800 GTX card with 768 Mb GPU memory.
 The OSG Version is 1.2, and IDE is VS 8 Express. The application is based
on Sceneview with default settings. We have used optimizer.

 1)The application consumes about 600 Mb of memory  to load the database
node. The memory usage subsequently  touches an astonishing 1.3 Gb within
the first

 frame itself.
 2)If we disable display list usage in Sceneview, and start rotating about
the origin - we see a constant increase in the memory used. The node loads
at

 around 600 Mb and the application memory usage touches 1.3 Gb within about
30 seconds and stabilises.
 3) There is an occasional lag in the scene refresh (probably due to hard
disk paging) when the memory usage exceeds 1 GB in all the above cases.
 4) On using osgProducer viewer, the same scene occupies only about 700 mb
of memory and remains stable at that. There is no excess memory usage or lag
with

 osgProducer Viewer.
 Can anybody give some pointers on Why the application occupies such excess
memory with Sceneview and how can i reduce it?

 pradeep.




___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Events from the past

2007-07-11 Thread Robert Osfield

On 7/11/07, André Garneau [EMAIL PROTECTED] wrote:

Hi Tim,

Yep you're right. Moving the assignment _timeOfLastCheckEvents =
getEventQueue()-getTime(); ahead of the assignment of the eventTime
variable would be one way to solve this.


But... the event will have happened before current time reported by
getTime(), it'll have occured between the time of the last event check
and the current time.

Do Win32 events have a time stamp assigned to them?  Could this be
used to offset the time of events relative to the last event check?

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] CompositeViewer and AnimationPath problem

2007-07-11 Thread Robert Osfield

On 7/11/07, Robert Osfield [EMAIL PROTECTED] wrote:

I will investigate.


I've now tracked down the problem, CompositeViewer wasn't setting up
the View's Scene with the CompositeViewer's FrameStamp, so the time
was being updated as it should have been.  I've now added this in an
animation path now works once more.

A svn update will get this fix.  It'll also be in the next dev release.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Events from the past (UNCLASSIFIED)

2007-07-11 Thread Robert Osfield

Hi Mike,

What platform are you working on?  Does the jitter show up on standard
camera manipulators?

W.r.t differences, osgViewer has new event handling code on all
platforms as well as new Viewer code.  In general things should behave
roughly the same in regards to event handlers and manipulators in
osgViewer::Viewer vs osgProducer::Viewer, and testing before 2.0
didn't through up major issues.  With any new block of code there is
likely to be new bugs introduced, we just need to characterize them
and fix them.

Robert.

On 7/11/07, Dorsett, Mike F AMRDEC/SAIC [EMAIL PROTECTED] wrote:

Classification:  UNCLASSIFIED
Caveats: NONE

I had a similar problem with one of my manipulators when I upgraded to OSG 2.0.

I have a mouse model that will move at speed determined by the distance from 
where you clicked to where the pointer is residing.  I update velocities, 
directions, matricies, etc. during osgGA::MatrixManipulator::handle. If I just 
let the mouse sit, the movement is jittery. But, if I do subtle movements with 
the mouse, I get more ::handle calls, and the camera movement is smoother.

The thing is, it worked perfectly in 1.2 and I had been using a dt (in 1.2) 
between events to determine an appropriate velocity. But, now the dt range is 
very drastic. I get similar results as below with even some negative dts.  So, 
I can't use dt anymore or I will get even worse jumping.  I just wonder, why 
did this work with Producer, but not now?


Mike Dorsett - Software Engineer - SAIC


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2007 2:54 AM
To: osg-users@openscenegraph.net
Subject: RE: [osg-users] Events from the past


Hi André,

I think the problem is, if you do nothing with your window, handleNativeWindowingEvent() 
gets no events, causing _timeOfLastCheckEvents getting no updates, until you move your mouse 
again. Then you will get an event from the past, i.e. with the old 
_timeOfLastCheckEvents instead of a fresh getEventQueue()-getTime(). If you keep your 
mouse moving everything is fine.

Tim.


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von André Garneau
Gesendet: Dienstag, 10. Juli 2007 18:28
An: 'osg users'
Betreff: RE: [osg-users] Events from the past

Hi Tim,

Correction: the getEventQueue()-getTime() method returns a time based on the timer, not 
the time set by the last EventQueue::frame() call, so my two-frames behind 
comment below is not valid. Sorry for the noise.

André

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of André Garneau
Sent: July-10-07 12:18 PM
To: 'osg users'
Subject: RE: [osg-users] Events from the past

Hi Tim,

Looking at the code, the EventsQueue::frame() method is called *after* the events 
are extracted from the graphics windows. So the event time appears to be two 
frames behind. It might be better therefore to use the current event time (i.e. 
getEventQueue()-getTime()) instead of the previous one, since the positioning 
of the EventsQueue::frame() call (which sets the new event
time) is already after the checkEvents() call. Hoping the above does not sound 
too confusing... :-)

As a test you could therefore try out this change:

Replace (in GraphicsWindowWin32::handleNativeWindowingEvent() )
---

double baseTime   = _timeLastCheckEvents;
double eventTime  = _timeLastCheckEvents; double resizeTime = eventTime;

_timeOfLastCheckEvents = getEventQueue()-getTime();

By
--

_timeOfLastCheckEvents = getEventQueue()-getTime();

double baseTime   = _timeLastCheckEvents;
double eventTime  = _timeLastCheckEvents; double resizeTime = eventTime;

And see how you get on.

Perhaps Robert can confirm or deny this.

Hope this helps,

André

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: July-10-07 10:06 AM
To: osg-users@openscenegraph.net
Subject: Re: [osg-users] Events from the past


Hi André,

the manipulator jumps forward everytime I move the mouse. It is a typical 
manipulator, saving the last two GUIEventAdapters for calculating the dT.
Looking at a short recording of the views-EventQueue:

time: 8.949542 type: Frame
time: 8.833379 type: Mouse, time: 8.966164 type: Frame

you can see the first pair gives a negative dT, the second pair a relative large dT of 
about 0.13, causing the manipulator to run like hell...


Tim.


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von André Garneau
Gesendet: Dienstag, 10. Juli 2007 15:43
An: 'osg users'
Betreff: RE: [osg-users] Events from the past

Hi Tim,

You are right, the event time used to tag the time at which windowing events 
occurred is the time of the last check events. In reality, these events occurred 
in the time range [_timeOfLastCheckEvents, getEventQueue()-getTime()], so this 
is a valid time, albeit conservatively 

Re: [osg-users] osg::ClipNode

2007-07-11 Thread Robert Osfield

Hi Nigel,

The role of a ClipNode is to position clip planes in fixed position in
space.  For convinience it also enables the clip planes for the
subgraph below the ClipNode.  Sometimes its useful to enable the clip
planes on other places which you can do via
StateSet::setMode(GL_CLIP0+i, osg::StateAttribute::ON);

One thing to note that the OSG only supports of position of each
OpenGL clip plane per stage in rendering, it doesn't support multiple
positions for each clip plane.  If you ClipNode has overlapping clip
plane numbers then you'll find them fighting over the position of the
final OpenGL clip plane.   If this is the case just make sure the clip
plane numbers aren't overlapping.

Robert.

On 7/11/07, Nigel Jenkins [EMAIL PROTECTED] wrote:

Hi All

I'm trying to understand the idea behind the osg::ClipNode.

I'm trying to clip two separate bit of geometry with two clip nodes, but
  it seams that all the geometry that is under any clip node gets
clipped with the setting of the clip node that is the last to be
specified in the code.

At first I thought it was my code, but it appears that after modifying
the osgclip example program I get the same results.  (can send modified
example app if needed)

So if this the correct behaviour that all nodes under any clipnode are
clipped by the same specs, or is this a bug in osg and each clipnode
should clip its contents with the appropriate clipnode specs (which I
assume should be the correct behaviour).

thanks

Nigel
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Excess Memory usage when using Sceneview

2007-07-11 Thread Robert Osfield

On 11 Jul 2007 14:57:58 -, Pradeep  S Kamath
[EMAIL PROTECTED]   Thanks for the reply. I have been
using osgUtil optimizer, with

ALL_OPTIMIZATIONS, but the excess memory problem has persisted. I also
tried out unreferencing the textures, but with no effect. Is there something
else i have missed?


I've given you my best guess, beyond this I can't help, you'll need to
debug things yourself.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Events from the past (UNCLASSIFIED)

2007-07-11 Thread Robert Osfield

On 7/11/07, Dorsett, Mike F AMRDEC/SAIC [EMAIL PROTECTED] wrote:

Classification:  UNCLASSIFIED
Caveats: NONE

I am running on a Win32 box, and I don't see it in other manipulators (even on 
others of mine). I tried many things to try to get this particular manipulator 
smoother, but could not.

One approach I haven't tried yet, is to calculate a camera's velocity in the 
handle() portion. Then, on getMatrix() get the current pos/rotation based off 
of that velocity.


Is it a multi-core machine your working on?  Is there a chance that
MS's time functions are playing tricks on the timing code?

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Events from the past (UNCLASSIFIED)

2007-07-11 Thread Robert Osfield

Hi Mike,

Is there any chance of you testing this out under Linux to see if the
GraphicsWindowX11 is behaving better than GraphicsWindowWin32 w.r.t
event timing?

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Events from the past (UNCLASSIFIED)

2007-07-11 Thread Robert Osfield

Hi André,

On 7/11/07, André Garneau [EMAIL PROTECTED] wrote:

FWIW, Producer seems to be using the Timer::instance()-tick() call to
timestamp its own events (no sign of using the native Windows message time).
The interim fix suggested to Tim should therefore give similar results to
Producer.


Not quite.  osgViewer polls for events that occurred between the
current frame and the last last frame, Producer had separate threads
polling/responding to events as they came in.

BTW, I still had problems with negative times in osgProducer, in fact
more so... but then I do work under Linux so conditions aren't quite
the same as under Windows.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] OsgShadow shadow volume strange bug

2007-07-11 Thread Robert Osfield

Hi,

This is a know bug.  ShadowVolume code isn't yet tracking matrix updates.

Robert.

On 7/11/07, amalric alexandre [EMAIL PROTECTED] wrote:

Hi osg-users,

I've noticed a strange behavior on Example osgshadow with command --sv (to
have shadow volume).

When shadow overlap each other they cancel them, if I'm not very clear see
the sceen capture attached.

Is it a known bug ??

I use OSG 2.1 on a geforce 7900GS.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Transform Matrix of Producer::Camera

2007-07-11 Thread Robert Osfield

On 7/11/07, Bernd Brot [EMAIL PROTECTED] wrote:

Hi,

thanks Robert for your reply.
With all that matrices I'm a little confused. I want to get the coordinates of 
a geode relative to the camera.
That's why I would like to know the following:
How do I get the position of a node in camera coordinates ?


You need to accumulate the matrices from the root of the scene graph
to the node in question, you can do this via:

 Node::getWorldMatrices()

Note, that this passes back a list of matrices as the OSG allow nodes
to have multiple parents, so each parent path can have its own matrix,
such as when a the four wheels of car all share the same wheel
geometry, but have different MatrixTransform that position them.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Events from the past (UNCLASSIFIED)

2007-07-11 Thread Robert Osfield

Hi Mike,

Is it that jitter is happening when no events other than the frame
event are happening?

Is vsync on?

How does your viewer use its windows?  Is osgviewer style, or
osgviewerMFC style?

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osg::ClipNode

2007-07-11 Thread Robert Osfield

On 7/11/07, Nigel Jenkins [EMAIL PROTECTED] wrote:

Robert Osfield wrote:

 One thing to note that the OSG only supports of position of each
 OpenGL clip plane per stage in rendering, it doesn't support multiple
 positions for each clip plane.

Thats a shame!

Would be really useful to have clipnode functionality that only worked
on geometry beneath it in the heirarchy, is there a reason that this
would be problematic because of OSGs internals that require the clipnode
defines the clipplanes per frame?


We don't just support decoration of subgraphs to support clip planes
as its really useful to decouple the positioning of the clip planes
from the use of them.  See the osgclip example for why this is useful.

Given this functionality you then have to limit how far the scope of a
single clip plane goes, the OSG by default limits it to the current
render stage.  You can do this programmatically by creating a
RenderStage in the cull traversal.

Robert.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Transform Matrix of Producer::Camera

2007-07-11 Thread Robert Osfield

On 7/11/07, Bernd Brot [EMAIL PROTECTED] wrote:

but with Node::getWorldMatrices() you will get the position of a node in world 
coordinates and not in camera coordinates or isn't it.


Well just multiply by the view matrix of the camera!  Do I have to
code the program for you?
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Problem when enabling GL_POINT_SMOOTH and using a fragment shader...

2007-07-11 Thread Robert Osfield

Hi Benjamin,

On 7/11/07, Benjamin Cabut [EMAIL PROTECTED] wrote:

I've got a problem (frame rates goes near 0 fps!) when I use a fragment
shader and when I enable GL_POINT_SMOOTH...

Does someone know something about this?

I've seen on another forum someone that have got the same problem, but
no solution was offered...


The solution is... don't enable point smoothing :-)

BTW, what hardware are you using?  Its likely to be a hardware or
driver specific limitation.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Getting error w/ OSG v 2.0

2007-07-11 Thread Robert Osfield

On 7/11/07, Cysneros, Nelson SPAWAR [EMAIL PROTECTED] wrote:

Will the patch be available in the next developers release, or can I get
it somewhere else.


Via SVN or the latest dev snapshot.  Made one just this afternoon in fact...

http://www.openscenegraph.com/downloads/snapshots/OpenSceneGraph-2.1.1.zip
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osg::ClipNode

2007-07-11 Thread Robert Osfield

glScissor is not positional state so doesn't have the same
restrictions as clip planes so it would be the better tools to use.

On 7/11/07, Nigel Jenkins [EMAIL PROTECTED] wrote:

Robert Osfield wrote:

 Given this functionality you then have to limit how far the scope of a
 single clip plane goes, the OSG by default limits it to the current
 render stage.  You can do this programmatically by creating a
 RenderStage in the cull traversal.

Hmmm, Had a brief look in the osgexamples for this kind of thing and
didn't get a clear example of how to do this, but I'll keep researching
(bit new to osg being an old school Performer programmer!)

Another option I just though about is to use glScissor rather than
clipplanes as all the stuff I'm clipping is in a 2d overlay, am I going
to run into the same issue with glScissor as with glClipplanes in that
they are defined per RenderStage?

thanks

Nigel
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


[osg-users] OpenSceneGraph-2.1.1 dev release made

2007-07-11 Thread Robert Osfield

Hi All,

To test out automated script that Jose has written to help out wrap up
new releases I have made a 2.1.1. dev release.

You can download the dev release source package from:

 http://www.openscenegraph.com/downloads/snapshots/OpenSceneGraph-2.1.1.zip

Or access the SVN tag via:

 http://www.openscenegraph.com/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.1.1/

The release includes a number of bug fixes, typo/spelling corrections
to API and some enhancements to the way that osg::OpeationsThread to
support thread pools (more on this topic later this week), and XCode
project has been updated.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Black seams visible in osgdem output

2007-07-11 Thread Robert Osfield

Hi David,

osgdem uses GDAL to do image reading and reprojection.  Its the
reprojection step that is the problematic one here, and stems from
projection producing a black region around the image, osgdem tries to
account for this by ignore all pure black pixels.  If GDAL is
returning some of images an not pure black due to sampling then these
pixels won't be rejected.

In the rewrite of VPB I am considering doing reprojection using OpenGL
and use an alpha channel to manage the boundary regions.
Alternatively it might be possible to promote an RGB source image to
RGBA and then get GDAL to reproject and then blend using the alpha
channel.

Robert.

On 7/11/07, Riepl, David M [EMAIL PROTECTED] wrote:

Thom/All,
I mentioned in my email, that I have verified in several viewers that
the black stayed pure black after the reprojection step of GDAL.  None
of the pixels are even near to black as my sample is in a very
desert-like area.  Are you suggesting something later in the process
that is caused by osgdem?  I don't even know, is osgdem somehow running
GDAL as a sub-process?


David Riepl
Visualization IG\DB Team
Training Systems  Services
[EMAIL PROTECTED]
314.777.4741

-Original Message-
From: Decarlo, Thomas R. (LARC-B702)[NCI INFORMATION SYSTEMS]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 11, 2007 1:54 PM
To: osg users
Subject: RE: [osg-users] Black seams visible in osgdem output

David,
Those black lines are probably the result of the resampling step. GDAL
(and hence Osgdem) will, by default, consider the black borders around
the images to be the background color and will ignore them when
mosaicing the textures. However, when using the cubic spline the black
background pixels immediately adjacent to the non-black image pixels can
be blended with the image pixels and become a non-black color. The width
of the non-black border pixels will depend on the size of the cubic
kernel.

To avoid the blending, try either
- using nearest neighbor resampling.
- use the cubic spline resample but then re-mask the output to trim off
the edges of the output images that might be blended.

HTH,
Thom
--
Thom DeCarlo  mailto:[EMAIL PROTECTED]
Sr. S/W Eng, VisSim   -- NASA LaRC AvSP --   v:757-224-4089

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Riepl, David
M
Sent: Wednesday, July 11, 2007 2:41 PM
To: osg-users@openscenegraph.net
Subject: [osg-users] Black seams visible in osgdem output

All,
When I make a 2-D Map from satellite imagery and let it generate the
maximum number of LODs required to reach the max resolution, I always
see black seams/stripes/borders of my images used during the OSGDEM
process.
Here is my normal approach:
I start with a folder of imagery...as an example let's say I have 12
geocells (1deg lat/1 deg long each) of imagery.
Using gdalwarp (from FWTools), I will reproject all the satellite
imagery from Geographic Lat/Long to my output projection of choice
(usually TM, UTM or LCC).
I use cubic spline resampling and output GeoTIFFs.
I used to think this is where my problem lay, but I can open up the
reprojected imagery in a viewer (like Imagine or GlobalMapper) and I can
clearly see that the black edges around the terrain stayed pure black
(0,0,0) after the reprojection.  I can also verify that there is overlap
between the images (3 pixels in my current case).
So then I run osgdem on my folder of reprojected GeoTIFs with a command
like this:
Osgdem -t Y:\Test_10m_Reprojected -o test_sat_2d.ive -l 99 Most of the
time the black seam does not become apparent/visible until I zoom into
the highest LOD using the osgviewer.

I am using osgdem from OSG1.2 on WinXP PC.
HELP!

David Riepl
Visualization IG\DB Team
 Training Systems  Services
[EMAIL PROTECTED]
314.777.4741

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Black seams visible in osgdem output

2007-07-11 Thread Robert Osfield

On 7/11/07, Riepl, David M [EMAIL PROTECTED] wrote:

But isn't the reprojection already done?  Since I already have
reprojected the imagery before I ever run osgdem?  I am not specifying a
coordinate system projection in my osgdem command too, because that
would be twice.


If osgdem doesn't need to reproject then it won't reproject, but... it
might need to if the coordinate system still doesn't match the
destination coordinate system.  If it needs to reproject then you'll
see temporary_* files written to disk.


Do you just mean resampling is done for each LOD of osgdem?


No. Sample done by GDAL when you read pixels from it.


What is the default resampling method (thru gdal) of osgdem?


It depends upon the particular GDAL API used. I haven't looked at
relevant code for a few years, but in the point that might be
sensitive to this problem I believe it will be nearest neighbour, but
it could easily be linear.


Are there other options for resampling available at the osgdem command
level?


No.

You possible try leaving the reprojection up to the OSG to see if that
makes any difference though, there is chance that your reprojection
introduced blurring of the edge colours.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Geographics coordinates

2007-07-10 Thread Robert Osfield

Hi Neus,

You can mix and match terrain models with other 3d models in the same
coordinate frame by using a transform node such as
osg::MatrixTransform or a osg::PositionAttitudeTransform.  This
applies to all coordinates systems be geographic, geocentric, UTM's,
local coords.

Examples like osganimate provide examples of using transform nodes to
place models into other models.

Robert.

On 7/10/07, Neus Aparicio [EMAIL PROTECTED] wrote:

Hello!
I am using osg for the generation of publisher. My
data are geographics coordinated in WGS84. I would
like to know if a model 3d in geographics coordinates
with a model of the terrain also in geographics
coordinates is able to unite a model.
If the answer is affirmative, You can give an advice
me of like doing it.

Thanks,



Neus Aparicio Ferrando




Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
http://advision.webevents.yahoo.com/reto/entretenimiento.html
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Transform Matrix of Producer::Camera

2007-07-10 Thread Robert Osfield

Hi Bernd,

Whether is a Producer::Camera or an osg::Camera the view matrix is the
matrix that takes the scene from world coordinates into eye
coordinates.  To take the eye coordinates into world coordinates
you'll need to compute the inverse of the view matrix.

W.r.t the Matrix, both Producer and OSG use row major rather than
column major so you're diagram needs to be transposed - the translate
line is at the bottom.

Robert.

On 7/10/07, Bernd Brot [EMAIL PROTECTED] wrote:

Hi,

How do I get the transform matrix of the Producer::Camera with world 
coordinates in a scene?
I use the following line of code:
const Producer::Matrix::value_type* matrix(camera-getViewMatrix());
Is this statement correct to get the transform matrix of the camera 
representing the world coordinates?

I have to use this transform matrix to compute a new matrix.
Typically a transform matrix has the following appearance.

r = rotation
s = shear
g = scale
t = transform

 XYZ   W
X (rg , rs , rs ,  t)
Y (rs , rg , rs ,  t)
Z (rs , rs , rg ,  t)
W( 0 ,  0 ,  0 ,  1) - Homogeneous coordinates

The martix I get with the statement above is different to this martix.
Which form has the martix I get with this statement:
const Producer::Matrix::value_type* matrix(camera-getViewMatrix());

Thanks and regards
Bernd


___
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] OSGDEM ( kind of ) contest

2007-07-10 Thread Robert Osfield

Hi Rémy,

The biggest dataset I've done so far is just a measly 8.3Gb once fully
built.  One this dataset the highest level insert is down to level 18,
but the bulk is at level 7.

In terms of push osgdem/VirtualPlanetBuilder  further, the limit
really is the need to keep two whole rows of a level in at memory at
once for the purpose of tile boundary equalization.  Keeping two rows
in memory at once is done for efficiency reasons, one could save tiles
and then do equalization as a separate step, it'd be slower but more
scalable.

For the work I'll be doing this summer and into Autumn on
VirtualPlanetBuilder will take the later approach as well as introduce
support for multi-processing, cluster support and incremental builds.
Once this work is in place the memory load will be much smaller that
it at present and will allow things to scale to as big as data as you
have, and as big as disk as you have to write to...

Robert.

On 7/10/07, Rémy Deslignes [EMAIL PROTECTED] wrote:

Hi ,

I would just like to launch a little OSGDEM contest ...
What is the biggest dataset you have processed with OSGDEM  ?

Up to now, I have processed the BlueMarble dataset  :

 * 86400x43200 color
 + 21600x10800 geometry
 + 86400x43200 normal map
 + 32768x16184 clouds

Which took approx 24 hours to process and produced 40 GB final data

I guess of course , that I don't have the biggest dataset around ...but
my obvious and evilly intent is to evaluate the potentials risks of
processing a very big dataset , because I would like to process an
approx 2.6Gpix * 1.3 Gpix dataset.
I would then get a 4 TB dataset ... and 13 levels .
Do you guys think this is feasible ? Shall the process time increase
exponentially ?
Do you have experience with such data ?

Thanks for your experiences

--
Remy Deslignes

Ingenieur Developement / Software Engineer
Tel: +33 (0)1.53.90.11.19

===
Silicon Worlds S.A.
224, rue Saint Denis
75002 Paris  France
Tel: +33 (0)1.53.90.11.11
Fax: +33 (0)1.53.90.11.12
http://www.silicon-worlds.fr
===

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Can't disable external lighting?

2007-07-10 Thread Robert Osfield

HI Wangzhu,

The OSG controls OpenGL state itself including modes like lighting so
use the OSG itself to switch off lighting. Something like:

 node-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF);

Robert.

On 7/10/07, 王竹 [EMAIL PROTECTED] wrote:

Hello everyone,

Thanks for your help! I can integrate my osg code to an openGL project now.
But when I want to use openGL code to control the scene lighting, I meet some problem: I 
can't use glDisable(GL_LIGHTING) to disable it…
Here is my code:

//
//Lighting set
GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightDiffuse[]= { 0.4f, 0.4f, 0.4f, 1.0f };
GLfloat LightPosition[]= { 0.0f, 0.0f, 2.0f, 1.0f };
glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient);
glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse);
glLightfv(GL_LIGHT1, GL_POSITION,LightPosition);
glEnable(GL_LIGHT1);

/*call SceneView::setDefaults(NO_SCENEVIEW_LIGHT); here*/
/*call SceneView::getGlobalStateSet()-setMode(GL_LIGHTING, 
osg::StateAttribute::OFF); here*/
/*call Group::getStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF); 
here*/

glDisable(GL_LIGHTING); //useless, there is also lighting in the scene
StageInterface::Update(); //do SceneView::update and SceneView::cull here
StageInterface::Render(); //do SceneView::draw here
//

When I use glDisable(GL_LIGHTING), there is also lighting in the scene. But when I use 
glDisable(LIGHT1) instead of glDisable(GL_LIGHTING), it works. So when I want to turn 
off all lights, I must use glDisable(LIGHT1/2/3) to turn off every one but can't use glDisable(GL_LIGHTING) 
to turn off all.

I think there may be something neglected when I set state, but I can't find it. 
Call for help, thank you~

--wangzhu
2007-07-10

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] osgViewer + Fox Toolkit example

2007-07-10 Thread Robert Osfield

HI Alex,

Thanks for writing the FOX example.  Would you like to submit this for
inclusion with the OSG distribution itself :-)

Robert.

On 7/10/07, amalric alexandre [EMAIL PROTECTED] wrote:

Hi osg-users,

I have made a little exemple wich is based on the WXWidget osgViewer for Fox
Toolkit GUI.

I had to do this for my own application. In example's directory of osgViewer
integration there is no example for FOX.

It's quite simple but I hope it will help some people who wants to integrate
OSG in their Fox application. I've attached a Visual 2005 project similar to
example osgViewerWX called example osgViewerFOX ;-)



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] get the SceneView with OSG 2.0

2007-07-10 Thread Robert Osfield

On 7/10/07, Benoit bossavit [EMAIL PROTECTED] wrote:

I want to get the cullVisitor of the sceneView. Before I used the
cullVisitor to put some userData. But now I don't have access to the
cullVisitor. I search a way to retrieve the cullVisitor and except by the
sceneView I don't see how can I do.
thanks


As Paul says SceneView is now an implementation detail rather than
part of the public interface.  Its my intention to keep this
encapsulation of SceneView as an internal detail, as a later date I'll
swap out the use of SceneView completely.

So.. this does leave a gap in functionality in terms of fine control
of elements contained within SceneView like CullVisitor and
RenderStage etc.  It's my plan to come up with an API for accessing
these details, but I haven't yet come up with this.

For 2.2 I'd like to sort this out and I'm open to suggestions.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] /usr/lib64 in build?

2007-07-10 Thread Robert Osfield

On 7/10/07, Andy Skinner [EMAIL PROTECTED] wrote:

I am setting linker and compiler flags.  I don't know anything about cmake 
commands, so I guess I'm going to have to learn more about cmake itself.


You should be able to change the lib postfix by running ccmake . and
then pressing 't' to toggle on advanced options, the scroll down the
LIB_POSTFIX, this will probably say 64 on your 64 bit machine so
just set to to  instead, then press 'c' to configure. then 'g' to
write out.

Or on the command line doing something like:

cmake . -DCMAKE_BUILD_TYPE=Release -DLIB_POSTFIX=
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] OSGDEM ( kind of ) contest

2007-07-10 Thread Robert Osfield

Hi David,

The crash is likely down to memory requirements that I outlined
earlier.  General feedback is  that Linux is able to get further with
the Windows equivalent build on the same machine.  The OSG code doing
the build is identical across platforms so its likely just an issue of
how well an OS manages virtual memory.

Once the revamp of VirtualPlanetBuilder is done even WindowsXP should
be able to cope with big datasets.  It still be slower than equivalent
Linux as the file system and multi-thread efficiency is pretty poor
under XP.

Robert.

On 7/10/07, Riepl, David M [EMAIL PROTECTED] wrote:

Hello all,
I can't compete (yet!). I do 2-D and 3-D maps here using OSGDEM 
(currently with OSG1.2 on WinXP desktop).  But my builds usually end up with a 
crash.  Frustrating.  The 2-D maps (GEOTIFF imagery) almost always works fine.  
The biggest 2-D map I've ever really done is 32 geocells of 10m imagery (41k 
files, 7.5GB output, .ive format, total of 10 LODs).  I've tried much larger 
(125 geocells with 10m imagery), but they inevitably crash after about 6 LODs 
which is not very close to the end.
I am frequently asked to build 3-D maps (combining imagery and 
elevation) too, but I never have much success.  OSGDEM appears to be chugging 
along fine and then it will have 1 hiccup reading in a TIFF and then the whole 
thing is shot to heck.  The errors seem so obscure to me.  Don't know if these 
are memory problems or what?
Recently someone asked me to build the whole US with 100m for 2/3 of 
the US, 10m imagery in the other 1/3 and throw in a couple of 5m insets along 
with DTED 1.  Does anyone think this even sounds possible?
Anyone have any pointers or advice for success they want to share?


David Riepl
Visualization IG\DB Team
Training Systems  Services
[EMAIL PROTECTED]
314.777.4741

-Original Message-
From: Wojciech Lewandowski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 7:29 AM
To: osg users
Subject: Re: [osg-users] OSGDEM ( kind of ) contest

Hi,

As an experiment we built 20 GB from 500 m Blue Marble and 1 km dem + high res 
inserts from 1m res for some US county. Took 2-3 days on Intel Core duo 6600 + 
4GB RAM + 2 disk raid + 64 bit Windows Vista.

You mentioned normal maps and clouds ? Does standard osgdem/vpb produce them or 
you had modified it ? I saw support for cloud/shadow textures in Terrain node 
kit but was not sure how to generate this.

And second question if this is not a secret. Where did you get hi res earth 
cloud coverage and normal maps. I suppose normal maps may be produced from DEMs 
but cloud maps ?

Cheers,
Wojtek Lewandowski

- Original Message -
From: Rémy Deslignes [EMAIL PROTECTED]
To: osg users osg-users@openscenegraph.net
Sent: Tuesday, July 10, 2007 11:17 AM
Subject: [osg-users] OSGDEM ( kind of ) contest


 Hi ,

 I would just like to launch a little OSGDEM contest ...
 What is the biggest dataset you have processed with OSGDEM  ?

 Up to now, I have processed the BlueMarble dataset  :

 * 86400x43200 color
 + 21600x10800 geometry
 + 86400x43200 normal map
 + 32768x16184 clouds
 Which took approx 24 hours to process and produced 40 GB final data

 I guess of course , that I don't have the biggest dataset around ...but my
 obvious and evilly intent is to evaluate the potentials risks of
 processing a very big dataset , because I would like to process an  approx
 2.6Gpix * 1.3 Gpix dataset.
 I would then get a 4 TB dataset ... and 13 levels .
 Do you guys think this is feasible ? Shall the process time increase
 exponentially ?
 Do you have experience with such data ?

 Thanks for your experiences

 --
 Remy Deslignes

 Ingenieur Developement / Software Engineer
 Tel: +33 (0)1.53.90.11.19

 ===
 Silicon Worlds S.A.
 224, rue Saint Denis
 75002 Paris  France
 Tel: +33 (0)1.53.90.11.11
 Fax: +33 (0)1.53.90.11.12
 http://www.silicon-worlds.fr
 ===

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Concatenate columns of successive rendered frames into one image

2007-07-10 Thread Robert Osfield

HI Tobias,

Might there be a more efficient way of getting the image than doing
360 frames?  Break it into 4 frames of 90 degress?

Any way you can attach an osg::Image to the Viewer's osg::Camera and
let it be copied across automatically on each frame, or use a post
draw callback on the camera to do a glReadPixels yourself.  Then just
copy the frame image into the final destination image by copying the
pixels across by hand.

Robert.


On 7/10/07, Tobias Münch [EMAIL PROTECTED] wrote:

Hello

 I want to capture centered one-pixel-width columns (e.g. 1x400 px) from 360
successive frames while a camera moves around an object. Afterwards I want
to concatenate the pixel-columns side by side to one image (360x400 pixel).
 What is the best way to realize this concatenation within the OSG
framework?

 Best regards, Tobias



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Events from the past

2007-07-10 Thread Robert Osfield

On 7/10/07, André Garneau [EMAIL PROTECTED] wrote:

And see how you get on.

Perhaps Robert can confirm or deny this.


I'll need to dig in to Win32 code to get a good understanding of this,
something for another time when I'm less busy.

I will add that under X11 I add some estimation code that tries to
provide a better time estimate for the event that simply the last time
the events were checked.  Looking through the GraphicsWindowX11.cpp
might provide some guidance on this.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


  1   2   3   4   5   6   7   8   9   10   >