[osg-users] Consistent lighting across different cameras

2009-07-05 Thread Julian Looser

Hi,

I am using OSG in a multi-wall stereo rendering environment. We have 
three walls, and we render both a left and right eye view for each wall. 
To do this, in my application I create six osg::Cameras and update their 
projection and view matrices each frame based on head-tracking. I add 
the same subgraph under each camera, and I get a seamless 3D scene 
across the three walls. So far so good.


My problem is with lighting. Although the 3D geometry is rendered in the 
right place, it isn't lit correctly. For example, sometimes the left 
view might be much brighter than the center view, which in turn is 
brighter than the right view. This has me confused because all six 
cameras are rendering the exact same scene, and the light is part of the 
scene (rather than a head-light of the viewer for example).


My scene graph is set up basically like this (just showing three rather 
than six cameras). The cameras all share the same child subgraph, and 
just render to viewports next to each other across a window.


root
-- camera (mv & proj for left wall)
 --- model
 --- lightsource
-- camera (mv & proj for center wall)
 --- model
 --- lightsource
-- camera (mv & proj for right wall)
 --- model
 --- lightsource

I've attached a picture of the effect I'm getting. What I expected would 
be that the object (just a long red box) would be smoothly lit along its 
length. However, when it spans across my three views, you can see it's 
darker or lighter in each view, suggesting that the lightsource isn't in 
the same place within each rendering.


Am I putting my lightsource in the wrong place in the scene graph? I 
thought it should be a sibling to what you want lit? Even though the 
projection and view matrices are different for each camera, the lighting 
should be consistent, right?


I'm using a composite viewer, and each view I create I've set the 
lighting mode to NO_LIGHT, so I don't think it's a default light causing 
any trouble. The only light should be the one in my scene.


If you have any ideas why this is happening I would really appreciate 
hearing them! :-)

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


Re: [osg-users] VPB

2009-07-05 Thread Chris 'Xenon' Hanson
Michael W. Hall wrote:
> Just got the latest SVN of OSG to compile on VS2005.  I am now trying to
> get VPB to build.  Was wondering if some one could point me to some
> help.  I have tried CMAKE and when I build it I see no executable.

  I've built it in the last week or so without problems. Can you outline your 
steps?

  I think I'm the most recent contributor to VPB's codebase, so if it's broken, 
I broke it. ;)

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] VPB

2009-07-05 Thread Michael W. Hall
Just got the latest SVN of OSG to compile on VS2005.  I am now trying to
get VPB to build.  Was wondering if some one could point me to some
help.  I have tried CMAKE and when I build it I see no executable.

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


[osg-users] Database Pager (TXP?) Problem

2009-07-05 Thread phishja...@yahoo.com
I am running a program with a composite viewer which contains one viewer for 
pure openGL rendering and multiple other views for scene rendering.  The scene 
consists of any number of loaded 3d models and a TerraPage database.  The code 
is set up as follows (I have copy/pasted and inserted pseudo code as the 
program is not compact enough to fully include.  If any omitted parts are 
important, let me know and I'll post them!):

this->_view = new osgViewer::Viewer;
this->_view->setName("_view");
this->_view->setSceneData(this->_sceneGroup.get());

this->_compositeViewer = new osgViewer::CompositeViewer;
this->_compositeViewer->setName("_compositeViewer");
this->_compositeViewer->addView(this->_view);

// Set up Traits ...


// Set up Graphics Context...


// Set up Display Settings


this->_view->setThreadingModel(osgViewer::Viewer::SingleThreaded);
this->_view->setUpThreading(); 
this->_view->startThreading();

this->_compositeViewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);
this->_compositeViewer->realize();

this->_view->getCamera()->setInitialDrawCallback(new 
CameraInitialDrawCallback(this));
this->_view->getCamera()->setFinalDrawCallback(new 
CameraFinalDrawCallback(this));
this->_compositeViewer->setUpThreading();
this->_compositeViewer->startThreading();

while(...)
{

this->_compositeViewer->frame();
}


Other views are added via:

void ...addViewer(osgViewer::Viewer* x)
{
const unsigned int viewSize = this->_compositeViewer->getNumViews();

for(unsigned int i = 0; i < viewSize; i++)
{
if(this->_compositeViewer->getView(i) == x)
{
return;
}
}

x->setThreadingModel(osgViewer::Viewer::SingleThreaded);
x->addEventHandler(this->_eventHandler);
x->setKeyEventSetsDone(24);
x->setUpThreading();
x->startThreading();

this->_compositeViewer->addView(x);
}

These other views have a database pager attached to them:

this->_scene = this->_viewer->getScene();

if(this->_scene->getDatabasePager() == NULL)
{
this->_scene->setDatabasePager(new osgDB::DatabasePager);
this->_scene->getDatabasePager()->setTargetFrameRate(60.0f);
this->_scene->getDatabasePager()->registerPagedLODs(this->getSceneManager()->getTerrainDatabase());
}

Just a few frames into the applicaiton, it can crash.  It appears as though all 
threads continue to run except for the database pager.  I get the following 
stack trace with the current version on SVN:

>osg60-osg.dll!osg::BoundingBoxImpl::expandBy(const osg::Vec3f & 
>v={...})  Line 152C++
 osg60-osg.dll!ComputeBound::drawArrays(unsigned int __formal=5, int first=354, 
int count=1197852551)  Line 706 + 0x2f bytesC++
 osg60-osg.dll!osg::DrawArrayLengths::accept(osg::PrimitiveFunctor & 
functor={...})  Line 92C++
 osg60-osg.dll!osg::Geometry::accept(osg::PrimitiveFunctor & functor={...})  
Line 2241 + 0x29 bytesC++
 osg60-osg.dll!osg::Drawable::computeBound()  Line 781C++
 osg60-osg.dll!osg::Drawable::getBound()  Line 203 + 0xe bytesC++
 osg60-osg.dll!osg::Geode::computeBound()  Line 192 + 0x1e bytesC++
 osg60-osg.dll!osg::Node::getBound()  Line 334 + 0xe bytesC++
 osg60-osg.dll!osg::Group::computeBound()  Line 357 + 0x16 bytesC++
 osg60-osg.dll!osg::Node::getBound()  Line 334 + 0xe bytesC++
 osg60-osg.dll!osg::Group::computeBound()  Line 357 + 0x16 bytesC++
 osg60-osg.dll!osg::Node::getBound()  Line 334 + 0xe bytesC++
 osg60-osg.dll!osg::Group::computeBound()  Line 357 + 0x16 bytesC++
 osgdb_txp.dll!txp::TXPPagedLOD::computeBound()  Line 121C++
 osg60-osg.dll!osg::Node::getBound()  Line 334 + 0xe bytesC++
 osg60-osg.dll!osg::Group::computeBound()  Line 357 + 0x16 bytesC++
 osg60-osg.dll!osg::Node::getBound()  Line 334 + 0xe bytesC++
 osg60-osgDB.dll!osgDB::DatabasePager::DatabaseThread::run()  Line 607C++
 ot11-OpenThreads.dll!OpenThreads::ThreadPrivateActions::StartThread(void * 
data=0x037c9d5c)  Line 65535C++
 msvcr90.dll!_callthreadstartex()  Line 348 + 0x6 bytesC
 msvcr90.dll!_threadstartex(void * ptd=0x06aae2e8)  Line 326 + 0x5 bytesC
 kernel32.dll!7c80b729() 
 [Frames below may be incorrect and/or missing, no symbols loaded for 
kernel32.dll]

I am not an OSG expert by any means, but have been trying to fix this for over 
a week and just don't have any insight into what might cause this.  Any help 
would be appreciated!

- John


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


Re: [osg-users] OSG Wiki editing

2009-07-05 Thread declic creation
Hi Adrian,

Account have to be approuved by Jose Luis Hidalgo, because of spam .
Just send him a mail and he will add you to the trusted user group.

Regards.
--
Christophe Loustaunau

Déclic Création
http://www.declic-creation.com/


On Sun, Jul 5, 2009 at 12:47 PM, Adrian Egli OpenSceneGraph (3D) <
3dh...@gmail.com> wrote:

>
>- logged in as 3dhelp
>- Logout 
>- Help/Guide
>- About Trac 
>- Preferences 
>
>
> Hi all ,
>
> can not change the wiki page, i like to do some some changes in my profil.
>
> i also used osg / 05G
>
> but doesn't help any more.
>
> regards adrian
>
>
> --
> 
> Adrian Egli
>
> ___
> 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] OSG Wiki editing

2009-07-05 Thread Adrian Egli OpenSceneGraph (3D)
   - logged in as 3dhelp
   - Logout 
   - Help/Guide 
   - About Trac 
   - Preferences 


Hi all ,

can not change the wiki page, i like to do some some changes in my profil.

i also used osg / 05G

but doesn't help any more.

regards adrian


-- 

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