[osg-users] TrackballManipulator asymptote

2008-10-28 Thread Richard Baron Penman
hello,

when I use the TrackballManipulator to view my model I find that the
camera velocity slows to zero if I try to approach a certain point,
which I believe is the origin.
Do you know why this occurs and how it can be prevented?

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


Re: [osg-users] updateCalculatedNearFar problem

2008-10-28 Thread Wang Rui
Hi forest,

Why not try to describe your question again at bbs.osgchina.org? Maybe your
theory will be more clear using native language. It is a Chinese forum. :)

Wang Rui
2008/10/29 forest37 <[EMAIL PROTECTED]>

>
>  hi robert,
> Thanks for your advice.
> I know people are busy,so i concentrate the code.Sometimes
> problems are hard to describe in native language much less a foreign
> language.I will try to describle  problems in english instead of codes.
>
> Thank you again.
> Best regards
>
> forest
>
>
>
>
> --
> [广告] 特惠尝必胜客26道新品 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] updateCalculatedNearFar problem

2008-10-28 Thread forest37
 
 hi robert,
Thanks for your advice.
I know people are busy,so i concentrate the code.Sometimes  problems are 
hard to describe in native language much less a foreign language.I will try to 
describle  problems in english instead of codes.
 
Thank you again.
Best regards
 
forest
 
 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] light & gouraud

2008-10-28 Thread Gordon Tomlinson
If OFL flag its set to just Gouraud then it should not be lit and should not
react to light

If its set to "Lit Gouraud" then lighting  does apply

__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 
__

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Tuesday, October 28, 2008 8:59 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] light & gouraud

I'm not sure that OpenFlight Face/Mesh records with the Gouraud flag set
should be lit. Can you point to something in the OpenFlight specification
that supports this?

If you want to enable lighting for those nodes, you would need to write a
NodeVisitor to enable lighting and provide appropriate normals.
   -Paul



> Hi, all,
> 
> Question for how to make light work on face that set to 
> "gouraud" in .flt. I have read all tutorials light part, 
> search the mail list, but cannot find a way.
> 
> Background: my visual data is .flt format; some faces setting: 
> drawing-shade-Gouraud; some faces setting drawing-shade-lit.
> 
> When I add a light source & a light, I can see the light work 
> on the faces whose setting is lit by noticing something like 
> color change. But faces whose setting is Gouraud do not change.
> When I disable the viewer default light, the same thing 
> happens. Here is piece of test code:
> 
> osg::ref_ptr lightSS (root->getOrCreateStateSet());
> 
>  lightSS->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
> 
> lightSS->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
> lightSS->setMode(GL_LIGHT0, osg::StateAttribute::OFF);
> lightSS->setMode(GL_LIGHT1, osg::StateAttribute::OFF);
> 
> //Loading the terrain node
> osg::ref_ptr terrainnode 
> (osgDB::readNodeFile(FLT_FILE_PATH));
> 
> terrainScaleMAT->addChild(terrainnode.get());
> terrainScaleMAT->setMatrix(terrainScaleMatrix);
>
> //adding the terrain node to the root node
> root->addChild(terrainScaleMAT.get());
> 
> viewer.setLightingMode(osgViewer::Viewer::NO_LIGHT);
> -
> 
>  From post in the mail list, there is suggestion for using 
> "setNormalBinding(osg::Geometry::BIND_PER_VERTEX);", but how 
> can I apply this to the osg::Node instead of osg::Geometry?
> 
> Thanks in advance
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
> 

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

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


Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.7.4 dev release

2008-10-28 Thread Paul Martz
WinXP, VS8: OSG compiles and runs fine. Tested my current dev project: runs
fine with OSG svn head.
   -Paul

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


Re: [osg-users] light & gouraud

2008-10-28 Thread Paul Martz
I'm not sure that OpenFlight Face/Mesh records with the Gouraud flag set
should be lit. Can you point to something in the OpenFlight specification
that supports this?

If you want to enable lighting for those nodes, you would need to write a
NodeVisitor to enable lighting and provide appropriate normals.
   -Paul



> Hi, all,
> 
> Question for how to make light work on face that set to 
> "gouraud" in .flt. I have read all tutorials light part, 
> search the mail list, but cannot find a way.
> 
> Background: my visual data is .flt format; some faces setting: 
> drawing-shade-Gouraud; some faces setting drawing-shade-lit.
> 
> When I add a light source & a light, I can see the light work 
> on the faces whose setting is lit by noticing something like 
> color change. But faces whose setting is Gouraud do not change.
> When I disable the viewer default light, the same thing 
> happens. Here is piece of test code:
> 
> osg::ref_ptr lightSS (root->getOrCreateStateSet());
> 
>  lightSS->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
> 
> lightSS->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
> lightSS->setMode(GL_LIGHT0, osg::StateAttribute::OFF);
> lightSS->setMode(GL_LIGHT1, osg::StateAttribute::OFF);
> 
> //Loading the terrain node
> osg::ref_ptr terrainnode 
> (osgDB::readNodeFile(FLT_FILE_PATH));
> 
> terrainScaleMAT->addChild(terrainnode.get());
> terrainScaleMAT->setMatrix(terrainScaleMatrix);
>
> //adding the terrain node to the root node
> root->addChild(terrainScaleMAT.get());
> 
> viewer.setLightingMode(osgViewer::Viewer::NO_LIGHT);
> -
> 
>  From post in the mail list, there is suggestion for using 
> "setNormalBinding(osg::Geometry::BIND_PER_VERTEX);", but how 
> can I apply this to the osg::Node instead of osg::Geometry?
> 
> Thanks in advance
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
> 

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


Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.7.4 dev release

2008-10-28 Thread Ulrich Hertlein

Compiled fine on Mac OS X 10.5.5, gcc 4.0.1, intel 32-bit
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] QT4 ViewerQOSG and Q_OBJECT

2008-10-28 Thread mgb
ViewerQOSG declaration in QOSGWidget.h separated out from QOSGWidget.cpp
To use the QT moc class definitions must each be in their own header.

// Parent class derived from QObject must come first.
class ViewerQOSG :  public QOSGWidget,public osgViewer::Viewer
{
   //Include this if you want to emit signals, but file will have to go through 
the moc
   //Q_OBJECT 

public: 
ViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f = 
0):
QOSGWidget( parent, name, f )
{
getCamera()->setViewport(new osg::Viewport(0,0,width(),height()));

// This line causes the image to be stretched vertically on Nvidia (but 
not ATI) on XP!
   //getCamera()->setProjectionMatrixAsPerspective(30.0f, 
static_cast(width())
 static_cast(height()), 1.0f, 
1.0f);
getCamera()->setGraphicsContext(getGraphicsWindow());
setThreadingModel(osgViewer::Viewer::SingleThreaded);

connect(&_timer, SIGNAL(timeout()), this, SLOT(update()));
_timer.start(10);
}
virtual void paintEvent( QPaintEvent * event ) { frame(); }

protected:
QTimer _timer;
};

--
Martin

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


[osg-users] light & gouraud

2008-10-28 Thread Cicey Hu

Hi, all,

Question for how to make light work on face that set to "gouraud" in 
.flt. I have read all tutorials light part, search the mail list, but 
cannot find a way.


Background: my visual data is .flt format; some faces setting: 
drawing-shade-Gouraud; some faces setting drawing-shade-lit.


When I add a light source & a light, I can see the light work on the 
faces whose setting is lit by noticing something like color change. But 
faces whose setting is Gouraud do not change.
When I disable the viewer default light, the same thing happens. Here is 
piece of test code:


osg::ref_ptr lightSS (root->getOrCreateStateSet());

lightSS->setMode(GL_NORMALIZE, osg::StateAttribute::ON);

   lightSS->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
   lightSS->setMode(GL_LIGHT0, osg::StateAttribute::OFF);
   lightSS->setMode(GL_LIGHT1, osg::StateAttribute::OFF);

//Loading the terrain node
   osg::ref_ptr terrainnode 
(osgDB::readNodeFile(FLT_FILE_PATH));


   terrainScaleMAT->addChild(terrainnode.get());
   terrainScaleMAT->setMatrix(terrainScaleMatrix);
  
//adding the terrain node to the root node

   root->addChild(terrainScaleMAT.get());

viewer.setLightingMode(osgViewer::Viewer::NO_LIGHT);
-

From post in the mail list, there is suggestion for using 
"setNormalBinding(osg::Geometry::BIND_PER_VERTEX);", but how can I apply 
this to the osg::Node instead of osg::Geometry?


Thanks in advance


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


Re: [osg-users] Viewer vs. Composite Viewer

2008-10-28 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
It's simple to convert over. Look at the osgcompositeviewer example to see
what needs to be done. I've been using just osgViewer::Viewer and I changed
over to using the composite viewer with no problems or difficulty. One's
just a subset of the other so I would probably just start out with a
CompositeViewer and then add one view...

-Shayne

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ed
Sent: Tuesday, October 28, 2008 2:42 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Viewer vs. Composite Viewer

After reading "osgViewer::Viewer vs osgViewer::CompositeViewer", I think 
I might need to use CompositeViewer at some point in the future of my 
project, but not at the outset.  Should I begin with the 
CompositeViewer, or make the necessary mods later?  How difficult is it 
to change from Viewer to CompositeViewer later?

Ed

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


smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] World-space bounds of a node

2008-10-28 Thread Paul Martz
Hi J-S -- I recently wrote my own visitor to flatten transforms. To do this,
I use osg::computeLocalToWorld(osg::NodePath&) to get the local-to-world
matrix, and transform all vertices by that matrix. This works great for me,
and what you are doing sounds like an equivalent operation, so I'm not sure
why it's not working for you. Can you provide more details on the failure?
   -Paul


> 
> Hi all,
> 
> I was wondering, what's the correct way to get the world 
> space bounds of a node? I can do the following:
> 
>  osg::ComputeBoundsVisitor cbbv;
>  node->accept(cbbv);
>  osg::BoundingBox bb = cbbv.getBoundingBox();
> 
> I also have the localToWorld matrix of the node. But just 
> transforming the _min and _max members by the matrix doesn't 
> seem to give the right results... (note that I don't care if 
> the resulting bounding box is axis-aligned - it could even be 
> a bounding sphere)
> 
> So, what is the correct way to get the bounds?
> 
> Thanks,
> 
> J-S
> --
> __
> Jean-Sebastien Guay[EMAIL PROTECTED]
> http://www.cm-labs.com/
>  http://whitestar02.webhop.org/ 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
> 

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


[osg-users] Viewer vs. Composite Viewer

2008-10-28 Thread Ed
After reading "osgViewer::Viewer vs osgViewer::CompositeViewer", I think 
I might need to use CompositeViewer at some point in the future of my 
project, but not at the outset.  Should I begin with the 
CompositeViewer, or make the necessary mods later?  How difficult is it 
to change from Viewer to CompositeViewer later?


Ed

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


Re: [osg-users] osgShadow question (ATI related?)

2008-10-28 Thread Wojciech Lewandowski
Hi Again Rick,

Small errata: I forgot to add .cpp suffixes to the files I suggest to
modify. So fixes should be done in

MinimalDrawBoundShadowMap.cpp line 225
and
StandardShadowMap.cpp line 753

Let us know if this helps, if it does, I will be smarter next time when this
question appears again.

Cheers,
Wojtek


Rick,

I don't know how to help you with your particular problem. But I hope these
2 hints could be useful:

I suppose it would be fairly simple to make similar adjustment for LisPSM as
you did for ShadowMap. Texgen matrix for LispSM is set in
MinimalDrawBoundShadowMap line 225. For safety you should also adjust
StandardShadowMap line 753. Second code path is used when you select LispSM
variant based on MinimalCullBoundsShadowMap or MinimalShadowMap.

Maybe when you activate debug HUD ( call DebugShadowMap::setDebugDraw(
true ) ) it will be easier to see and fix the problem.

Cheers,
Wojtek

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Rick
Middelkoop
Sent: Tuesday, October 28, 2008 7:13 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] osgShadow question (ATI related?)


Hello,

I'm trying to add shadows to the application I'm working on, and encountered
two issues which seems to be ATI card/driver related.

The first issue is, that shadows generated using the ShadowMap technique
are in the
wrong location, both in the application I'm working on and the
'osgshadow' example.
Only the ShadowTexture technique gives correct results.

For example, in the 'aircraft above terrain' example scene with the
ShadowMap
technique (osgshadow --sm -2), there is a shadow on the ground below the
aircraft,
but it is turning in the opposite direction to the aircraft.
A colleague who is using an Nvidia card is seeing correct shadows in the
example.

After searching the osg mailing list I found a few clues towards solving
the problem,
one was that ATI had inverted a coordinate of the FBO-texture in their
drivers:
http://archive.netbsd.se/?ml=openscenegraph-submissions&a=2008-02&m=6605417

The solution was to mirror the shadow map along the Y axis in the
ShadowMap::cull()
function:

_texgen->setPlanesFromMatrix( osg::Matrix::scale(1.0, -1.0, 1.0) *
  _camera->getProjectionMatrix() *
  osg::Matrix::translate(1.0,1.0,1.0) *
  osg::Matrix::scale(0.5f,0.5f,0.5f) );

(I am using a Radeon X1800 series card with the Catalyst 8.9 drivers,
and the osg2.7.3
developer release. However, the effect also occurs with the osg2.2
stable release.)

Now for the second, still unsolved issue:

At the moment, I am looking at using the LightSpacePerspectiveShadowMap
technique
in the application. However, the problem here is that when changing the
viewpoint position
or orientation,  the shadows also move or rotate! It is very difficult
to see what is going on
from the position or movements of the shadows in this case. However,
when I mirror the
shadow map (like in the code above), the shadows seem to be correct in
one special case.
This is when the viewpoint is looking down along the Z axis, and the
viewpoint viewx/vup
axes are parallel to the world X/Y-axes.

Does anyone have an idea on how this might be solved?

Thanks + Best Regards,

Rick.



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

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

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


Re: [osg-users] osgShadow question (ATI related?)

2008-10-28 Thread Wojciech Lewandowski
Rick,

I don't know how to help you with your particular problem. But I hope these
2 hints could be useful:

I suppose it would be fairly simple to make similar adjustment for LisPSM as
you did for ShadowMap. Texgen matrix for LispSM is set in
MinimalDrawBoundShadowMap line 225. For safety you should also adjust
StandardShadowMap line 753. Second code path is used when you select LispSM
variant based on MinimalCullBoundsShadowMap or MinimalShadowMap.

Maybe when you activate debug HUD ( call DebugShadowMap::setDebugDraw(
true ) ) it will be easier to see and fix the problem.

Cheers,
Wojtek

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Rick
Middelkoop
Sent: Tuesday, October 28, 2008 7:13 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] osgShadow question (ATI related?)


Hello,

I'm trying to add shadows to the application I'm working on, and encountered
two issues which seems to be ATI card/driver related.

The first issue is, that shadows generated using the ShadowMap technique
are in the
wrong location, both in the application I'm working on and the
'osgshadow' example.
Only the ShadowTexture technique gives correct results.

For example, in the 'aircraft above terrain' example scene with the
ShadowMap
technique (osgshadow --sm -2), there is a shadow on the ground below the
aircraft,
but it is turning in the opposite direction to the aircraft.
A colleague who is using an Nvidia card is seeing correct shadows in the
example.

After searching the osg mailing list I found a few clues towards solving
the problem,
one was that ATI had inverted a coordinate of the FBO-texture in their
drivers:
http://archive.netbsd.se/?ml=openscenegraph-submissions&a=2008-02&m=6605417

The solution was to mirror the shadow map along the Y axis in the
ShadowMap::cull()
function:

_texgen->setPlanesFromMatrix( osg::Matrix::scale(1.0, -1.0, 1.0) *
  _camera->getProjectionMatrix() *
  osg::Matrix::translate(1.0,1.0,1.0) *
  osg::Matrix::scale(0.5f,0.5f,0.5f) );

(I am using a Radeon X1800 series card with the Catalyst 8.9 drivers,
and the osg2.7.3
developer release. However, the effect also occurs with the osg2.2
stable release.)

Now for the second, still unsolved issue:

At the moment, I am looking at using the LightSpacePerspectiveShadowMap
technique
in the application. However, the problem here is that when changing the
viewpoint position
or orientation,  the shadows also move or rotate! It is very difficult
to see what is going on
from the position or movements of the shadows in this case. However,
when I mirror the
shadow map (like in the code above), the shadows seem to be correct in
one special case.
This is when the viewpoint is looking down along the Z axis, and the
viewpoint viewx/vup
axes are parallel to the world X/Y-axes.

Does anyone have an idea on how this might be solved?

Thanks + Best Regards,

Rick.



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

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


Re: [osg-users] newcomer: suitabilty of osg for physics modeling program?

2008-10-28 Thread Janusz

Vaclav:

While ago I worked on a discrete-element-method tool. A very,very early 
version of the tool (using osg v. 1.2) you

may still find at this site: www.3dcalc.pl/osg-examples/osgDEM.zip

This used to be a part of an academic project some time ago. This is a 
linux-based project.


The tool itself is a property-configured browser that runs after 
computing is completed, i.e. it loads results, displays them.
Also, users may query particle properties (position, speed, etc.), 
advance the simulation back and forts, 


If you require some other post-processing tools like streamlines, vector 
plots, particle tracing, I am afraid you
need to implement them yourself. Or use VTK which has features 
specically tailored for the scientific community :-)



Hope it answers your question in some way.
Janusz



Václav Šmilauer pisze:

Hi everybody,

I am considering switch to openscenegraph for the modeling program I
work on (http://yade.wikia.com), which has only home-grown openGL
visualization now, which is getting unsatisfactory. I read tutorial on
osg but due to only shallow knowledge of osg architecture and
possibilities, I would like to describe what I am looking for in the
hope that seasoned users will tell me if I should give osg a try.

Yade simulation consist of bodies (particles) and interactions, which
are both kept in linear containers. At every iteration, bounding boxes
of all bodies are computed, collisions detected, interactions
created/deleted/update, forces generated, accels integrated and body
positions updated. The 3d view is only optional, the computation must be
able to run without it (headless nodes etc) and the visualization should
run in separate thread (there are mutexes to avoid collisions on the
body/interaction containers) - this is how it works now also.

First question is whether such flat graph (one linear sequence of
bodies, one linear sequence of interactions) is ok for osg -- if it will
not pretty much kill all the advatages that graph-oriented approach has.

Second question is whether nodes of the scene graph can be taught to ask
simulation elements for their data: think of Transform object, which
holds position and orientation of a particle (its leaf). It would be
best if it could query
bodies[id]->physicalParameters->se3.{position,orientation} as needed
(when the scene graph is traversed) instead of copying those
periodically from the simulation into the Transform object.

Third question is how ref_ptr play with boost::shared_ptr? We use
shared_ptr's extensively, but as long as the code is well separate,
these two will hopefully never be mixed?

Fourth question: is there support for selection of an element in the 3d
scene with mouse?

Fifth question: honestly, I read that opensg is more suited for CAM etc
apps, would it be better for me? Or some other suggestion, like VTK? Our
objective is not to have the highest possible framerate, but it shold
certainly run at a dozen fps with 1e4 bodies (spheres, boxes,
triangulation elements etc) on regular hardware.

Thanks for any comments. Best regards,

Václav


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


  


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


Re: [osg-users] Group Info (Off-topic)

2008-10-28 Thread Paul Martz
> Hi Jeremy,
> 
> > Whoa! I'm the #7 poster (since Jul of last year, it looks 
> like)! I've 
> > really got to cut back, jeeze...
> 
> You think you need to cut back? Not only am I second in the 
> last month, but I'm second AND fifth of all time!

I'm trying to keep my number of posts equal to the number of cups of coffee
I drink. (Rats! As soon as I press 'send', I have to refill... :-)
   -Paul

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


Re: [osg-users] Group Info (Off-topic)

2008-10-28 Thread Jean-Sébastien Guay

Hi Jeremy,


Whoa! I'm the #7 poster (since Jul of last year, it looks like)! I've
really got to cut back, jeeze...


You think you need to cut back? Not only am I second in the last month, 
but I'm second AND fifth of all time!


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] World-space bounds of a node

2008-10-28 Thread Jean-Sébastien Guay

Hi all,

I was wondering, what's the correct way to get the world space bounds of 
a node? I can do the following:


osg::ComputeBoundsVisitor cbbv;
node->accept(cbbv);
osg::BoundingBox bb = cbbv.getBoundingBox();

I also have the localToWorld matrix of the node. But just transforming 
the _min and _max members by the matrix doesn't seem to give the right 
results... (note that I don't care if the resulting bounding box is 
axis-aligned - it could even be a bounding sphere)


So, what is the correct way to get the bounds?

Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] choppiness on 2nd graphics card with 4 monitors

2008-10-28 Thread Robert Osfield
Hi Joe,

OK this screenshot makes more sense... and is indeed how one would
typically drive multiple monitors with the OSG.

One optimization that is worth doing with this type of setup is use
one graphics context per graphics card, and split the each window
across two displays.  This typically provides the best performance.
But... other posts on similar about Visita/XP suggest that XP is
capable of this, but Visita has lots this capability, which sucks.
Linux is capable of doing the one context driving two screens, so if
can port then you have a solution there.

The only other thing you can try on the OSG side is to change the draw
dispatch serialization flag to off, as right now its on by default.
Use the env var OSG_SERIALIZE_DRAW_DISPATCH set to OFF, then run your
app.   In theory one should always have OSG_SERIALIZE_DRAW_DISPATCH
set to OFF, but in my own testing have found PC OGL drivers/hardware
perform worse when you allow multiple threads driving multiple cards
to all do draw dispatch in a parallel, perhaps later drivers might
fix/hardware this lack of scalability.   I'd recommend that you do a
search on this env on the osg-users archives to see the points I've
raised in the past on this topic.

In your case I don't actually expect the draw serialization to make a
difference to you only getting fps, as the swap buffers aren't
serialized - they all still run in parallel, and your not breaking
frame due to draw dispatch anyway.  What may help is the swap groups
extension - it shouldn't be necessary to get 60fps, but perhaps the
driver is just a bit crappy and needs the extra push to do the right
thing.

Robert.

On Tue, Oct 28, 2008 at 5:40 PM, Joe Lyga <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> I guess I forgot to mention what the original problem was.  Normally, the
> program is run across all four monitors.  However, even with practically
> nothing loaded in view, I'm only getting around 30 fps.  I was running it
> independently on two monitors at a time in order to isolate the problem, and
> there's definitely a difference between the first two and the second two.
> Here is the stats of it running on four monitors, but I don't think it shows
> as much as the stats with it on two each at a time.
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Test Paged database online

2008-10-28 Thread Gerrick Bivins

Same here. This works for me now as well(Mac 10.5).
Pretty cool stuff Robert!!!
Gerrick

On 10/28/08 1:10 PM, "christophe loustaunau"
<[EMAIL PROTECTED]> wrote:

> Hi,
> 
> Before the update, I get also the error : readCharArray(): Failed to read char
> value.
> 
> But now everithing works well !
> Very cool stuff !
> 
> Regards.
> 
> On Tue, Oct 28, 2008 at 6:30 PM, Robert Osfield <[EMAIL PROTECTED]>
> wrote:
>> Hi All,
>> 
>> I have just merged a fix for the read error from Lionel Lagrade - he
>> implemented read() and gcount() usage rather than my previous
>> readsome() as it looks like this function isn't consistently
>> implemented across platforms.
>> 
>> Could all those who've had read problems on the online database do an
>> svn update and let me know how you get on.
>> 
>> Thanks,
>> Robert.
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> 

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


[osg-users] Group Info (Off-topic)

2008-10-28 Thread Jeremy Moles
Whoa! I'm the #7 poster (since Jul of last year, it looks like)! I've
really got to cut back, jeeze...

http://groups.google.com/group/osg-users/about

Anyways, fun information. And oh yeah, this bumps my post count one
more. :)

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


Re: [osg-users] Load animated model?

2008-10-28 Thread Tomlinson, Gordon
At this time nope, unless you want to write a loader to handle you case with 
your models
 

Gordon

__
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 
 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thanh Trung Trinh
Sent: Tuesday, October 28, 2008 1:35 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Load animated model?


Thanks, but sadly that topic doesn't solve the problem. Is there a way to load 
the animation without using osgCal and Cal3D? I have a pretty simple animation, 
and I just want to load the animation and control the framerate, and don't 
really need skeleton animation or so.

Hope some will help.




Từ: Thanh Trung Trinh <[EMAIL PROTECTED]>
Đến: osg-users@lists.openscenegraph.org
Gửi ngày: Thứ Hai, 27 tháng 10, 2008 1:36:16
Chủ đề: Load animated model?


I've just join the OSG Community, and I have a newbie question. I have a simple 
animated 3ds model, and how can I load the animation in OpenSceneGraph? I have 
load the model but it has no animation. 

Thanks in advance.




Chọn ngay địa chỉ email bạn thích! 

 
Giờ đã có @ymail.com và @rocketmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgShadow question (ATI related?)

2008-10-28 Thread Rick Middelkoop
Hello,

I'm trying to add shadows to the application I'm working on, and encountered
two issues which seems to be ATI card/driver related.

The first issue is, that shadows generated using the ShadowMap technique
are in the
wrong location, both in the application I'm working on and the
'osgshadow' example.
Only the ShadowTexture technique gives correct results.

For example, in the 'aircraft above terrain' example scene with the
ShadowMap
technique (osgshadow --sm -2), there is a shadow on the ground below the
aircraft,
but it is turning in the opposite direction to the aircraft.
A colleague who is using an Nvidia card is seeing correct shadows in the
example.

After searching the osg mailing list I found a few clues towards solving
the problem,
one was that ATI had inverted a coordinate of the FBO-texture in their
drivers:
http://archive.netbsd.se/?ml=openscenegraph-submissions&a=2008-02&m=6605417

The solution was to mirror the shadow map along the Y axis in the
ShadowMap::cull()
function:

_texgen->setPlanesFromMatrix( osg::Matrix::scale(1.0, -1.0, 1.0) *
  _camera->getProjectionMatrix() *
  osg::Matrix::translate(1.0,1.0,1.0) *
  osg::Matrix::scale(0.5f,0.5f,0.5f) );

(I am using a Radeon X1800 series card with the Catalyst 8.9 drivers,
and the osg2.7.3
developer release. However, the effect also occurs with the osg2.2
stable release.)

Now for the second, still unsolved issue:

At the moment, I am looking at using the LightSpacePerspectiveShadowMap
technique
in the application. However, the problem here is that when changing the
viewpoint position
or orientation,  the shadows also move or rotate! It is very difficult
to see what is going on
from the position or movements of the shadows in this case. However,
when I mirror the
shadow map (like in the code above), the shadows seem to be correct in
one special case.
This is when the viewpoint is looking down along the Z axis, and the
viewpoint viewx/vup
axes are parallel to the world X/Y-axes.

Does anyone have an idea on how this might be solved?

Thanks + Best Regards,

Rick.



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


Re: [osg-users] Test Paged database online

2008-10-28 Thread christophe loustaunau
Hi,

Before the update, I get also the error : readCharArray(): Failed to read
char value.

But now everithing works well !
Very cool stuff !

Regards.

On Tue, Oct 28, 2008 at 6:30 PM, Robert Osfield <[EMAIL PROTECTED]>wrote:

> Hi All,
>
> I have just merged a fix for the read error from Lionel Lagrade - he
> implemented read() and gcount() usage rather than my previous
> readsome() as it looks like this function isn't consistently
> implemented across platforms.
>
> Could all those who've had read problems on the online database do an
> svn update and let me know how you get on.
>
> Thanks,
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


Re: [osg-users] Sharing PrimitiveSets between Geometrys

2008-10-28 Thread Bill Prendergast
>> Can primitivesets be shared between geometrys similarly to vertexes,
>> colors, and texcoords?

> I have never tried this, but it should work just fine.

Slightly off-topic, but I recently made a visitor that looks for
duplicated texture coordinates (unit 1 uses same TC's as unit 0)
and deleted the duplicate array and shared unit 0 TC's with unit 1.

Treat this as anecdotal for now until I can poke into it a little
more, but this appeared to crash the Tri-Strip Optimizer if I tried
to share TC's before optimization.

Running the same visitor after optimization was OK and I could share
TC arrays with no problems.

- Bill


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


Re: [osg-users] Load animated model?

2008-10-28 Thread Thanh Trung Trinh
Thanks, but sadly that topic doesn't solve the problem. Is there a way to load 
the animation without using osgCal and Cal3D? I have a pretty simple animation, 
and I just want to load the animation and control the framerate, and don't 
really need skeleton animation or so.

Hope some will help.





Từ: Thanh Trung Trinh <[EMAIL PROTECTED]>
Đến: osg-users@lists.openscenegraph.org
Gửi ngày: Thứ Hai, 27 tháng 10, 2008 1:36:16
Chủ đề: Load animated model?


I've just join the OSG Community, and I have a newbie question. I have
a simple animated 3ds model, and how can I load the animation in
OpenSceneGraph? I have load the model but it has no animation. 

Thanks in advance.



  Bạn có ý kiến về Cẩm Ly?
Hãy cùng chia sẻ với mọi người tại Yahoo! Việt Nam Music
http://vn.music.yahoo.com/artist/10019?___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Test Paged database online

2008-10-28 Thread Robert Osfield
Hi All,

I have just merged a fix for the read error from Lionel Lagrade - he
implemented read() and gcount() usage rather than my previous
readsome() as it looks like this function isn't consistently
implemented across platforms.

Could all those who've had read problems on the online database do an
svn update and let me know how you get on.

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


Re: [osg-users] choppiness on 2nd graphics card with 4 monitors

2008-10-28 Thread Robert Osfield
Hi Joe,

Just looking at the two images, it really looks like you running two
separate viewers.   Is this right?  Is it even two separate
applications?

The OSG allows you to run a single viewer across multiple contexts and
this is the usual way that OSG users will do multi-monitors.  Is there
a reason why you are using this approach?

Robert.

On Tue, Oct 28, 2008 at 5:14 PM, Joe Lyga <[EMAIL PROTECTED]> wrote:
> Hi again,
>
> I'm not having much success getting other operating systems to run correctly
> on my vista machine.  Windows XP doesn't support running off external drives
> (and hacking it to work is a difficult process), and the latest Ubuntu live
> cd I tried didn't have the correct nvidia graphics drivers.
>
> Anyway, I took a look at nvidia swap groups extension Robert mentioned.  I
> believe that synchronization between the graphics cards is something I'm
> trying to avoid.  Both graphics cards should be running independently.  I'm
> no expert, but judging by what I've seen so far and by looking at the stats
> with vsync off, the second graphics card is waiting on the first.  Could it
> be that the second graphics card is trying to synchronize itself somehow
> with the first graphics card?
>
> I reattached the stats with vsync off (first image = first graphics card,
> second image = second graphics card)
> Notice the inconsistant placement of the frame markers and the large amount
> of empty space in the second image as opposed to the smooth performance of
> the first.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problems with RTT-cameras when changing window size

2008-10-28 Thread Robert Osfield
Hi Steffen,

On Tue, Oct 28, 2008 at 4:38 PM, Steffen Kim <[EMAIL PROTECTED]> wrote:
> I was still using frame buffer based cameras because they seem to be the only 
> way to get a real-time-sufficient performance for more complex applications.

This sounds a bit odd, such as FBO or PBuffer RTT camera's aren't
performing properly on your hardware/drivers.  Or perhaps you are
using the scene graph inefficiently.   FBO's should provide the best
in performance.

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


Re: [osg-users] Problems with RTT-cameras when changi ng window size

2008-10-28 Thread Steffen Kim
Hi.

The cameras are part of the scene graph.

I was still using frame buffer based cameras because they seem to be the only 
way to get a real-time-sufficient performance for more complex applications.
I figured out that this causes the problem and found no way to get rid of the 
error - even when adapting the viewport to window size changes or using other 
similar approaches.

To solve this I now provide the user with the possibility to chose between 
using frame_buffer or frame_buffer_object according to his needs. The one mode 
allows to enlarge the window without having to reinitialize the cameras, the 
other one ist faster.

Cheers,
Steffen
_
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=0066

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


Re: [osg-users] auto-capture example: capturing an image from a PagedLOD Database

2008-10-28 Thread Robert Osfield
Hi John,

On Tue, Oct 28, 2008 at 4:16 PM, John Vidar Larring
<[EMAIL PROTECTED]> wrote:
> I was hoping this would work too, but
> getDatabasePager()->getFileRequestListSize() _always_ returns 0 (zero).
>
> So I am hoping that this is either a bug that can be fixed or that there is
> another method for checking whether the DatabasePager is done / idle (!?)

There isn't much to go wrong is this method, so I doubt there is a bug
in it.  I suspect the read queues are just being emptied really fast
so you are missing when they are not empty.  Or perhaps you are
testing the wrong DatabasePager.

You could also check the getDataToCompileListSize() to see if it has
anything it in, and there isn't a present a DataToMergeListSize()
method which there should probably.  The sum of all these would
probably be the thing that would test against to see if there isn't
pending in the pager.

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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Lionel Lagarde




I don't think that is a connection problem. libcurl download the
file integrally in a stringstream.
The stringstream is then given to to ive ReaderWriter.

Serge Lages wrote:
Hi all,
  
Can't test myself currently but I'll try as soon as I can.
About the error, are you behind proxies or something similar ? Is it
possible to be a connection problem ?
  
  On Tue, Oct 28, 2008 at 5:16 PM, Gerrick
Bivins <[EMAIL PROTECTED]>
wrote:
  I
get this error on Mac OSX 10.5

DataInputStream::readCharArray(): Failed to read char value.

./bin/osgviewer.app/Contents/MacOS/osgviewer: No data loaded

 Gerrick


On 10/28/08 11:13 AM, "Jean-Sébastien Guay"
<[EMAIL PROTECTED]>
wrote:

> Hi Robert,
>
>> The readsome() returns if data isn't available yet, it doesn't
wait
>> like read.  You could try changing the code across to using
read() and
>> gcount() to find out how many bytes have been read.
>>
>> What platform are you working on?
>
> Just to add another report, I get the same error as Lionel:
>
> DataInputStream::readCharArray(): Failed to read char value.
>
> I'm using the zlib binary that was in Mike's 3rdParty binaries for
> Visual Studio 8.0 SP1, which I think is the one that was compiled
with
> libpng (not built separately). Not sure if that has any bearing on
the
> problem, just thought I'd mention it.
>
> I don't have time to debug this myself, so I'll hang back and let
others
> puzzle it out. I can give plenty of moral support though! :-)
>
> J-S



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


  
  
  
  
  
-- 
Serge Lages
  http://www.tharsis-software.com
  

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



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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Robert Osfield
Hi J-S,

On Tue, Oct 28, 2008 at 4:10 PM, Jean-Sébastien Guay
<[EMAIL PROTECTED]> wrote:
> Can the animation path also be gotten by http? If so, we could use the
> following all-powerful command line:
>
> osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
> -p http://www.openscenegraph.org/data/earth_bayarea/bay.path --file-cache
> MyFileCache
>
> That would be pretty cool!

This won't work right now as the curl plugin only loads images and
nodes, and the animation path code just does a straight ofstream of
the filename provided.  So right now you'll need to do a wget on the
path.

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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Serge Lages
Hi all,

Can't test myself currently but I'll try as soon as I can.
About the error, are you behind proxies or something similar ? Is it
possible to be a connection problem ?

On Tue, Oct 28, 2008 at 5:16 PM, Gerrick Bivins <[EMAIL PROTECTED]
> wrote:

> I get this error on Mac OSX 10.5
>
> DataInputStream::readCharArray(): Failed to read char value.
> ./bin/osgviewer.app/Contents/MacOS/osgviewer: No data loaded
>
>  Gerrick
>
>
> On 10/28/08 11:13 AM, "Jean-Sébastien Guay"
> <[EMAIL PROTECTED]> wrote:
>
> > Hi Robert,
> >
> >> The readsome() returns if data isn't available yet, it doesn't wait
> >> like read.  You could try changing the code across to using read() and
> >> gcount() to find out how many bytes have been read.
> >>
> >> What platform are you working on?
> >
> > Just to add another report, I get the same error as Lionel:
> >
> > DataInputStream::readCharArray(): Failed to read char value.
> >
> > I'm using the zlib binary that was in Mike's 3rdParty binaries for
> > Visual Studio 8.0 SP1, which I think is the one that was compiled with
> > libpng (not built separately). Not sure if that has any bearing on the
> > problem, just thought I'd mention it.
> >
> > I don't have time to debug this myself, so I'll hang back and let others
> > puzzle it out. I can give plenty of moral support though! :-)
> >
> > J-S
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] auto-capture example: capturing an image from a PagedLOD Database

2008-10-28 Thread John Vidar Larring

Hi Robert,

> I haven't personally tried this but an educated guess is that you'll
> need to do is keep polling the DatabasePager::getFileRequestListSize()
> till it returns 0.Something like:
>
> while(!viewer.done() &&
> viewer.getDatabasePager()->getFileRequestListSize()>0) frame();

I was hoping this would work too, but 
getDatabasePager()->getFileRequestListSize() _always_ returns 0 (zero).


So I am hoping that this is either a bug that can be fixed or that there 
is another method for checking whether the DatabasePager is done / idle 
(!?)


Best regards,
John

Robert Osfield wrote:

Hi John,

I haven't personally tried this but an educated guess is that you'll
need to do is keep polling the DatabasePager::getFileRequestListSize()
till it returns 0.Something like:

while(!viewer.done() &&
viewer.getDatabasePager()->getFileRequestListSize()>0) frame();

Robert.

On Tue, Oct 28, 2008 at 2:34 PM, John Vidar Larring
<[EMAIL PROTECTED]> wrote:

Hi all,

_Goal_: I'd like to make a command-line tool where I can open paged
database, set the camera at a particular position and supply a filename, and
the program will dump an image and exit.

% ./osgautocapture
Usage: ./osgautocapture [options] filename ...
Options:
 --activeUse active rendering instead of passive / lazy rendering
 --cameraSpecify camera
position for image capture. Angles are specified in degrees and altitude in
meters above sealevel (e.g. --camera 55 10 30 0 30 0)
 --filename  Filename for the captured image

Example below yields the attached image called autocapture.jpg:
./osgautocapture --camera 55 10 30 0 30 0 --filename autocapture.jpg
http://www.openscenegraph.org/data/earth_bayarea/earth.ive

(Robert: thanks for making that database available;)

_Problem_: The image is blurred because the the necessary level of detail
has not been loaded when the image is captured (Ref: autocapture.jpg)

If I force to program to render the 180 frames before capturing, I'll get at
descent image (ref: autocapture_180_frames.jpg). However, this approach will
either not give a good result or take more time and resources than
necessary.

What I would like to do is to query the DatabasePager to find out whether or
not it needs load more tiles for the image to be rendered with the correct
level of detail. However, I can't seem to find the correct method (or
correct context for calling the method) for finding out when the
DatabasePager is done loading all necessary tiles.

Please, help. I'm quite stuck. The complete source code is attached to this
email.

Best regards,
John






--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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



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




--
Best regards,
John
WeatherOne


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Gerrick Bivins
I get this error on Mac OSX 10.5

DataInputStream::readCharArray(): Failed to read char value.
./bin/osgviewer.app/Contents/MacOS/osgviewer: No data loaded

 Gerrick


On 10/28/08 11:13 AM, "Jean-Sébastien Guay"
<[EMAIL PROTECTED]> wrote:

> Hi Robert,
> 
>> The readsome() returns if data isn't available yet, it doesn't wait
>> like read.  You could try changing the code across to using read() and
>> gcount() to find out how many bytes have been read.
>> 
>> What platform are you working on?
> 
> Just to add another report, I get the same error as Lionel:
> 
> DataInputStream::readCharArray(): Failed to read char value.
> 
> I'm using the zlib binary that was in Mike's 3rdParty binaries for
> Visual Studio 8.0 SP1, which I think is the one that was compiled with
> libpng (not built separately). Not sure if that has any bearing on the
> problem, just thought I'd mention it.
> 
> I don't have time to debug this myself, so I'll hang back and let others
> puzzle it out. I can give plenty of moral support though! :-)
> 
> J-S

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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Jean-Sébastien Guay

Hi Robert,


The readsome() returns if data isn't available yet, it doesn't wait
like read.  You could try changing the code across to using read() and
gcount() to find out how many bytes have been read.

What platform are you working on?


Just to add another report, I get the same error as Lionel:

DataInputStream::readCharArray(): Failed to read char value.

I'm using the zlib binary that was in Mike's 3rdParty binaries for 
Visual Studio 8.0 SP1, which I think is the one that was compiled with 
libpng (not built separately). Not sure if that has any bearing on the 
problem, just thought I'd mention it.


I don't have time to debug this myself, so I'll hang back and let others 
puzzle it out. I can give plenty of moral support though! :-)


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Test Paged database online

2008-10-28 Thread Jean-Sébastien Guay

Hi Robert,


Last night I uploaded a 547Mb paged database to openscenegraph.org.


Nice, can't check it out yet as I'm waiting on a full compile but will 
check it out as soon as I can.


About the animation path:


Grab this then run osgviewer with the path:

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
-p bay.path


Can the animation path also be gotten by http? If so, we could use the 
following all-powerful command line:


osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
-p http://www.openscenegraph.org/data/earth_bayarea/bay.path 
--file-cache MyFileCache


That would be pretty cool!

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Test Paged database online

2008-10-28 Thread Robert Osfield
Hi Lionel,

The readsome() returns if data isn't available yet, it doesn't wait
like read.  You could try changing the code across to using read() and
gcount() to find out how many bytes have been read.

What platform are you working on?

Robert.

On Tue, Oct 28, 2008 at 3:00 PM, Lionel Lagarde <[EMAIL PROTECTED]> wrote:
> Curiously, the readsome function fail to read data (return value is 0),
> but fin.eof() returns false.
>
> I've tried to loop until some data are read but it does not work :
>
> do {
>   strm.avail_in = fin.readsome((char*)in, CHUNK);
> while (strm.avail_in == 0 && !fin.eof());
>
> It is an infinite loop.
>
>
> The behavior is the same using a local file. Maybe my zlib doesn't work.
>
>
>
> Lionel Lagarde wrote:
>>
>> The ive plugin is built with zlib support.
>>
>> There is a problem in the uncompress loop. The earth.ive size is 14976
>> bytes.
>> In the loop, the first read:
>>
>> strm.avail_in = fin.readsome((char*)in, CHUNK);
>>
>> reports me 12427 bytes read and the second 0 bytes.
>>
>> Continuing investigation.
>>
>> John Vidar Larring wrote:
>>>
>>> Hi Robert,
>>>
>>> After compiling OSG svn trunk (linux 64bit), the following commands
>>> worked like charm:
>>>
>>> > wget http://www.openscenegraph.org/data/earth_bayarea/bay.path
>>> > osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive -p
>>> > bay.path --file-cache MyFileCache
>>>
>>> The second time I ran the viewer, it was obvious that the file cache was
>>> being used.
>>>
>>> Great features!
>>> / John
>>>
>>> Robert Osfield wrote:

 Hi All,

 Last night I uploaded a 547Mb paged database to openscenegraph.org.
 The .ive files are all generated using zlib compression that is built
 into the svn/trunk version of the OSG, you won't be able to load them
 with any prior version of the OSG I'm afraid as the compression
 support has just been introduced.  To view the database you can use:

  osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive


 The database I generated with the svn/trunk version of
 VirtualPlanetBuilder, using options to generate the compressed data,
 to use non power of two textures for the highest res tiles, and
 disabled mipmapping.   These options all work to minimize the tile
 sizes which in turn means that the data is better suited for streaming
 over http.

 The data itself is composed of the Nasa blue marble 1km data, with
 high res insert in the bay area of california.  You should be able to
 find the Don Burn's local hang gliding hill that the osghangglide
 example is based on, which in turn was the original inspiration for
 the whole OpenSceneGraph odyssey.  To help find this little insert
 I've uploaded an animation path:

http://www.openscenegraph.org/data/earth_bayarea/bay.path

 Grab this then run osgviewer with the path:

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
 -p bay.path

 This will set up an AnimationPathManipulator that zooms you into the
 high res insert, and then around the globe.  Pressing '4' will take
 you to the TerrainManipulator so you can then start exploring
 manually, pressing '5' will take you back to the animation path.

 The next little thing your can try is to populate a local file cache,
 so the next time you load up the data you can pick up on locally cache
 files rather than hitting the server.

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
 --file-cache MyFileCache

 Or via an env var:

export OSG_FILE_CACHE = /home/me/Data/MyFileCache  # change to
 setenv or set for your system...
osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive

 Now this dataset is really a tiny one compared to what
 VirtualPlanetBuilder is capable of building, one I routinely test
 against is 20,000 times bigger, alas the data isn't public so you'll
 just have to find your own data and build your databases for such a
 Terrabyte database.  All the tools are there for you, you just need to
 add the data.  In terms of runtime need to view the bigger datasets
 there are no differences, osgviewer works for all of them equally.

 Have fun.

 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

Re: [osg-users] auto-capture example: capturing an image from a PagedLOD Database

2008-10-28 Thread Robert Osfield
Hi John,

I haven't personally tried this but an educated guess is that you'll
need to do is keep polling the DatabasePager::getFileRequestListSize()
till it returns 0.Something like:

while(!viewer.done() &&
viewer.getDatabasePager()->getFileRequestListSize()>0) frame();

Robert.

On Tue, Oct 28, 2008 at 2:34 PM, John Vidar Larring
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
> _Goal_: I'd like to make a command-line tool where I can open paged
> database, set the camera at a particular position and supply a filename, and
> the program will dump an image and exit.
>
> % ./osgautocapture
> Usage: ./osgautocapture [options] filename ...
> Options:
>  --activeUse active rendering instead of passive / lazy rendering
>  --cameraSpecify camera
> position for image capture. Angles are specified in degrees and altitude in
> meters above sealevel (e.g. --camera 55 10 30 0 30 0)
>  --filename  Filename for the captured image
>
> Example below yields the attached image called autocapture.jpg:
> ./osgautocapture --camera 55 10 30 0 30 0 --filename autocapture.jpg
> http://www.openscenegraph.org/data/earth_bayarea/earth.ive
>
> (Robert: thanks for making that database available;)
>
> _Problem_: The image is blurred because the the necessary level of detail
> has not been loaded when the image is captured (Ref: autocapture.jpg)
>
> If I force to program to render the 180 frames before capturing, I'll get at
> descent image (ref: autocapture_180_frames.jpg). However, this approach will
> either not give a good result or take more time and resources than
> necessary.
>
> What I would like to do is to query the DatabasePager to find out whether or
> not it needs load more tiles for the image to be rendered with the correct
> level of detail. However, I can't seem to find the correct method (or
> correct context for calling the method) for finding out when the
> DatabasePager is done loading all necessary tiles.
>
> Please, help. I'm quite stuck. The complete source code is attached to this
> email.
>
> Best regards,
> John
>
>
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] asymmetrical viewing volume

2008-10-28 Thread Robert Osfield
Hi Gianluca,

The default compute of near/far is something that you can disable via:

  
viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

But even if you don't call this a let the near far be recomputed it
won't affect the asymmetry of the projection matrix.  For instance the
osgwindow example runs with an asymmetric frustum and runs fine.  Also
when you enable stereo it'll be use asymmetric frustum.

Robert.

On Tue, Oct 28, 2008 at 2:22 PM, Gianluca Natale
<[EMAIL PROTECTED]> wrote:
> Hi all.
> I need to set a projection matrix for an asymmetrical
> viewing volume.
>
> Settings for the scene view associated with the camera
> are:
>
> osg::CullSettings::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES.
>
> I tried with camera.SetProjectionMatrixAsFrustum(…),
> but it resets left and right clipping planes to a symmetrical frustum,
> when I call camera.frame(…).
>
>
>
> Is it because the near and far clipping planes need to be updated
> during redraw?
>
>
>
> Is there a way to prevent this behavior, having only near and far
> clipping planes updated?
>
>
>
> Thanks
>
> Gianluca
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Test Paged database online

2008-10-28 Thread Lionel Lagarde

Curiously, the readsome function fail to read data (return value is 0),
but fin.eof() returns false.

I've tried to loop until some data are read but it does not work :

do {
   strm.avail_in = fin.readsome((char*)in, CHUNK);
while (strm.avail_in == 0 && !fin.eof());

It is an infinite loop.


The behavior is the same using a local file. Maybe my zlib doesn't work.



Lionel Lagarde wrote:

The ive plugin is built with zlib support.

There is a problem in the uncompress loop. The earth.ive size is 14976 
bytes.

In the loop, the first read:

strm.avail_in = fin.readsome((char*)in, CHUNK);

reports me 12427 bytes read and the second 0 bytes.

Continuing investigation.

John Vidar Larring wrote:

Hi Robert,

After compiling OSG svn trunk (linux 64bit), the following commands 
worked like charm:


> wget http://www.openscenegraph.org/data/earth_bayarea/bay.path
> osgviewer 
http://www.openscenegraph.org/data/earth_bayarea/earth.ive -p 
bay.path --file-cache MyFileCache


The second time I ran the viewer, it was obvious that the file cache 
was being used.


Great features!
/ John

Robert Osfield wrote:

Hi All,

Last night I uploaded a 547Mb paged database to openscenegraph.org.
The .ive files are all generated using zlib compression that is built
into the svn/trunk version of the OSG, you won't be able to load them
with any prior version of the OSG I'm afraid as the compression
support has just been introduced.  To view the database you can use:

  osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive


The database I generated with the svn/trunk version of
VirtualPlanetBuilder, using options to generate the compressed data,
to use non power of two textures for the highest res tiles, and
disabled mipmapping.   These options all work to minimize the tile
sizes which in turn means that the data is better suited for streaming
over http.

The data itself is composed of the Nasa blue marble 1km data, with
high res insert in the bay area of california.  You should be able to
find the Don Burn's local hang gliding hill that the osghangglide
example is based on, which in turn was the original inspiration for
the whole OpenSceneGraph odyssey.  To help find this little insert
I've uploaded an animation path:

http://www.openscenegraph.org/data/earth_bayarea/bay.path

Grab this then run osgviewer with the path:

osgviewer 
http://www.openscenegraph.org/data/earth_bayarea/earth.ive

-p bay.path

This will set up an AnimationPathManipulator that zooms you into the
high res insert, and then around the globe.  Pressing '4' will take
you to the TerrainManipulator so you can then start exploring
manually, pressing '5' will take you back to the animation path.

The next little thing your can try is to populate a local file cache,
so the next time you load up the data you can pick up on locally cache
files rather than hitting the server.

osgviewer 
http://www.openscenegraph.org/data/earth_bayarea/earth.ive

--file-cache MyFileCache

Or via an env var:

export OSG_FILE_CACHE = /home/me/Data/MyFileCache  # change to
setenv or set for your system...
osgviewer 
http://www.openscenegraph.org/data/earth_bayarea/earth.ive


Now this dataset is really a tiny one compared to what
VirtualPlanetBuilder is capable of building, one I routinely test
against is 20,000 times bigger, alas the data isn't public so you'll
just have to find your own data and build your databases for such a
Terrabyte database.  All the tools are there for you, you just need to
add the data.  In terms of runtime need to view the bigger datasets
there are no differences, osgviewer works for all of them equally.

Have fun.

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







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


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


Re: [osg-users] TrackballManipulator Question

2008-10-28 Thread Rob Radtke

Ok, will do.  Thank you very much for your advice!

Rob

--

Date: Tue, 28 Oct 2008 07:26:59 -0600
From: "Paul Martz" <[EMAIL PROTECTED]>
Subject: Re: [osg-users] TrackballManipulator Question
To: "'OpenSceneGraph Users'" 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;   charset="us-ascii"

Good point.

Rather than use a Manipulator, just use a regular event handler, and pass
your Camera to its constructor. Your event handler can modify the Camera as
necessary in response to events.
  -Paul



> 
> Thank you Paul.  That does help me out a lot.  I have one 
> follow-up question, however.  It is not clear to me how to 
> fashion a manipulator so that it automatically modifies the 
> projection matrix.  I noticed that osgViewer::Viewer will 
> automatically ask its camera manipulator for the model view 
> matrix when appropriate (via the
> osgGA::MatrixManipulator::get*Matrix() functions).  There 
> doesn't seem to be a similar API for those two classes to 
> pass information about the projection matrix, however.  Do 
> you have any advice as to how I should handle this?
> 
> Thank you so much!
> 
> Rob

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


[osg-users] Cloud particles

2008-10-28 Thread Roman Grigoriev
Hi guys!
I try to solve flightgear clouds sorting problem
Clouds consists of billboards position and lighting calculated in vertex and
fragment program
here is screenshot in attachment
Maybe gurus give us quick solution
Our blend equation and alpha func and shaders
_standardBlendFunc = new osg::BlendFunc;
_standardBlendFunc->setSource(osg::BlendFunc::SRC_ALPHA);

_standardBlendFunc->setDestination(osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
alphaFunc = new osg::AlphaFunc;
alphaFunc->setFunction(osg::AlphaFunc::GREATER,0.3f);
newst->setRenderBinDetails(9, "DepthSortedBin");

static char vertexShaderSource[] = 
"#version 120\n"
"\n"
"varying float fogFactor;\n"
"varying float alphaBlend;\n"
"attribute float textureIndexX;\n"
"attribute float textureIndexY;\n"
"attribute float wScale;\n"
"attribute float hScale;\n"
"attribute float shade;\n"
"void main(void)\n"
"{\n"
"//shade=1;\n"
"//wScale=1;\n"
"//hScale=1;\n"
"//textureIndexX=0;\n"
"//textureIndexY=0;\n"
"  gl_TexCoord[0] = gl_MultiTexCoord0+ vec4(textureIndexX,
textureIndexY, 0.0, 0.0);\n"
"  vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);\n"
"  vec4 l  = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);\n"
"  vec3 u = normalize(ep.xyz - l.xyz);\n"
// Find a rotation matrix that rotates 1,0,0 into u. u, r and w are
// the columns of that matrix.
"  vec3 absu = abs(u);\n"
"  vec3 r = normalize(vec3(-u.y, u.x, 0));\n"
"  vec3 w = cross(u, r);\n"
// Do the matrix multiplication by [ u r w pos]. Assume no
// scaling in the homogeneous component of pos.
"  gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n"
"  gl_Position.xyz = gl_Vertex.x * u * wScale;\n"
"  gl_Position.xyz += gl_Vertex.y * r * hScale;\n"
"  gl_Position.xyz += gl_Vertex.z * w;\n"
"  gl_Position.xyz += gl_Color.xyz;\n"
// Determine a lighting normal based on the sprites position from the
// center of the cloud. 
"  float n = dot(normalize(gl_LightSource[0].position.xyz),
normalize(mat3x3(gl_ModelViewMatrix) * gl_Position.xyz));\n"
// Determine the position - used for fog and shading calculations
"  vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);\n"
"  float fogCoord = abs(ecPosition.z);\n"
// Final position of the sprite
"  gl_Position = gl_ModelViewProjectionMatrix * gl_Position;\n"
// Limit the normal range from [0,1.0], and apply the shading (vertical
factor)
"  n = min(smoothstep(-0.5, 0.5, n), shade);\n"
// This lighting normal is then used to mix between almost pure ambient (0)
and diffuse (1.0) light
"  vec4 backlight = 0.8 * gl_LightSource[0].ambient + 0.2 *
gl_LightSource[0].diffuse;\n"
"  gl_FrontColor = mix(backlight, gl_LightSource[0].diffuse, n);\n"
"  gl_FrontColor += gl_FrontLightModelProduct.sceneColor;\n"
"  gl_FrontColor.a = smoothstep(10.0, 100.0, fogCoord);\n"
"  gl_BackColor = gl_FrontColor;\n"
// Fog doesn't affect clouds as much as other objects.
"  fogFactor = exp( -gl_Fog.density * fogCoord);\n"
"  fogFactor = clamp(fogFactor, 0.0, 1.0);\n"
// As we get within 100m of the sprite, it is faded out
"  alphaBlend = smoothstep(10.0, 100.0, fogCoord);\n"
"}\n";

static char fragmentShaderSource[] = 
"uniform sampler2D baseTexture; \n"
"varying float fogFactor;\n"
"varying float alphaBlend;\n"
"\n"
"void main(void)\n"
"{\n"
"  vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);\n"
"  vec4 finalColor = base * gl_Color;\n"
//"  finalColor.a = min(alphaBlend, finalColor.a);\n"
"  gl_FragColor = mix(gl_Fog.color, finalColor, fogFactor );\n"
" gl_FragColor=finalColor;\n"
"}\n";

Thanx in advance
Bye

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


[osg-users] asymmetrical viewing volume

2008-10-28 Thread Gianluca Natale
Hi all.
I need to set a projection matrix for an asymmetrical
viewing volume.

Settings for the scene view associated with the camera
are:

osg::CullSettings::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES.



I tried with camera.SetProjectionMatrixAsFrustum(.),
but it resets left and right clipping planes to a symmetrical frustum,
when I call camera.frame(.).

 

Is it because the near and far clipping planes need to be updated
during redraw?

 

Is there a way to prevent this behavior, having only near and far
clipping planes updated?

 

Thanks

Gianluca

 

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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Lionel Lagarde

The ive plugin is built with zlib support.

There is a problem in the uncompress loop. The earth.ive size is 14976 
bytes.

In the loop, the first read:

strm.avail_in = fin.readsome((char*)in, CHUNK);

reports me 12427 bytes read and the second 0 bytes.

Continuing investigation.

John Vidar Larring wrote:

Hi Robert,

After compiling OSG svn trunk (linux 64bit), the following commands 
worked like charm:


> wget http://www.openscenegraph.org/data/earth_bayarea/bay.path
> osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive 
-p bay.path --file-cache MyFileCache


The second time I ran the viewer, it was obvious that the file cache 
was being used.


Great features!
/ John

Robert Osfield wrote:

Hi All,

Last night I uploaded a 547Mb paged database to openscenegraph.org.
The .ive files are all generated using zlib compression that is built
into the svn/trunk version of the OSG, you won't be able to load them
with any prior version of the OSG I'm afraid as the compression
support has just been introduced.  To view the database you can use:

  osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive


The database I generated with the svn/trunk version of
VirtualPlanetBuilder, using options to generate the compressed data,
to use non power of two textures for the highest res tiles, and
disabled mipmapping.   These options all work to minimize the tile
sizes which in turn means that the data is better suited for streaming
over http.

The data itself is composed of the Nasa blue marble 1km data, with
high res insert in the bay area of california.  You should be able to
find the Don Burn's local hang gliding hill that the osghangglide
example is based on, which in turn was the original inspiration for
the whole OpenSceneGraph odyssey.  To help find this little insert
I've uploaded an animation path:

http://www.openscenegraph.org/data/earth_bayarea/bay.path

Grab this then run osgviewer with the path:

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
-p bay.path

This will set up an AnimationPathManipulator that zooms you into the
high res insert, and then around the globe.  Pressing '4' will take
you to the TerrainManipulator so you can then start exploring
manually, pressing '5' will take you back to the animation path.

The next little thing your can try is to populate a local file cache,
so the next time you load up the data you can pick up on locally cache
files rather than hitting the server.

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
--file-cache MyFileCache

Or via an env var:

export OSG_FILE_CACHE = /home/me/Data/MyFileCache  # change to
setenv or set for your system...
osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive

Now this dataset is really a tiny one compared to what
VirtualPlanetBuilder is capable of building, one I routinely test
against is 20,000 times bigger, alas the data isn't public so you'll
just have to find your own data and build your databases for such a
Terrabyte database.  All the tools are there for you, you just need to
add the data.  In terms of runtime need to view the bigger datasets
there are no differences, osgviewer works for all of them equally.

Have fun.

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







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


Re: [osg-users] Test Paged database online

2008-10-28 Thread John Vidar Larring

Hi Robert,

After compiling OSG svn trunk (linux 64bit), the following commands 
worked like charm:


> wget http://www.openscenegraph.org/data/earth_bayarea/bay.path
> osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive 
-p bay.path --file-cache MyFileCache


The second time I ran the viewer, it was obvious that the file cache was 
being used.


Great features!
/ John

Robert Osfield wrote:

Hi All,

Last night I uploaded a 547Mb paged database to openscenegraph.org.
The .ive files are all generated using zlib compression that is built
into the svn/trunk version of the OSG, you won't be able to load them
with any prior version of the OSG I'm afraid as the compression
support has just been introduced.  To view the database you can use:

  osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive


The database I generated with the svn/trunk version of
VirtualPlanetBuilder, using options to generate the compressed data,
to use non power of two textures for the highest res tiles, and
disabled mipmapping.   These options all work to minimize the tile
sizes which in turn means that the data is better suited for streaming
over http.

The data itself is composed of the Nasa blue marble 1km data, with
high res insert in the bay area of california.  You should be able to
find the Don Burn's local hang gliding hill that the osghangglide
example is based on, which in turn was the original inspiration for
the whole OpenSceneGraph odyssey.  To help find this little insert
I've uploaded an animation path:

http://www.openscenegraph.org/data/earth_bayarea/bay.path

Grab this then run osgviewer with the path:

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
-p bay.path

This will set up an AnimationPathManipulator that zooms you into the
high res insert, and then around the globe.  Pressing '4' will take
you to the TerrainManipulator so you can then start exploring
manually, pressing '5' will take you back to the animation path.

The next little thing your can try is to populate a local file cache,
so the next time you load up the data you can pick up on locally cache
files rather than hitting the server.

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
--file-cache MyFileCache

Or via an env var:

export OSG_FILE_CACHE = /home/me/Data/MyFileCache  # change to
setenv or set for your system...
osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive

Now this dataset is really a tiny one compared to what
VirtualPlanetBuilder is capable of building, one I routinely test
against is 20,000 times bigger, alas the data isn't public so you'll
just have to find your own data and build your databases for such a
Terrabyte database.  All the tools are there for you, you just need to
add the data.  In terms of runtime need to view the bigger datasets
there are no differences, osgviewer works for all of them equally.

Have fun.

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




--
Best regards,
John
WeatherOne


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Robert Osfield
Hi Lionel,

On Tue, Oct 28, 2008 at 1:50 PM, Lionel Lagarde <[EMAIL PROTECTED]> wrote:
> osgviewer reports me:
>
> DataInputStream::readCharArray(): Failed to read char value.
>
> Do I need to do something to enable the zlib decompression ?

You need to have zlib installed.  If it is installed perhaps Cmake
need to be pushed to re-evaluate the dependencies - try removing the
OpenSceneGraph/CMakeLists.txt and then rebuild.

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


Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.7.4 dev release

2008-10-28 Thread John Vidar Larring

Hi Robert,

Compiled without errors on CentOS 4.7 x86_64 with gcc 3.4.6

/John Vidar

Robert Osfield wrote:

Hi All,

On Mon, Oct 27, 2008 at 5:26 PM, Robert Osfield
<[EMAIL PROTECTED]> wrote:

There have been lots of bug and build fixes checked in since 2.7.3,
and feature refinements but as always this might come with their own
regressions, so please do a check out of svn/trunk and test the build
and execution of this baby :-)


I have one error report in of a build error under Windows/VisualStudio
8, relating to changes to OpenThreads (svn revision 9059):



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [osg-users] Test Paged database online

2008-10-28 Thread Lionel Lagarde

Hi Robert,

osgviewer reports me:

DataInputStream::readCharArray(): Failed to read char value.

Do I need to do something to enable the zlib decompression ?

Robert Osfield wrote:

Hi All,

Last night I uploaded a 547Mb paged database to openscenegraph.org.
The .ive files are all generated using zlib compression that is built
into the svn/trunk version of the OSG, you won't be able to load them
with any prior version of the OSG I'm afraid as the compression
support has just been introduced.  To view the database you can use:

  osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive


The database I generated with the svn/trunk version of
VirtualPlanetBuilder, using options to generate the compressed data,
to use non power of two textures for the highest res tiles, and
disabled mipmapping.   These options all work to minimize the tile
sizes which in turn means that the data is better suited for streaming
over http.

The data itself is composed of the Nasa blue marble 1km data, with
high res insert in the bay area of california.  You should be able to
find the Don Burn's local hang gliding hill that the osghangglide
example is based on, which in turn was the original inspiration for
the whole OpenSceneGraph odyssey.  To help find this little insert
I've uploaded an animation path:

http://www.openscenegraph.org/data/earth_bayarea/bay.path

Grab this then run osgviewer with the path:

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
-p bay.path

This will set up an AnimationPathManipulator that zooms you into the
high res insert, and then around the globe.  Pressing '4' will take
you to the TerrainManipulator so you can then start exploring
manually, pressing '5' will take you back to the animation path.

The next little thing your can try is to populate a local file cache,
so the next time you load up the data you can pick up on locally cache
files rather than hitting the server.

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
--file-cache MyFileCache

Or via an env var:

export OSG_FILE_CACHE = /home/me/Data/MyFileCache  # change to
setenv or set for your system...
osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive

Now this dataset is really a tiny one compared to what
VirtualPlanetBuilder is capable of building, one I routinely test
against is 20,000 times bigger, alas the data isn't public so you'll
just have to find your own data and build your databases for such a
Terrabyte database.  All the tools are there for you, you just need to
add the data.  In terms of runtime need to view the bigger datasets
there are no differences, osgviewer works for all of them equally.

Have fun.

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

  

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


Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.7.4 dev release

2008-10-28 Thread Cedric Pinson

Hi All,
Compiled fine on gentoo dual core intel linux 32 bits gcc 4.1.2

Cheers,
Cedric
Robert Osfield wrote:

Hi All,

On Mon, Oct 27, 2008 at 5:26 PM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
  

There have been lots of bug and build fixes checked in since 2.7.3,
and feature refinements but as always this might come with their own
regressions, so please do a check out of svn/trunk and test the build
and execution of this baby :-)



I have one error report in of a build error under Windows/VisualStudio
8, relating to changes to OpenThreads (svn revision 9059):

  

-- Build started: Project: OpenThreads, Configuration: Debug Win32 --


1>Compiling...
1>Atomic.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(944) : error C2733: second C linkage of
overloaded function '_interlockedbittestandset' not allowed
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(944) : see declaration of
'_interlockedbittestandset'
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(945) : error C2733: second C linkage of
overloaded function '_interlockedbittestandreset' not allowed
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(945) : see declaration of
'_interlockedbittestandreset'
1>Build log was saved at
"file://c:\bsi.ext\3rdparty\osg\OpenSceneGraph\src\OpenThreads\win32\OpenThreads.dir\Debug\BuildLog.htm"
1>OpenThreads - 2 error(s), 0 warning(s)
== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==

Save for reverting these changes I don't have an fix.  I'm not a
Windows developer so can't do anything to directly help.  Testing and
suggestions would be very much appreciated.

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


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


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


Re: [osg-users] TrackballManipulator Question

2008-10-28 Thread Paul Martz
Good point.

Rather than use a Manipulator, just use a regular event handler, and pass
your Camera to its constructor. Your event handler can modify the Camera as
necessary in response to events.
   -Paul


> 
> Thank you Paul.  That does help me out a lot.  I have one 
> follow-up question, however.  It is not clear to me how to 
> fashion a manipulator so that it automatically modifies the 
> projection matrix.  I noticed that osgViewer::Viewer will 
> automatically ask its camera manipulator for the model view 
> matrix when appropriate (via the
> osgGA::MatrixManipulator::get*Matrix() functions).  There 
> doesn't seem to be a similar API for those two classes to 
> pass information about the projection matrix, however.  Do 
> you have any advice as to how I should handle this?
> 
> Thank you so much!
> 
> Rob
> 
> 
> 
> *Paul Martz* pmartz at skew-matrix.com
>  5Bosg-users%5D%20TrackballManipulator%20Question&In-Reply-To=%
> 3C0EB1FC78DFF641B88B4D49BBD70D473E%40Supreme%3E>
> /Mon Oct 27 19:26:21 PDT 2008/
> 
> * Previous message: [osg-users] TrackballManipulator Question
>   <017960.html>
> * *Messages sorted by:* [ date ]  [ thread ]
>[ subject ]  [ author ]
>   
> 
> --
> --
> 
> The TrackballManipulator does not support a zoom function. 
> Rather, the right mouse button pans the Camera along the view 
> direction vector. This is a different effect from zoom, which 
> is a change to the field of view without changing the Camera 
> position. With an orthographic Projection matrix, moving the 
> Camera along the view direction vector obviously has no 
> visual effect; the Camera does not have a distance in an 
> orthographic Projection.
> 
> So the short answer is that the TrackballManipulator doesn't 
> support the zoom function that you require.
> 
> Your options? Create a new Manipulator that supports zoom by 
> changing the field of view. To do this correctly, you need to 
> support both changing the field of view in a perspective 
> Projection matrix, as well as changing the 
> left/right/bottom/top values for an orthographic Projection.
> 
> Hope that helps,
>-Paul
> 
> 
> 
> Rob Radtke wrote:
> > Hello Everyone,
> > I'm trying to use a TrackballManipulator in conjunction with an 
> > orthographic camera (i.e., I'm using 
> > osg::Camera::setProjectionMatrixAsOrtho()).  The problem is 
> that model 
> > scaling (with right mouse button) does not work.  This is because 
> > TrackballManipulator achieves a scaling effect by changing the 
> > distance between the camera and the model.  Unfortunately, this 
> > doesn't have the desired effect when using an orthographic camera.
> > The model does not change size at all in the display window.  Then, 
> > when I zoom far enough, I start to see parts disappear due 
> to clipping 
> > issues.
> >
> > Is there a way for me to use TrackballManipulator (with an ortho
> > camera) more effectively such that I don't see this 
> behavior?  If not, 
> > is there another built-in manipulator that would work better for my 
> > purposes?  If not, what are your other recommendations?
> >
> > Thank you very much!
> > Rob
> >
> > PS - I'm using OSG v 2.2 but, from a code inspection, (I 
> think) I've 
> > determined that the behavior is the same in version 2.6.
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
> 

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


Re: [osg-users] AutoTransform and small feature culling

2008-10-28 Thread Robert Osfield
On Tue, Oct 28, 2008 at 1:14 PM, Peter Wraae Marino <[EMAIL PROTECTED]> wrote:
> To our application we don't need our AutoTransform objects to be small
> feature culled, so we
> would like to ask is there a reason why there isn't a flag on all nodes to
> enabled/disable small
> feature culling?

Because it takes time to implement it, and so far no one has found a
compelling reason to implement it...

There is a memory overhead and CPU cost in implementing such a feature
as well, it wouldn't be free so I'd be hesitant to check in such a
feature.

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


[osg-users] AutoTransform and small feature culling

2008-10-28 Thread Peter Wraae Marino
Hi,

We have searched the archive and already found a post about this subject:
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg15948.html

First our build setup:
OS: Windows (sorry robert)
OSG: osg2.6.0
DELTA3D: 2.1.0

Ok,.. our problem is that AutoTransform nodes get culled and disabling small
feature
culling fixes it.

We do see the paradox here,.. because AutoTransform uses the CullVisitor and
this
does not get called because at startup the AutoTransform node
bounding(sphere) is too small.

To our application we don't need our AutoTransform objects to be small
feature culled, so we
would like to ask is there a reason why there isn't a flag on all nodes to
enabled/disable small
feature culling?

-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Sharing PrimitiveSets between Geometrys

2008-10-28 Thread Robert Osfield
Hi Brian,

On Tue, Oct 28, 2008 at 12:55 PM, Brian R Hill <[EMAIL PROTECTED]> wrote:
> It does work when adding them during runtime, but the .ive/.osg
> reader/writer don't support sharing them. They always write out full
> definitions and expect to read in full definitions. For my current use
> (creating sequences from osgCal/cal3d models) the prim overhead isn't too
> bad, at least not yet. I'll come back to the .ive/.osg plugins after I
> finish what I'm currently doing.

Sharing of vertex arrays and primitives set will need to be added to
.ive to enable you to do this, it shouldn't be too hard to do.

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


Re: [osg-users] Sharing PrimitiveSets between Geometrys

2008-10-28 Thread Brian R Hill
Robert,

It does work when adding them during runtime, but the .ive/.osg
reader/writer don't support sharing them. They always write out full
definitions and expect to read in full definitions. For my current use
(creating sequences from osgCal/cal3d models) the prim overhead isn't too
bad, at least not yet. I'll come back to the .ive/.osg plugins after I
finish what I'm currently doing.

Brian

[EMAIL PROTECTED] wrote: -

To: "OpenSceneGraph Users" 
From: "Robert Osfield" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
Date: 10/28/2008 05:12AM
Subject: Re: [osg-users] Sharing PrimitiveSets between Geometrys

HI Brian,

On Mon, Oct 27, 2008 at 7:25 PM, Brian R Hill <[EMAIL PROTECTED]> wrote:
> Can primitivesets be shared between geometrys similarly to vertexes,
> colors, and texcoords?

I have never tried this, but it should work just fine.

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


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


Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.7.4 dev release

2008-10-28 Thread Wang Rui
Hi Robert,

The newest SVN version works for my VisualStudio 9. Maybe this is a bug of
VS8. :)

Wang Rui
2008/10/28 Robert Osfield <[EMAIL PROTECTED]>

> Hi All,
>
> On Mon, Oct 27, 2008 at 5:26 PM, Robert Osfield
> <[EMAIL PROTECTED]> wrote:
> > There have been lots of bug and build fixes checked in since 2.7.3,
> > and feature refinements but as always this might come with their own
> > regressions, so please do a check out of svn/trunk and test the build
> > and execution of this baby :-)
>
> I have one error report in of a build error under Windows/VisualStudio
> 8, relating to changes to OpenThreads (svn revision 9059):
>
> >-- Build started: Project: OpenThreads, Configuration: Debug Win32
> --
> 1>Compiling...
> 1>Atomic.cpp
> 1>C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\include\intrin.h(944) : error C2733: second C linkage of
> overloaded function '_interlockedbittestandset' not allowed
> 1>C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\include\intrin.h(944) : see declaration of
> '_interlockedbittestandset'
> 1>C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\include\intrin.h(945) : error C2733: second C linkage of
> overloaded function '_interlockedbittestandreset' not allowed
> 1>C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\include\intrin.h(945) : see declaration of
> '_interlockedbittestandreset'
> 1>Build log was saved at
>
> "file://c:\bsi.ext\3rdparty\osg\OpenSceneGraph\src\OpenThreads\win32\OpenThreads.dir\Debug\BuildLog.htm"
> 1>OpenThreads - 2 error(s), 0 warning(s)
> == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==
>
> Save for reverting these changes I don't have an fix.  I'm not a
> Windows developer so can't do anything to directly help.  Testing and
> suggestions would be very much appreciated.
>
> Robert.
>  ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Test Paged database online

2008-10-28 Thread Robert Osfield
Hi All,

Last night I uploaded a 547Mb paged database to openscenegraph.org.
The .ive files are all generated using zlib compression that is built
into the svn/trunk version of the OSG, you won't be able to load them
with any prior version of the OSG I'm afraid as the compression
support has just been introduced.  To view the database you can use:

  osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive


The database I generated with the svn/trunk version of
VirtualPlanetBuilder, using options to generate the compressed data,
to use non power of two textures for the highest res tiles, and
disabled mipmapping.   These options all work to minimize the tile
sizes which in turn means that the data is better suited for streaming
over http.

The data itself is composed of the Nasa blue marble 1km data, with
high res insert in the bay area of california.  You should be able to
find the Don Burn's local hang gliding hill that the osghangglide
example is based on, which in turn was the original inspiration for
the whole OpenSceneGraph odyssey.  To help find this little insert
I've uploaded an animation path:

http://www.openscenegraph.org/data/earth_bayarea/bay.path

Grab this then run osgviewer with the path:

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
-p bay.path

This will set up an AnimationPathManipulator that zooms you into the
high res insert, and then around the globe.  Pressing '4' will take
you to the TerrainManipulator so you can then start exploring
manually, pressing '5' will take you back to the animation path.

The next little thing your can try is to populate a local file cache,
so the next time you load up the data you can pick up on locally cache
files rather than hitting the server.

osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive
--file-cache MyFileCache

Or via an env var:

export OSG_FILE_CACHE = /home/me/Data/MyFileCache  # change to
setenv or set for your system...
osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive

Now this dataset is really a tiny one compared to what
VirtualPlanetBuilder is capable of building, one I routinely test
against is 20,000 times bigger, alas the data isn't public so you'll
just have to find your own data and build your databases for such a
Terrabyte database.  All the tools are there for you, you just need to
add the data.  In terms of runtime need to view the bigger datasets
there are no differences, osgviewer works for all of them equally.

Have fun.

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


Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.7.4 dev release

2008-10-28 Thread Robert Osfield
Hi All,

On Mon, Oct 27, 2008 at 5:26 PM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
> There have been lots of bug and build fixes checked in since 2.7.3,
> and feature refinements but as always this might come with their own
> regressions, so please do a check out of svn/trunk and test the build
> and execution of this baby :-)

I have one error report in of a build error under Windows/VisualStudio
8, relating to changes to OpenThreads (svn revision 9059):

>-- Build started: Project: OpenThreads, Configuration: Debug Win32 --
1>Compiling...
1>Atomic.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(944) : error C2733: second C linkage of
overloaded function '_interlockedbittestandset' not allowed
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(944) : see declaration of
'_interlockedbittestandset'
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(945) : error C2733: second C linkage of
overloaded function '_interlockedbittestandreset' not allowed
1>C:\Program Files (x86)\Microsoft Visual Studio
8\VC\include\intrin.h(945) : see declaration of
'_interlockedbittestandreset'
1>Build log was saved at
"file://c:\bsi.ext\3rdparty\osg\OpenSceneGraph\src\OpenThreads\win32\OpenThreads.dir\Debug\BuildLog.htm"
1>OpenThreads - 2 error(s), 0 warning(s)
== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==

Save for reverting these changes I don't have an fix.  I'm not a
Windows developer so can't do anything to directly help.  Testing and
suggestions would be very much appreciated.

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


Re: [osg-users] Call for feedback : AC3D loader behavior w.r.t texture repeat and clamping

2008-10-28 Thread Robert Osfield
Hi ?? Could you please sign with the name you'd like to be addressed.

Also if you want to report a problem the place is not to hang it off a
complete unrelated thread. Please send the post with a relevant
subject line so it gets thread properly by mail tools and is easy to
follow.  If you want me to answer your question can your report
properly.

Robert.

On Tue, Oct 28, 2008 at 9:48 AM, mjingting <[EMAIL PROTECTED]> wrote:
>  hi Robert:
>when I use osg::ImageSequence with option PAGE_AND_DISCARD_USED_IMAGES,
> the program will crash; I found in OSG 2.7.3 ImageSequence.cpp at line 387,
> if ((i>=_images.size() || !_images[i]) &&
> _filesRequested.count(_fileNames[i])==0),
> the variable _fileNames is empty, I don't know why? could you help me?
>
> thanks!
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Call for feedback : AC3D loader behavior w.r.t texture repeat and clamping

2008-10-28 Thread mjingting
 hi Robert:
   when I use osg::ImageSequence with option PAGE_AND_DISCARD_USED_IMAGES, the 
program will crash; I found in OSG 2.7.3 ImageSequence.cpp at line 387, if 
((i>=_images.size() || !_images[i]) && _filesRequested.count(_fileNames[i])==0),
the variable _fileNames is empty, I don't know why? could you help me?

thanks!

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


Re: [osg-users] Call for feedback : AC3D loader behavior w.r.t texture repeat and clamping

2008-10-28 Thread Robert Osfield
On Mon, Oct 27, 2008 at 9:51 PM, Csaba Halász <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 27, 2008 at 10:42 PM, John Cummings <[EMAIL PROTECTED]> wrote:
>> FYI, here is the link to the discussion on the Ac3D forum:
>>
>> http://www.inivis.com/forum/showthread.php?t=5090
>>
>> It seems to be headed in the same direction as Robert's comments regarding
>> keeping track of the UV ranges.
>
> Which, unfortunately, would still break our app (flightgear), as we
> have default texture coordinates within the 0,1 range, but later we
> change those dynamically and assume texture repeat. Of course we could
>  work around that ourselves if absolutely necessary.

"assume" in the above paragraph is something that could probably be
fixed quite easily with a small tweak in flight gear, and regardless
of the solution will settle for in the .ac case I'd suggest this is
something that should be done as our model sources might not follow
the current convention that AC3D follows.

On the OSG side I think the post process NodeVisitor that detects and
applies the appropriate wrap mode should be optional, or something
that is done purely as a post process entirely separate from the .ac
plugin.

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


Re: [osg-users] Call for feedback : AC3D loader behavior w.r.t texture repeat and clamping

2008-10-28 Thread Robert Osfield
On Mon, Oct 27, 2008 at 9:42 PM, John Cummings <[EMAIL PROTECTED]> wrote:
> FYI, here is the link to the discussion on the Ac3D forum:
>
> http://www.inivis.com/forum/showthread.php?t=5090
>
> It seems to be headed in the same direction as Robert's comments regarding
> keeping track of the UV ranges.

It's a bit of cop out really, what should be done in AC3D and the .ac
format is that wrap modes are something that is managed explicitly,
rather than apply post processing workarounds.

This situation is something we have to live with though.  I think the
right workaround is to have the ac plugin honour the ac3d format and
leave repeat in place, then have a custom NodeVisitor that traverses
the loaded scene graph and detects the tex coord range and changes the
wrap mode accordingly.   The only question I think would be whether
this NodeVisitor would be run from inside the ac plugin as an option,
or just a post process run by users.

The NodeVisitor to do the detect and wrap change is a general purpose
tool that should go in osgUtil.  Do we have any volunteers for writing
it?

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


Re: [osg-users] updateCalculatedNearFar problem

2008-10-28 Thread Robert Osfield
Hi Forest,

Do you expect people to really follow this? Just throw the code out
there and expect people to know what effect your are trying to do?
Please remember that everyone will be busy with their own work and
just scan emails.  You need to convey what you are trying to do in a
digestable form otherwise people will just ignore it.

The best I can do is say that use of Projection node has long been
deprecated, it just kept around for backwards compatibility.  Use an
in scene graph osg::Camera when you want to over the projection and
view matrix.

Robert.

2008/10/28 forest37 <[EMAIL PROTECTED]>:
>
>  hi all,
> It seems that there is a problem with
> CullVisitor::updateCalculatedNearFar,I have the code like this:
>
> osgViewer::Viewer viewer;
>
> class MCallBack : public osg::NodeCallback
> {
> public:
>  virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
>  {
>  osg::PositionAttitudeTransform *pat =
> dynamic_cast(node);
>  if( pat != NULL )
>  {
>  osg::Camera *camera=viewer.getCamera();
>  osg::Matrixd pMatrix = camera->getViewMatrix();
>  pat ->setAttitude(pMatrix.getRotate());
>  }
>   }
> };
>
> osg::Node* fun()
> {
>  osg::Geode* geode=new osg::Geode;
>  geode->addDrawable(new osg::ShapeDrawable(new
> osg::Sphere(osg::Vec3(0,0,0),0.1)));
>
>  osg::MatrixTransform *mt=new osg::MatrixTransform ;
>  Matrix matrix;
>  matrix.setTrans(osg::Vec3(1,0,0));
>  mt->setMatrix(matrix);
>  mt->addChild(geode);
>
>  osg::PositionAttitudeTransform * tran = new osg::PositionAttitudeTransform;
>  tran->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
>  tran->setPosition(osg::Vec3(5,5,0));
>  tran->addChild(mt);
>  tran->setUpdateCallback(new MCallBack());
>
>  osg::Projection* ProjectionMatrix = new osg::Projection;
>  ProjectionMatrix->setMatrix(osg::Matrix::ortho2D(0,10,0,10));
>  ProjectionMatrix->addChild(tran);
>
>  return ProjectionMatrix;
> }
> int _tmain(int argc, _TCHAR* argv[])
> {
>  osg::Node* mRoot  =fun();
>  viewer.setSceneData(mRoot);
>  return viewer.run();
> }
>
>   when i rotate the scene,the scene is culled not exactly.
>   Is there a bug with osg or something wrong with my code?
>
>thanks for any advice.
>
>   best regards
>
> forest
>
> 
> [广告] 金秋最关注楼盘-房不胜房
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] QT4 ViewerQOSG and Q_OBJECT

2008-10-28 Thread Robert Osfield
Hi Martin,

Could you post complete modified file as this will explain the changes
without any chance of ambiguity.

Thanks,
Robert.

On Mon, Oct 27, 2008 at 8:10 PM,  <[EMAIL PROTECTED]> wrote:
> Not a question so much as a note for the archives.
>
> If you want ViewerQOSG to be able to handle signals it must have a Q_OBJECT 
> definition.
> In order to do this the viewerQT example must swap the order of the definition
> to "class ViewerQOSG : public QOSGWidget, public osgViewer::Viewer"
> The QT moc assumes that the parent class derived from QObject is first in the 
> list.
>
> In addition QOSGWidget must not have a Q_OBJECT since you cannot inherit from 
> multiple Q_OBJECT defined classes.
>
> Martin
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] What can I do with the NodeKit osgSim?

2008-10-28 Thread Robert Osfield
On Mon, Oct 27, 2008 at 7:32 PM, Paul Martz <[EMAIL PROTECTED]> wrote:
> It contains support classes to enable OpenFlight model loading and working
> with terrain databases.

That's just one of the items that osgSim provides...

The NodeKit is just a collection of classes that help in the
development of vis-sim apps.  The functionality is rather broad - from
light points to overlays to OpenFlight helper classes.  If the
functionality is useful to you use it.

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


Re: [osg-users] Sharing PrimitiveSets between Geometrys

2008-10-28 Thread Robert Osfield
HI Brian,

On Mon, Oct 27, 2008 at 7:25 PM, Brian R Hill <[EMAIL PROTECTED]> wrote:
> Can primitivesets be shared between geometrys similarly to vertexes,
> colors, and texcoords?

I have never tried this, but it should work just fine.

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