[osg-users] intersections

2010-07-19 Thread lucie lemonnier
Hello,
I use osg:: LineSegment to perform an intersection between a ray starting from 
a wand and the objects in my scene. Here is my code:


osg::Vec3 wandpt1;
osg::Vec3 wandpt2;

line = new osg::LineSegment(wandpt1,wandpt2);

osg::BoundingBox modelbox;
modelbox.expandBy(modelTransf-getBound());

if(line-intersect(modelbox)){
std::cout  intersection with the cow  std::endl;

}

The problem is that detection is not very precise.
Do you know another solution in openscenegraph for this?


Thank you!

lucie

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30105#30105





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


Re: [osg-users] StateSet and changes

2010-07-19 Thread Mathieu Scorpionis
Hello

Yes, great job ! 
There was an other problem : I did an optimize() of my model  ; at that moment, 
all stateSet lost their geode parent... and all of them were suddenly linked to 
the same and main parent (the cabine of the aircraft).

Now is much better !
Thanks again.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30106#30106





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


Re: [osg-users] Select node on screen

2010-07-19 Thread Martin Naylor
Hi,
Take a look at the example osgPick, should be what you are after...

Martin Naylor.


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tufan TaÅŸ
Sent: 15 July 2010 13:53
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Select node on screen

Hi,
I have nodes on screen and I want to select a node by clicking on it using
mouse. Do you know any samples about this subject?

... 

Thank you!

Cheers,
Tufan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30027#30027





___
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] intersections

2010-07-19 Thread Riccardo Corsi
Hi Lucie,

take a look to osgPick example to see the correct way of using intersection
visitors and routines.
Ricky

On Mon, Jul 19, 2010 at 09:56, lucie lemonnier lucielemonn...@hotmail.frwrote:

 Hello,
 I use osg:: LineSegment to perform an intersection between a ray starting
 from a wand and the objects in my scene. Here is my code:


 osg::Vec3 wandpt1;
 osg::Vec3 wandpt2;

 line = new osg::LineSegment(wandpt1,wandpt2);

 osg::BoundingBox modelbox;
 modelbox.expandBy(modelTransf-getBound());

 if(line-intersect(modelbox)){
 std::cout  intersection with the cow  std::endl;

 }

 The problem is that detection is not very precise.
 Do you know another solution in openscenegraph for this?


 Thank you!

 lucie

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=30105#30105





 ___
 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] osgVolume volume rendering ?

2010-07-19 Thread Robert Osfield
Hi Emmanuel,

If you are trying to create a stack of images as a single volume then
use the --images filenames command line option.

Robert.

On Sat, Jul 17, 2010 at 1:50 PM, Emmanuel Roche
roche.emman...@gmail.com wrote:
 One very interesting detail concerning those osgVolume tests (still on
 Windows) by the way:

 I use a command like:

 osgvolume --test2 --shader --zSize 100 --window 50 50 600 400
 CEMRA_HIGHRES\IM-0001-0001.png CEMRA_HIGHRES\IM-0001-0002.png
 CEMRA_HIGHRES\IM-0001-0003.png ... [more files here] ...
 CEMRA_HIGHRES\IM-0001-0119.png CEMRA_HIGHRES\IM-0001-0120.png -o result.dds

 I use 120 input png images.

 And I get the output:

 Creating sequence of 120 volumes.

 But the resulting image (see the -o result.dds in the previous command
 line), only has a size of about 500 KB, and that's clearly not enough to
 hold all the 2D images. So is this really supposed to save the 3D image
 content here ?? In that case it there must be a something going wrong.

 Moreother, if I then try:

 osgvolume result.dds

 it seems to load the image as a simple 2D image (and outputs: Single image
 1 volumes.)

 Now, let's see on linux...

 Manu.


 2010/7/17 Emmanuel Roche roche.emman...@gmail.com

 Hello Dzenan!

 i've just tried the website you suggested, downloaded the baby.pvm,
 bonsai1.pvm and bunny.pvm datasets, and tried commands such as:

 osgvolume --window 50 50 600 400 --raw 256 256 98 1 1 big baby.pvm

 -- As I have no idea about the numberOfcomponents and endianness of
 those files I did multiple tests with big/little endianness and 1, 3 or
 4 components

 Unfortunately, everything I tried just resulted in a crash of osgvolume
 without displaying anything on Windows. (I'm now using osg v2.9.8 for those
 tests).

 I'm now about to test all this on Linux... But for the moment, I still
 haven't got any kind of volumetric rendering on Windows...


 One note by the way, I didn't bother settings up the osg Data folder at
 all, could it be the the osgVolume library is in fact trying to retrieve
 maybe shaders or other needed ressources from that data folder ? [but I
 guess I should get a warning of something like that in that case...]


 Cheers!
 Manu.




 2010/7/12 Dženan Zukić dzen...@gmail.com

 Hi,

 I have a working osgVolume used in my program - I use it as a preliminary
 visualization. Since it has only 1D transfer function support, and does not
 combine with polygonal models, in later stage I replace it with
 isosurface+polygonal model.

 My version is basically a simplified osgVolume example. Of course, before
 modifying it I played with it a bit - the simplest way to get it to
 visualize 3D image is giving it raw data. You can find some free 3D images
 here:
 http://www9.informatik.uni-erlangen.de/External/vollib/

 Cheers,
 Dženan

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=29928#29928





 ___
 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] Event Handling from outside a Viewer

2010-07-19 Thread Robert Osfield
Hi Tom,

On Mon, Jul 19, 2010 at 4:00 AM, Tom Pearce tmpea...@gmail.com wrote:
 Thanks for the info, Robert.  I tried what you suggested, but I don't seem to 
 be getting any events back at all: copyEvents(Events) returns false, and 
 events.size() is zero.  When I used getCurrentEventState() I could access the 
 mouse position from the GUIEventAdapter that was returned, but I was never 
 getting any events like button pushes or key presses.

If you are running the viewer's eventTraversal() then it'll be doing a
takeEvents() so consuming all the events.

I know nothing about why or exactly how you're putting your app
together the way you are.  If you are already using the viewer's frame
loop and hence eventTraversal() then why not just use a viewer event
handler to capture the events and push where you want, or just do your
own frame loop and replace the eventTraversals().

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


Re: [osg-users] osgVolume volume rendering ?

2010-07-19 Thread Robert Osfield
Hi Manu,

You data DICOM data rendering suggests that the air around the subject
is returning a high intensity value rather than a low one.  This is
not something I've seen with the DICOM datasets I've tested, so try
other data.  A transfer function would certainly be one way to pick
out the data you want.

Robert.

On Mon, Jul 19, 2010 at 10:34 AM, Emmanuel Roche
roche.emman...@gmail.com wrote:
 Thanks Robert !

 Actually, I've just figured that on my side too! My error was to assume that
 the --images flag was optional, and all the specified images would just be
 used to build a volume anyway.

 When I use the --images just before the image list I get a proper volume
 rendering.

 Now, unfortunately, I have another issue: when I use the raw data as
 suggested by Dzenan, I get a nice volume display (see attached
 bonzai_volume.png). But when I use real medical data (whether I start from
 uncompressed DICOM images or converted PNG images doesn't matter here) I get
 far less interesting results (see attached phenix_OS_volume.png).

 I suspect this could have something to do with the transfer function as I
 would like the opaque areas to be transparent, and vise-versa ?? (the cube
 shape should not be visible, only the human head should be opaque and it
 seems to be the contrary here...)

 = Any idea what I could try to solve this problem ??

 Cheers,
 Manu.




 2010/7/19 Robert Osfield robert.osfi...@gmail.com

 Hi Emmanuel,

 If you are trying to create a stack of images as a single volume then
 use the --images filenames command line option.

 Robert.

 On Sat, Jul 17, 2010 at 1:50 PM, Emmanuel Roche
 roche.emman...@gmail.com wrote:
  One very interesting detail concerning those osgVolume tests (still on
  Windows) by the way:
 
  I use a command like:
 
  osgvolume --test2 --shader --zSize 100 --window 50 50 600 400
  CEMRA_HIGHRES\IM-0001-0001.png CEMRA_HIGHRES\IM-0001-0002.png
  CEMRA_HIGHRES\IM-0001-0003.png ... [more files here] ...
  CEMRA_HIGHRES\IM-0001-0119.png CEMRA_HIGHRES\IM-0001-0120.png -o
  result.dds
 
  I use 120 input png images.
 
  And I get the output:
 
  Creating sequence of 120 volumes.
 
  But the resulting image (see the -o result.dds in the previous command
  line), only has a size of about 500 KB, and that's clearly not enough to
  hold all the 2D images. So is this really supposed to save the 3D
  image
  content here ?? In that case it there must be a something going wrong.
 
  Moreother, if I then try:
 
  osgvolume result.dds
 
  it seems to load the image as a simple 2D image (and outputs: Single
  image
  1 volumes.)
 
  Now, let's see on linux...
 
  Manu.
 
 
  2010/7/17 Emmanuel Roche roche.emman...@gmail.com
 
  Hello Dzenan!
 
  i've just tried the website you suggested, downloaded the baby.pvm,
  bonsai1.pvm and bunny.pvm datasets, and tried commands such as:
 
  osgvolume --window 50 50 600 400 --raw 256 256 98 1 1 big baby.pvm
 
  -- As I have no idea about the numberOfcomponents and endianness
  of
  those files I did multiple tests with big/little endianness and 1,
  3 or
  4 components
 
  Unfortunately, everything I tried just resulted in a crash of osgvolume
  without displaying anything on Windows. (I'm now using osg v2.9.8 for
  those
  tests).
 
  I'm now about to test all this on Linux... But for the moment, I still
  haven't got any kind of volumetric rendering on Windows...
 
 
  One note by the way, I didn't bother settings up the osg Data folder at
  all, could it be the the osgVolume library is in fact trying to
  retrieve
  maybe shaders or other needed ressources from that data folder ? [but I
  guess I should get a warning of something like that in that case...]
 
 
  Cheers!
  Manu.
 
 
 
 
  2010/7/12 Dženan Zukić dzen...@gmail.com
 
  Hi,
 
  I have a working osgVolume used in my program - I use it as a
  preliminary
  visualization. Since it has only 1D transfer function support, and
  does not
  combine with polygonal models, in later stage I replace it with
  isosurface+polygonal model.
 
  My version is basically a simplified osgVolume example. Of course,
  before
  modifying it I played with it a bit - the simplest way to get it to
  visualize 3D image is giving it raw data. You can find some free 3D
  images
  here:
  http://www9.informatik.uni-erlangen.de/External/vollib/
 
  Cheers,
  Dženan
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=29928#29928
 
 
 
 
 
  ___
  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
 

Re: [osg-users] osgVolume volume rendering ?

2010-07-19 Thread Dženan Zukić
Hi,

Hehe, now that you have succeeded at getting something, you start to get into 
the problematics of volume rendering. Namely, to get a nice visual 
representation, you have to provide a suitable transfer function. The example 
uses some hard-coded transfer function (osgVolume supports only 1D TF), if I 
remember correctly. But to make it adaptable to data being visualized, you need 
transfer function editor, something like this: 
http://www.youtube.com/watch?v=ke6-kwuN0Rs

Cheers,
Dženan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30112#30112





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


[osg-users] change of email on Submissions list

2010-07-19 Thread Martin Naylor
HI all,

I have tried to change my email address for the submissions list, it never
sends me an email for my password to change it.

 

Can anyone help?

I have managed to change osg-users, if this comes through!

 

Cheers

 

Martin Naylor.

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


[osg-users] Some basic questions about OSG before integrating

2010-07-19 Thread Igor Lebedev
Hi,

I'm thinking about using OSG functions in my engine, but some things about OSG 
aren't obvious for me, so, i want to ask advanced users for exact info:

1) Is it hard to change components of OSG, to meet my requirments and use my 
own version within scene graph integrated? For example, i'm not very satisfied 
with render code and shadows\other FX, can i do a pure opengl replacement in my 
engine and replace component without any problems? Or should i edit OSG code or 
something?

2) Is LWO loader plugin fully compatible with latest LWO\LWS files(i have 9.6)? 
I mean loading geometry, uv(can keep relative path to texture?), bones, 
animation. If it isn't, what version should i use and what's limitations?

3) That's all, folks!(at least, for now)  I'm afraid you'll just send me to 
RTFM. And sorry for bad English.
 
Thank you!

Cheers,
Igor

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30115#30115





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


Re: [osg-users] OSG on IPhone

2010-07-19 Thread Stephan Maximilian Huber
Hi all,

just a short heads-up. As suggested by Mathieu Marache I am using now
the semi-official osg-git-repository and a custom branch called iphone
for further development.

You'll find it here:

http://github.com/stmh/osg/tree/iphone

I'll abandon the old github project at
http://github.com/stmh/OpenSceneGraph-port-to-IOS in the near future.

cheers,
Stephan




Am 30.06.10 21:49, schrieb Stephan Huber:
 Hi all,
 
 I have set up an github repository for the iphone-port of osg, as
 there's some work to do, before it's ready for inclusion in osg-trunk.
 git makes it easy to keep the iphone specific modifications in a
 separate branch.
 
 It's my last version, I took the mentioned zip from Thomas Hogarth when
 it was available and did some bugfixing and updated osg to a more recent
 version. the iphone-port is now based on rev 11554.
 
 So feel free to send patches for the iphone port:
 
 you'll find the repository at
 
 http://github.com/stmh/OpenSceneGraph-port-to-IOS
 
 there are mainly two branches: master which reflects osgs
 subversion-version, and iphone which holds the modifications and project
 files for the iphone port.
 
 what's missing for primetime:
 
 * most important: Cmake build support, currently the iphone port uses a
 handcrafted xcode-project (again, argh!)
 * multitouch-support for osgGA and implementation in GraphicsWindowIphone
 * some fancy multitouch camera handlers :)
 
 what's working:
 * the core libs and the following plugins: osg, iomageio
 
 
 and some more testing and love.
 
 cheers,
 Stephan
 
 
 
 
 
 Am 27.06.10 17:13, schrieb Mark Feldman:
 Hi,

 Also interested in using OSG on the iPhone..seems like the link is no longer 
 valid.

 Are there any sample applications out there?  

 Thank you!

 Cheers,
 Mark

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=29428#29428





 ___
 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] Some basic questions about OSG before integrating

2010-07-19 Thread Jean-Sébastien Guay

Hello Igor,


1) Is it hard to change components of OSG, to meet my requirments and use my 
own version within scene graph integrated? For example, i'm not very satisfied 
with render code and shadows\other FX, can i do a pure opengl replacement in my 
engine and replace component without any problems? Or should i edit OSG code or 
something?


OSG's design is well encapsulated, so it's generally easy to replace 
parts of OSG's functionality with subclasses you would make yourself. 
For example if you wanted to do your own shadow rendering code you could 
subclass one of the osgShadow classes (ShadowVolume, StandardShadowMap 
or ShadowTechnique). You could also create your own classes that do this 
subclassing just a simple Node or Group and overriding the traverse() 
method. See for example osgOcean which does this (osgocean.googlecode.com).


If you want to do straight OpenGL you can do that by subclassing 
osg::Drawable and writing your code in the overridden 
drawImplementation() method, or in a drawable DrawCallback. You just 
have to make sure you leave the OpenGL state the same way it was at the 
beginning of the method, otherwise you'll have trouble with OSG's own 
drawing and state tracking.



2) Is LWO loader plugin fully compatible with latest LWO\LWS files(i have 9.6)? 
I mean loading geometry, uv(can keep relative path to texture?), bones, 
animation. If it isn't, what version should i use and what's limitations?


I have no idea. If you want bones and animations, I've found the best 
formats are Collada and FBX.



3) That's all, folks!(at least, for now)  I'm afraid you'll just send me to 
RTFM. And sorry for bad English.


Oh, if you insist I tell you to RTFM, then I will :-) If you're new to 
developing with OSG, make sure you at least read the Quick Start Guide 
(www.osgbooks.com - it's free in PDF format). And don't be shy to go 
into the OSG code when you want to know how something works (keep your 
own build of OSG handy, put breakpoints and trace to see where it goes).


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] Point in Polygon problem

2010-07-19 Thread Benoît Bayol
Hi,

Reply to myself : Using osgUtil::DelaunayConstraint and after using the 
contains() method.

Thank you!

Cheers,
Benoît


-- 
Benoît Bayol
benoit.ba...@gmail.com

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30118#30118





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


[osg-users] Curve tangent

2010-07-19 Thread daniele argiolas
Hi, I notice that in bezier curves with method getValueAt() I can get the 
coordinates of a specified point in a time t. Is there a way to get the angle 
of curve tangent?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30119#30119





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


Re: [osg-users] I'm lost the UpdateCallbacks

2010-07-19 Thread Mathieu Scorpionis
I update thattopic, because I have the same problem as LittleG () : one OSG 
file with an AnimationPathCallback:

num_children 1
  MatrixTransform {
DataVariance DYNAMIC
name bugklappe01
nodeMask 0x
cullingActive TRUE
UpdateCallbacks {
  AnimationPathCallback {
pivotPoint 0 0 0
timeOffset 0
timeMultiplier 1
AnimationPath {
  LoopMode LOOP
  ControlPoints {
0 -15580.4365234375 482791.625 4228893.5 0.876726806163788 0 0 
-0.48098878698 0.99940395355 1 1
0.033350718021 -15580.4365234375 482791.625 4228893.5 
-0.829647123813629 0 0 0.558288156986237 0.99940395355 1 1
0.066701436043 -15580.4365234375 482791.625 4228893.5 
-0.775771200656891 0 0 0.631014347076416 0.99940395355 1 1
...
...
...


The object moves after the node has been loaded.
However, impossible to access the callback in order to change the 
timeMultiplier (I would like to accelerate or decelerate the motion with a 
slider on the screen... and go to a static position with an other slider).

Thanks.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30120#30120





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


Re: [osg-users] I'm lost the UpdateCallbacks

2010-07-19 Thread Mathieu Scorpionis
Oops sorry, I found the reason, just after written the post.
Please don't take into account

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30121#30121





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


[osg-users] getting collada support in debian

2010-07-19 Thread Sébastien Barthélemy
Hello,

I'd like to get OSG support collada files out of the box in debian.

I created a debian package for collada-dom, and I'm currently waiting
for a reviewer/sponsor. It is my first package, there might be some
work left. If somebody here with debian knowledge/powers is willing
to help, he would be welcome.

The request is there:
http://lists.debian.org/debian-mentors/2010/07/msg00217.html

I would also like to get a look at the debian-specific files for
openscenegraph. Are they stored somewhere on vcs, or should I resort
to diff.gz?

Thank you.

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


Re: [osg-users] Event Handling from outside a Viewer

2010-07-19 Thread Tom Pearce
Hi Robert,

I think the solution of having a GUIEventHandler through Viewer to capture and 
pass along all events will be the way I go.

I was trying to have various users on our end write their own event handlers 
based on their needs, and be able to swap from one to the other on the fly 
depending on the context of the application.  I noticed there was no 
removeEventHandler method in 2.8.2, and I saw a thread mentioning that this 
method has been added in the recent dev releases.  However, we won't be 
changing versions until 3.0, so I was trying to get around it another way.  
Adding a second layer of event handler - one attached to Viewer to pass events 
through, and the user-written one accessing that information - should do the 
trick without ever having to change the handler that Viewer sees.

Thanks for your input - helpful as always!

Cheers,
Tom

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30123#30123





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


[osg-users] osgViewer FullScreen on Horizontal Span

2010-07-19 Thread Thomas Klemmer
Hi,


I'm trying to get a stereo setup to work with osg.

I have Horzontal Span (Nvidia,Linux) Desktop over two screens and I start the 
viewer with

osg::DisplaySettings::instance()-setStereo(true);
osg::DisplaySettings::instance()-setStereoMode(osg::DisplaySettings::HORIZONTAL_SPLIT);

but the viewer window will only fullscreen on one of the monitors.

Tips anyone?


Thank you!

Cheers,
Thomas

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30124#30124





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


Re: [osg-users] Event Handling from outside a Viewer

2010-07-19 Thread Robert Osfield
Hi Tom,

Another solution would be to subclass from osgViewer::Viewer and add
your own removeEventHandler method, then once you move to 3.0 you'll
just be able to drop your own Viewer class or just remove the method,
and optional compile would even let you build against 2.9.x/3.0 and
2.8.x without difficulty.

Robert.

On Mon, Jul 19, 2010 at 3:19 PM, Tom Pearce tmpea...@gmail.com wrote:
 Hi Robert,

 I think the solution of having a GUIEventHandler through Viewer to capture 
 and pass along all events will be the way I go.

 I was trying to have various users on our end write their own event handlers 
 based on their needs, and be able to swap from one to the other on the fly 
 depending on the context of the application.  I noticed there was no 
 removeEventHandler method in 2.8.2, and I saw a thread mentioning that this 
 method has been added in the recent dev releases.  However, we won't be 
 changing versions until 3.0, so I was trying to get around it another way.  
 Adding a second layer of event handler - one attached to Viewer to pass 
 events through, and the user-written one accessing that information - should 
 do the trick without ever having to change the handler that Viewer sees.

 Thanks for your input - helpful as always!

 Cheers,
 Tom

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=30123#30123





 ___
 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] RTT single frame

2010-07-19 Thread Keith Parkins

Hi,

I am trying to dynamically make a smaller LOD for a street block
populated with buildings. To do this, I am trying to render different
views into texture memory to apply onto a simple cube during the
scene building section of code before entering the main loop. These are
static images, so I want to render into texture memory once before the
app goes into the main loop.

Right now, I took the osgprerender example as a starting point and
modified the call createPreRenderSubGraph. Instead of adding the camera
with the prerender node to the main scenes subgraph:

// parent-addChild(camera);
osg::ref_ptrosgViewer::Viewer view = new osgViewer::Viewer;
view-init();
view-setCamera(camera);
view-setSceneRoot(prerendernode);
view-frame();

// I attached the color buffer to an image  so:
osgDB::writeImageFile(image, imagefilename);
camera-detatch(osg::Camera::COLOR_BUFFER)

return parent;
   }

This works except that I am sure it is overkill. If I try to call
renderingTraversals() without realizing the viewer, I don't get
anything. What is the right way to render a single frame into texture
memory? Keep in mind that the above will be a loop:

{  . . .

   foreach block:
{ . . . .

foreach cameraposition:
createTexturememory()
camera-attach(color_buffer, tex_mem)
camera-move()
renderframe()
camera-detatch(color_buffer)

// create stateset and node with texture tex_mem

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


Re: [osg-users] RTT single frame

2010-07-19 Thread Robert Osfield
HI Keith,

The easiest way to do what you want is place your six RTT Camera's as
nodes in the scene graph and have a callback in on them that switches
them off either via a NodeMask or via an osg::Switch node so that they
only render for one frame, or one nominated frame, or whatever metric
you want to use.

Robert.

On Mon, Jul 19, 2010 at 4:49 PM, Keith Parkins
kpark...@cs.rochester.edu wrote:
 Hi,

 I am trying to dynamically make a smaller LOD for a street block
 populated with buildings. To do this, I am trying to render different
 views into texture memory to apply onto a simple cube during the
 scene building section of code before entering the main loop. These are
 static images, so I want to render into texture memory once before the
 app goes into the main loop.

 Right now, I took the osgprerender example as a starting point and
 modified the call createPreRenderSubGraph. Instead of adding the camera
 with the prerender node to the main scenes subgraph:

        // parent-addChild(camera);
        osg::ref_ptrosgViewer::Viewer view = new osgViewer::Viewer;
        view-init();
        view-setCamera(camera);
        view-setSceneRoot(prerendernode);
        view-frame();

        // I attached the color buffer to an image  so:
        osgDB::writeImageFile(image, imagefilename);
        camera-detatch(osg::Camera::COLOR_BUFFER)

        return parent;
   }

 This works except that I am sure it is overkill. If I try to call
 renderingTraversals() without realizing the viewer, I don't get
 anything. What is the right way to render a single frame into texture
 memory? Keep in mind that the above will be a loop:

 {  . . .

   foreach block:
        { . . . .

        foreach cameraposition:
                createTexturememory()
                camera-attach(color_buffer, tex_mem)
                camera-move()
                renderframe()
                camera-detatch(color_buffer)

                // create stateset and node with texture tex_mem

 Thanks,
 Keith
 ___
 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] Understanding osgShadow::ShadowMap

2010-07-19 Thread Jason Segarra
Hi,

I'm trying to understand how the OSG ShadowMap class works on a frame by frame 
basis. I understand that the shadow is computed when the Cull Visitor hits the 
ShadowedScene node, which has the ShadowMap technique set to it. 
Right now, adding the Shadow technique and supplying it with the light to use, 
as well as the texture size doesn't seem to be doing anything, as in the scene 
is exactly the same with or without the shadow technique being applied to the 
root ShadowedScene node. 

one gotcha is that we aren't calling .frame(), instead we are manually calling 
updateTraversal() and renderingTraversals() on the viewer, due to some changes 
we needed to make to not have the back buffer automatically flip at the end of 
a render. Is this skipping something that we will need to do, or should I look 
elsewhere for the cause of the issue?
Also, in a more general sense, how are the uniforms and shaders propogated down 
the scene? After looking around the Shadow Map code, I can't seem to understand 
how those get applied on each frame to the children of the node, I'm sure I'm 
missing something blindingly obvious in this regard.


Any pointers or guidance (or requests for more information) would be 
appreciated.

Thank you!

Cheers,
Jason

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30128#30128





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


[osg-users] Nine days until the OpenSceneGraph BOF at SIGGRAPH 2010

2010-07-19 Thread John F. Richardson
Hello,

9 days till Siggraph OSG BOF.

RobertI need some slides on OSG-3.0/OpenGL ES. I sent an email to your
gmail account. Is that the correct one for off list communications?

Also, anyone else with material who will not be at the BOF, send it so I can
be a talking head on your topic. Best if received by Noon Pacific Standard
Time, 21 July.

John F. Richardson


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


[osg-users] question about use wgs84 coordination in osggis

2010-07-19 Thread tang312
hello! 
 
I  try osggis_mapper example, and find that when terrain and shapefiles are 
all in UTM Zone 19,It run well. building are in the right position and I can 
select buildings and change the color of selected building with 
osgSim::overlayNode. 
But ,if I change the terrain's coordination to wgs84 (eg.use osgearth 
terrain strm.earth),buildings are all in the right position,but  the color of 
selected building can not be changed any more. 
I think this may be coordination problem.   but why the position of 
buildings are right?  can someone give me advise? 
Thank you for help!




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