Re: [osg-users] Extracting the texture from an ive and use it for a shader's sample2DRect uniform

2011-02-07 Thread Bawenang Rukmoko
Hi,

Nevermind. I've found my mistake. I was just wondering why it didn't work and 
the texture can't be loaded from the shader. It's all because my own stupidity 
of using sample2DRect instead of sample2D. And I've just found out that the 
base texture from an ive is actually pre-determined as the texture number 0 and 
the uniform parameter baseTexture. :D

Thank you!

Cheers,
Bawenang

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





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


Re: [osg-users] [osgCompute] osgCompute / osgCuda Postfilter

2011-02-07 Thread J.P. Delport

Hi Jens,

On 04/02/11 18:05, Jens Orthmann wrote:

Hi serkan, hi J.P.,

Here is a link to a simple example solving your problem:
http://www.cg.informatik.uni-siegen.de/data/Downloads/svt/osgComputeDemoApp.zip
We render a rotating cow into a texture then run a cuda-kernel and display the 
result in the same scene.

You need to set the usage flags of your render targets to GL_TARGET, e.g. :
Target0-setUsage( osgCompute::GL_TARGET_COMPUTE_SOURCE ).
With this flag you tell the texture that it is used as a FBO.
Unfortunately, OpenSceneGraph does not call any function of osg::Texture when 
it renders into a texture.
In other words something like texture-applyAsFBO() is missing.
So there is no way to get notified when this happens.
The only way to deal with this is to copy the texture memory each time a mapping 
function is called (GPU-GPU which is still fast).
However, for this the user needs to setup the usage flag.


I added the flag and my test app is now working, thanks.

regards
jp



Additionally, with older drivers/CUDA versions (we are not sure about this) you 
have to call MRTTexture-unmap() after your kernel has finished.
If you do not call unmap(), the MRTTexture is still mapped in the CUDA context 
and OpenGL cannot render into it successfully.

Hopefully this helps,
Jens

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





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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] [vpb] libvpb.so.10: cannot open shared object file

2011-02-07 Thread jamil farooq
Hi,

thanx i have included the /usr/local/lib/ in PATH env variable and its working 
now:)

Thank you!

Cheers,
jamil

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





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


[osg-users] When / howto stop or remove animation path

2011-02-07 Thread vincent sauvage
Hi,

i use animation path for moving a geode from one point to another ,(from its 
position to a target position acquired by picking)

It works but , once the animation has finished (target position is reached), il 
seems that callback is still running   ... and the result is i can move anymore 
 the geode , by user input for exemple. geode keep on go to target position.
..; even if i call setLoopMode(osg::AnimationPath::NO_LOOPING)

I'd like to run this animation just one time time, pause it et restart it later 
with other taget position.
.
My question is :
How could i know my animation is finished ?
and  
how can i pause it and restart it later?


Thank you!

Cheers,
vincent

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





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


Re: [osg-users] [osgCompute] osgCompute / osgCuda Postfilter

2011-02-07 Thread Serkan Ergun
Hi,

Thank you very much! This solved my problem.

Cheers,
Serkan

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





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


Re: [osg-users] Bug in GLObjectsVisitor::apply(osg::Geode node)

2011-02-07 Thread Robert Osfield
Hi Felix,

Something odd must be going on with the scene graph should be
independent from any state, there should be no reason that state
should be applied before geometry calls.  If there is a problem then
changing the order is probably just masking the issue.

Could you explain the role of invalid vertex program?

Robert.

On Sun, Feb 6, 2011 at 2:09 PM, Felix Nawothnig
felix.nawoth...@googlemail.com wrote:
 Hello.

 I was getting GL_INVALID_OPERATION on a glDrawArrays() call in
 Drawable::compileGLObjects() / Geometry::drawImplementation(). I
 traced it down to GLObjectsVisitor::apply(osg::Geode node) which
 does:

           apply(*drawable);
           if (drawable-getStateSet())
           {
               apply(*(drawable-getStateSet()));
           }

 ... so because the drawable is drawn before it's stateset was applied
 an invalid vertex program was used (which caused the
 GL_INVALID_OPERATION error). Changing the order there fixed the
 problem for me.

 I checked trunk - the problem is still there.

 Cheers,

 Felix
 ___
 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] OsgAnimation questions, strange fps and splitting animations

2011-02-07 Thread Thomas Hogarth
Hi Cedric

Thanks for checking out my model, sounds like good news to me. I was worried
there was something inherently wrong with the model (like too many bones
etc). I plan to split the animation into individual animations to make
them easier to play and perhaps do some work on blending etc. So by the
sounds of it that should help as each animation will be shorter.

Been loving osgAnimation now I've finally started using it properly, nice
work. Think decent support for skinning and more importantly hardware
skinning is the final piece in the osg puzzle for me.

I'll keep you up to date on my results and let you know once I have it
running on IPhone, should look good I reckon. If I get properly stuck I'll
be sure to head to your site.

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


Re: [osg-users] LineSegmentIntersector which objects are returned?

2011-02-07 Thread Robert Osfield
Hi Heiko,

I'm afraid I can't work out what is going on from your description so
the best I can do is provide some general suggestions.

First up only polygonal meshes can be interested by
LineSegmentIntersector, so point clouds and lines will not return
intersections.

Secondly the intersections you get returned return the leaf node and
drawable that is intersected along with the node path from the root of
the intersection traversal down to the leaf node that was intersected.

Robert.

On Sun, Feb 6, 2011 at 11:12 PM, Heiko Thiel osgfo...@tevs.eu wrote:
 Hi,

 I have a simple question to LineSegmentIntersector: Which objects can be 
 intersect with the test ray?

 I ask because I have following problem: I have following osg tree:

 - Geode -Field
  - Node (Model loaded from disc) - Contains Name obj1 by Model (so not set 
 by my - don't want to presume that the name is everytime same)
  - Geode (single quad of the ground of terrain) - Name: Ground
   - Geometry (4 vertices)

 If I do now a klick I got following names returned: obj1, obj1, obj, ..., 
 Ground (Model is a Firetree - many intersections). But never the name 
 Field. So the problem is: I can't assume that the Model has name obj1. 
 That is why I think I must additional geode around it with an extra class, so 
 I can check with dynamic_cast if the test ray had found an interesting object 
 or not. But this don't work, if I dont get the Field-Geode returned.

 How to handle this problem? (osgPick-Demo is to simple to see a solution :( )

 Thank you!

 Cheers,
 Heiko

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





 ___
 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] When / howto stop or remove animation path

2011-02-07 Thread Robert Osfield
Hi Vincent,

I'm afraid the osg::AnimationPathCallback doesn't have a callback to
inform you when the animation is finished, so you'll have to subclass
from AnmationPathCallback or write your own callback to implement
this.

Robert.

On Mon, Feb 7, 2011 at 12:43 AM, vincent sauvage
sauv...@iut.u-clermont1.fr wrote:
 Hi,

 i use animation path for moving a geode from one point to another ,(from its 
 position to a target position acquired by picking)

 It works but , once the animation has finished (target position is reached), 
 il seems that callback is still running   ... and the result is i can move 
 anymore  the geode , by user input for exemple. geode keep on go to 
 target position.
 ..; even if i call setLoopMode(osg::AnimationPath::NO_LOOPING)

 I'd like to run this animation just one time time, pause it et restart it 
 later with other taget position.
 .
 My question is :
 How could i know my animation is finished ?
 and
 how can i pause it and restart it later?


 Thank you!

 Cheers,
 vincent

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





 ___
 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] osgWidgets performance problem

2011-02-07 Thread Eduardo Poyart
Hello,

I'm using osgWidgets and I have a hierarchy that starts with a
osgWidget::Frame, and it has other widgets inside. This is the hierarchy:

Frame
|  Box
|  |  Frame
|  |  |  Box
|  |  |  |  Canvas
|  |  |  |  |  Frame
|  |  |  |  |  |  Box
|  |  |  |  |  Frame
|  |  |  |  |  |  Box
|  |  |  |  |  Frame
|  |  |  |  |  |  Box
  ...

There are about 8 to 10 Frame/Box sets, inside that last Canvas.

This Frame is a toolbar in my application. I'm animating its height to
perform a smooth collapse when the user clicks the close button.

The problem is: during this collapse the performance gets severely reduced.
The status info shows that the Event traversal is taking a long time. On
Windows the problem is worse: the performance gets reduced to ~1 fps. On
Linux, even though the performance penalty isn't that big, it's still
noticeable. My resize function invokes Frame::resizeFrame, Frame::setOrigin
and Frame::update at the top level Frame.

Any tips on what could be going on? Why would a widget resize cause so much
activity in the Event traversal? I only resize widgets
on osgGA::GUIEventAdapter::FRAME events (once per frame).

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


[osg-users] SoftShadowMap Shader problem

2011-02-07 Thread Werner Modenbach

Hi all,

I think SoftShadowMap doesn't unload the shader when unloaded.

The root node of my scene is a ShadowedScene.
I guess without assigning a ShadowTechnique the default GL rendering 
pipeline is used.
When creating and setting SoftShadowMap as technique shadowing takes 
place and the techniques shaders do its work.
Unfortunately when setting shadowTechnique in the ShadowedScene back to 
0 (no technique) the shaders still apply.


I guess this as a bug.

Also when using the SoftShadowTechnique the models colors get 
significantly darker.

Debugging the shader by setting
gl_FragColor = gl_Color; at the end shows that

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


[osg-users] SoftShadowMap Shader problem

2011-02-07 Thread Werner Modenbach

Sorry, partially sent by accident ...



Hi all,

I think SoftShadowMap doesn't unload the shader when unloaded.

The root node of my scene is a ShadowedScene.
I guess without assigning a ShadowTechnique the default GL rendering 
pipeline is used.
When creating and setting SoftShadowMap as technique shadowing takes 
place and the techniques shaders do its work.
Unfortunately when setting shadowTechnique in the ShadowedScene back to 
0 (no technique) the shaders still apply.


I guess this as a bug.

Also when using the SoftShadowTechnique the models colors get 
significantly darker.

Debugging the shader by setting
gl_FragColor = gl_Color;
at the end of the frag shader shows that gl_Color is dark allready.

But SoftShadowMap doesn't install a vertex shader. So, why is the 
gl_Color different?


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


[osg-users] [QUESTION]Simple camera create and position?

2011-02-07 Thread Nan WANG
Hi, 
I am really newbie in OSG. Here is one simple question I want to ask:

How can I create a camera and set its position to (0,0,0) in the world and set 
it as the viewer default camera to render?

Any example of using camera?


... 

Thank you!

Cheers,
Nan

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





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


Re: [osg-users] Generating multitouch events

2011-02-07 Thread Serge Lages
Hi all,

I am currently working on getting multi-touch working on Linux with MPX
(XInput2), and I would like to use this new system for my events. But with
XInput (or also with Windows 7), I am receiving all the events separately,
so what's the best approach to feed the
touchesBegan/touchesMoved/touchesEnded methods ? Will I need to store each
input state internally into the GraphicWindow class to set each time all the
touch states ?

Cheers,

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


Re: [osg-users] difference between osg Producer and OpenProducer

2011-02-07 Thread Mike Hatcher
Hi,

Wow, I can't thank you enough for the great response!!  You answered my 
question perfectly and pretty much nailed the situation.  I in fact have a 
pre-osg 1.x app and I upgraded it to 1.0.0 about 2 and 1/2 years ago when I 
first became familiar with it.  I agree with you.  From what little research 
I've done and after having read much of the source code, the startup guide, 
some of the class references, and Producer source code, it was starting to look 
like what you had described...Producer is no longer needed with the latest OSG. 
 I'm glad to read I was not incorrect in that assessment.

Now, I do have a 1.x app but I would like to skip the intermediary step and go 
right to getting off Producer and using OSG.  So, now the only question is who 
would you recommend to help us get that work done?  I think I saw a page on 
here where you can post OSG related work, didn't I?

Thank you!

Cheers,
Mike

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





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


[osg-users] Visualization of an image + depth map

2011-02-07 Thread Stefan Walk
Hi,

I'm looking for a way to visualize an image (dimensions somewhere between 
640x480  and 1280x960) from a calibrated camera + a dense depth map (estimated 
from a stereo pair). With this information, i can compute the 3D coordinates of 
the regions that produced each pixel, and I'd like to visualize that. Ideally, 
when the virtual camera is positioned like the physical camera was, the 
visualization should just look like the image, and the 3d structure becomes 
apparent when moving the camera. Does OpenSceneGraph provide a convenient way 
to do that (I'm unfamiliar with it, I'm looking for the right tools to do this 
task now)? If yes, are there examples that are close to what I want to do? I've 
looked at osgpointsprite, which seems kind of appropriate, when i take the 
blending out and reenable the depth test, however the sprites don't change size 
when the camera is moved, is that changeable? 

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


[osg-users] [ANN] Contract or freelance work on real time driving simulator

2011-02-07 Thread Mike Hatcher
Hello dear OSG-community,

We are in need of assistance from an experienced OSG software engineer to help 
us port the visual and rendering subsystem of a driving simulation application 
from OSG 1.0.0 to OSG 2.8.3.  The current code base makes use of SceneView and 
Producer.  We would be looking to eliminate Producer and the SceneView classes 
in favor of more recent OSG versions.  Work may be completed remotely or on 
site.  Please send me a private message if interested.  We are located in Utah, 
USA.  Competitive compensation for this work available to the best candidate.

Best regards,
Mike

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





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


Re: [osg-users] [QUESTION]Simple camera create and position?

2011-02-07 Thread Tomlinson, Gordon
Did you have a look through the numerous examples both with the source and on 
the OSG Web site or search the mail list as this is a common question and 
should be the first thing you really do 

Also there are 2 very good books out available that will take you through the 
basics of OSG


Newest book https://www.packtpub.com/openscenegraph-3-0-beginners-guide/book

Older books http://www.osgbooks.com/




Gordon Tomlinson
3D Technology
System Engineering Consultant
Overwatch®
An Operating Unit of Textron Systems
__
WARNING: Documents that can be viewed, printed or retrieved from this E-Mail 
may contain technical data whose export is restricted by the Arms Export 
Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration 
Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not 
be exported, released or disclosed to non-U.S. persons (i.e. persons who are 
not U.S. citizens or lawful permanent residents [green card holders]) inside 
or outside the United States, without first obtaining an export license.  
Violations of these export laws are subject to severe civil, criminal and 
administrative penalties.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Nan WANG
Sent: Monday, February 07, 2011 6:06 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [QUESTION]Simple camera create and position?

Hi, 
I am really newbie in OSG. Here is one simple question I want to ask:

How can I create a camera and set its position to (0,0,0) in the world and set 
it as the viewer default camera to render?

Any example of using camera?


... 

Thank you!

Cheers,
Nan

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





___
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] [QUESTION]Simple camera create and position?

2011-02-07 Thread Nan WANG
Hi,

I could not fine source code on this topic.
I tried these code, but nothing rendered, what is the problem?

Code:

osg::Node* tankNode = NULL;
osg::Group* root = NULL;
osgViewer::Viewer viewer;
osg::Vec3 tankPosit; 
osg::PositionAttitudeTransform* tankXform;
osg::ref_ptrosg::Camera camera = new osg::Camera;

tankNode = osgDB::readNodeFile(cow.osg);

root = new osg::Group();
tankXform = new osg::PositionAttitudeTransform();

root-addChild(tankXform);
tankXform-addChild(tankNode);

tankPosit.set(0,2,0);
tankXform-setPosition( tankPosit ); 
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
camera-addChild(root);
osg::Vec4 bgColor(0.2f, 0.2f, 0.6f, 1.0f);

viewer.setCamera(camera);
viewer.setSceneData( root );
viewer.realize();

while( !viewer.done() )
{
viewer.frame();
}



Thanks

Nan

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





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


Re: [osg-users] [vpb] [osgdem] remove polygons of the sea

2011-02-07 Thread Julien Chavaroche
Hi,

even if I do a simple osgdem -- TERRAIN convertion to osg, i got some stranges 
lines under the created shape 

how can I avoid thoses artifacts ?


Thank you!

Cheers,
Julien

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



attachment: render2.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [QUESTION]Simple camera create and position?

2011-02-07 Thread Nan WANG
Ok,thanks alot Robert.

But could you tell me how to set current viewer's camera's position?

Thanks again。

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





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


Re: [osg-users] [QUESTION]Simple camera create and position?

2011-02-07 Thread Robert Osfield
Hi Nan,

On Mon, Feb 7, 2011 at 2:03 PM, Nan WANG nan.c...@gmail.com wrote:
 Ok,thanks alot Robert.

 But could you tell me how to set current viewer's camera's position?

If you use a CameraManipulator then you'll set the position via it,
the default home position of which can be set via:
viewer.getCameraManipulator()-setHomePosition(...);

If you don't use the CameraManipulator then on each new frame you
simple do:  viewer.getCamera()-setViewMatrix(..).

I would encourage you to have a look at the headers of the osg::Camera
and the osgGA::CameraManipulator subclasses.  There are also plenty of
examples and two books to read which go into their usage.

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


Re: [osg-users] [QUESTION]Simple camera create and position?

2011-02-07 Thread Nan WANG
Hi,robert

I will look into these libraries.

Thank you!

Cheers,
Nan

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





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


Re: [osg-users] [vpb] libvpb.so.10: cannot open shared object file

2011-02-07 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
The PATH env variable should really only contain the paths to shared objects
and executables (i.e. /usr/local/bin). LD_LIBRARY_PATH should be set to
/usr/local/lib instead...

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of jamil
farooq
Sent: Monday, February 07, 2011 1:44 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [vpb] libvpb.so.10: cannot open shared object file

Hi,

thanx i have included the /usr/local/lib/ in PATH env variable and its
working now:)

Thank you!

Cheers,
jamil

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





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


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


Re: [osg-users] Visualization of an image + depth map

2011-02-07 Thread Chris 'Xenon' Hanson
On 2/7/2011 5:00 AM, Stefan Walk wrote:
 I'm looking for a way to visualize an image (dimensions somewhere between 
 640x480  and 1280x960) from a calibrated camera + a dense depth map 
 (estimated from a stereo pair). With this information, i can compute the 3D 
 coordinates of the regions that produced each pixel, and I'd like to 
 visualize that. Ideally, when the virtual camera is positioned like the 
 physical camera was, the visualization should just look like the image, and 
 the 3d structure becomes apparent when moving the camera. Does OpenSceneGraph 
 provide a convenient way to do that (I'm unfamiliar with it, I'm looking for 
 the right tools to do this task now)? If yes, are there examples that are 
 close to what I want to do? I've looked at osgpointsprite, which seems kind 
 of appropriate, when i take the blending out and reenable the depth test, 
 however the sprites don't change size when the camera is moved, is that 
 changeable? 

  Is this from a Kinect device, or something similar?

 Best regards,
 Stefan

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
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] Visualization of an image + depth map

2011-02-07 Thread Stefan Walk

On 7 Feb 2011, at 17:06, Chris 'Xenon' Hanson wrote:

 On 2/7/2011 5:00 AM, Stefan Walk wrote:
 I'm looking for a way to visualize an image (dimensions somewhere between 
 640x480  and 1280x960) from a calibrated camera + a dense depth map 
 (estimated from a stereo pair). With this information, i can compute the 3D 
 coordinates of the regions that produced each pixel, and I'd like to 
 visualize that. Ideally, when the virtual camera is positioned like the 
 physical camera was, the visualization should just look like the image, and 
 the 3d structure becomes apparent when moving the camera. Does 
 OpenSceneGraph provide a convenient way to do that (I'm unfamiliar with it, 
 I'm looking for the right tools to do this task now)? If yes, are there 
 examples that are close to what I want to do? I've looked at osgpointsprite, 
 which seems kind of appropriate, when i take the blending out and reenable 
 the depth test, however the sprites don't change size when the camera is 
 moved, is that changeable? 
 
  Is this from a Kinect device, or something similar?

Depends on how you define similar. The Kinect gains depth information by 
having a laser projector and a camera looking at the projection, in my case I 
have two camera views (for example from a camera like 
http://www.ptgrey.com/products/bbxb3/bumblebeeXB3_stereo_camera.asp) and 
compute the depth map from that.

Best regards,
Stefan___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Generating multitouch events

2011-02-07 Thread Paul Martz

On 2/7/2011 4:06 AM, Serge Lages wrote:

Hi all,

I am currently working on getting multi-touch working on Linux with MPX
(XInput2), and I would like to use this new system for my events. But with
XInput (or also with Windows 7), I am receiving all the events separately, so
what's the best approach to feed the touchesBegan/touchesMoved/touchesEnded
methods ? Will I need to store each input state internally into the
GraphicWindow class to set each time all the touch states ?


Hi Serge -- I was never able to figure out how to use touchBegan / touchMoved / 
touchEnded. From the EventQueue.cpp source, each of these functions creates a 
GUIEventAdapter with just a single TouchPoint, so can't be used if you want to 
send an event containing multiple TouchPoints (as far as I can tell).


Instead, I created my own GUIEventAdapter, added each TouchPoint that my code 
detected, and called EventQueue::addEvent().


But, more to your question...

My project uses a Kinect to detect hands (more generally, interactors). My 
code correlates the interactors detected in the current frame with the 
interactors detected in the previous frame (by doing distance computations). So, 
much like you, I needed to store and track the interactors in my own internal 
data structure. Then I created a list of TouchPoints with the appropriate 
phases, and added them to a single GUIEventAdapter as described above, using 
EventQueue::addEvent rather than the multitouch convenience routines.


Hope that helps,
   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Generating multitouch events

2011-02-07 Thread David Glenn
Greetings Paul!

Well, if you only have to deal with three mouse points with Kinect that should 
be much easier than Smart board. Last year at NAB, I talked to the designer and 
he told me that you have to look over eight mouse points at any given time - 
that I can remember!

... 
D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Generating multitouch events

2011-02-07 Thread Stephan Huber
Hi Glenn,

Am 07.02.11 12:06, schrieb Serge Lages:
 I am currently working on getting multi-touch working on Linux with MPX
 (XInput2), and I would like to use this new system for my events. But with
 XInput (or also with Windows 7), I am receiving all the events separately,
 so what's the best approach to feed the
 touchesBegan/touchesMoved/touchesEnded methods ? Will I need to store each
 input state internally into the GraphicWindow class to set each time all the
 touch states ?

You'll have to store your touch-points and submit them alltogether as
one event to the eventqueue, here's some pseudo-code:

osg::ref_ptrosgGA::GUIEventAdapter osg_event(NULL);
for(int i = 0; i  numTouches; i++)
{
  // get touch i and corrsponding phase, x and y
  ...
  // feed it to the osg_event
  if (!osg_event) {
osg_event = _win-getEventQueue()-touchBegan(i, phase, x, y);
  } else {
osg_event-addTouchPoint(i, phase, x, y);
  } 
}

As Paul noticed in one of his recent mails, the design of the current
implementation is not the easiest and cleanest,  but I was happy to have
something working on my end. So if you have any improvements to the
design/code, please share them with us, so we get a robust and clean
multi-touch implementation working consistent on different platforms.

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


Re: [osg-users] Problem with OpenVrml Plugin( OSG 2.9.10)

2011-02-07 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Kumar,

On 02/02/2011 10:33 PM, Kumar Saurabh Arora wrote:
 Hi Robert,
 
  
 
 I am using 0.18.6 OpenVrml and OSG 2.9.10.
 
 b-create_vrml_from_stream is returning empty nodes for everymodel.(
 parse_vrml returns vector of empty nodes)
 
 Does OSG plugin(2.9.10) compatible with OpenVrml 0.18.6? If so, what
 could be the possible reason?

The compatibility should be OK, unless OpenVRML made some major changes
recently.

If you are getting only empty nodes, that most likely means that the
type of node in your VRML file is not supported by the loader. The
OpenVML plugin is *not* a full VRML-compatible viewer, it was intended
as a tool to load data exported by 3DS Max in VRML and later on few
other features were added. Only meshes and some basic shapes are loaded
correctly atm, together with textures and color. While OpenVRML will
load your file fine, it doesn't mean it will show in OSG as not every
VRML feature is mapped over (or even has an OSG equivalent).


 I am able to view models using SDL.

I am not sure what you mean. SDL (from http://www.libsdl.org/) doesn't
load/display VRML files ...

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org/

iD8DBQFNUEwCn11XseNj94gRAmCyAJ95C+DyXYxWgcrv1csozrHioHUrTACghSXy
/lE57SgxHhnbB/wrxmr5nTo=
=4suW
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Viewing angle 180 degrees

2011-02-07 Thread Bolstad, Mark

I'm revisiting my old message here. I have in place a version that uses the 
view offset parameter of addSlave in viewer, but I'm getting some strange 
results (it appears like a three-point perspective, one per camera ). It's 
worked enough to get the system running, but the results are somewhat 
distracting. So rather than listing my code, could someone modify osgcamera to 
show the proper way to have 3 cameras with a FOV greater than 180 degrees?

Mark

Mark A. Bolstad
Scientific Computing
Janelia Farm Research Campus
Howard Hughes Medical Institute
19700 Helix Drive, Ashburn, VA  20147
email: bolst...@janelia.hhmi.org
office: +1.571.209.4623
web: http://www.hhmi.org/janelia/






On Nov 15, 2010, at 8:04 PM, Bolstad, Mark wrote:

 I've dug around in the lists and various other areas and have yet to come up 
 with a solution.
 
 We have a cylindrical display using 3 projectors with a viewing angle of 225 
 degrees. Most of the code is based off of osgdistortion, but I can't seem to 
 get a very large FOV. I've tried several approaches:
 1. Setting the viewing angle of the master camera to perspective with the 
 large FOV. Works up to 140 degrees but after that the perspective is to 
 distorted (as would be expected). Interestingly, at FOV  180, the up vector 
 flips and the FOV gets smaller (somewhat expected if you think about the 
 math).
 2. Setting the offset parameters in addSlave (strange results)
 
 What I think I need is to set each one of the three views to have a viewing 
 angle of 75 degrees,  and to rotate two of the views +/- 75 degrees from the 
 center.
 
 Any help/hints on setting this up would be appreciated.
 
 Mark
 
 Mark A. Bolstad
 Scientific Computing
 Janelia Farm Research Campus
 Howard Hughes Medical Institute
 19700 Helix Drive, Ashburn, VA  20147
 email: bolst...@janelia.hhmi.org
 office: +1.571.209.4623
 web: http://www.hhmi.org/janelia/
 
 
 
 
 
 

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


Re: [osg-users] Viewing angle 180 degrees

2011-02-07 Thread Robert Osfield
Hi Mark,

The osgViewer::View::setUpViewFor3DSphericalDisplay(..) provides a
slave setup of 6 slave cameras that render to texture cube map and a
final slave camera that renders this cubmap to distortion correction
mesh.  The cubemap rendering is for full 360 degree view,  The source
code can be found at OpenSceneGraph/src/osgViewer/View.cpp.  You can
also run osgviewer with the --3d-sd command line option and it'll run
with this view setup.  The distortion correction is appropriate for
Pufferfish display that uses a single projector with a fish eye lens.

Robert.

On Mon, Feb 7, 2011 at 7:53 PM, Bolstad, Mark bolst...@janelia.mi.org wrote:

 I'm revisiting my old message here. I have in place a version that uses the
 view offset parameter of addSlave in viewer, but I'm getting some strange
 results (it appears like a three-point perspective, one per camera ). It's
 worked enough to get the system running, but the results are somewhat
 distracting. So rather than listing my code, could someone modify osgcamera
 to show the proper way to have 3 cameras with a FOV greater than 180
 degrees?
 Mark
 Mark A. Bolstad
 Scientific Computing
 Janelia Farm Research Campus
 Howard Hughes Medical Institute
 19700 Helix Drive, Ashburn, VA  20147
 email: bolst...@janelia.hhmi.org
 office: +1.571.209.4623
 web: http://www.hhmi.org/janelia/






 On Nov 15, 2010, at 8:04 PM, Bolstad, Mark wrote:

 I've dug around in the lists and various other areas and have yet to come up
 with a solution.
 We have a cylindrical display using 3 projectors with a viewing angle of 225
 degrees. Most of the code is based off of osgdistortion, but I can't seem to
 get a very large FOV. I've tried several approaches:
 1. Setting the viewing angle of the master camera to perspective with the
 large FOV. Works up to 140 degrees but after that the perspective is to
 distorted (as would be expected). Interestingly, at FOV  180, the up vector
 flips and the FOV gets smaller (somewhat expected if you think about the
 math).
 2. Setting the offset parameters in addSlave (strange results)
 What I think I need is to set each one of the three views to have a viewing
 angle of 75 degrees,  and to rotate two of the views +/- 75 degrees from the
 center.
 Any help/hints on setting this up would be appreciated.
 Mark
 Mark A. Bolstad
 Scientific Computing
 Janelia Farm Research Campus
 Howard Hughes Medical Institute
 19700 Helix Drive, Ashburn, VA  20147
 email: bolst...@janelia.hhmi.org
 office: +1.571.209.4623
 web: http://www.hhmi.org/janelia/








 ___
 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] [osgPlugins] OBJ plugin loader places model at wrong position and with wrong attitude

2011-02-07 Thread Robert Pardridge
Hi,

The problem is I get back a null pointer for options after using this: 

osgDB::ReaderWriter::Options* options 
=osgDB::Registry::instance()-getOptions();

I am guessing the options string I want is specific to the obj plugin, so do I 
need to tell the registry I am using that plugin? To load the obj all I am 
doing is this:

Node*node = osgDB::readNodeFile(myobject.obj);

I can load the object fine but its at the wrong orientation, and I want to fix 
that just like the original post.

Thank you!

Cheers,
Robert

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





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


[osg-users] True Geometric Morph

2011-02-07 Thread Seth Berrier
I'm looking to implement geometric morphing between two non-identical objects 
(with different ploy and vertex counts).  I stumbled upon 
osgAnimation::MorphGeometry and have been playing with it a bit but have come 
to the conclusion that it cannot do something this general; that it implements 
Morph Target Animation and not general geometric morphing.  Is this correct?  I 
say this as all the examples given morph between objects with identical vertex 
and poly counts.  Also, I see no mechanism in the MorphGeometry class to 
establish correspondence points or vertex groupings which would surely be 
necessary to solve this problem in general.

The trick with morphing is mapping the vertices from one target to another.  
That's kind of free when the targets are this similar (identical vertex counts 
and identical vertex ordering for each object).  I'm interested in the case 
where it's not obvious, where vertex counts are different and more information 
is needed to create and control that mapping as the object is tweened.

Anyways, is there anything that solves this more general problem in OSG?  If I 
were to implement this, would it be of interest to other (i.e. should I do it 
in OSG and I should I do it carefully so that others could at least attempt to 
take advantage of it ... as opposed to just hacking it together)  ;-)

Seth

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





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