Re: [osg-users] [osgPlugins] Michael Platings

2011-03-03 Thread Alberto Luaces
Josue Hernandez writes:

 to make it clear, i follow the instructions of the dwight page, but use the 
 binares of osg 2.8.3 and i copy the .dll of fbx that i gererated with the 
 .sln you toldme to compile

You can't mix versions like that! Use only the OSG you compiled
(binaries + plugins).

-- 
Alberto

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


[osg-users] TexGen Python Scripting

2011-03-03 Thread Adam Healey
Hello,

This was the first forum that came up after I googled my query that was not 
linked to the recently broken TexGen support website.

I've been using TexGen for the past couple of weeks to generate fabric weaves 
that I then intend to impact test using ABAQUS. I am relatively inexperienced 
with programming and scripting, so I ask for your patience.

I've had some trouble recently creating a 'non-crimp fabric;' TexGen does not 
accept the Python script I've written for it, citing an 'Invalid Syntax' when 
'for Yarn in Yarns' is used.

The curious thing is that the same instruction was used in creation of a 
tri-axial braid fabric which was accepted, albeit a bit messily.

Can anyone suggest a solution to my problem? The scripts I've written for both 
the non-crimp fabric and the tri-axial braid are available on request. I'd 
really appreciate any help anyone can give me.

Cheers,

Adam

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





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


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

2011-03-03 Thread Sukender
Hi Nectarios,

Did you try updating the drivers? I already spotted strange things like this 
and it was a matter of drivers.
And is there something special on your model, or is this simply a one-texture 
thing?

Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Nectarios Pelekanos nectarios.peleka...@armes-tech.com a écrit :

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


Re: [osg-users] TexGen Python Scripting

2011-03-03 Thread David Callu
Hi Adam,

Seem that you don't use the good forum/mailing list.
This one is the OpenSceneGraph User Mailing List

TexGen forum is here http://texgen.sourceforge.net/phpBB2/index.php

HTH
David Callu


2011/2/22 Adam Healey ah...@ex.ac.uk

 Hello,

 This was the first forum that came up after I googled my query that was not
 linked to the recently broken TexGen support website.

 I've been using TexGen for the past couple of weeks to generate fabric
 weaves that I then intend to impact test using ABAQUS. I am relatively
 inexperienced with programming and scripting, so I ask for your patience.

 I've had some trouble recently creating a 'non-crimp fabric;' TexGen does
 not accept the Python script I've written for it, citing an 'Invalid Syntax'
 when 'for Yarn in Yarns' is used.

 The curious thing is that the same instruction was used in creation of a
 tri-axial braid fabric which was accepted, albeit a bit messily.

 Can anyone suggest a solution to my problem? The scripts I've written for
 both the non-crimp fabric and the tri-axial braid are available on request.
 I'd really appreciate any help anyone can give me.

 Cheers,

 Adam

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





 ___
 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] Bug in AutoTransform ?

2011-03-03 Thread Miguel Lokida
Hi,

I use OpenSceneGraph 2.8.2 on windows xp.

I have a scene graph in which I have severals geodes (quads).
The camera looks them at the top in an orthographic view (tested also in a 
perspective view).

I have this structure : 
Root - PositionAttitudeTransform1-AutoTransform1-Geode1
Root - PositionAttitudeTransform2-AutoTransform2-Geode2
Root - PositionAttitudeTransform3-AutoTransform3-Geode3
...

I have set AutoScaleToScreen to true for the AutoTransformNode.

The problem is that geodes that do not move in time do not appear in the viewer.

But if set AutoScaleToScreen is to false, they appears.

I have tested setMinimumScale, setAutoUpdateEyeMovementTolerance and 
setAutoScaleTransitionWidthRatio with differents parameter But as I haven't 
found any information about this methods and what they do I am not sure of the 
result.

So, What can I do to display this geode that do not move in time when I use the 
AutoTransform node with setAutoScaleToScreen at true ?

Thank you for your help.

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





___
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-03 Thread Cedric Pinson
Hi,
Look to the TimelineAnimationManager, and the examples about
osgAnimation.

Cedric

On Thu, 2011-03-03 at 08:46 +0100, Mr Alji wrote:
 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

-- 
Provide OpenGL, WebGL and OpenSceneGraph services
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bug in AutoTransform ?

2011-03-03 Thread Robert Osfield
HI Miguel,

I can't make much sense of the issue from your description.  What do
you mean by The problem is that geodes that do not move in time do
not appear in the viewer, this is such an open ended statement that
there no way to know what you precisely mean.

As a general comment, osg::AutoTransform uses the camera positions
during the cull traversal to set it's a rotation and scale when you
select the appropriate options.

Robert.

On Thu, Mar 3, 2011 at 9:21 AM, Miguel Lokida mlok...@yahoo.fr wrote:
 Hi,

 I use OpenSceneGraph 2.8.2 on windows xp.

 I have a scene graph in which I have severals geodes (quads).
 The camera looks them at the top in an orthographic view (tested also in a 
 perspective view).

 I have this structure :
 Root - PositionAttitudeTransform1-AutoTransform1-Geode1
 Root - PositionAttitudeTransform2-AutoTransform2-Geode2
 Root - PositionAttitudeTransform3-AutoTransform3-Geode3
 ...

 I have set AutoScaleToScreen to true for the AutoTransformNode.

 The problem is that geodes that do not move in time do not appear in the 
 viewer.

 But if set AutoScaleToScreen is to false, they appears.

 I have tested setMinimumScale, setAutoUpdateEyeMovementTolerance and 
 setAutoScaleTransitionWidthRatio with differents parameter But as I haven't 
 found any information about this methods and what they do I am not sure of 
 the result.

 So, What can I do to display this geode that do not move in time when I use 
 the AutoTransform node with setAutoScaleToScreen at true ?

 Thank you for your help.

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





 ___
 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] Bug in AutoTransform ?

2011-03-03 Thread Miguel Lokida
It is a scene whith several postionAttitudeTransform-AutoTransform-geode in 
the same viewer and the same camera.

I mean that when I set set AutoScaleToScreen(true) for the autoTransformNode, 
Geode (a quad geometry with coords Vec3(-20, 20, 20),
Vec3(-20, -20, 20), Vec3(20, -20, 20), Vec3(20, 20, 20). )

that has a constant position (for example, a constant position 0,0,0 in the 
PositionAttitudeTransform parent Node for Geode 1), the quad is not displayed 
whereas, the second geode where position move in time (Time 0 pos(-10, 0,10) 
time 1 pos(-9,0,10)...) the quad is displayed in the viewer.

I will try to make an example.

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





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


[osg-users] Loading a model, but can not see it (iPhone Plateform)

2011-03-03 Thread Tang Yu
Hi,

i met trouble on iphone again!

i loaded an IVE model in my viewer. This viewer has a texture2D image 
background which is rendered to the whole size of view. But I can not see any 
model except for the texture background.
After i uncomment the code about rendering background, the model is loading 
successfully. My code is below:
  

Code:

-(osg::Node *) create2DBGTexture
{
unsigned int w = 480; 
unsigned int h = 320; 

float vx = (float)w;
float vy = (float)h;

osg::ref_ptrosg::Geometry rectBG_geom = new osg::Geometry;

osg::Vec3Array * vertices = new osg::Vec3Array;
vertices-push_back(osg::Vec3(0.0, 0.0, -1.0));
vertices-push_back(osg::Vec3(0.0, vy, -1.0));
vertices-push_back(osg::Vec3(vx, vy, -1.0));
vertices-push_back(osg::Vec3(vx, 0.0, -1.0));
rectBG_geom-setVertexArray(vertices);

osg::Vec2Array * texcoords = new osg::Vec2Array;
texcoords-push_back(osg::Vec2(0.0, 0.0625));
texcoords-push_back(osg::Vec2(0.0, 0.9375));
texcoords-push_back(osg::Vec2(1.0, 0.9375));
texcoords-push_back(osg::Vec2(1.0, 0.0625));
rectBG_geom-setTexCoordArray(0,texcoords);

osg::Vec3Array * normals = new osg::Vec3Array;
normals-push_back(osg::Vec3(0.0f,0.0f,1.0f));
rectBG_geom-setNormalArray(normals);
rectBG_geom-setNormalBinding(osg::Geometry::BIND_OVERALL);

rectBG_geom-addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,4));

BG_image = new osg::Image;
BG_image-setImage(AVWidth, AVHeight, 1, GL_RGBA, GL_BGRA, 
GL_UNSIGNED_BYTE, pAVImage, osg::Image::NO_DELETE);

BG_texture = new osg::Texture2D;
BG_texture-setDataVariance(osg::Object::DYNAMIC); 
BG_texture-setImage(BG_image);
BG_texture-setResizeNonPowerOfTwoHint(false);
BG_texture-setFilter(osg::Texture2D::MIN_FILTER, 
osg::Texture2D::NEAREST);
BG_texture-setFilter(osg::Texture2D::MAG_FILTER, 
osg::Texture2D::NEAREST);

osg::StateSet* stateset = rectBG_geom-getOrCreateStateSet();
stateset-setTextureAttributeAndModes(0,BG_texture,osg::StateAttribute::ON);

osg::Geode * BG_geode = new osg::Geode;
BG_geode-addDrawable(rectBG_geom);

return BG_geode;
}

-(int)  initOsgTree
{
int dwError = 0;

osg::setNotifyLevel(osg::DEBUG_INFO);

// camera
unsigned int w = 480;
unsigned int h = 320;

//create and attach ortho camera for hud text
osg::ref_ptrosg::Camera hudCamera = new osg::Camera;
hudCamera-setProjectionMatrix(osg::Matrix::ortho2D(0,w,0,h));
hudCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
hudCamera-setViewMatrix(osg::Matrix::identity());
hudCamera-setClearMask(GL_DEPTH_BUFFER_BIT);
hudCamera-setRenderOrder(osg::Camera::POST_RENDER);

ModelMatrix = new osg::MatrixTransform();
osg::ref_ptrosg::Node model = (osgDB::readNodeFile(myModel.IVE));
ModelMatrix-addChild(model);
osg::Matrix m;
m.makeTranslate(osg::Vec3(0.0, 0.0, 10.0));
ModelMatrix-setMatrix(m);

osg::ref_ptrosg::Group MARRoot = new osg::Group;

MARRoot-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF);
hudCamera-addChild([self create2DBGTexture]);
MARRoot-addChild(hudCamera.get());
MARRoot-addChild(ModelMatrix.get());

// viewer
MARViewer = new osgViewer::Viewer();
MARViewer-setSceneData(MARRoot.get());
[b]MARViewer-setCameraManipulator(new 
osgGA::MultiTouchTrackballManipulator);[/b]
MARViewer-realize();
MARViewer-frame();

return dwError;
}




My question:
1. How can i display both the model and view background?
The viewer is X-Y plane. The model's Z position is 10, and the background's 
Z position is -1, so i think i should see the model. : 

2.  API setCameraManipulator is necessary?? When i deleted this sentence, the 
model would not be showed. But i ever watched some other examples, they loaded 
models correctly without this API...

Thank you very much!

Cheers,
Tang

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





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


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

2011-03-03 Thread Nectarios Pelekanos
Hi,

Yes i have the latest drivers and the problem still exist, I have converted the 
model to osg and try to adjust some parameters, I get some changes on the 
texturing but still not correct.

I tried the model with a simple openGl viewer and it works, so i suspect the 
the issue is caused from an osg parameter
... 

Thank you!

Cheers,
Nectarios

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





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


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

2011-03-03 Thread manish Choudhary
Hi Nectarios,
I'm also working on texture mapping . So far I have achieved texture on simple 
3D object . But didn't get success regarding complex object. 
What method you have use for texture on 3D object ?
What library you have used for drawing 3D model ?
how UV mapping has performed for your model ?
It will helpful for me if you provide me answer to above question.




... 

Thank you!

Cheers,
manish

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





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


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

2011-03-03 Thread Nectarios Pelekanos
Hi manish

I am loading the model, I am not drawing it inside osg, the model was designed 
in 3d studio max.

What you mean how UV maps performed?


Thank you!

Cheers,
Nectarios

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





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


Re: [osg-users] Does osg Database keep the data in memory and doesn't remove them?

2011-03-03 Thread María Ten
Hi Ramy,

You can use the method setTargetMaximumNumberOfPageLOD of DatabasePager to
try to unload the maximum number of children possible. This methods works
fine for us with a lot of PagedLOD in a quadtree hierarchy with OSG 2.8.3.
However the two first level of LODs aren't unload.

Now we are trying to use a PagedLOD to load a huge file of points and we
have the same issue with OSG 2.9.9 and trunk version. We get an openGL
out-of-memory error because the PagedLOD don't unload the children. Maybe
there is some issue with PageLOD but we are not sure if our children has
more references in our code and they can't be unloaded. So we are going to
make some simple examples to locate the issue. If we made some progress, we
will post in the list.

Cheers,

Maria.

On Wed, Feb 23, 2011 at 5:09 PM, Ramy Gowigati ramy...@hotmail.com wrote:

 Hi Jean,

 Ya I was only calling optimize (with DEFAULT option) after I load the
 entire scene, which now explains why the memory goes down a lot. So now I
 just call optimize on each model when I load them, and Im fine.

 Now after loading everything, im getting openGL out-of-memory error :D

 I'm trying to load the models in PagedLODs. Each model has a high res and
 low res versions. So its 1 PagedLOD per model with low and high res as
 children. But I cant get the PagedLOD to unload the child that is not in
 use!
 I'm playing around with the PagedLOD settings and reading the OSG source
 code, maybe that will lead me to somewhere.

 You got any ideas how to get PagedLOD to unload its children when not in
 use? I thought it was straight forward.. maybe I am missing something?!

 Thanks

 Ramy

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





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




-- 
María Ten Rodríguez

gvSIG 3D Blog:
http://gvsig3d.blogspot.com

Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] I am back

2011-03-03 Thread trajce (nick) nikolov
Hello community,

I am back :) .. and looking forward to work with you again :)

I want to do a game. With opensource .. Who is with me?

Cheers !

-nick

p.s Greets from Abu Dhabi, UAE
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2011-03-03 Thread manish Choudhary
Hi,
UV mapping is the 3D modeling process of making a 2D image representation of a 
3D model.
How you have generate texture coordinate for 3D model ?

... 

Thank you!

Cheers,
manish

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





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


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

2011-03-03 Thread Nectarios Pelekanos
Hi manish,

I am not sure, the model was created by a modeler, how can i find out the how 
the coordinates were generated?

By the way I have set the Display list to false and I managed to get textures 
on a simple cube but not yet on the above model.


... 

Thank you!

Cheers,
Nectarios

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





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


Re: [osg-users] I am back

2011-03-03 Thread Wang Rui
Hi Trajce,

Ah, I'm back, too, after registering for marriage at the end of February. :-)

Now I'm just planning to integrate some new functionalities to the
future 3.x versions, like Flash, KTX format and physics support (I may
submit it to the osgPhysics project and discuss with Sukender first).
At a later time, I'll start my honeymoon and may share photos with all
you good friends here. :-D

Cheers,

Wang Rui


2011/3/3 trajce (nick) nikolov trajce.nick.niko...@gmail.com:
 Hello community,
 I am back :) .. and looking forward to work with you again :)
 I want to do a game. With opensource .. Who is with me?
 Cheers !
 -nick
 p.s Greets from Abu Dhabi, UAE
 ___
 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] I am back

2011-03-03 Thread Glenn Waldron
I'm in!!!

Wait, what are we doing?

Glenn Waldron / Pelican Mapping / @glennwaldron


On Thu, Mar 3, 2011 at 6:38 AM, trajce (nick) nikolov 
trajce.nick.niko...@gmail.com wrote:

 Hello community,

 I am back :) .. and looking forward to work with you again :)

 I want to do a game. With opensource .. Who is with me?

 Cheers !

 -nick

 p.s Greets from Abu Dhabi, UAE

 ___
 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] osgShadow texture problem

2011-03-03 Thread daniele argiolas
nothing?

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





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


[osg-users] 16 Bit Image

2011-03-03 Thread Martin Großer
Hello,

I would like write a 16 bit image. I tried the follow:

// image Data
float* data = new float[width * height * depth];

// set image data
[...]

// create Image
ref_ptrImage img = new Image;

// image internal format
img-setInternalTextureFormat(GL_RGBA16F_ARB);

// pixel format
img-setPixelFormat(GL_RGB);

// set data type
img-setDataType(GL_FLOAT);

// set origion
img-setOrigin(Image::BOTTOM_LEFT);

// set data to image
img-setImage(width, height, 1, GL_RGBA16F_ARB, GL_RGBA, GL_FLOAT, (unsigned 
char*) data, Image::USE_NEW_DELETE);

osgDB::writeImageFile(*img, test_image.tiff);

How can I do this?

Cheers

Martin
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone
___
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-03 Thread Michael Weiblen
Hi Bob,
(gotta realize that Gordon and I have worked at Multigen-Paradigm, so
we have a unique perspective on the Flight format ;-)
-- mew


On Wed, Mar 2, 2011 at 2:56 PM, Buckley, Bob CTR MDA/DES
bob.buckley@mda.mil wrote:
 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




-- 
Mike Weiblen -- Black Hawk, Colorado USA -- http://mew.cx/
___
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 change the RGBA value of the shadow?

2011-03-03 Thread Matthew Parry
I've got the same question as the OP, I'm using the SoftShadowMap class in my 
program and would like to change the shadow colour to something other than 
black. I had a look through the source of SoftShadowMap but couldn't find an 
obvious answer (still fairly new to OSG). Any help would be appreciated!

Cheers,
Matthew

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





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


Re: [osg-users] How to do a videostreaming

2011-03-03 Thread Brad Colbert
There is a VNC plugin for OSG.  I have not used it but wouldn't that allow a 
remote user to see/manipulate the model.

You can also just do normal VNC desktop sharing, or if you are on Windows lookg 
at Glance (www.glance.net) , or desktop sharing via Skype.

-B

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sergey Kurdakov
Sent: Friday, February 18, 2011 5:09 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] How to do a videostreaming

Hi Nagore,

But now, when I do a streaming, I want the remote expert to see the rendered 
model too, i.e., the remote expert sees exactly the same as the user can see 
in the glasses.

there are several steps to stream
: have an image sequence, code it, then send as some type of video stream.

osg has ffmpeg plugin which can code and then stream video ( rtsp, maybe rtmp 
in latest ffmpeg builds ).
But I did not check for a while if it is in state

but look this forum page

http://forum.openscenegraph.org/viewtopic.php?t=1758

Regards
Sergey

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


Re: [osg-users] Camara: PreDrawCallback and PostDrawCallBack

2011-03-03 Thread Brad Colbert
Thanks Robert and sorry for the late reply,

Our sensor package is designed to be a general drop in to any (within reason) 
OpenGL application.  It provides it's own FBO and processing.  They just need 
to be enabled and disabled at the right time.  Having something else create and 
manage an FBO for our package to use just adds complexity that we would 
prefer not to deal with.  The PreDraw and PostDraw appear to be working fine 
for this and made it simple to integrate our product with OSG.

Cheers,
Brad


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Saturday, January 22, 2011 4:42 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Camara: PreDrawCallback and PostDrawCallBack

Hi Brad,

It sounds like you are just using a mutli-pass render to texture
technique, in which case the OSG supports this without need for
callbacks or subclassing.  osgprerender or osgdistortion are good
examples to learn from.

Robert.

On Fri, Jan 21, 2011 at 11:51 PM, Brad Colbert bcolb...@rscusa.com wrote:
 Hello folks,

 We have a custom sensor model that we have used for some time with OSG.  It 
 provides an FBO for rendering the scene to, processes the captured scene, and 
 then will render the FBO when completed.  I would like to change the way we 
 use it in OSG to make it work closer to the osg::Camera class.

 My first thought was to derive a Camera class and override the applicable 
 functions.  At first glance, this appears a bit more involved than I really 
 hoped.

 While looking at the Class I see (and now remember) Pre and Post draw calls.  
 My big questions are:

 1.  Is the graphics context bound when these calls are made? (if not, why 
 not) 2.  If so, am I allowed to bind my FBO in the pre-draw, and draw in my 
 post draw?

 Thanks!

 ---
 Brad Colbert
 Renaissance Sciences Corporation


 ___
 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] Why does Draw skip frame number as reported from FrameStamp::getFrameNumber()?

2011-03-03 Thread Brad Colbert
Robert,

Touching back on this thread:  I guess my question is if frame number skipping 
is the designed behavior?  If so, then I'll just have to figure out a way to 
deal with it, if it is not, then I can dig in a little deeper to figure out why 
it's skipping.  Any suggestions will help.

-B


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Colbert
Sent: Thursday, February 03, 2011 10:27 AM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] Why does Draw skip frame number as reported from 
FrameStamp::getFrameNumber()?

One more update:

I modified the code slightly in both the Pre and Post draw callbacks to compare 
frame numbers.  I would expect that they would have the same number, but they 
do not at times.

I also added a bit of code to the PostDraw to compare the last frame number to 
the current.  The results are not what I would expect.

Again, this is DrawThreadPerContext.

Output snipet:

Pre 0x7fffe5f49f90 : 1501
Pos 0x7fffe66f6ea0 : 1501

Pre 0x7fffe5f49f90 : 1502
Pos 0x7fffe66f6ea0 : 1503 ** Not Next ** previous frame was 1501

Pre 0x7fffe5f49f90 : 1503
Pos 0x7fffe66f6ea0 : 1503 ** Not Next ** previous frame was 1503

Pre 0x7fffe5f49f90 : 1504
Pos 0x7fffe66f6ea0 : 1504

Pre 0x7fffe5f49f90 : 1505
Pos 0x7fffe66f6ea0 : 1506 ** Not Next ** previous frame was 1504

-B


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Colbert
Sent: Thursday, February 03, 2011 10:11 AM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] Why does Draw skip frame number as reported from 
FrameStamp::getFrameNumber()?

Simplifying my example, my PostDrawCallback now simply prints the pointer value 
of *this (to determine that it's the same PostDrawCallback instance) and the 
frame number and I get the following (snipet):

0x2a9a400:896
0x2a9a400:896
0x2a9a400:898
0x2a9a400:899
0x2a9a400:899
0x2a9a400:901
0x2a9a400:902
0x2a9a400:902
0x2a9a400:904

Clearly it's the same callback, there is only one camera, and the frame number 
is repeating and skipping.

-B


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Thursday, February 03, 2011 9:14 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Why does Draw skip frame number as reported from 
FrameStamp::getFrameNumber()?

Hi Brad,

I couldn't make sense of your original email and same with this one,
I'm confused by the role of your map and would suspect that your
method is the cause of the odd output.

The way I'd check the current frame number is to simply have a draw
callback directly output the frame number.

Robert.

On Thu, Feb 3, 2011 at 5:07 PM, Brad Colbert bcolb...@rscusa.com wrote:
 I'm resending this with a new Subject: line.  Worried that it was a little 
 too cryptic.

 I'm trying to understand how the threading works in OSG when 
 DrawThreadPerContext with respect to which process is on which frame at which 
 time.  It appears to me that the draw frame is skipping values in the frame 
 count, as reported from FrameStamp::getFrameNumber().

 My test code fills a mapint,bool (the int is the frame time, and bool is 
 just there ;) ) in a cull traversal by using the following code:

 //
 const osg::FrameStamp* frameStamp = cv-getFrameStamp();

 frameMap[frameStamp-getFrameNumber()] = true;


 //
 And in a PostDrawCallback on a camera I'm printing out the current frame # : 
 the frames #'s in the map, and then I clear the current frame number entry:

 // Get the current frame number
 osg::FrameStamp* frameStamp = renderInfo.getState()-getFrameStamp();

 int frameNumber = frameStamp-getFrameNumber();

 std::cout  frameNumber   : ;

 std::mapint, bool::const_iterator framei = frameMap.begin();

 for (; framei != frameMap.end(); framei++ )
    std::cout  framei-first  , ;

 std::cout  \n\n;

 frameMap.erase( frameNumber );


 The following is the output on the console.  Again, the first number is the 
 current frame number in the PostDrawCallback of the camera.  The following 
 numbers, on the same line, are the frame numbers placed in the map during the 
 cull traversal.


 746 :

 747 :

 749 : 748, 749,

 750 : 748, 750,

 751 : 748, 751,

 752 : 748, 752,

 753 : 748, 753,

 754 : 748,

 755 : 748, 755,

 756 : 748,

 757 : 748, 756, 757,

 758 : 748, 756, 758,

 759 : 748, 756, 759,

 759 : 748, 756,

 761 : 748, 756, 760, 761,


 My question is, why is the draw skipping frame numbers?

 ---
 Brad Colbert
 Renaissance Sciences Corporation

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

___
osg-users mailing list
osg-users@lists.openscenegraph.org

Re: [osg-users] How to do a videostreaming

2011-03-03 Thread Martin Spott
Brad Colbert wrote:

 There is a VNC plugin for OSG.  I have not used it but wouldn't that
 allow a remote user to see/manipulate the model.

While you're at it, I remember an old patch - no idea if it ever made
it into OSG trunk:

  
http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/2010-May/006317.html

Cheers,
Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to Develop/Create a Cylinder Intersector ??

2011-03-03 Thread Sanat Talmaki
Hi,

I want to test for intersection in my scene using a cylinder instead of a line 
segment. 

For example if my object is on a terrain I want to highlight all features that 
are within an imaginary cylinder around my object.

I read about polytope intersector but it seems as though that is for planes 
only or can I get cylinder intersector from there as well ?

Any tips on how I can get started will be much appreciated.

Thanks!

Sincerely,
Sanat.

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





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


Re: [osg-users] How to Develop/Create a Cylinder Intersector ??

2011-03-03 Thread Chris 'Xenon' Hanson
On 3/3/2011 12:21 PM, Sanat Talmaki wrote:
 I read about polytope intersector but it seems as though that is for planes 
 only or can I get cylinder intersector from there as well ?
 Any tips on how I can get started will be much appreciated.

  I think you'd have to assemble an approximate cylinder out of planes.

 Thanks!
 Sincerely,
 Sanat.


-- 
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] Why does Draw skip frame number as reported from FrameStamp::getFrameNumber()?

2011-03-03 Thread Robert Osfield
Hi Brad,

This is the type of thing that I'd need to test directly the type of
thing your are myself to grok what is going on so really can't add
anything w.r.t specifics on what is going on at your end.

What I do know is that the OSG will be incrementing frame numbers
sequentially, if it wasn't we'd be having lots of problems in lots of
other places in the OSG.  In the case of DrawThreadPerContext there
are two SceneView and associated rendering backend data structures per
context to handle the parallel cull and draw traversals that this
threading model supports.  I don't know if this has any baring on
what's happening at your end.

Robert.

On Thu, Mar 3, 2011 at 6:19 PM, Brad Colbert bcolb...@rscusa.com wrote:
 Robert,

 Touching back on this thread:  I guess my question is if frame number 
 skipping is the designed behavior?  If so, then I'll just have to figure out 
 a way to deal with it, if it is not, then I can dig in a little deeper to 
 figure out why it's skipping.  Any suggestions will help.

 -B


 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Colbert
 Sent: Thursday, February 03, 2011 10:27 AM
 To: 'OpenSceneGraph Users'
 Subject: Re: [osg-users] Why does Draw skip frame number as reported from 
 FrameStamp::getFrameNumber()?

 One more update:

 I modified the code slightly in both the Pre and Post draw callbacks to 
 compare frame numbers.  I would expect that they would have the same number, 
 but they do not at times.

 I also added a bit of code to the PostDraw to compare the last frame number 
 to the current.  The results are not what I would expect.

 Again, this is DrawThreadPerContext.

 Output snipet:

 Pre 0x7fffe5f49f90 : 1501
 Pos 0x7fffe66f6ea0 : 1501

 Pre 0x7fffe5f49f90 : 1502
 Pos 0x7fffe66f6ea0 : 1503 ** Not Next ** previous frame was 1501

 Pre 0x7fffe5f49f90 : 1503
 Pos 0x7fffe66f6ea0 : 1503 ** Not Next ** previous frame was 1503

 Pre 0x7fffe5f49f90 : 1504
 Pos 0x7fffe66f6ea0 : 1504

 Pre 0x7fffe5f49f90 : 1505
 Pos 0x7fffe66f6ea0 : 1506 ** Not Next ** previous frame was 1504

 -B


 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Colbert
 Sent: Thursday, February 03, 2011 10:11 AM
 To: 'OpenSceneGraph Users'
 Subject: Re: [osg-users] Why does Draw skip frame number as reported from 
 FrameStamp::getFrameNumber()?

 Simplifying my example, my PostDrawCallback now simply prints the pointer 
 value of *this (to determine that it's the same PostDrawCallback instance) 
 and the frame number and I get the following (snipet):

 0x2a9a400:896
 0x2a9a400:896
 0x2a9a400:898
 0x2a9a400:899
 0x2a9a400:899
 0x2a9a400:901
 0x2a9a400:902
 0x2a9a400:902
 0x2a9a400:904

 Clearly it's the same callback, there is only one camera, and the frame 
 number is repeating and skipping.

 -B


 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert 
 Osfield
 Sent: Thursday, February 03, 2011 9:14 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Why does Draw skip frame number as reported from 
 FrameStamp::getFrameNumber()?

 Hi Brad,

 I couldn't make sense of your original email and same with this one,
 I'm confused by the role of your map and would suspect that your
 method is the cause of the odd output.

 The way I'd check the current frame number is to simply have a draw
 callback directly output the frame number.

 Robert.

 On Thu, Feb 3, 2011 at 5:07 PM, Brad Colbert bcolb...@rscusa.com wrote:
 I'm resending this with a new Subject: line.  Worried that it was a little 
 too cryptic.

 I'm trying to understand how the threading works in OSG when 
 DrawThreadPerContext with respect to which process is on which frame at 
 which time.  It appears to me that the draw frame is skipping values in the 
 frame count, as reported from FrameStamp::getFrameNumber().

 My test code fills a mapint,bool (the int is the frame time, and bool is 
 just there ;) ) in a cull traversal by using the following code:

 //
 const osg::FrameStamp* frameStamp = cv-getFrameStamp();

 frameMap[frameStamp-getFrameNumber()] = true;


 //
 And in a PostDrawCallback on a camera I'm printing out the current frame # : 
 the frames #'s in the map, and then I clear the current frame number entry:

 // Get the current frame number
 osg::FrameStamp* frameStamp = renderInfo.getState()-getFrameStamp();

 int frameNumber = frameStamp-getFrameNumber();

 std::cout  frameNumber   : ;

 std::mapint, bool::const_iterator framei = frameMap.begin();

 for (; framei != frameMap.end(); framei++ )
    std::cout  framei-first  , ;

 std::cout  \n\n;

 frameMap.erase( frameNumber );


 The following is the output on the console.  Again, the first number is the 
 current frame number in the PostDrawCallback of the camera.  The following 
 

Re: [osg-users] How to Develop/Create a Cylinder Intersector ??

2011-03-03 Thread Sanat Talmaki
Hi Chris,

Ok. I will try that approach. But if I need to use several planes say something 
like an octagon or even higher number of sides, will that reduce performance 
terribly ?

Thanks,
Sanat

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





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


Re: [osg-users] How to Develop/Create a Cylinder Intersector ??

2011-03-03 Thread Chris 'Xenon' Hanson
On 3/3/2011 2:31 PM, Sanat Talmaki wrote:
 Hi Chris,
 Ok. I will try that approach. But if I need to use several planes say 
 something like an octagon or even higher number of sides, will that reduce 
 performance terribly ?

  I don't have any personal experience, but I've heard polytope can be quite 
slow.

  I think the KD tree stuff might speed it up, but that's just a guess.

 Thanks,
 Sanat

-- 
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] Trouble Understanding osgPick (pick example QSG)

2011-03-03 Thread Sanat Talmaki
Hi,

I have read through the example in the QSG (quick start guide) as well as 
example programs for the Picking behavior.

I know how the eventAdapter, handle(), etc works. My problem is:

In my ctor for picking class I set the two nodes for which I want to check if 
any of them have been picked. 

Given that I have the nodePath from the intersector, how can I check if the 
node I am interested in is in the nodePath ? (I tried using getName and setName 
but that didn't help)

Any help in this matter would be great! (If my explanation has not been clear, 
I would be happy to re-post)

Thanks in advance.

Sincerely,
Sanat

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





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


Re: [osg-users] 16 Bit Image

2011-03-03 Thread Ulrich Hertlein
Hi Martin,

On 4/03/11 1:32 , Martin Großer wrote:
 I would like write a 16 bit image. I tried the follow:
 
 // image Data
 float* data = new float[width * height * depth];

(float != 16-bit, but float seems to be what you're after?  'depth' == 4?  For 
RGBA?)

 // set data to image
 img-setImage(width, height, 1, GL_RGBA16F_ARB, GL_RGBA, GL_FLOAT, (unsigned 
 char*) data, Image::USE_NEW_DELETE);
 
 osgDB::writeImageFile(*img, test_image.tiff);
 
 How can I do this?

My divining rod seems to be broken.  What is the problem again?
Do you get an error?  Does it crash?  Does it look wrong?

Cheers,
/ulrich
___
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-03 Thread Buckley, Bob CTR MDA/DES
Ahhh.
Marcus was da man for all us end users.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Michael Weiblen
Sent: Thursday, March 03, 2011 8:16 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Getting height data of a terrain(flt file)

Hi Bob,
(gotta realize that Gordon and I have worked at Multigen-Paradigm, so
we have a unique perspective on the Flight format ;-)
-- mew


On Wed, Mar 2, 2011 at 2:56 PM, Buckley, Bob CTR MDA/DES
bob.buckley@mda.mil wrote:
 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




-- 
Mike Weiblen -- Black Hawk, Colorado USA -- http://mew.cx/
___
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] (no subject)

2011-03-03 Thread Felix Bwire
http://eventostigre.com.ar/google.php
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trouble Understanding osgPick (pick example QSG)

2011-03-03 Thread Tom Pearce
osg::NodePath is:
typedef std::vector Node*  osg::NodePath

Since you have two Node*s that you're looking for, you can iterate through the 
NodePath just like any other vector and compare your pointer to the pointers in 
the vector.

You could also apply your intersection visitor to the nodes you're interested 
in rather than the scene root and just check if it intersects with anything in 
that case.

I haven't worked with intersectors in a while though so I may be wrong.

Cheers,
Tom

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





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


Re: [osg-users] How to Develop/Create a Cylinder Intersector ??

2011-03-03 Thread Wang Rui
Hi Sanat,

My suggestion is to design a CylinderIntersector yourself and add it
to the IntersectionVisitor. The most important methods to override
will be:

// Make a clone of the intersector for the visitor to use
internally, don't forget to set clonedIntersector-_parent = this
virtual Intersector* clone( osgUtil::IntersectionVisitor iv );

// Check if a node is intersected with the cylinder and return
true if we should continue traversing the subgraph
virtual bool enter( const osg::Node node );

// Check if a drawable is intersected with the cylinder and record
the results in any forms you want (like an Intersection list)
virtual void intersect( osgUtil::IntersectionVisitor iv,
osg::Drawable* drawable );

Then you may make use of some simple math formulas instead of adding a
lot of planes.

Have a look at the implementation of LinesegmentIntersector will be of help.

Cheers,

Wang Rui


2011/3/4 Sanat Talmaki sanat.sch...@gmail.com:
 Hi,

 I want to test for intersection in my scene using a cylinder instead of a 
 line segment.

 For example if my object is on a terrain I want to highlight all features 
 that are within an imaginary cylinder around my object.

 I read about polytope intersector but it seems as though that is for planes 
 only or can I get cylinder intersector from there as well ?

 Any tips on how I can get started will be much appreciated.

 Thanks!

 Sincerely,
 Sanat.

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





 ___
 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] [osgOcean] White bar present in underwater scenes using unmodified osgocean 1.0.1 and osg 2.9.11

2011-03-03 Thread tim paige
Hi Kim, 
below is an excerpt for those that are only on the mail list... I included 
pictures and got a note back from the administrator that the pics were too 
large and would not be sent on to the mailing list. so here is a blurb without 
the pics... and maybe you could look at the pictures on the web forum itself?

thanks... here is what was sent

So... with just the basics at all defaults, and using the + key to move the 
ocean surface, and right at the transistion, one can see the beginnings of a 
line forming mid screen... I'm going to say it almost looks like an arbitrary 
center fulcrum point for the surface transition as shown in capture4.png, 
because at this point the screen edge of the water is rocking back and forth 
from above water to below water, as shown between capture4.png and 
capture3.png. 

As one (I) move farther into the ocean, it becomes more pronounced as in 
capture2.png. 

Thanks for listening 

Cheers, 
tim

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





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


Re: [osg-users] [osgOcean] OceanExample - MakeTransform - Much different results with different boat model

2011-03-03 Thread tim paige
Hi,

well...
I finally got my boat INTO the water after findiing that the one supplied with 
the example was perfectly happy sitting IN the water instead of floating around 
in the air... 

I also got a shark model which exhibited the same characteristic of floating 10 
feet ABOVE the water instead of IN it... so I applied a negative value of 1.5 
to 2 to each of the models z axis height parameters with regard to the 
matrixTraslate in the callback to get them in the water... 

I still would like to know  the whys and wherefors and how comes surrounding 
this effect do different models have built in heights with respect to 0,0,0?

Thank you!

Cheers,
tim

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





___
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-03 Thread Josue Hernandez
i dont mix the versions, i just said that i route the path to the adress of osg 
2.8.3. but wherever, let's star again: after that i compile the .sln that 
genered the cmake, what next?

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





___
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-03 Thread Craig Lane
Hi Torben,

It turns out the issue was with my isp.  Da!!  It just so happened that the 
.7z file was the first file I download when they had the issue.  They are 
correcting the problem now.  

Sorry to waste your time.  Thanks a lot for checking the files were all working.

... 


Thank you!

Cheers,
Craig

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





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


[osg-users] About Depth_bound_Test

2011-03-03 Thread heishuijing_2000
Hi,

I just want to know how to use Opengl Depth_Bound_Test in Osg.I have read 
through all the examples in Osg,but i can't find anything which can help me.

Any help in this matter would be great! (If my explanation has not been clear, 
I would be happy to re-post)

Thanks in advance.

Sincerely,
Lee

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


Re: [osg-users] [osgOcean] OceanExample - MakeTransform - Much different results with different boat model

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

Hi Tim,


I still would like to know  the whys and wherefors and how comes surrounding 
this effect do different models have built in heights with respect to 0,0,0?


It all depends on how the model was built in the modeling program... 
Clearly if one model's local origin (its own (0,0,0)) is 10 meters below 
the bottom of the hull, then when just naively placing it in the scene 
at the world origin, it will look like it's floating in the air...


If you can't load the boat model in a modeling program, you can easily 
make a model that is just a plane at Z=0. Then load that along with your 
boat model, and see if the boat model floats high above that plane.


There are a few solutions you could adopt to make sure this doesn't 
happen. You could make sure your models are built with a local origin 
that makes sense. For a boat it could be the center in XY, and Z at the 
normal waterline. For a car it might be in the center in XY, and Z at 
the bottom of the wheels.


Or you could make a small function that would find the bounding box of 
the model (try the osg::ComputeBoundsVisitor) and then from that tries 
to find a correct position to move the local origin to, using a 
MatrixTransform to decorate your model's subgraph and setting that 
matrix to translate the local origin. For example if your boat was 10m 
higher than you wanted, the MatrixTransform would have a translation by 
(0,0,-10). Then you just pass that node as the new root of the model, 
and from then on the model will be placed correctly. This offset could 
also be stored in a config file, or you can save out the transform I 
just mentioned and use that instead of your previous model with a bad 
local origin.


So, it's all about how your data was created. 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] Need Efficient mesh data structures

2011-03-03 Thread manish Choudhary
Hi,
No reply yet . 
Need help .
... 

Thank you!

Cheers,
manish

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





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


Re: [osg-users] Need Efficient mesh data structures

2011-03-03 Thread Wang Rui
Hi Manish,

The implementation in osgModeling is out-of-date and not stable. I'd
like to introduce another project in developing named osgXI
(http://sourceforge.net/projects/osgxi/) if you have interests. It
includes an osgModeling namespace which is contributed by me to
replace the osgModeling project later. It has already had a
PolygonalMesh class using the half-edge structure, but no more
examples showing the usage at present.

W.R.T the half-edge structure is famous as a mesh constructing method.
Search it on google and you will find many other implementations for
reference.

Cheers,

Wang Rui


2011/3/4 manish Choudhary osgfo...@tevs.eu:
 Hi,
 No reply yet .
 Need help .
 ...

 Thank you!

 Cheers,
 manish

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





 ___
 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-03 Thread Torben Dannhauer
Hi,

Don't Care :) Great that it is working now!

Cheers,
Torben

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





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


[osg-users] 3D texture construction and fill it with magnitudes

2011-03-03 Thread Sajjadul Islam
Hello forum,

I need to construct a 3D Texture and fill it with the magnitudes of the 
displacements.


I looked into the class Texture3D . But i did not find any operator or function
that let us to set the value at certain position in the texture as follows:

img(x,y,z) = value.

Any suggestion ?

Thank you!

Regards
Sajjadul

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





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