Re: [osg-users] ShadowMapping on recent ATI - repost

2008-02-22 Thread Sebastian Messerschmidt
I've fixed this behaviour too, by simply taking:

gl_TexCoord[1].t = 1.0- clamp(dot( vec4(vVertPos,1.0), gl_EyePlaneT[1] 
),0.0,1.0);
 instead of
gl_TexCoord[1].t =  clamp(dot( vec4(vVertPos,1.0), gl_EyePlaneT[1] 
),0.0,1.0);
in the vertex shader

(yeah, I know the clamp is useless here, but since I've been debugging I 
tried almost everything ;-) )

thx a lot
Sebastian


Sebastian Messerschmidt schrieb:
 Hi Christian,

 I think i've seen your post on gamedev.net and tried to answer ...;-) 
 Coincidence.
 Problem for me is, that even on 7.1 it's not working (but I've 
 downgraded driver which might obscurify this issue a bit).
 I recently read some articles, where most of them were stating that 
 binding LUMINANCE to FBOs isn't working properly ever since.
 Could you do me the favour and take a look at my screenies? If the issue 
 should be related to flipped coordinates I could give it some tries 
 into that direction.
 For now I remain a little clueless, since I cannot imagine other 
 applications using shadowmapping in conjunction with FBOs won't
 suffer the same problems.
 Thanks for your answer however ... seems I'm not completly nuts at all ;-)

 cheers
 Sebastian
   
 Hi!

 I didn't look at your images, but I recently posted an issue that seems 
 to be similar to yours... (title issues with latest ATI driver, please 
 confirm)

 I'll quote the relevant part here:

 
 In my program, I use perspective shadow maps, rendering to a depth 
 texture using setRenderTargetImplementation(FRAME_BUFFER_OBJECT). This 
 works perfectly with driver version 7.9. In 8.1 however, it appears that 
 the frame buffer image is flipped upside down for some reason. If I 
 invert the y-coordinate for shadow texture lookup, everything works fine 
 again for this driver version.

 Can anybody confirm these issues? I'm afraid now I'll have to implement 
 a test of whether the frame buffer is flipped to maintain compatibility 
 with the screwed-up ATI driver... I hope this is not the case...
 

 Nobody replied to this post yet, in the meantime I have implemented the 
 workaround which tests the orientation of the image which is rendered to 
 the FBO.

 Perhaps this is of any help
 regards
 chris

 ___
 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] Modifier key mask not working under OS X

2008-02-22 Thread Stephan Maximilian Huber
Adrian Egli OpenSceneGraph (3D) schrieb:
 Perfect, it's working.
   
ok, I'll submit them to osg-submissions.
 did you still a review of my AGL Thread Safe submission ? because i can not
 run the safari plugin with mutli threaded, only single thread. otherwise
 i crashs when i press 's' (stats, freetype) and then i rescale or move the
 safari window.
   
Sorry, I did not get anything to review from you? Did you send me an email?

I think it is the wrong solution to add mutexes to the 
GraphicsWindowCarbon. IMHO all window-implementations require calling 
from the right thread which created and manipulated the opengl context. 
All threading-stuff is done outside the GraphicWindow-implementations. 
Perhaps Robert can add some more info to this topic.

Perhaps it's a better solution for your special needs to subclass from 
GraphicsWindowCarbon and add the Mutexes there.

I could not recreate the crash using the standard osgviewer.

cheers,
Stephan


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


Re: [osg-users] strange normal with VPB

2008-02-22 Thread Robert Osfield
Hi Christophe,

Is the normal discontinuity only apparent along one longitudinal
split?  What happens when you zoom in?

I presume the normal discontinuity is along the boundary where the
longitude goes from -180 to 180.  The is code to equalize normals
across boundaries between tiles, but don't remember any code that
wraps around the the equalization so this might well be the source of
the issue.

As for fixing it, well you all have the source code... to me this is
rather a minor issue in the greater scheme of things.  When viewing
the texture model a small discontinuity in the normal is hardly
noticeable.

Robert.

On Fri, Feb 22, 2008 at 3:13 PM, christophe loustaunau
[EMAIL PROTECTED] wrote:
 Hi all,

 I have notice that when I generate an earth with osgdem there is some
 problems with the normals.
 I have used this command line :

  osgdem --bluemarble-west -t ../land_shallow_topo_west.tif
  --bluemarble-east -t ../land_shallow_topo_east.tif
  --geocentric
 -l 12
  -o earth.ive

 I have join to the mail, a screenShot of the first level, showing the
 normals. You can see that there
 is a problem of normals at the join.

 I would like to know If Robert has plan to correct this, or is this intend ?

 Thanks !
 --
 Christophe Loustaunau.
 ___
  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] strange normal with VPB

2008-02-22 Thread christophe loustaunau
 Is the normal discontinuity only apparent along one longitudinal
 split?


yes, in fact the normal discontinuity only appears at the join of the tile.
See the
screenshot I have attached you will understand.

What happens when you zoom in?

 I presume the normal discontinuity is along the boundary where the
 longitude goes from -180 to 180.  The is code to equalize normals
 across boundaries between tiles, but don't remember any code that
 wraps around the the equalization so this might well be the source of
 the issue.


Thanks for the explanation.

As for fixing it, well you all have the source code... to me this is
 rather a minor issue in the greater scheme of things.  When viewing
 the texture model a small discontinuity in the normal is hardly
 noticeable.

Robert.


I will look at the code and try to fix this.
Thanks.

On Fri, Feb 22, 2008 at 3:13 PM, christophe loustaunau
 [EMAIL PROTECTED] wrote:
  Hi all,
 
  I have notice that when I generate an earth with osgdem there is some
  problems with the normals.
  I have used this command line :
 
   osgdem --bluemarble-west -t ../land_shallow_topo_west.tif
   --bluemarble-east -t ../land_shallow_topo_east.tif
   --geocentric
  -l 12
   -o earth.ive
 
  I have join to the mail, a screenShot of the first level, showing the
  normals. You can see that there
  is a problem of normals at the join.
 
  I would like to know If Robert has plan to correct this, or is this
 intend ?
 
  Thanks !
  --
  Christophe Loustaunau.

  ___
   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




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


[osg-users] Stereoscopy, part 2

2008-02-22 Thread Renan Mendes
Hi,

 It's been a couple of weeks since I first asked about stereoscopy in
OSG. I've had an answer from Rémy (which I forgot to thank for, sorry), but
I still have some questions on the subject.
 I've managed to use the stereoscopy option, which provided me with a
split image of my scene. When I finally tried to use the second video
monitor (I have a NVIDIA GeForce 6200 dual-head video card), something
unexpected happened. I have only managed to split the image between the two
monitors when I used the 800x600 resolution - and I had to drag the window
to the edge of the first video monitor for that to happen...
 What I wanted to know, is how to perform this action with the full
screen (1024x768). Any suggestions and tips are quite welcome...

 Thanks,

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


[osg-users] Representing projections

2008-02-22 Thread Renan Mendes
Hi,

In my application, I need to represent simple shapes' projections. For
instance, project a line on a plane. I was thinking about using textures,
but my problem is that my projection will have to be to be rotated and
translated all the time, which, according to what I've noticed in some
examples, is not a very simple task. Another idea I've had was to use indeed
a light-and-shadow effect, but that wouldn't work either, for I need to
project that line on that plane even if some other shape comes in between
them.
Anyone has any suggestions?

   Thanks,

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


Re: [osg-users] Stereoscopy, part 2

2008-02-22 Thread Rémy Deslignes
Hi Renan,

Maybe you should have a look at the dual moitor management of your 
graphic card .
If you are running on Windows for instance, you need to extend the  
desktop  instead of using the dual mode screen

Rémy   ( not fully convinced that this will help anyway )


Renan Mendes a écrit :
 Hi,

  It's been a couple of weeks since I first asked about stereoscopy 
 in OSG. I've had an answer from Rémy (which I forgot to thank for, 
 sorry), but I still have some questions on the subject.
  I've managed to use the stereoscopy option, which provided me 
 with a split image of my scene. When I finally tried to use the second 
 video monitor (I have a NVIDIA GeForce 6200 dual-head video card), 
 something unexpected happened. I have only managed to split the image 
 between the two monitors when I used the 800x600 resolution - and I 
 had to drag the window to the edge of the first video monitor for that 
 to happen...
  What I wanted to know, is how to perform this action with the 
 full screen (1024x768). Any suggestions and tips are quite welcome...

  Thanks,

   Renan M Z Mendes
 

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


-- 
Remy Deslignes

Ingenieur Developement / Software Engineer 

Tel: +33 (0)1.53.90.11.19

===
 Silicon Worlds S.A.
 224, rue Saint Denis
 75002 Paris  France
 Tel: +33 (0)1.53.90.11.11
 Fax: +33 (0)1.53.90.11.12
 http://www.silicon-worlds.fr
=== 


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


Re: [osg-users] Multiple viewers and one scene

2008-02-22 Thread nicolas peña
I forgot to say that I was two instances of osgviewer::viewer.

Thanks again,

  Nicolas.

2008/2/22, nicolas peña [EMAIL PROTECTED]:

 Hi Robert,

  I have done several tests and have reached to the conclusion that it is
 not possible
  to use two viewers at the same time from one process.
  This happens even when they do not share anything and even if I set-up
  the viewers from different threads.
  I have done the most simplistic code and even this fail.
  I'm using OSG 2.3.4 on Linux 2.6.22 with NVIDIA proprietary drivers.


 I would like to help to solve this if you confirm it as a bug and if it is
 possible.


 Thanks a lot,
 Nicolas.

 2008/2/22, Robert Osfield [EMAIL PROTECTED]:
 
  Hi Nicolas,
 
  Its really hard to know whats going on at your end w.r.t application
  setup and flow control so advicing on it is easy.  In general I can
  say that sharing a scene between View's is OK within on
  CompositeViewer as they will Views on the same scene will share the
  same FrameStamp i.e. there will be all at the same point in time.
  Sharing one scene between multiple Viewers will hit up against the
  problem that in one set of traversals the scene graph is one time and
  then the traversals from the other viewer will try to change the time
  back - and likely to cause a mess.  This timing issue isn't likely to
  cause problems with high level rendering though - it should just mess
  up things like particle systems and sequences.
 
  Robert.
 
 
  On Thu, Feb 21, 2008 at 8:33 PM, nicolas peña [EMAIL PROTECTED]
  wrote:
   Hi all,
  
As I need to control the frame rate of my cameras independently, I
  have
   set-up a viewer for each one.
One camera  has to draw in a window and accept user input, while the
  others
   should not appear in the screen at all
  (they have an image attached and send a copy of it to other
  process).
  
   To achieve this, the interactive camera's graphic context is set from
  a
   traits with pbuffer = false
and the other one with pbuffer = true.
  
   The problem is that if a set up a loop that calls  the frame method of
  both
   one renders over the other as
   if the rendering contexts were the same.
  
   Can I share the scene among different viewers?
  
   If yes what do I need to do to render properly?
  
   Please ask for the needed details...
  
   Thanks a lot,
  
   Nicolas.
  
  
  
  
  
  
 
   ___
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] Multiple viewers and one scene

2008-02-22 Thread nicolas peña
Hi Robert,

 I have done several tests and have reached to the conclusion that it is not
possible
 to use two viewers at the same time from one process.
 This happens even when they do not share anything and even if I set-up
 the viewers from different threads.
 I have done the most simplistic code and even this fail.
 I'm using OSG 2.3.4 on Linux 2.6.22 with NVIDIA proprietary drivers.


I would like to help to solve this if you confirm it as a bug and if it is
possible.


Thanks a lot,
Nicolas.

2008/2/22, Robert Osfield [EMAIL PROTECTED]:

 Hi Nicolas,

 Its really hard to know whats going on at your end w.r.t application
 setup and flow control so advicing on it is easy.  In general I can
 say that sharing a scene between View's is OK within on
 CompositeViewer as they will Views on the same scene will share the
 same FrameStamp i.e. there will be all at the same point in time.
 Sharing one scene between multiple Viewers will hit up against the
 problem that in one set of traversals the scene graph is one time and
 then the traversals from the other viewer will try to change the time
 back - and likely to cause a mess.  This timing issue isn't likely to
 cause problems with high level rendering though - it should just mess
 up things like particle systems and sequences.

 Robert.


 On Thu, Feb 21, 2008 at 8:33 PM, nicolas peña [EMAIL PROTECTED]
 wrote:
  Hi all,
 
   As I need to control the frame rate of my cameras independently, I have
  set-up a viewer for each one.
   One camera  has to draw in a window and accept user input, while the
 others
  should not appear in the screen at all
 (they have an image attached and send a copy of it to other process).
 
  To achieve this, the interactive camera's graphic context is set from a
  traits with pbuffer = false
   and the other one with pbuffer = true.
 
  The problem is that if a set up a loop that calls  the frame method of
 both
  one renders over the other as
  if the rendering contexts were the same.
 
  Can I share the scene among different viewers?
 
  If yes what do I need to do to render properly?
 
  Please ask for the needed details...
 
  Thanks a lot,
 
  Nicolas.
 
 
 
 
 
 

  ___
   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] Get pixels from a scene in a matrix in order to modifypixels color

2008-02-22 Thread Brad Colbert
Hello,

Try these steps:

1. Render the scene to an FBO
2. Render the captured buffer with an RGB to YUV shader.

-B
 
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Sent: Wednesday, February 20, 2008 3:25 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Get pixels from a scene in a matrix in order to
modifypixels color

Hello all,

 

I would like to get pixels in a matrix of a zone in order to get colors
(yuv) and modify them.

Any way to do this quickly? 

I would like to use GPU and not CPU.

Using FBO...?

 

Thanks in advance.

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


[osg-users] MouseCoords - TexCoords

2008-02-22 Thread Jeremy Moles
I would like to provide a user of osgWidget with the ability to get the
color value of any textured Widget, particularly whatever 2D coord the
mouse is currently over. I've played with a number of implementations
for doing this, but I wanted to get some opinions on what the BEST way
to do it is. (Also: this is just for osg::Texture2D at the moment)

When I want to calculate the color value I have access to the following
information:

- The GLOBAL mouse coords
- The LOCAL mouse coords (relative to the Widget itself)
- The tex coords of all 4 points of the quad (Widget)
- The dimensions of the Widget (width, height, etc.)

In the simplest case, assuming the quad is fully mapped by the
texture, I can do something like the following:

x = LocalMouseX / WidgetWidth
y = LocalMouseY / WidgetHeight

...which, easily enough, will also give me the tex coord that I can pass
to osg::Image::getColor(). However, things become more complicated when
you only use a portion of the Image in your Widget's tex coord mapping,
and I've come up alternative ways of handling those scenarios, none of
which feel very clean or proper.

Is there an arbitrary way to translate mouse coordinates (given the data
I have access to) into texture coordinates? I don't need the code to do
this, just some ideas to push me in the right direction...

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


Re: [osg-users] Stereoscopy, part 2

2008-02-22 Thread Per Rosengren

You probably tried

osgViewer::View::setUpViewAcrossAllScreens ()

if you have one desktop on two screens, or

osgViewer::View::setUpViewOnSingleScreen (unsigned int screenNum=0)

, one for each viewer, if you have two desktops.

If so, what happened?


Renan Mendes wrote:

Hi,

 It's been a couple of weeks since I first asked about stereoscopy 
in OSG. I've had an answer from Rémy (which I forgot to thank for, 
sorry), but I still have some questions on the subject.
 I've managed to use the stereoscopy option, which provided me with 
a split image of my scene. When I finally tried to use the second video 
monitor (I have a NVIDIA GeForce 6200 dual-head video card), something 
unexpected happened. I have only managed to split the image between the 
two monitors when I used the 800x600 resolution - and I had to drag the 
window to the edge of the first video monitor for that to happen...
 What I wanted to know, is how to perform this action with the full 
screen (1024x768). Any suggestions and tips are quite welcome...


 Thanks,

  Renan M Z Mendes




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
begin:vcard
fn:Per Rosengren
n:Rosengren;Per
org:KTH;CVAP
adr:;;KTH;Stockholm;;SE-100 44;Sweden
email;internet:[EMAIL PROTECTED]
title:Ph.D. student
tel;work:+46 8 790 6203
tel;fax:+46 8 723 0302 
note:PGP keyID: 0xD40DD8E0
x-mozilla-html:FALSE
url:http://www.csc.kth.se/~perrose/
version:2.1
end:vcard

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


[osg-users] Adding geometry to a scene (seeking advice)

2008-02-22 Thread John Wilde
Hi,
I'm a new OpenSceneGraph user and am looking for some advice to get me
started on an analysis I'm doing.  The problem is to try and find
safe paths through an urban environment - a path is considered more
safe if the points along the path are not visible from windows on
the buildings in the environment.  I have some 3D models of buildings
and I want to generate points (to simulate windows) on the walls of
the buildings and lay down other points on the ground (to simulate
potential traveling positions).  I would then use the
LineSegmentIntersector utility to see, for each point on the ground,
how many windows have unobstructed views of that point.  The
OpenSceneGraph library seems to have the ability to this kind of
analysis.  I've read through the excellent Quick Start Guide and
looked at many examples but am wondering if anyone has advice on how
they would approach this.  The approach I was considering was:

1) Examine the geometry of the model: identify the walls of
buildings by looking at the values of the Normals,
2) Create new geometry in the model to represent windows by randomly
placing them on the walls of the buildings
3) The travel positions are provided to me so I have to just create
geometry to represent them
4) For each travel position, find the distance to all the windows,
discarding any that are further than a certain distance or are
obstructed by other buildings.

Does this approach sound reasonable?  Are there utilities that are
available that might help me in identifying and placing the window
geometry on the buildings?  Can you suggest any of the example code I
should look at that might help me along?

Any advice is appreciated!  Thanks, John
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org