[osg-users] Build Error Windows : Application osgViewer

2009-07-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert, Hi all

there is a build error in the osgviewer.cpp because of the ifdef win stuff

missing includes, i guess there is a experimental stuff in the SVN or ?

adrian

-- 

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


[osg-users] Server Backup

2009-07-06 Thread Jose Luis Hidalgo
Hi all,

   I'm going to stop the server (www, subversion, trac...) to perform
a full backup. And as Robert is on holidays this week I will try to
move the current virtual machine to another server, so don't panic if
the server is down. I'll keep the list informed, if anybody depends on
the server write me to hold the operation.

Cheers,
   JL.


-- 
  Jose L. Hidalgo Valiño (PpluX)
   http://www.pplux.com 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Simon Hammett
Just a quick guess, but are you putting rotation into your left 
right projection matrices?
If so that's what's mucking up your lighting:

http://sjbaker.org/steve/omniv/projection_abuse.html

2009/7/6 Julian Looser li...@roarmot.co.nz:
 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





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


Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Ulrich Hertlein

Hi Julian,

On 6/7/09 6:28 AM, Julian Looser wrote:

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

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?


(The model and lightsource are a shared graph, right?)

You can place the osg::LightSource anywhere you like in the scene graph, OSG has no 
concept of limiting light to a certain sub-graph.


With regards to the different lighting, how is your model tessellated?  If it's coarsely 
tessellated and/or you're using face normals then the lighting calculation might only be 
done on the corner vertices and interpolated from there.


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


Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Julian Looser

Hi Simon,

Thanks for the promising link, but I don't think I'm misusing the 
projection matrix. I calculate the left, right, top and bottom values 
and set the projection matrix via osg::Camera's 
setProjectionMatrixAsFrustum. The view matrix is set with 
setViewMatrixAsLookAt using the head-tracked position and the direction 
towards the screen. I'm pretty sure this is the correct way to set up 
head-tracked stereo. The 3D effect works, just the lighting is wrong. :-(


Cheers,
Julian.

Simon Hammett wrote:

Just a quick guess, but are you putting rotation into your left 
right projection matrices?
If so that's what's mucking up your lighting:

http://sjbaker.org/steve/omniv/projection_abuse.html

2009/7/6 Julian Looser li...@roarmot.co.nz:
  

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







  


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


Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Paul Melis

Julian Looser wrote:

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).
Can you give more detail on the sometimes? Does that mean that the 
lighting varies over different runs of your software, or that the 
lighting is incosistent during a single run for some head positions? If 
the latter, it sounds like the head transformation isn't applied 
consistently to the light position. And is there some position for which 
the lighting does seem to be correct?


Bye,
Paul

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


Re: [osg-users] osg-users Digest, Vol 25, Issue 7

2009-07-06 Thread McGlone, James C.
D

- Original Message -
From: osg-users-boun...@lists.openscenegraph.org 
osg-users-boun...@lists.openscenegraph.org
To: osg-users@lists.openscenegraph.org osg-users@lists.openscenegraph.org
Sent: Sat Jul 04 15:03:11 2009
Subject: osg-users Digest, Vol 25, Issue 7

Send osg-users mailing list submissions to
osg-users@lists.openscenegraph.org

To subscribe or unsubscribe via the World Wide Web, visit

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

or, via email, send a message with subject or body 'help' to
osg-users-requ...@lists.openscenegraph.org

You can reach the person managing the list at
osg-users-ow...@lists.openscenegraph.org

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


Today's Topics:

   1. Re: Background image (Jason Coposky)
   2. Re: osgManipulator refactored (Robert Osfield)
   3. osgVolume now supports use of osgManipulator draggers
  (Robert Osfield)
   4. Off on a weeks holiday! (Robert Osfield)
   5. Re: Off on a weeks holiday! (Cyril Brulebois)
   6. Re: Off on a weeks holiday! (Maxim Gammer)
   7. Re: Off on a weeks holiday! (FlySky)
   8. Re: rendering many instances of big Geometries (Simon Loic)
   9. Re: Off on a weeks holiday! (Simon Loic)


--

Message: 1
Date: Fri, 3 Jul 2009 12:05:34 -0700 (PDT)
From: Jason Coposky jason.copo...@yahoo.com
Subject: Re: [osg-users] Background image
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Message-ID: 489606.21987...@web110307.mail.gq1.yahoo.com
Content-Type: text/plain; charset=us-ascii

turn off depth testing something like this:

camera_-setViewport( 0, 0, image_-s(), image_-t() );
camera_-setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT );

// *** this is also pretty key ** 
camera_-setRenderOrder( osg::Camera::PRE_RENDER, 1 );

camera_-attach( osg::Camera::COLOR_BUFFER, texture_.get() );

camera_-setClearMask( GL_COLOR_BUFFER_BIT ); // do not want to clear bg image
camera_-setReferenceFrame( osg::Transform::ABSOLUTE_RF );
camera_-setViewMatrix( osg::Matrix::identity() );

// *** make sure depth is off ***
camera_-getOrCreateStateSet()-setMode( GL_DEPTH_TEST, 
osg::StateAttribute::OFF );





From: Carlos Sanches ces...@gmail.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Friday, July 3, 2009 2:22:27 PM
Subject: Re: [osg-users] Background image

no, I m using hud   but my 3d objects are behind the hud.
I want  my 3d objets in front of hud .



  
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090703/a168a1b2/attachment.html

--

Message: 2
Date: Fri, 3 Jul 2009 20:14:45 +0100
From: Robert Osfield robert.osfi...@gmail.com
Subject: Re: [osg-users] osgManipulator refactored
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Message-ID:
7ffb8e9b0907031214h6bf9d891q65048ff5b0ca...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

Hi Guys,

I've just checked in the addition of the following methods to Dragger
that enable one to control when the draggers can be activated by
clicking on them :

void setActivationModKeyMask(unsigned int mask) {
_activationModKeyMask = mask; }
unsigned int getActivationModKeyMask() const { return
_activationModKeyMask; }

void setActivationKeyEvent(int key) { _activationKeyEvent = key; }
int getActivationKeyEvent() const { return _activationKeyEvent; }

Usage looks like (from the new rev of the osgmanipulator example):

// if we don't set an activation key or mod mask then any mouse click on
// the dragger will activate it, however if do define either of
ActivationModKeyMask or
// and ActivationKeyEvent then you'll have to press either than
mod key or the specified key to
// be able to activate the dragger when you mouse click on it.
Please note the follow allows
// activation if either the ctrl key or the 'a' key is pressed and
held down.
dragger-setActivationModKeyMask(osgGA::GUIEventAdapter::MODKEY_CTRL);
dragger-setActivationKeyEvent('a');

I've added these extra controls so that we can have manipulators on
screen at the same time as being able to have the standard camera
manipulators active (i.e. the camera trackball).  Previously the
example had an event handle change modes via presses to the tab key,
but this was rather awkward to use.  One can still implement this
approach if you wish just by toggling the
Dragger::setHandleEvents(bool) for you own event handler.

Robert.


--

Message: 3
Date: Fri, 3 Jul 2009 20:31:53 +0100
From: Robert Osfield robert.osfi...@gmail.com
Subject: [osg-users] osgVolume now supports use of osgManipulator
draggers
To: 

[osg-users] Control of animated object

2009-07-06 Thread Carlos Sanches
Hi all !
I have a animated object and I need that the animation stops in the last
frame, not to be in loop.
How do you sugest that I do this ?

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


Re: [osg-users] Control of animated object

2009-07-06 Thread Cedric Pinson
Hi,
What do you use to animate your objects ?

Cheers,
Cedric

On Mon, 2009-07-06 at 08:51 -0300, Carlos Sanches wrote:
 Hi all !
 I have a animated object and I need that the animation stops in the
 last frame, not to be in loop.
 How do you sugest that I do this ?
 
 tks
 
 
 ___
 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:cedric.pin...@plopbyte.net
http://www.plopbyte.net



signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Control of animated object

2009-07-06 Thread Carlos Sanches
i m only loading it with this:

  osg::Node* testenode=osgDB::readNodeFile(obj_mesh);

the animation is always in loop.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Build Error Windows : Application osgViewer

2009-07-06 Thread Jean-Sébastien Guay

Hi Adrian,


there is a build error in the osgviewer.cpp because of the ifdef win stuff

missing includes, i guess there is a experimental stuff in the SVN or ?


I'm guessing that you're right, this was probably experimental code 
checked in by mistake. It doesn't seem appropriate in the general 
osgviewer application. Unfortunately Robert is off on vacation so he 
can't revert the changes right now... You could revert back to the 
previous version of osgviewer.cpp in your local copy to make things compile.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] Focus event handling on composite viewer under MFC

2009-07-06 Thread Alexandre Amalric
Hi osg-users,

I am curious about a part of code in CompositeViewer.cpp in function :

void CompositeViewer::eventTraversal()

it's written :


case(osgGA::GUIEventAdapter::RESIZE):

setCameraWithFocus(0);

break;
Why are we set camera with focus to NULL when resizing a view ??
Isn't it useless ??

I'm curious because I'm experiencing some difficulties to set focus on
composite viewer view's myself in my MFC application.
I'm calling :


pView-getCamera()-setAllowEventFocus(false);

when creating a new view and I set the focus myself when receiving a focus
event on the CView embedding the osgViewer::View.

My goal is to set focus on an osgViewer::View only when corresponding CView
(MFC) is focused, not when moving mouse on the osgViewer::View.



Kind regards,

-- 
Alexandre AMALRIC   Ingénieur RD
===
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Focus event handling on composite viewer under MFC

2009-07-06 Thread Alexandre Amalric
I forgot to mention that I'm using osg SVN version 2.9.5.

2009/7/6 Alexandre Amalric alex.pix...@gmail.com

 Hi osg-users,

 I am curious about a part of code in CompositeViewer.cpp in function :

 void CompositeViewer::eventTraversal()

 it's written :


 case
 (osgGA::GUIEventAdapter::RESIZE):

 setCameraWithFocus(0);

 break; Why are we set camera with focus to NULL when resizing a view ??
 Isn't it useless ??

 I'm curious because I'm experiencing some difficulties to set focus on
 composite viewer view's myself in my MFC application.
 I'm calling :


 pView-getCamera()-setAllowEventFocus(
 false);

 when creating a new view and I set the focus myself when receiving a focus
 event on the CView embedding the osgViewer::View.

 My goal is to set focus on an osgViewer::View only when corresponding CView
 (MFC) is focused, not when moving mouse on the osgViewer::View.



 Kind regards,

 --
 Alexandre AMALRIC   Ingénieur RD
 ===
 PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
 http://www.pixxim.fr




-- 
Alexandre AMALRIC   Ingénieur RD
===
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Build Error Windows : Application osgViewer

2009-07-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi Jean-Sebastien,

Thanks for the answer, there is no problem for us using the SVN code while
robert is on vacation. i disable the osgviewer in my build :-)

regards adrian

2009/7/6 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com

 Hi Adrian,

  there is a build error in the osgviewer.cpp because of the ifdef win stuff

 missing includes, i guess there is a experimental stuff in the SVN or ?


 I'm guessing that you're right, this was probably experimental code checked
 in by mistake. It doesn't seem appropriate in the general osgviewer
 application. Unfortunately Robert is off on vacation so he can't revert the
 changes right now... You could revert back to the previous version of
 osgviewer.cpp in your local copy to make things compile.

 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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




-- 

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


Re: [osg-users] Control of animated object

2009-07-06 Thread Cedric Pinson
Hi,

I you are using AnimationPath you would need to do is to set all your
animations to NO_LOOPING see osg/AnimationPath header.
I think you can search LOOP_MODE in your file and replace it to
NO_LOOPING if it's possible to alter the file.

Cheers,
Cedric

On Mon, 2009-07-06 at 14:20 +0200, Cedric Pinson wrote:
 Hi,
 What do you use to animate your objects ?
 
 Cheers,
 Cedric
 
 On Mon, 2009-07-06 at 08:51 -0300, Carlos Sanches wrote:
  Hi all !
  I have a animated object and I need that the animation stops in the
  last frame, not to be in loop.
  How do you sugest that I do this ?
  
  tks
  
  
  ___
  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
-- 
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net



signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [osgPlugins] Plugin Logo bug

2009-07-06 Thread Alexandre Amalric
Hi osg-users,

I'm using osg svn version 2.9.5 and I've apparently found a bug in osgPlugin
logo.

When using more than one view logosCullCallback function is called without
checking context ID from the cull visitor is equal to logo _contextID
variable. It involves updating logo's viewport with different sizes.
So I made a fix well working, at least the way I use the plugin.

I'm not used to post fix so I attached the modified cpp files in current
mail, hope it helps...

Code I added is indicated with comment :

// AA DD/MM/YY Fix
Kind regards

-- 
Alexandre AMALRIC   Ingénieur RD
===
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr


ReaderWriterLOGO.rar
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg-users Digest, Vol 25, Issue 9

2009-07-06 Thread Terry Welsh
Hi Julian,
Have you tried using osg::LightModel to turn on
GL_LIGHT_MODEL_LOCAL_VIEWER?  It's often necessary in multi-wall setups
--
Terry Welsh  /  mogumbo 'at' gmail.com
www.reallyslick.com  /  www.mogumbo.com



 Message: 3
 Date: Mon, 06 Jul 2009 16:28:10 +1200
 From: Julian Looser li...@roarmot.co.nz
 Subject: [osg-users] Consistent lighting across different cameras
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Message-ID: 4a517d5a.5060...@roarmot.co.nz
 Content-Type: text/plain; charset=iso-8859-1; Format=flowed

 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] Consistent lighting across different cameras

2009-07-06 Thread Terry Welsh
Hi Julian,
Have you tried using osg::LightModel to turn on
GL_LIGHT_MODEL_LOCAL_VIEWER?  It's often necessary in multi-wall setups
--
Terry Welsh  /  mogumbo 'at' gmail.com
www.reallyslick.com  /  www.mogumbo.com




 Message: 3
 Date: Mon, 06 Jul 2009 16:28:10 +1200
 From: Julian Looser li...@roarmot.co.nz
 Subject: [osg-users] Consistent lighting across different cameras
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Message-ID: 4a517d5a.5060...@roarmot.co.nz
 Content-Type: text/plain; charset=iso-8859-1; Format=flowed

 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


[osg-users] VC8 build error for latest osgviewer in svn

2009-07-06 Thread Yefei He
Hi, Robert,

I just did an svn update and got a buildi error with osgViewer
under VC8: the file vsynctoggle_custom.h could not be found. It also 
used glext.h and wglext.h, which I just did download (I guess I should 
have done that long time ago). Did I just catch the checked in source 
code at an awkward moment? I have since grabbed the stable 2.8.0 
version of osgViewer and compiled it successfully. Is there an risk 
of doing that when all the other source codes are the latest version 
from the svn repository? 

Thanks,

Yefei

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


Re: [osg-users] VC8 build error for latest osgviewer in svn

2009-07-06 Thread Chris 'Xenon' Hanson
Yefei He wrote:
 Hi, Robert,
 I just did an svn update and got a buildi error with osgViewer
 under VC8: the file vsynctoggle_custom.h could not be found. It also 
 used glext.h and wglext.h, which I just did download (I guess I should 
 have done that long time ago). Did I just catch the checked in source 
 code at an awkward moment? I have since grabbed the stable 2.8.0 
 version of osgViewer and compiled it successfully. Is there an risk 
 of doing that when all the other source codes are the latest version 
 from the svn repository? 

  Robert is away on holiday this week.

 Thanks,
 Yefei

-- 
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


Re: [osg-users] VC8 build error for latest osgviewer in svn

2009-07-06 Thread Jean-Sébastien Guay

Hello Yefei,


I just did an svn update and got a buildi error with osgViewer
under VC8: the file vsynctoggle_custom.h could not be found. It also 
used glext.h and wglext.h, 


There was some discussion about this earlier today, see the thread 
[osg-users] Build Error Windows : Application osgViewer. I think yes, 
it was committed with testing code by mistake. But as Chris said, Robert 
is on vacation this week so just go back to a previous revision in SVN 
and you'll be fine.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] VC8 build error for latest osgviewer in svn

2009-07-06 Thread Yefei He
Ah, just saw the thread myself. Sorry for not reading other recent 
posts first. So far the old viewer with the new osg core seems to 
hold up fine.

Thanks,

Yefei

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
 boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay
 Sent: Monday, July 06, 2009 2:08 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] VC8 build error for latest osgviewer in svn
 
 Hello Yefei,
 
  I just did an svn update and got a buildi error with osgViewer
  under VC8: the file vsynctoggle_custom.h could not be found. It also
  used glext.h and wglext.h,
 
 There was some discussion about this earlier today, see the thread
 [osg-users] Build Error Windows : Application osgViewer. I think yes,
 it was committed with testing code by mistake. But as Chris said,
 Robert
 is on vacation this week so just go back to a previous revision in SVN
 and you'll be fine.
 
 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] 2.8.2-rc2 install question (UNCLASSIFIED)

2009-07-06 Thread Butler, Lee Mr CIV USA USAMC
Classification: UNCLASSIFIED
Caveats: NONE

Just built 2.8.2-rc2 on Windows Vista.  The INSTALL target installs the
DLLs but not the .lib files needed for linking.  Is this customary?
What's the usual approach for installing a version of OSG to link other
applications against?

Lee
Classification: UNCLASSIFIED
Caveats: NONE



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


Re: [osg-users] 2.8.2-rc2 install question (UNCLASSIFIED)

2009-07-06 Thread Jean-Sébastien Guay

Hello Lee,


Just built 2.8.2-rc2 on Windows Vista.  The INSTALL target installs the
DLLs but not the .lib files needed for linking.  Is this customary?
What's the usual approach for installing a version of OSG to link other
applications against?


.lib files should be in $CMAKE_INSTALL_PREFIX/lib after building the 
INSTALL target... It does this on my machine (VC++ 2005 SP1, Vista). 
Perhaps you were expecting them to be alongside the DLLs in 
$CMAKE_INSTALL_PREFIX/bin?


If you really don't get the lib files, check the output window in VC++ 
when you build the INSTALL target, it will tell you where they went, or 
if there was some error when copying them.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] problem with blending when using floating point FBO

2009-07-06 Thread Jonathan Richard
Ok I was able to get it working by getting the resolved fbo using the
RenderStage::getMultisampleResolveFramebufferObject method. Here a subset of
my code in the draw callback:


  osgViewer::Renderer * renderer =
static_castosgViewer::Renderer*(renderInfo.getCurrentCamera()-getRenderer());

osg::FrameBufferObject *fbo=NULL;


fbo=renderer-getSceneView(0)-getRenderStage()-getMultisampleResolveFramebufferObject();

// Bind the fbo to be read
fbo-apply(state,osg::FrameBufferObject::READ_FRAMEBUFFER);

// Specify a color buffer as the source for the subsequent call of
glReadPixel
glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);

  float* tempbuf32Bits = new float[WIDTH*HEIGHT];
 glReadPixels(0, 0, WIDTH, HEIGHT, GL_RED, GL_FLOAT, tempbuf32Bits);


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


Re: [osg-users] problem with blending when using floating point FBO

2009-07-06 Thread Thrall, Bryan
Jonathan Richard wrote on Monday, July 06, 2009 4:04 PM:
 Ok I was able to get it working by getting the resolved fbo using the 
 RenderStage::getMultisampleResolveFramebufferObject method. Here a
subset of
 my code in the draw callback:  
 
 
   osgViewer::Renderer * renderer =

static_castosgViewer::Renderer*(renderInfo.getCurrentCamera()-getRend
erer());
 
 osg::FrameBufferObject *fbo=NULL;
 


fbo=renderer-getSceneView(0)-getRenderStage()-getMultisampleResolveFr
amebufferObject();
 
 // Bind the fbo to be read
 fbo-apply(state,osg::FrameBufferObject::READ_FRAMEBUFFER);
 
 // Specify a color buffer as the source for the subsequent call of
 glReadPixel glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
 
   float* tempbuf32Bits = new float[WIDTH*HEIGHT];
  glReadPixels(0, 0, WIDTH, HEIGHT, GL_RED, GL_FLOAT, tempbuf32Bits);

Glad you got it working!

Is there a reason you didn't just attach an osg::Texture to your camera
and set the number of samples greater than 1 in the attach call?

By the way, if you change OpenGL state, be careful that you restore the
previous state or tell OpenSceneGraph about the changes you make (via
haveAppliedMode(), haveAppliedAttribute(), etc.); otherwise
OpenSceneGraph will get confused about what the current OpenGL state is.

-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Julian Looser

Hi Ulrich,

(The model and lightsource are a shared graph, right?)

Yes, that's right.
With regards to the different lighting, how is your model 
tessellated?  If it's coarsely tessellated and/or you're using face 
normals then the lighting calculation might only be done on the corner 
vertices and interpolated from there.
The model is a simple box with no further tessellation, and just face 
normals. However, the effect is the same with more complicated and 
higher-tessellated models. I think the detail of the model shouldn't 
effect the lighting in this case... all the cameras are looking at the 
same lit scene from the same point, just with slight offsets in the 
projection and view matrices. Other than possibly subtle differences in 
specular highlights, I wouldn't think the scene should be lit any 
differently in each of the views. I realise the lighting won't look 
great on a low-tessellated model, but I think it should be consistent.


I figure it's like taking multiple photos and stitching them together 
into a panorama... the world doesn't get lit completely differently just 
because you turn left and right a bit. :-(


Cheers,
Julian.

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


Re: [osg-users] Control of animated object

2009-07-06 Thread Carlos Sanches
I m seeing the examples but look like that my problem is that I m doing the
animation in 3DMAX and exporting the object in .IVE file.

The object load but always in loop mode.
Maybe I m not understanding something but look like that OSG have a
dificulty in control of animations . I m refering about 2D movies and
imported 3d objects .

Excuse-me,  I know that I m a little user of OSG but I have some ideas.
To be perfect to me OSG would have any functions like :
setFrame () -- that stop object exactly  in the frame that we want .
int getCurrentFrame() -- return the current frame of animation.
int getNumberOfFrames()  -- return the total number of frames in the
animation.

These kind of functions ll help a lot with movies or image sequences and 3D
object animations .
I always have to know when an animation ends to execute next action.
 Nobody  had this kind of problem ??
___
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-06 Thread Michael W. Hall
I got it to build.  I kept messing with it and finally got it to work.
However, I am trying to build the osgDotNet wrappers and I am having
trouble there.  Has anyone built these?

I have been following the steps and have had no luck.

Michael

On Sun, 2009-07-05 at 15:47 -0600, Chris 'Xenon' Hanson wrote:
 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. ;)
 

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


Re: [osg-users] osgFX render issue

2009-07-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi Vincent

Well, i haven't understood your scene graph right. Let's me draw your scene
graphs

(1)
Group == type of osgFX::xxx
  ___|
  | ||  |
Group1Group2Group3Group4


(2)
  Group
  __|
  |  |
|  |
Group1== type of osgFX::xxx  Group2Group3Group4

But if i am right understood your email you appended the osgFX effect not as
group, instead you appended it
as parent node, right?


(x)Group
  ___|__
  | ||  |   |
Group1Group2Group3Group4   osgFX ???


if i am wrong please stop reading and explain again the exacly outlook of
the scene graph you have. otherwise have a look into the osgFXbrowser
example. if you are using
(x) this would enable the osgFX for all object under osgFX ??? (childrens)
not for Group, GroupX

regard adrian


2009/7/6 Vincent Bourdier vincent.bourd...@gmail.com

 Hi all,

 I've got a understandable problem with osgFX::Cartoon and osgFX::Scribe.

 I got a graph like that :

 Group
   ___|
   | ||  |
 Group1Group2Group3Group4

 If I put the effect on Group, no problem all is good.
 The same effect on Group1 do not set the good color.

 I use :

 osg::ref_ptrosgFX::Cartoon s = new osgFX::Cartoon;
 s-setOutlineColor(osg::Vec4(color.x(), color.y(), color.z(), 0.0f));
 s-setOutlineLineWidth(edge_width);

 and I put it as a new parent for the concerned group.

 See attached file for details.

 Any idea would be very appreciated, this is an important thing I have to
 solved as soon as possible.

 Thanks for your help.

 Regards,
Vincent.


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




-- 

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