Re: [osg-users] [osgPlugins] Is fx required while building collada on Linux?

2010-09-07 Thread Siddhi Anil Machina
Hi,
Can someone help me out on this.Its a bit urgent.

Thanks,
Siddhi

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





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


[osg-users] [build] Issues compiling fx and Cg using collada dom

2010-09-07 Thread Siddhi Anil Machina
Hi,

I was trying to compile Collada-Dom on Ubuntu.For this i downloaded 
collada-dom-2.2.zip and compiled the same as per the instructions given on
http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/Collada; 
for linux.
But when i do make os=linux project=minizip  the compiler compiles for
make os=linux project=minizip -C dom and make os=linux project=dom -C dom 
but throws an error for make os=linux project=fx -C fx.
Also it gives an error saying that Cg/cg.h: No such file or directory.
So just wanted to cross check if fx and Cg are really required.If yes,for what 
purpose are they required.


Thank you!

Cheers,
Siddhi

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





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


Re: [osg-users] osgBullet: Stereo mode / TriMesh Collision Shapes

2010-09-07 Thread Johannes Scholz
To the stereo mode issue: This morning I had a quick look at the colladaread 
example in osgBullet. I just set OSG_STEREO to ON and I am getting quite the 
same picture in the colladaread example like in my environment. The distance 
between the left and right eye images is wrong somehow misbehaves..

Unfortunately I will have parent transforms so I would like to stick to the 
AbsoluteModelTransform.

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





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


[osg-users] how to get the new position of a PositionAttitudeTransform?

2010-09-07 Thread Vitali Anselm
Dear list members,could you please help me with the issue how to get the position of my object?I have developed a class, which is derived from the class "PositionAttitudeTransform" and this class encapsulates within its constructor some other classes/objects. These are namely "Switch" (to be able to set all children on or off), Geode, MatrixTransform and other.My intention is to have a sphere that can be dragged in 3 dimensions by the "TranslateAxisDragger" and to get its new position. So far so good, the visualization of the sphere and of the dragger is successful and I also can drag the sphere around, but I cannot get the new position. I try to get the position with this-getPosition(), where "this" is an object of PositionAttitudeTransform, the result is always zero. I guess the parent class, derived from PositionAttitudeTransform does not get to know the changes of its children. Can you tell me how can I achieve my goal?I thank you in advance.kind regards,VitaliHere is the code of the constructor: TargetSetter::TargetSetter(Rcs::RHCPrimitive *primitive) : osg::PositionAttitudeTransform() { // store the pointer to the RHCPrimitive class _primitive = primitive; //root = new osg::Group; _switch = new osg::Switch; addChild(_switch.get() ); // create a command manager cmdMgr = new osgManipulator::CommandManager; osg::ref_ptrosg::Geode geode_1 = new osg::Geode; osg::ref_ptrosg::MatrixTransform transform_1 = new osg::MatrixTransform; osg::ref_ptrosg::TessellationHints hints = new osg::TessellationHints; hints-setDetailRatio(2.0f); // draw a sphere osg::ref_ptrosg::ShapeDrawable shape; osg::Vec3 position; float radius = 0.01; arr vec= _primitive-computeX1(); // get the coordinates of the initial target (can consist of more than 3 elements) // assuming that the first 3 elements of the vector are x,y,z coordinates position[0] = vec(0); position[1] = vec(1); position[2] = vec(2); shape = new osg::ShapeDrawable(new osg::Sphere(position,radius), hints.get()); shape-setColor(osg::Vec4(0.8f, 0.8f, 0.4f, 1.0f)); geode_1-addDrawable(shape.get()); // draw info text beside the sphere CoordText = new osgText::Text; CoordText-setFont("fonts/times.ttf"); CoordText-setCharacterSize(radius*4); CoordText-setPosition(osg::Vec3(position[0]-radius*2,position[1],position[2])); CoordText-setAxisAlignment(osgText::Text::SCREEN); CoordText-setBackdropType(osgText::Text::OUTLINE); CoordText-setDrawMode(osgText::Text::TEXT | osgText::Text::BOUNDINGBOX); char buf[15]; sprintf(buf, "[%2.2f, %2.2f, %2.2f]",position[0],position[1],position[2]); CoordText-setText(buf); geode_1-addDrawable(CoordText); // material osg::ref_ptrosg::Material matirial = new osg::Material; matirial-setColorMode(osg::Material::DIFFUSE); matirial-setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1)); matirial-setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 1, 1, 1)); matirial-setShininess(osg::Material::FRONT_AND_BACK, 64.0f); this-getOrCreateStateSet()-setAttributeAndModes(matirial.get(), osg::StateAttribute::ON); transform_1.get()-addChild(addDraggerToScene(geode_1.get(), cmdMgr.get() )); _switch-addChild(transform_1.get()); _switch-setAllChildrenOff(); // hide the target node _pickHandler = new TargetHandler(this); osg::Vec3d pos = this-getPosition(); std::cerr  "position: "  pos[0] " , "  pos[1]  " , "  pos[2]  std::endl;}GRATIS fr alle WEB.DE Nutzer: Die maxdome Movie-FLAT!Jetzt freischalten unter http://movieflat.web.de

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


Re: [osg-users] setCamera for Viewer

2010-09-07 Thread Robert Osfield
Hi Tom,

One wouldn't normally change the viewer's master Camera while the
viewer is running, if you do this you'll been to stop all threading,
assin an Renderer and the get the viewer to rewire the threading.

In you case I would just take the subgraph below your own Camera and
then attach this and then copy whatever settings you want across.

Robert.

On Mon, Sep 6, 2010 at 9:05 PM, Tom Pearce tmpea...@gmail.com wrote:
 Hey everyone,

 I'm having trouble using osgViewer::Viewer::setCamera(osg::Camera*) method 
 (inherited from osg::View).  I'm sure the problem is me and not with the 
 function. :-*

 Here's the scenario: I have an already-realized viewer window with an empty 
 scene, to which I am trying to add a new scene with a Camera node as the 
 root.  If I use setSceneData(osg::Node*) the scene appears in the window 
 correctly, but osg::ComputeWorldToLocal doesn't ignore the camera that was 
 the root of my graph.  I thought using setCamera instead would do the trick - 
 avoiding the 'myCameraNode' is a child of the real root camera problem - but 
 the window simply disappears.  Is this enough info that anyone would be able 
 to point me at what I am doing wrong?

 Thanks for any hints,
 Tom

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





 ___
 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] Is fx required while building collada on Linux?

2010-09-07 Thread Robert Osfield
Hi Siddhi,

I have never compile Collada-Dom with Cg.  Perhaps something has
changed in a recent rev of Collada-Dom.  Might I suggest you go visit
the Collada project website for most up to date details on compiling
the DOM and any dependencies.

Robert.

On Mon, Sep 6, 2010 at 1:19 PM, Siddhi Anil Machina
wisteri...@gmail.com wrote:
 Hi,
 I was trying to compile Collada-Dom on Ubuntu.For this i downloaded 
 collada-dom-2.2.zip and compiled the same as per the instructions given on 
 OSG-collada-wiki.

 But when i do make os=linux project=minizip  the compiler compiles for
 make os=linux project=minizip -C dom and make os=linux project=dom -C dom 
 but throws an error for make os=linux project=fx -C fx.
 Also it gives an error saying that Cg/cg.h: No such file or directory.
 So just wanted to cross check if fx and Cg are really required.If yes,for 
 what purpose are they required and how do we resolve these errors.

 Regards,
 Siddhi

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





 ___
 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] osgAL problems

2010-09-07 Thread ting zhang
Hi, all

I successfully compiled the osgAL project, but the examples in osgAL solution 
didn't work. They all notify me that:

No Generic Hardware in :
OpenAL++: couldn't open sound device.

It seems that osgAL cannot find my sound device. However, my sound device 
actually works well in my Windows.
Could anyone tell me what the problem is?
Thank you!

Cheers,
ting

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





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


[osg-users] How can I rotate a image

2010-09-07 Thread Martin Großer
Hello,

I would like rotate a image. Because I want to rotate the separate images from 
my sky box. I think it is difficult to change the texture coordinates of my 
sphere. I my idea is to rotate the images at the beginning.

Example

::osg::Image* image = osgDB::readImageFile(c_posX.Filename);

// rotate image

_cubeMap-setImage(::osg::TextureCubeMap::POSITIVE_X, image);

I hope someone can help me.

Cheers

Martin
-- 
GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAL problems

2010-09-07 Thread Maxim Gammer
pDevice = alcOpenDevice(NULL);
pContext = alcCreateContext(pDevice, NULL);
alcMakeContextCurrent(pContext);

it work in windows and linux.





2010/9/7 ting zhang bee...@sina.com

 Hi, all

 I successfully compiled the osgAL project, but the examples in osgAL
 solution didn't work. They all notify me that:

 No Generic Hardware in :
 OpenAL++: couldn't open sound device.

 It seems that osgAL cannot find my sound device. However, my sound device
 actually works well in my Windows.
 Could anyone tell me what the problem is?
 Thank you!

 Cheers,
 ting

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





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




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


Re: [osg-users] How can I rotate a image

2010-09-07 Thread Trajce (Nick) Nikolov
what do you mean by rotating an image? Could you tell what you are
actually trying to do? More info you provide more chances to get some advice

-Nick


2010/9/7 Martin Großer grosser.mar...@gmx.de

 Hello,

 I would like rotate a image. Because I want to rotate the separate images
 from my sky box. I think it is difficult to change the texture coordinates
 of my sphere. I my idea is to rotate the images at the beginning.

 Example

 ::osg::Image* image = osgDB::readImageFile(c_posX.Filename);

 // rotate image

 _cubeMap-setImage(::osg::TextureCubeMap::POSITIVE_X, image);

 I hope someone can help me.

 Cheers

 Martin
 --
 GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
 http://portal.gmx.net/de/go/dsl
 ___
 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] How can I rotate a image

2010-09-07 Thread Martin Großer
Ok, also I have create a sky box like the sky box in the vertexprogramm example 
of osg. But in my scene the up vector is in the z direction and not in the y 
direction. Now I have rotate my sky box 90 degrees around the x axis.

Is it understandable?

But now, the images on the sky box are in the wrong orientation. For example 
the image in the positiv x direction is 90 degrees rotated. And I want to 
correct this rotation.

Is it understandable? I am not sure.

Cheers

Martin

 Original-Nachricht 
 Datum: Tue, 7 Sep 2010 14:57:24 +0400
 Von: Trajce (Nick) Nikolov nikolov.tra...@gmail.com
 An: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Betreff: Re: [osg-users] How can I rotate a image

 what do you mean by rotating an image? Could you tell what you are
 actually trying to do? More info you provide more chances to get some
 advice
 
 -Nick
 
 
 2010/9/7 Martin Großer grosser.mar...@gmx.de
 
  Hello,
 
  I would like rotate a image. Because I want to rotate the separate
 images
  from my sky box. I think it is difficult to change the texture
 coordinates
  of my sphere. I my idea is to rotate the images at the beginning.
 
  Example
 
  ::osg::Image* image = osgDB::readImageFile(c_posX.Filename);
 
  // rotate image
 
  _cubeMap-setImage(::osg::TextureCubeMap::POSITIVE_X, image);
 
  I hope someone can help me.
 
  Cheers
 
  Martin
  --
  GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99
 Euro/mtl.!*
  http://portal.gmx.net/de/go/dsl
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

-- 
GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I rotate a image

2010-09-07 Thread Wojciech Lewandowski

Hi Martin,

If you follow the vertexexample closely then then rotation can be simply 
added (or removed because its already there) to TexMat in TexMatCallback. 
Look at R matrix in TexMatCallback::operator(). Multiply this R matrix by 
neccessary rotation. If you don't know what rotation exactly, try 90 or -90 
degrees around X, Y, Z axes. After up to 6 tries you will find the one that 
best suits your need. And you will learn a lot ;-)


Wojtek

--
From: Martin Großer grosser.mar...@gmx.de
Sent: Tuesday, September 07, 2010 1:16 PM
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] How can I rotate a image

Ok, also I have create a sky box like the sky box in the vertexprogramm 
example of osg. But in my scene the up vector is in the z direction and 
not in the y direction. Now I have rotate my sky box 90 degrees around the 
x axis.


Is it understandable?

But now, the images on the sky box are in the wrong orientation. For 
example the image in the positiv x direction is 90 degrees rotated. And I 
want to correct this rotation.


Is it understandable? I am not sure.

Cheers

Martin

 Original-Nachricht 

Datum: Tue, 7 Sep 2010 14:57:24 +0400
Von: Trajce (Nick) Nikolov nikolov.tra...@gmail.com
An: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Betreff: Re: [osg-users] How can I rotate a image



what do you mean by rotating an image? Could you tell what you are
actually trying to do? More info you provide more chances to get some
advice

-Nick


2010/9/7 Martin Großer grosser.mar...@gmx.de

 Hello,

 I would like rotate a image. Because I want to rotate the separate
images
 from my sky box. I think it is difficult to change the texture
coordinates
 of my sphere. I my idea is to rotate the images at the beginning.

 Example

 ::osg::Image* image = osgDB::readImageFile(c_posX.Filename);

 // rotate image

 _cubeMap-setImage(::osg::TextureCubeMap::POSITIVE_X, image);

 I hope someone can help me.

 Cheers

 Martin
 --
 GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99
Euro/mtl.!*
 http://portal.gmx.net/de/go/dsl
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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



--
GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl
___
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] How can I rotate a image

2010-09-07 Thread Trajce (Nick) Nikolov
so yo have a skybox model (probably a dome). and you want to render
something in cube map and apply that to the skybox, correct?
-Nick


2010/9/7 Martin Großer grosser.mar...@gmx.de

 Ok, also I have create a sky box like the sky box in the vertexprogramm
 example of osg. But in my scene the up vector is in the z direction and not
 in the y direction. Now I have rotate my sky box 90 degrees around the x
 axis.

 Is it understandable?

 But now, the images on the sky box are in the wrong orientation. For
 example the image in the positiv x direction is 90 degrees rotated. And I
 want to correct this rotation.

 Is it understandable? I am not sure.

 Cheers

 Martin

  Original-Nachricht 
  Datum: Tue, 7 Sep 2010 14:57:24 +0400
  Von: Trajce (Nick) Nikolov nikolov.tra...@gmail.com
  An: OpenSceneGraph Users osg-users@lists.openscenegraph.org
  Betreff: Re: [osg-users] How can I rotate a image

  what do you mean by rotating an image? Could you tell what you are
  actually trying to do? More info you provide more chances to get some
  advice
 
  -Nick
 
 
  2010/9/7 Martin Großer grosser.mar...@gmx.de
 
   Hello,
  
   I would like rotate a image. Because I want to rotate the separate
  images
   from my sky box. I think it is difficult to change the texture
  coordinates
   of my sphere. I my idea is to rotate the images at the beginning.
  
   Example
  
   ::osg::Image* image = osgDB::readImageFile(c_posX.Filename);
  
   // rotate image
  
   _cubeMap-setImage(::osg::TextureCubeMap::POSITIVE_X, image);
  
   I hope someone can help me.
  
   Cheers
  
   Martin
   --
   GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99
  Euro/mtl.!*
   http://portal.gmx.net/de/go/dsl
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  

 --
 GMX DSL SOMMER-SPECIAL: Surf  Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
 http://portal.gmx.net/de/go/dsl
 ___
 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] How can I rotate a image

2010-09-07 Thread Trajce (Nick) Nikolov
:)) .. Let make the easy way :)

Here is the code with the proper setup

if (!mEnvironmentGroup.valid()) mEnvironmentGroup = new osg::Group;
mEnvironmentGroup-setName(ENVIRONMENT);
 mEnvironmentGroup-setNodeMask(0x0);

int tex_width = 256;
int tex_height = 256;

double range = 4.0;

osg::Camera::RenderTargetImplementation renderTargetImplementation =
osg::Camera::FRAME_BUFFER_OBJECT;

mEnvironmentCubeMap = new osg::TextureCubeMap;
mEnvironmentCubeMap-setTextureSize(tex_width, tex_height);
mEnvironmentCubeMap-setInternalFormat(GL_RGB);

 mEnvironmentCubeMap-setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR);

 mEnvironmentCubeMap-setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR);
mEnvironmentCubeMap-setWrap(osg::Texture::WRAP_S,
osg::Texture::CLAMP_TO_EDGE);
mEnvironmentCubeMap-setWrap(osg::Texture::WRAP_T,
osg::Texture::CLAMP_TO_EDGE);
mEnvironmentCubeMap-setWrap(osg::Texture::WRAP_R,
osg::Texture::CLAMP_TO_EDGE);

typedef std::pairosg::Vec3, osg::Vec3 ImageData;
 typedef std::mapunsigned int, ImageData  ViewData;

ViewData id;
id[osg::TextureCubeMap::POSITIVE_X] = ImageData( osg::Vec3( 1,  0,  0),
osg::Vec3( 0, -1,  0) ); // +X
id[osg::TextureCubeMap::NEGATIVE_X] = ImageData( osg::Vec3(-1,  0,  0),
osg::Vec3( 0, -1,  0) ); // -X
id[osg::TextureCubeMap::POSITIVE_Y] = ImageData( osg::Vec3( 0,  1,  0),
osg::Vec3( 0,  0,  1) ); // +Y
id[osg::TextureCubeMap::NEGATIVE_Y] = ImageData( osg::Vec3( 0, -1,  0),
osg::Vec3( 0,  0, -1) ); // -Y
id[osg::TextureCubeMap::POSITIVE_Z] = ImageData( osg::Vec3( 0,  0,  1),
osg::Vec3( 0, -1,  0) ); // +Z
id[osg::TextureCubeMap::NEGATIVE_Z] = ImageData( osg::Vec3( 0,  0, -1),
osg::Vec3( 0, -1,  0) ); // -Z


// right face
{
osg::ref_ptrosg::Camera camera = new osg::Camera;
camera-setViewport(new osg::Viewport(0, 0, tex_width, tex_height));
 camera-addChild(mSilverLiningGroup.get());
camera-setAllowEventFocus(false);
 camera-setProjectionMatrixAsFrustum(-1.0,1.0,-1.0,1.0,1.0,range);
camera-setViewMatrixAsLookAt(osg::Vec3(0,0,0),id[osg::TextureCubeMap::POSITIVE_X].first,id[osg::TextureCubeMap::POSITIVE_X].second);
 camera-setRenderTargetImplementation(renderTargetImplementation);
camera-attach(osg::Camera::COLOR_BUFFER, mEnvironmentCubeMap.get(),
0, osg::TextureCubeMap::POSITIVE_X);
 camera-setUserData(mViewer-getView(0)-getCamera()-getUserData());
camera-setRenderOrder(osg::Camera::PRE_RENDER);
 camera-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
camera-setCullingActive(false);
 camera-setClearMask(0);
camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
 camera-setName(ENVIRONMENT_CAMERA);
camera-setUpdateCallback( new UpdateEnvironmentCameraNodeCallback(
 id[osg::TextureCubeMap::POSITIVE_X].first,
id[osg::TextureCubeMap::POSITIVE_X].second,
 mViewer-getView(0)-getCamera()) );
mEnvironmentGroup-addChild(camera);

}

// left face
{
osg::ref_ptrosg::Camera camera = new osg::Camera;
camera-setViewport(new osg::Viewport(0, 0, tex_width, tex_height));
camera-addChild(mSilverLiningGroup.get());
camera-setAllowEventFocus(false);
 camera-setProjectionMatrixAsFrustum(-1.0,1.0,-1.0,1.0,1.0,range);
camera-setViewMatrixAsLookAt(osg::Vec3(0,0,0),id[osg::TextureCubeMap::NEGATIVE_X].first,id[osg::TextureCubeMap::NEGATIVE_X].second);
 camera-setRenderTargetImplementation(renderTargetImplementation);
camera-attach(osg::Camera::COLOR_BUFFER, mEnvironmentCubeMap.get(),
0, osg::TextureCubeMap::NEGATIVE_X);
 camera-setUserData(mViewer-getView(0)-getCamera()-getUserData());
camera-setRenderOrder(osg::Camera::PRE_RENDER);
 camera-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
camera-setCullingActive(false);
 camera-setClearMask(0);
camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
 camera-setName(ENVIRONMENT_CAMERA);
camera-setUpdateCallback( new UpdateEnvironmentCameraNodeCallback(
 id[osg::TextureCubeMap::NEGATIVE_X].first,
id[osg::TextureCubeMap::NEGATIVE_X].second,
 mViewer-getView(0)-getCamera()) );

mEnvironmentGroup-addChild(camera);
}

// front face
{
osg::ref_ptrosg::Camera camera = new osg::Camera;
camera-setViewport(new osg::Viewport(0, 0, tex_width, tex_height));
 camera-addChild(mSilverLiningGroup.get());
camera-setAllowEventFocus(false);
 camera-setProjectionMatrixAsFrustum(-1.0,1.0,-1.0,1.0,1.0,range);
camera-setViewMatrixAsLookAt(osg::Vec3(0,0,0),id[osg::TextureCubeMap::POSITIVE_Y].first,id[osg::TextureCubeMap::POSITIVE_Y].second);
 camera-setRenderTargetImplementation(renderTargetImplementation);
camera-attach(osg::Camera::COLOR_BUFFER, mEnvironmentCubeMap.get(),
0, osg::TextureCubeMap::POSITIVE_Y);
 camera-setUserData(mViewer-getView(0)-getCamera()-getUserData());
camera-setRenderOrder(osg::Camera::PRE_RENDER);
 camera-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
camera-setCullingActive(false);
 camera-setClearMask(0);

Re: [osg-users] Virtual reality application (head-tracking, stereo, immersive displays)

2010-09-07 Thread Gerwin de Haan
Dear Lucie,

at the Graphics Group at Delft University of Technology we use our
VRmeer toolkit, basically some Virtual Reality and Data
Visualization extensions combining OSG, VRPN and VTK. You can download
our source code for use or inspiration at
http://graphics.tudelft.nl/VRmeer

The default stereo provided in OSG provides on-axis stereo. To
accommodate more better stereo views on your display, we calculate
off-axis perspective matrices, for each eye of every head-tracked user
based on actual display sizes.

We do use the osgUtils SceneView callbacks right now (as indicated in
the other posts) , but it seems this is deprecated and I plan to
convert this to the Compositeviewer.

Let us know if this helps you!
Gerwin



On Fri, Sep 3, 2010 at 4:24 PM, lucie lemonnier
lucielemonn...@hotmail.fr wrote:
 Hi,

 Thank you very much for your replies. I'll try to get along with your 
 indications.

 Cheers,
 lucie

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





 ___
 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] Virtual reality application (head-tracking, stereo, immersive displays)

2010-09-07 Thread lucie lemonnier
Hi,

Thank you for your reply.
How can I download the sources of VRMeer in your site?
He asks me for a login and password.

Thank you!

Cheers,
lucie

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





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


Re: [osg-users] Virtual reality application (head-tracking, stereo, immersive displays)

2010-09-07 Thread Robert Osfield
Hi Gerwin,

On Tue, Sep 7, 2010 at 1:07 PM, Gerwin de Haan gerwindeh...@gmail.com wrote:
 We do use the osgUtils SceneView callbacks right now (as indicated in
 the other posts) , but it seems this is deprecated and I plan to
 convert this to the Compositeviewer.

Just a small note, the way to do stereo at the viewer level would be
to use two slave Camera attached to one View(er), rather than two View
attached to the CompositeViewer.  The master Camera of the View(er)
would be controlled by the head tracking, while the eye offsets would
be done as projection and modelview offset matrices associate with
each slave Camera.

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


Re: [osg-users] Compute Terrain Intersection for .flt databases[SEC=UNCLASSIFIED]

2010-09-07 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Paul,

For HAT, you only need one point. LOS requires a start and end point. Both
require that the points be specified in the database coordinates (i.e.
geocentric Cartesian coordinates for round earth databases).

I haven't worked with .flt databases but the osgSim methods appear to work
for paged databases built by VPB...

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Pocock
Sent: Thursday, September 02, 2010 11:06 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Compute Terrain Intersection for .flt
databases[SEC=UNCLASSIFIED]

Hi - Whats the best way to get the z down intersect point onto a paged
database. I'm getting what looks like loss of precision errors. I am not
sure if it is because I am using  osgUtil::IntersectVisitor (Which I
believe is deprecated?) or my lack of knowledge of
osgSim::HeightAboveTerrain. Is it my proper understanding that I provide
two points x,y,z (beginning and end) for HAT? Even doing this gives some
very strange results... Is there a very basic example out there to
achieve this? Is it a trivial problem?

Regards
Paul



IMPORTANT: This email remains the property of the Department of Defence and
is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you
have received this email in error, you are requested to contact the sender
and delete the email.
___
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] std::vectorbool performance issue

2010-09-07 Thread Andrew Cunningham
Robert,
You are right, although vectorbool is slow, it is apparently not the 
bottleneck. In my case, the bottleneck was basically, a deep and complex 
hierarchy of osg::Switch groups.

I did  some frame rate testing, replace all the osg::Switch with osg::Group, 
then frame rate tested again. There was only a minor difference. The hierarchy 
is the issue, not the presence of the osg::Switch

Still, this is a bit like the _SECURE_SCL=0/1 issue on Windows - a performance 
problem possibly waiting to bite someone.

Andrew

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





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


Re: [osg-users] Issue with osgOcean on MacOSX GeForce 7300 GT

2010-09-07 Thread Jean-Claude Monnin
Hi Tat,

I have been able to run osgOcean by modifying the shaders, but the frame rate 
was not acceptable (15 FPS).  I have also applied the patch to Texture.cpp, but 
it didn't resolve the FBO errors.
Given the framerate is too low, I stop trying to run the software on that 
graphics card.

Thanks a lot for your help. 

Jean-Claude

On Sep 6, 2010, at 10:24 PM, Tatsuhiro Nishioka wrote:

 Hi Jean-Claude,
 
 Though I don't use osgOcean, I can help you on this.
 
 On Sep 7, 2010, at 1:50 AM, Jean-Claude Monnin wrote:
 
 When I run oceanExample, I get following errors:
 
  VERTEX glCompileShader ocean_surface_vertex_shader FAILED
  VERTEX Shader ocean_surface_vertex_shader infolog:
  ERROR: 0:50: 'gl_' : reserved built-in name 
 
  FRAGMENT glCompileShader ocean_surface_fragment_shader FAILED
  FRAGMENT Shader ocean_surface_fragment_shader infolog:
  ERROR: 0:60: '/' :  wrong operand types no operation '/' exists that 
 takes a left-hand operand of type 'const float' and a right operand of type 
 'const int' (or there is no acceptable conversion)
  ERROR: 0:214: 'pow' : no matching overloaded function found 
  ERROR: 0:214: '=' :  cannot convert from 'const float' to '2-component 
 vector of float'
 
  glLinkProgram ocean_surface FAILED
 
 The errors above have something to do with nVidia's problem on implicit cast 
 from integer to float.
 Somehow some of nVidia drivers omit the cast part and then try to pass an 
 integer parameter to a function (like pow) that requires a float parameter, 
 and thus you get wrong operand types, no matching overloaded function, or 
 undefined symbol.
 A solution for this is to replace integer constants (like 1, 2, 3, ...) with 
 explicit float ones (e.g. 1.0, 2.0, 3.0, ...) in shader source code.
 
 This can be a mac specific issue but it is safer to use float constants in 
 shader code unless integer constant is clearly needed.
 
 
 As long as I don't disable all the options that use a FBO, I get garbage on 
 the screen.
 Is anybody using osgOcean successfully on MacOSX. Is the graphics card too 
 old for osgOcean? If the graphics card should be capable of running it, any 
 hints on how to fix it are welcome.
 
 GT7300 driver on Mac OS X has a problem in hardware mipmapping.
 So you need to disable it by applying my patch to Texture.cpp. The patch is 
 available at:
 http://macflightgear.svn.sourceforge.net/viewvc/macflightgear/trunk/patches/OSG-2.9.8.diff?revision=279view=markup
 
 # This patch (for Texture.cpp) was once rejected since this hack is too drive 
 specific bug-fix.
 
 Best,
 
 Tat
 
 ___
 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] osgAL problems

2010-09-07 Thread Chris 'Xenon' Hanson
On 9/7/2010 1:42 AM, ting zhang wrote:
 I successfully compiled the osgAL project, but the examples in osgAL solution 
 didn't work. They all notify me that:
 No Generic Hardware in :
 OpenAL++: couldn't open sound device.
 It seems that osgAL cannot find my sound device. However, my sound device 
 actually works well in my Windows.
 Could anyone tell me what the problem is?

  I believe the problem is with OpenAL and more modern versions of Windows like 
Vista and
Win7. I think you can install a software OpenAL and get this sorted out.

  I did a rearchitect of osgAL and turned it into osgAudio, which supports both 
OpenAL and
FMOD. http://code.google.com/p/osgaudio/

  It also fixed a few design issues in osgAL. This redesign was done with the 
blessing of
the original osgAL authors. Even if you continue to use OpenAL, consider 
switching to
osgAudio. Changing to osgAudio is very simple, just a few search  replace of 
include and
namespace names and such.


 Cheers,
 ting

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


Re: [osg-users] osgAL problems

2010-09-07 Thread Jason Daly

ting zhang wrote:

Hi, all

I successfully compiled the osgAL project, but the examples in osgAL solution 
didn't work. They all notify me that:

No Generic Hardware in :
OpenAL++: couldn't open sound device.
  


If you're using Vista or later, there will be no Generic Hardware 
device because of the new audio architecture that appeared in Vista.  As 
Maxim suggested, you should probably just use NULL for the device.

--J

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


Re: [osg-users] std::vectorbool performance issue

2010-09-07 Thread Andrew Cunningham
Just as background, the model is a CAD model of a fairly typical part.
When broken down to the component CAD entities, there are a total of about 
19,000 groups in a hierarchy about 4 levels deep. Of course the geometry could 
be coalesced to any level, but users expect visibility control and attribute 
control down to the individual entity level. The traversal of the scene graph 
is very significant portion of the time taken to refresh the scene.

Andrew

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





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


[osg-users] [osgPlugins] can't find plugins at runtime

2010-09-07 Thread Davide Byron
Hi all,

i've happily developed an application based on osg/osgART and i was proudly 
giving it to my friends. Unfortunately, noone of them is able to run it.
The main problem is the inability to find the plugins. i get the error:
plugin -1 unknown
no matter where i put the plugins, in the same folder as the executable, or in 
a folder called osgPlugins-2.8.3
i've searched the forum without luck... can anyone point me in the right 
direction, please?

Also, some have complained about missing config, and that problems seems to be 
related to the lack of microsoft vc++ redistributable. in some cases installing 
vcredist_x68.exe fixed the problem, in other it didn't...
any advice on this too?

Thanks in advance

Cheers,
Davide

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





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


Re: [osg-users] Issue with osgOcean on MacOSX GeForce 7300 GT

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

Bonjour Jean-Claude,


I have been able to run osgOcean by modifying the shaders, but the frame rate 
was not acceptable (15 FPS).  I have also applied the patch to Texture.cpp, but 
it didn't resolve the FBO errors.
Given the framerate is too low, I stop trying to run the software on that 
graphics card.


I have used osgOcean on a 7900GTX in the past, and performance was 
acceptable, but not great. The 7900GTX is the high-end card of the 7000 
line, whereas the 7300GT is on the low end, so your results don't 
surprise me.


You could probably get better results if you're willing to lower the 
resolution of the mesh osgOcean generates. Have a look at the parameters 
to the constructor of FFTOceanSurface. Plus, you'll probably want to 
disable all effects (reflection, refraction, silt, god rays, depth of 
field, etc.) and remove the shaders altogether. Doing this, I have been 
able to get acceptable performance even on laptop integrated chipsets... 
Of course then it doesn't look so great, but the client required any 
ocean representation, and it's better than a blue flat plane. ;-)


So if you're willing to do some testing, disabling things and 
re-enabling them to find your sweet spot, you should be able to use 
osgOcean on most graphics hardware.


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] std::vectorbool performance issue

2010-09-07 Thread Robert Osfield
Hi Andrew,

On Tue, Sep 7, 2010 at 4:25 PM, Andrew Cunningham o...@a-cunningham.com wrote:
 Just as background, the model is a CAD model of a fairly typical part.
 When broken down to the component CAD entities, there are a total of about 
 19,000 groups in a hierarchy about 4 levels deep. Of course the geometry 
 could be coalesced to any level, but users expect visibility control and 
 attribute control down to the individual entity level. The traversal of the 
 scene graph is very significant portion of the time taken to refresh the 
 scene.

If the large number of internal nodes in the scene graph is the
bottleneck then perhaps it would be appropriate to simplify it using
custom nodes that can manage the specifics of your type of scene
layout.

OOoo just had an almighty lighting strike and thunder just outside my
window... time to stand back from any electrics...

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


Re: [osg-users] osgFX Outline Patch

2010-09-07 Thread Florian Kolbe
Hi,

I am still facing an issue with this effect. I tried my model (a chair) with 
osgoutline (2.9.8) and it looked just fine. I integrated the code of 
osgoutline.cpp into my application and I integrated Outline* into my build 
(still using 2.8.3).

Note the attached image. The first chair has no effect, the second chair has 
the outline effect, and the third chair has the scribe effect. As you can see 
with the middle chair, the legs seem to be working but then the seats polygon 
lines get exposed? May this be an issue due to using 2.8.3 ? 

Cheers,
   Florian

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




Attachments: 
http://forum.openscenegraph.org//files/outline_878.png


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


[osg-users] FBO setup failed

2010-09-07 Thread alexandre amyot murray
Hi,

I'm using an osg::Camera to do a render to texture. My setup looks like this
:

osg::Camera * rttCamera = new osg::Camera();
rttCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
rttCamera-setRenderOrder(osg::Camera::PRE_RENDER);

rttCamera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

osg::Texture2D * rttTex = new osg::Texture2D;
rttTex-setResizeNonPowerOfTwoHint( false );
rttTex-setTextureSize( w,h );
rttTex-setInternalFormat(GL_RGBA16F_ARB);
rttTex-setSourceFormat(GL_LUMINANCE);
rttTex-setSourceType(GL_UNSIGNED_BYTE);
rttTex-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
rttTex-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);

osg::Image * rttResultIm = new osg::Image;
osg::PixelBufferObject* pbo= new osg::PixelBufferObject(rttResultIm);
rttResultIm-setPixelBufferObject(pbo);

rttResultIm-allocateImage(w, h, 1, GL_LUMINANCE, GL_UNSIGNED_BYTE);

rttCamera-attach( osg::Camera::COLOR_BUFFER, rttResultIm );
rttTex-setImage( rttResultIm );

But when I do this this way, I get the following warning/error :

RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd6
Warning: detected OpenGL error 'invalid enumerant' after RenderBin::draw(,)
RenderStage::drawInner(,) FBO status= 0x8cd5

Still everything seems to work fine and my frame rate is about 320 fps. But
if I change the last 2 lines from :

rttCamera-attach( osg::Camera::COLOR_BUFFER, rttResultIm );
rttTex-setImage( rttResultIm );

to

rttCamera-attach( osg::Camera::COLOR_BUFFER, rttTex );
rttCamera-attach( osg::Camera::COLOR_BUFFER, rttResultIm );

Then I get no error/warning but my frame rate drops to 250 fps.

So can somebody explain to me what's happening ? I just don't get what is
the difference between the 2 methods and why the first one gives me an error
like this, but still work. By the way I'm working on Windows XP and an
NVidia GTX 260.

Thank you in advance

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


Re: [osg-users] osgFX Outline Patch

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

Hello Florian,


Note the attached image. The first chair has no effect, the second chair has 
the outline effect, and the third chair has the scribe effect. As you can see 
with the middle chair, the legs seem to be working but then the seats polygon 
lines get exposed? May this be an issue due to using 2.8.3 ?


You need to enable the stencil buffer when you create your graphics 
context in order for the outline effect to work correctly. If this is 
not done you'll get the problem you have (sometimes internal polygons 
are shown, sometimes not, depending on order of drawing).


You should be able to use 
osg::DisplaySettings::instance()-setMinimumNumStencilBits(8); before 
creating your viewer/window/context to do this, or modify the traits you 
pass to createGraphicsContext() if you're creating it yourself.


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] osgBullet: Stereo mode / TriMesh Collision Shapes

2010-09-07 Thread Paul Martz

Johannes Scholz wrote:

To the stereo mode issue: This morning I had a quick look at the colladaread 
example in osgBullet. I just set OSG_STEREO to ON and I am getting quite the 
same picture in the colladaread example like in my environment. The distance 
between the left and right eye images is wrong somehow misbehaves..

Unfortunately I will have parent transforms so I would like to stick to the 
AbsoluteModelTransform.


Thanks for the reproducer case. Can you open an issue at the osgBullet wiki? 
This should probably be investigated. This is an interesting issue because, if 
I'm not mistaken, osgBullet is already running in a production environment using 
stereo.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] update problem

2010-09-07 Thread Gianni Ambrosio
I have a set of nodes in the scene. I implemented an UpdateCallback class and 
set it to each node of the scene to animate it. The UpdateCallback 
implementation basically uses the current system time to get the values of 
position and rotation from the corresponding array.

Now the problem. Since the UpdateCallback of each node occurs at different 
system time, sometimes happens the whole scene is not updated in synchronous 
way. In fact during the update visit the index of the array to get the new 
position and rotation from is different from one node to the previous onces of 
the scene.
Basically I need a way to get the system time and store it somewhere once for 
every update visit. I thought to derive from the NodeVisitor and store the 
system time in the constructor (so that I can get it back on every 
UpdateCallback) but I'm not sure this is possible. I don't know where the 
Node/Update Visitor is created and if there is a way to set my own visitor 
instead.

Regards
Gianni

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





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


Re: [osg-users] std::vectorbool performance issue

2010-09-07 Thread Chris 'Xenon' Hanson
On 9/7/2010 9:25 AM, Andrew Cunningham wrote:
 Just as background, the model is a CAD model of a fairly typical part.
 When broken down to the component CAD entities, there are a total of about 
 19,000 groups in a hierarchy about 4 levels deep. Of course the geometry 
 could be coalesced to any level, but users expect visibility control and 
 attribute control down to the individual entity level. The traversal of the 
 scene graph is very significant portion of the time taken to refresh the 
 scene.

  I would consider using some sort of dynamic building of the model. Build the 
scenegraph
with only the top-level groups, flatten everything below them. If the user 
performs and
action that needs finer grained division (like, drilling into one of the 
groups) then you
can replace the flattened subgraph with a newly-built subgraph with 
fine-grained grouping.
either all the way down, or just down to the next step, and repeat the process 
when/if
they drill into that layer.

  For picking, you should be able to have a unique ID on every leaf node, 
regardless of
whether it's in a group or not.

  Paul Martz of Skew Matrix could write a book about don't use OSG to simply 
recreate
your application's internal geometry structure.

 Andrew

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


Re: [osg-users] osgBullet: Stereo mode / TriMesh Collision Shapes

2010-09-07 Thread Paul Martz

Paul Martz wrote:
Thanks for the reproducer case. Can you open an issue at the osgBullet 
wiki?


This isn't an osgBullet issue, I see the same behavior in the osgWorks amt test 
program. So discussion / issue tracking / patch submission should occur in the 
osgWorks related pages:


http://code.google.com/p/osgworks/issues/list
http://groups.google.com/group/osgworks-users

--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Maya to OSG exporter and importer

2010-09-07 Thread Javier Taibo
  Hi all,

  I have released an open source plug-in for Maya that allows to export
Maya scenes to OSG and import them back from OSG to Maya. In case
someone is interested, you can find it at:

  http://maya2osg.sourceforge.net/

  It is a preliminary release. I am currently testing it, but I think it
is fairly usable for the basic features. If you are interested init,
stay tuned... more features are on the way.

  User feedback is very welcome. Enjoy!


  Best regards,

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


Re: [osg-users] Compute Terrain Intersection for .flt databases[SEC=UNCLASSIFIED]

2010-09-07 Thread Paul Pocock
Thanks Robert/Shayne,  turns out I was computing HAT correctly but was
using wrong texture filtering ( I store the positions in a texture ).
thus the computed heights were displayed incorrectly in the vert shader.

Thanks again.


On 09/08/2010 12:27 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
wrote:
 Paul,

 For HAT, you only need one point. LOS requires a start and end point. Both
 require that the points be specified in the database coordinates (i.e.
 geocentric Cartesian coordinates for round earth databases).

 I haven't worked with .flt databases but the osgSim methods appear to work
 for paged databases built by VPB...

 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Pocock
 Sent: Thursday, September 02, 2010 11:06 PM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Compute Terrain Intersection for .flt
 databases[SEC=UNCLASSIFIED]

 Hi - Whats the best way to get the z down intersect point onto a paged
 database. I'm getting what looks like loss of precision errors. I am not
 sure if it is because I am using  osgUtil::IntersectVisitor (Which I
 believe is deprecated?) or my lack of knowledge of
 osgSim::HeightAboveTerrain. Is it my proper understanding that I provide
 two points x,y,z (beginning and end) for HAT? Even doing this gives some
 very strange results... Is there a very basic example out there to
 achieve this? Is it a trivial problem?

 Regards
 Paul



 IMPORTANT: This email remains the property of the Department of Defence and
 is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you
 have received this email in error, you are requested to contact the sender
 and delete the email.
 ___
 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