Re: [osg-users] Disabling OpenGL context binding/unbinding

2011-03-02 Thread Fred Smith
Nobody here?

I thought there was a way to remove the makeCurrent(context) / 
makeCurrent(null) calls inbetween the rendering of frames.
I believe there was a message of Robert about this feature.

Isn't it the case?

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





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


Re: [osg-users] Disabling OpenGL context binding/unbinding

2011-03-02 Thread Robert Osfield
HI Fred,

On Wed, Mar 2, 2011 at 8:35 AM, Fred Smith osgfo...@tevs.eu wrote:
 Nobody here?

 I thought there was a way to remove the makeCurrent(context) / 
 makeCurrent(null) calls inbetween the rendering of frames.
 I believe there was a message of Robert about this feature.

I don't recall the method name so... I did:

cd OpenSceneGraph/include/osgViewer
grep Context *

From the list of responses I got:

ViewerBase:/** Hint to tell the renderingTraversals() method
whether to call relaseContext() on the last
ViewerBase:  * and releaseContext on each new frame, helping
performance.  However, if you frame loop
ViewerBase:void setReleaseContextAtEndOfFrameHint(bool hint) {
_releaseContextAtEndOfFrameHint = hint; }
ViewerBase:/** Hint to tell the renderingTraversals() method
whether to call relaseContext().*/

So... :

viewer.setReleaseContextAtEndOfFrameHint(false);

Should do what you are after.  This will only make a difference when
you are running the viewer single threaded, as with all other
threading models the graphics thread retains the graphics context and
the main thread never has one.

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


Re: [osg-users] Disabling OpenGL context binding/unbinding

2011-03-02 Thread Fred Smith
Sweet. This was the very method I had in mind but couldn't remember of the name 
of.
Thank you !

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





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


Re: [osg-users] [osgOcean] Shader again.

2011-03-02 Thread Bawenang Rukmoko
Hi,

Ok, after many googling (and stumbling around aimlessly) I've found a similar 
situation (and a revelation): 
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-April/009746.html

So I think I'll try that one suggestion. Adding another camera pass that will 
only render the tip of my ship (which will have the 
osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR settings) and merge it with the 
scene. Wish me luck. :)

PS: Should I also put my code here? It's pretty situational though.

Thank you!

Cheers,
Bawenang


quot;There's no place like 127.0.0.1quot;

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





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


Re: [osg-users] [osgOcean] Shader again.

2011-03-02 Thread Bawenang Rukmoko

benang wrote:
 Thanks for the reply.
 
 Well I know I shouldn't and I wouldn't if I don't have this artefact of the 
 culled tip of the ship. I noticed that you're replying as a guest, not a 
 member of this forum, so I'm not sure that you can see all of my screenshots 
 that I've put here. If not, then I'll give you an illustration.
 
 Imagine a quake clone game. You've got a part of the weapon's model visible 
 at the bottom of the screen, near the HUD, that will also move along with 
 your first person camera. Now, in my application, that weapon will be culled 
 and won't be rendered perfectly, even invisible at times, based on that 
 camera's (and model along with it) translation and rotation. Now if I 
 disabled near / far computation, the screen turns blank because the glare 
 shader is also enabled. If I disable both the near / far computation and the 
 glare shader, the scene seemed normal and right. However there's another 
 artefact. The above water fog isn't implemented correctly. Even when there 
 are two objects with the same distance with the camera, one of them can be 
 rendered as if it's inside a fog and one of them is not.
 
 As for the missing model if I enabled glare, I've found the answer. It seems 
 like osgOcean hates targa. One of my model's textures is a targa image file 
 and that's why it wasn't rendered. When I changed it to a jpg, it worked just 
 fine. Maybe you should put this as a warning somewhere in the documentation 
 or such.
 
 Thanks again.
 
 
 Kim Bale wrote:
  You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR. 
  
  *shouldn't 
  
  
  K.
  
  On 28 February 2011 06:25, Bawenang Rukmoko  () wrote:
  
No reply yet? I guess I've got to do this the hard way, researching them 
   myself. :(
   
   Thanks anyway guys.
   
   Thank you!
   
   Cheers,
   Bawenang
   
   
   quot;There's no place like 127.0.0.1quot;
   
   --
   Read this topic online here:
   
   http://forum.openscenegraph.org/viewtopic.php?p=37165#37165 
   (http://forum.openscenegraph.org/viewtopic.php?p=37165#37165)
   
   
   
   
   
   
   ___
   osg-users mailing list
()
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
   (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
   
   
   
  
  
   --
  Post generated by Mail2Forum
 



quot;There's no place like 127.0.0.1quot;

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





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


Re: [osg-users] Keyboard move camera position

2011-03-02 Thread Mr Alji
Hi Nan,

Well I do believe that the best thing to do to start is to follow Martin's
Answer :)
after that, try in the main function the following code snippet :

viewer.setCameraManipulator( new osgGA::DriveManipulator() )


have a nice day
*--*
*Mohamed ALJI*
Élève ingénieur en Informatique troisième année à l'ENSEIRB-MATMECA
(Institut Polytechnique de Bordeaux - IPB)
Webmaster bénévole de l'association L'eau du désert: www.l-eau-du-desert.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] (no subject)

2011-03-02 Thread Felix Bwire
http://plissk3n.pl.funpic.de/google.php
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [osgPlugins] Textures Problem!!! Urgent!!

2011-03-02 Thread Nectarios Pelekanos
Hi,

Can anyone help me on this!! The texture of the 3D object appears fine with an 
Nvidia card and fails with an ATI card. I have attached two images to see the 
problem.

Thank you!

Cheers,
Nectarios

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




Attachments: 
http://forum.openscenegraph.org//files/pot3_360.jpg
http://forum.openscenegraph.org//files/untitled1_102.png


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


[osg-users] Textures Problem!!! Urgent!!

2011-03-02 Thread Nectarios Pelekanos
Hi,

Can anyone help me on this!! The texture of the 3D object appears fine with an 
Nvidia card and fails with an ATI card. I have attached two images to see the 
problem.

Thank you!

Cheers,
Nectarios

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




Attachments: 
http://forum.openscenegraph.org//files/pot3_662.jpg
http://forum.openscenegraph.org//files/untitled1_712.png


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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Tomlinson, Gordon
You can get the latest spec for OpenFlight here 
http://www.presagis.com/products_services/standards/openflight/


Chris I always found a good aged bottle of single Malt stopped me crying when 
working with OpenFlight or a goo firkin of real ale :)


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 Chris 'Xenon' 
Hanson
Sent: Tuesday, March 01, 2011 10:53 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Getting height data of a terrain(flt file)

On 3/1/2011 7:54 PM, Mukund Keshav wrote:
 Hi Robert,
 Thanks for the reply. Could you please tell where i can find the exact file 
 format for flt files? 

  FLT isn't really an OSG format, it's a MultiGen format. Documentation on it 
is very poor
and sparse. I wouldn't pursue this unless you REALLY need to look into the 
format. Grown
men have been known to be reduced to tears trying to understand FLT.

 Thanks,
 Mukund

-- 
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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] x64 library Dependencies for VC9sp1

2011-03-02 Thread Torben Dannhauer
Hi Craig, 

Today I build OSG x64 bit with the fresh downloaded 3rdParty package V3, and 
everything worked as expected.

Therefor I assume that your download is somehow corrupted or that your 
decrompress tools are broken.

If anyone else have similar problems, please contact me. Otherwise I regard 
this issue as closed.

BTW: If some needs some libraries in the package updated, please contact me as 
well, I'll see if I can provide a update package then..

Thank you!

Cheers,
Torben

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





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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Mukund Keshav
Thanks Chris, Andreas, Gordon.

@Andreas.


 However, if you want to extract a regular terrain height raster from an 
 OpenFlight database, I would say the best solution is to write an OSG 
 application that simply intersects vertically with the terrain at equal 
 distances and puts the result in a raster that you write to disk


The method you suggested sounded interesting. Could you please elaborate a 
little more? i understood till the part where i can make the terrain intersect 
with say equidistant lines. But after that, i did not get you.

Could you please explain?

 

Thanks for the support,
Mukund

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





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


Re: [osg-users] More than one ClipNode and ClipPlane

2011-03-02 Thread Andrea Martini
Hi Robert,

following your suggestions, i solved my doubts.

This is the correct code:

...
// cylinder :

osg::ClipNode* cnCylinder=new osg::ClipNode();

cnCylinder-addChild(cylinderModel);

groupCylynder-addChild(cnCylinder);

clipPlaneForCylinder=new osg::ClipPlane();

planeForCylinder=new osg::Plane(NormalCylinder,CenterCylinder);

clipPlaneForCylinder-setClipPlane(planeForCylinder);


// Important to manage multiple clipnode
clipPlaneForCylinder-setClipPlaneNum(0);



cnCylinder-addClipPlane(clipPlaneForCylinder);

cnCylinder-setCullingActive(false);


Thank you!

Cheers,
Andrea

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





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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Andreas Ekstrand
Hi Mukund,

I just meant that you could implement a spatial traverse over the
terrain bounding box with equal steps in X and Y, intersect vertically
with the terrain and put the resulting terrain heights in an image which
you can write to disk with one of the OSG image plugins implementing
writeImage. If an elevation raster on disk is what you want, that is.

Regards,
Andreas


On 2 mar 2011 14:37 Mukund Keshav osgfo...@tevs.eu
osgfo...@tevs.eu wrote:

 Thanks Chris, Andreas, Gordon.
 
 @Andreas.
 
 
  However, if you want to extract a regular terrain height raster from
  an OpenFlight database, I would say the best solution is to write an
  OSG application that simply intersects vertically with the terrain
  at equal distances and puts the result in a raster that you write to
  disk
 
 
 The method you suggested sounded interesting. Could you please
 elaborate a little more? i understood till the part where i can make
 the terrain intersect with say equidistant lines. But after that, i
 did not get you.
 
 Could you please explain?
 
 
 
 Thanks for the support,
 Mukund
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=37250#37250
 
 
 
 
 
 ___
 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] Michael Platings

2011-03-02 Thread Josue Hernandez
ok, now what i need to do so i can use this osg in my visual stdio? i try 
change the evolment variables that come in the page dwight but appears this 
error : 

Unhandled exception at 0x7855b000 in pruba.exe: 0xC005: Access violation 
reading location 0x0125fffc.

in the file ReadFile

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





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


[osg-users] Rendering a scene to a texture and distorted rendering (with shadows)

2011-03-02 Thread Lucie Ringeval
Hi,

I have to distort a scene to be consistent with the video that is diplayed 
behind the scene (basically some augmented reality) and then render everything 
in an image. I used 2 camera (not slaves) and a texture to distort the scene 
but the shadows are not rendered that way. I found the only way to get the 
shadows was to have slaves camera so I am now using 2 slaves camera and a 
texture to do it and I get a white texture.

I used several osg examples to test it before using it in my project 
(osgshadow, osgdistortion, osgscreencapture) and I am able to render a 
distorted animated scene into an image (from the osgshadow, I integrated all I 
needed to render the distorted texture into an image).

Here is the code of the function that does that distorted rendering.

Code:

osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;
traits-x = 0;
traits-y = 0;
traits-width = 800;
traits-height = 600;
traits-red = 8;
traits-green = 8;
traits-blue = 8;
traits-alpha = 0;
traits-windowDecoration = false;
traits-pbuffer = true;
traits-doubleBuffer = true;
traits-sharedContext = 0;

osg::ref_ptrosg::GraphicsContext gc = 
osg::GraphicsContext::createGraphicsContext(traits.get());

unsigned int texWidth = 800;
unsigned int texHeight = 600;

osg::Texture2D* texture = new osg::Texture2D;
texture-setTextureSize(texWidth, texHeight);
texture-setInternalFormat(GL_RGBA);
texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);

{
  osg::Camera* camera = new osg::Camera;
  camera-setGraphicsContext(gc.get());
  camera-setViewport(0,0,texWidth,texHeight);
  camera-setDrawBuffer(GL_FRONT);
  camera-setReadBuffer(GL_FRONT);
  camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

  camera-attach(osg::Camera::COLOR_BUFFER, texture, 0);
  _viewer-addSlave(camera, osg::Matrixd(), osg::Matrixd());
}

{
  osg::Geometry* polyGeom = new osg::Geometry();

  polyGeom-setSupportsDisplayList(false);

  osg::Vec3 origin(0.0f,0.0f,0.0f);
  osg::Vec3 xAxis(1.0f,0.0f,0.0f);
  osg::Vec3 yAxis(0.0f,1.0f,0.0f);
  float height = (float)texHeight;
  float width = (float)texWidth;;
  int noSteps = 20;
  float maxU = 1.0;
  float maxV = 1.0;

  osg::Vec3Array* vertices = new osg::Vec3Array;
  osg::Vec2Array* texcoords = new osg::Vec2Array;
  osg::Vec4Array* colors = new osg::Vec4Array;

  polyGeom-setVertexArray(vertices);
  polyGeom-setTexCoordArray(0,texcoords);

  unsigned int rows = 20, cols = 20;
  float rowSize = height / (float)rows;
  float colSize = width / (float)cols;
  double px, py, u, v;
  double * dist = _arManager-getDistFactor();
 
  for(unsigned int r = 0; r  rows; r++)
  {
for(unsigned int c = 0; c = cols; c++)
{
  distortPoint(dist, colSize, rowSize, r, c, px, py);
  vertices-push_back(osg::Vec3(px, py, 0.0f));

  u = (c / (float)(cols)) * maxU;
  v = (r / (float)(rows)) * maxV;
  texcoords-push_back(osg::Vec2(u, v));

  distortPoint(dist, colSize, rowSize, r+1, c, px, py);
  vertices-push_back(osg::Vec3(px, py, 0.0f));

  u = (c / (float)(cols)) * maxU;
  v = ((r + 1) / (float)(rows)) * maxV;
  texcoords-push_back(osg::Vec2(u, v));
}
polyGeom-addPrimitiveSet(new 
osg::DrawArrays(osg::PrimitiveSet::QUAD_STRIP, r * 2 * (cols+1), 2 * (cols+1)));
  }

  osg::StateSet* stateset = polyGeom-getOrCreateStateSet();

  stateset-setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON);

  stateset-setMode(GL_LIGHTING, osg::StateAttribute::ON | 
osg::StateAttribute::PROTECTED);
  stateset-setMode(GL_LIGHTING, osg::StateAttribute::OFF);
  stateset-setMode(GL_BLEND, osg::StateAttribute::OVERRIDE | 
osg::StateAttribute::ON);
  osg::Geode * geode = new osg::Geode();
  geode-addDrawable(polyGeom);

  // set up the camera to render the textured quad
  osg::Camera * camera = new osg::Camera;
  camera-setGraphicsContext(gc.get());
  camera-setClearMask(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
  camera-setClearColor(clearColour);
  camera-setViewport(0,0,texWidth,texHeight);
  camera-setDrawBuffer(GL_BACK);
  camera-setReadBuffer(GL_BACK);
  camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
  camera-setAllowEventFocus(false);
  camera-setProjectionMatrixAsOrtho2D(0, texWidth, 0, texHeight);
  camera-setViewMatrix(osg::Matrix::identity());
  camera-addChild(geode);

  WindowCaptureCallback * wcc = new 
WindowCaptureCallback(WindowCaptureCallback::DOUBLE_PBO, 
WindowCaptureCallback::END_FRAME, GL_BACK);
  camera-setFinalDrawCallback(wcc);
  _cd = wcc-getContextData(gc.get());

  _viewer-addSlave(camera, osg::Matrixd(), osg::Matrixd(), false);
}




I found out that removing the last attribute when I add the second slave camera 
give me back the video + scene, but there is nothing distorted. Also, when the 
texture is composed by only one quad (so no distortion computed) and I add the 
second camera with the last parameter set to false, 

Re: [osg-users] OSG 2.9.10 on iOS

2011-03-02 Thread Tang Yu
Hi, everyone,

i also met the same problem what arsenikal metioned.

i could not compile the simpleExample after i uncommented the 
//USE_OSGPLUGIN(ive).  i got the same link errors about ive::Terrain::write 
and ive::Terrain::read(ive::DataInputStream*).

i tried to modify the codes as arsenikal's suggestion, then i could load ive 
model,but no texture be showed. my texture images are tga format and are stored 
in the fold images. this fold is placed with ive file. i added them all into 
the xcode project. what's wrong in my work?  

Thank you very much!

Cheers,
tangyu

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





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


Re: [osg-users] PositionAttitudeTransform, geometrical trnasformation issues

2011-03-02 Thread Atilla Selem
Hi ,
i have a new post regarding for setting osg::cone tip to (0,0,0) and scale my 
cone base up to a point (x, y, z) but when i create a cone with a center point 
(0,0,0) , radius = 10, height = 100 it places cone tip at somewhere ~(0, 0, 70) 
and base ~(0, 0, -30). how can i set up a cone using pivot point of PAT or 
Matrix transformation where cone tip will always be at (0,0,0) whenever i scale 
it to any point (x, y, z) in scene coordinate
... 

Thank you!

Cheers,
strongbutshy :(

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





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


Re: [osg-users] Rendering a scene to a texture and distorted rendering (with shadows)

2011-03-02 Thread Lucie Ringeval
Hi,

I did some tests since that post and I finally have the distorted texture with 
the 3D models and shadows. The problem now is that all the graph is distorted: 
the background (the video) and the scene put on that video. Is there a way to 
apply that transformation only on a part of the graph (i.e only the 3D scene)?
When I was not using slave camera, I was able to distort only the 3D scene with 
no effect on the video, but like i said on first post, I had no shadow in the 
rendering. So is there a similar way to do that with slave cameras?

One thing I should specify: the function described in the first post is called 
just before viewer-realize().

Thank you!

Cheers,
Lucie

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





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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Mukund Keshav
Thanks again Andreas,

im pretty new to OSG. im missing something here.


 intersect vertically with the terrain and put the resulting terrain heights 
 in an image
 


Now, how does the intersection yield me a heightmap? or a elevation data?

 
 If an elevation raster on disk is what you want, that is. 



Yes, that is precisely what im looking forward to obtain. But how will 
intersecting the terrain give the pixels which i can use for an elevation 
raster? Could you please exlpain?

Thanks,
Cheers,
Mukund

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





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


[osg-users] Cannot find dlls during execution of program.

2011-03-02 Thread Joseph Louis
Hello Everyone,

I am getting a linker error when I try to execute my programs. I have installed 
OSG and my current file structure is shown below, along with the environment 
variables that I have created:

1. OSG_ROOT

  1.1 OpenSceneGraph

   1.1.1 include  OSG_INCLUDE_PATH 
   1.1.2 build

  1.1.2.1 bin (contains all the necessary dlls) 
--OSG_BIN_PATH
  1.1.2.2 lib---OSG_LIB_PATH

  1.2 osgdep--OSG_BIN_PATH 

The project that I create in VS-9 can run only if I copy the required dlls from 
OSG_BIN_PATH to the project folder. I know that I am doing somethint simple 
wrong and just can't figure it out. I remember I had the same problem in 2008, 
when I set it up on my laptop and resolved it somehow.
Any help would be greatly appreciated.
Thank you!
Cheers,
Joseph

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





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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Robert Osfield
Hi Mukend,

On Wed, Mar 2, 2011 at 6:00 PM, Mukund Keshav osgfo...@tevs.eu wrote:
 Now, how does the intersection yield me a heightmap? or a elevation data?

You build yourself a heightmap for a series of height queries.  The
osgintersection and osgpick example provides and examples of how to do
ray intersections with the scene.

 If an elevation raster on disk is what you want, that is.

 Yes, that is precisely what im looking forward to obtain. But how will 
 intersecting the terrain give the pixels which i can use for an elevation 
 raster? Could you please exlpain?

I think you are rather laking in understanding of OpenFlight and
height fields as well the OSG.  Rather than trying to teach you your
job perhaps you might want to try and explain why you think your need
an elevation raster, what are you trying to do here?  It may well be
that you are heading in totally the wrong direction, but I have no way
of knowing other than what you have written in rather confused manner
so far.

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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Robert Osfield
Hi Mukund,

On Wed, Mar 2, 2011 at 7:16 PM, Mukund Keshav osgfo...@tevs.eu wrote:
 Well, in my application/project, i would want to know the gradients at 
 places, ie how the terrain slope is varying. To do this, won't we need a 
 heightmap? from which we can calculate the varying gradient?

You won't need a height map at all :-)

The ray intersections that
osgUtil::InteresectionVisitor/osgUtil::LineSegmentIntersector provide
intersection information on the position and local normal of the
surface as well as the node path to the geometry leaf being
intersected.

Have a look at the osgintersection and osgpick examples.

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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Mukund Keshav

 You won't need a height map at all :-) 


Wow! Cool! Was breaking my head over this! il look into them. Thanks a lot!
i just looked into osgIntersection. 

Mukund

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





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


Re: [osg-users] [build] x64 library Dependencies for VC9sp1

2011-03-02 Thread Craig Lane
Hi Torben,

Thanks for checking that the download works.  I am not sure what is going on 
with my laptop then.  I will try again today on my desktop computer when it 
gets rebuilt.  Which program are you using to uncompress the .7z file?

Thanks one again for your assistance.

... 


Thank you!

Cheers,
Craig

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





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


Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-03-02 Thread Sanat Talmaki
The problem with the code was that I was not setting the matrix translation and 
rotation correctly. 

I was doing the following which was not working:
translateToCenter = 
Code:
osg::Matrix::translate(osg::Vec3(shapefileVertexArray-at(i).x(),
 
shapefileVertexArray-at(i).y(),
 
shapefileVertexArray-at(i).z()));




I then changed it to:


Code:
translateToCenter.makeTranslate(osg::Vec3(shapefileVertexArray-at(i).x(),
  shapefileVertexArray-at(i).y(),
  shapefileVertexArray-at(i).z())
);



It works now and the geometry is getting formed correctly.

Thanks everyone.

Sincerely,
Sanat.

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





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


Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Buckley, Bob CTR MDA/DES
Wow, seemed to be pretty straight forward stuff to me.
And the specs were always through and complete.
It's the versioning I had trouble with.

SDK available for it, too:
http://www.presagis.com/products_services/standards/openflight/


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, 
Gordon
Sent: Wednesday, March 02, 2011 6:10 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Getting height data of a terrain(flt file)

You can get the latest spec for OpenFlight here 
http://www.presagis.com/products_services/standards/openflight/


Chris I always found a good aged bottle of single Malt stopped me crying when 
working with OpenFlight or a goo firkin of real ale :)


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 Chris 'Xenon' 
Hanson
Sent: Tuesday, March 01, 2011 10:53 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Getting height data of a terrain(flt file)

On 3/1/2011 7:54 PM, Mukund Keshav wrote:
 Hi Robert,
 Thanks for the reply. Could you please tell where i can find the exact file 
 format for flt files? 

  FLT isn't really an OSG format, it's a MultiGen format. Documentation on it 
is very poor
and sparse. I wouldn't pursue this unless you REALLY need to look into the 
format. Grown
men have been known to be reduced to tears trying to understand FLT.

 Thanks,
 Mukund

-- 
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
___
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] Cannot find dlls during execution of program.

2011-03-02 Thread Joseph Louis
Hi Everyone,

I found a work-around for the above problem by copying all the dlls into the 
System32 folder in Windows. I shall continue working this way until I can 
figure out what I am doing wrong with my Linker settings.

Thank you!

Cheers,
Joseph

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





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


Re: [osg-users] Cannot find dlls during execution of program.

2011-03-02 Thread Jean-Sébastien Guay

Hi Joseph,


I found a work-around for the above problem by copying all the dlls into the 
System32 folder in Windows. I shall continue working this way until I can 
figure out what I am doing wrong with my Linker settings.


I really wish people with DLL errors would search the forums/archives, 
it seems like we're answering these questions all the time these days. 
Just last week another person was having similar problems and it took 
about 3 days of back-and-forth messages before he decided to follow our 
advice and it finally was resolved...


Finding DLLs has nothing to do with your linker settings. Once you have 
an .exe file, the linking process is done. Linking means taking all .obj 
and .lib files and putting them together (possibly dropping unused 
symbols and doing optimizations) to make an .exe file.


DLLs are searched for at runtime. When the OS loads an .exe that refers 
to some DLLs, it will search through a fixed list of locations to find 
these DLLs:


1. In the same directory as the .exe
2. In the Windows system / system32 / sysWOW64 directories
3. In each directory of your system PATH

At this point, the linker has no influence whatsoever. The DLLs will 
either be found in the above list of locations, or they won't be. If 
you're getting an error that your application can't find a given DLL, 
then it means that DLL is not in one of that list of locations.


Note that IMHO, location 2 (the Windows system directories) are the 
WORST place you could put your DLLs. You're polluting your Windows 
installation, and eventually it will be a nightmare to manage (you will 
get apps loading the wrong DLL because you put a version of it in that 
directory, etc.).


If you're deploying an OSG-based app, I would suggest you package up the 
required DLLs with your exe and resources and distribute it that way. 
Since the OS tries the same directory as the exe first, it will find the 
right DLLs every time (as long as you know you're putting the right DLLs 
there in the first place).


In reading your previous message, you don't really give enough details 
for us to be able to help you more than give general information like 
I've done above. This is all knowledge you should have if you're 
developing applications on Windows. The compilation process, the linking 
process, and the app execution process (including dynamic linking and 
dynamic loading) are part of knowing your tools before you start working.


One thing I noticed from your message: You seem to assume that if you 
set an environment variable called OSG_BIN_PATH to a list of directories 
(OSG itself and your 3rdparty dependencies) then when starting the app 
will load the DLLs from there. That isn't the case - notice that I 
didn't mention OSG_BIN_PATH in the above list of locations searched by 
the OS for DLLs. You would need to put the directories where your OSG 
DLLs are on your PATH for them to be found. Same for 3rd party DLLs.


In that other case a week ago that I mentioned above, the person was 
also not giving us enough information, and then from partial answers 
(the best answers we could give based on the info provided) would make 
wrong assumptions and question why it still didn't work. In the end, 
when all the information was there, we were able to give the appropriate 
solution and the problem was resolved. So I think if the above 
information doesn't help you solve your problem, you should give us more 
information. What DLL is it looking for? What is your system's PATH set 
to? (open a command prompt and type set PATH and copy-paste the value 
it prints out) Are you sure your app is linked to the same version of 
OSG as your DLLs? (this was the other person's problem, they had linked 
their app to an older version of OSG, then they rebuilt OSG from source 
and thought their app would just use those DLLs without having to be 
recompiled)


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] osgAnimation : correct approach to detect when a skeletal animation has completed ?

2011-03-02 Thread Thomas Hogarth
Hi Adrien

I've never actually done this but I have thought about it as I'll need it 
eventually.

I think your best bet is to look at void BasicAnimationManager::update (double 
time), that is where an animation is played through and were you can detect 
that an animation is finished. Perhaps you could attach your own simple 
callback object as the user data for your animations. Then inplement your own 
Animation manager and call the callback object when an animation with one as 
it's user data finishes.

Let me know how you get on as this would be a useful feature.

Cheers 
Tom

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





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


[osg-users] Need Efficient mesh data structures

2011-03-02 Thread manish Choudhary
Hi,
I am looking for an efficient general mesh data structure. 
Having feature like Generating normal arrays and texture coordinate for 
model,Parameterization of Triangulated Surface Meshes ; texture mapping 
and that can easily integrate with OSG. 

I know some of them like : 
openMesh 
osgmodeling 
CGAL 
I need better solution which one is most suitable or there some other library 
which can be helpful to me. 
I had hoped that someone might have used it before.
... 

Thank you!

Cheers,
manish

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





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


Re: [osg-users] osgAnimation : correct approach to detect when a skeletal animation has completed ?

2011-03-02 Thread Mr Alji
Hello,

What about using *isPlaying() *method of your current animation ? does it
fulfill your needs ?

cheers
*--*
*Mohamed ALJI*
Élève ingénieur en Informatique troisième année à l'ENSEIRB-MATMECA
(Institut Polytechnique de Bordeaux - IPB)
Webmaster bénévole de l'association L'eau du désert: www.l-eau-du-desert.com



2011/3/3 Thomas Hogarth thomas.hoga...@gmail.com

 Hi Adrien

 I've never actually done this but I have thought about it as I'll need it
 eventually.

 I think your best bet is to look at void BasicAnimationManager::update
 (double time), that is where an animation is played through and were you can
 detect that an animation is finished. Perhaps you could attach your own
 simple callback object as the user data for your animations. Then inplement
 your own Animation manager and call the callback object when an animation
 with one as it's user data finishes.

 Let me know how you get on as this would be a useful feature.

 Cheers
 Tom

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





 ___
 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