Re: [osg-users] FFmpeg plugin

2009-04-01 Thread Robert Osfield
Hi Carlos,

Good to here you've got things working.  Still don't know what might have
been wrong in your original setup... but at least things are working now.

FYI, I'm currently use the Kubuntu 9.04 beta and ffmpeg that comes with it.

Robert.

2009/3/31 Carlos Sanches ces...@gmail.com

 yeah !!!
 Finally  I did it !
 Today I installed the beta version of ubuntu 9.04  and OSG 2.9.2
 Now is running ffmpeg plugin  :)
 Now I can sleep .

 ___
 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] vpbmaster vs osgdem

2009-04-01 Thread Gert van Maren

Hi Robert,

I've put the tasks/logs on our ftp server:

ftp.k2vi.com
user: DIT_Guest
password 33Karaka2oo9 (the two o's are the letter o, not numbers)

file: /Download/OSG/vpb_task_logs.rar

It does look like it goes down to level 21 looking at the log file that
was last accessed but I can't see an error/warning. It just stops

However when I compare this globe with a globe built by osgdem (also down
to level 21) - the osgdem globe is way higher resolution both in terrain
and aerial photo.

Gert

On Wed, 01 Apr 2009 02:59:53 +1300,
osg-users-requ...@lists.openscenegraph.org wrote:


Hi Gert,

Could you post the .log files for the failed tasks.

Robert.

2009/3/31 Gert van Maren g...@k2vi.com
Hi Robert,

Vpbmaster fires up, creates the task files and starts executing the  
tasks but in the very last task I get again errors. See attached dos  
output. Weird thing is that this last task appears to be at level 13 at  
least looking at the subtile naming. osgdem happily builds 21 levels  
with exactly the same input parameters. Maybe an issue with the task  
list creation?


Have also attached the build_master.tasks and build_master.source files

Any ideas?

Cheers Gert




--
Gert van Maren

Head of Research  Development
K2Vi Virtual Reality Software
Data Interface Technologies Ltd

3 Cliff Wilson street
Level 2, 9305
Wanaka, New Zealand
Phone: +64 21 2855581
Email: g...@k2vi.com
Web: http://www.k2vi.com


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


Re: [osg-users] Compressed texture

2009-04-01 Thread Robert Osfield
HI Yefei,

The OSG has support for removing duplicate state on an already loaded scene
graph, but at present there isn't any support in the .ive format for pooling
imagery/texture between sets of .ive files.  The later feature would be very
useful though... so please feel free to dive in and implement it :-)

The next question is... how would one go about it.  Perhaps a custom state
pool Node that does nothing more than hold a map of names/ID to
StateAttribute.  Then you could save this node out to it's own .ive file,
then each of the other .ive files could include this StatePool node as an
external file reference.  Then use the Registry cache to make sure that each
of the separate .ive then reuse the same StatePool.  Finally the .ive plugin
would need to have some kinda of ID system to pull the apprpriate attribute
from the current StatePool(s).

Robert.

On Tue, Mar 31, 2009 at 7:07 PM, Yefei He y...@nads-sc.uiowa.edu wrote:

 Hi, Folks,

If I create a flt file that uses compressed .dds files as textures,
 and then convert the flt file to ive format with the option
 -O noTexturesInIVEFile, do I still get compressed texture when loading
 the ive file? Reading through the source code, it seems to indicate that
 the internal texture format is preserved by the dds loader as compressed
 texture, and passed on to the osg core. So I assume it works.

I have thought of converting the flt files that uses compressed
 textures to ive files with built-in texture and with one of the compressed
 texture options. But in my set up I use multiple flt files that share
 textures, and I'm not sure if with built-in textures in ive files, I will
 have multiple instances of the same texture loaded into memory, so instead
 of one uncompressed texture in memory, I may end up with 20 compressed
 texture of identical content in memory. Is this what's going to happen
 with ive files with built-in textures?

Thanks,

Yefei

 ___
 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] Import Large Meshes

2009-04-01 Thread Robert Osfield
Hi Brian,

I'm afraid VirtualPlanetBuilder is based around processing heightfiels +
imagery, not irregular polygonal meshes so won't be of any help.

The osgUtil::Simplifier might be able to help though, although you'll
probably need to break up the model into chunks first.  One thing it would
be worth doing is when loading you models is to disable the tri-stripping of
the models.

Robert.

On Tue, Mar 31, 2009 at 7:12 PM, Brian R Hill bhil...@csc.com wrote:

 Folks,

 I'm trying to import large meshes, +10 million verts, +20 million tris from
 obj files. I'm not familiar with the terrain generation/processing parts of
 OSG and was wondering if there are any utilities that I can use to
 subdivide these or convert to pageable chunks.

 Thanks,

 Brian

 This is a PRIVATE message. If you are not the intended recipient, please
 delete without copying and kindly advise us by e-mail of the mistake in
 delivery.
 NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
 any order or other contract unless pursuant to explicit written agreement
 or government initiative expressly permitting the use of e-mail for such
 purpose. •
 ___
 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] DatabasePager Stats

2009-04-01 Thread Robert Osfield
Hi Mike,

2009/3/31 michael.schm...@l-3com.com

  I apologize in advance if this has already been answered, but I didn’t
 find anything.  One of the stats views shows “DatabasePager time to merge
 new tiles”.  What is the meaning of the different values, especially the
 “requests” value?  What would cause it to spike on a flt file?

Each external file reference that has to get paged in will be a single file
request.  The external file requests are instigated by either PagedLOD or
ProxyNode, with .flt it'll have to be the ProxyNode as it doesn't have
support for PagedLOD.  The OpenFlight plugin uses ProxyNode for external
file references.

You can pass different options into the OpenFlight plugin to get it to
loaded the the external file references up front.   To see the options do:

   osgconv --format flt

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


Re: [osg-users] vpbmaster vs osgdem

2009-04-01 Thread Robert Osfield
HI Gert,

I downloaded the file but on attempting to unpack the archive using unrar I
get an error:

unrar x vpb_task_logs.rar

UNRAR 3.80 freeware  Copyright (c) 1993-2008 Alexander Roshal

The archive header is corrupt

Extracting from vpb_task_logs.rar

Unexpected end of archive
No files to extract

If I run md5sum I get:

md5sum vpb_task_logs.rar
454388294a9cab627e7e60ac7d1d5e36  vpb_task_logs.rar

Is the file OK?   Could you try posting a zipped file?

Robert.


On Wed, Apr 1, 2009 at 7:56 AM, Gert van Maren g...@k2vi.com wrote:

 Hi Robert,

 I've put the tasks/logs on our ftp server:

 ftp.k2vi.com
 user: DIT_Guest
 password 33Karaka2oo9 (the two o's are the letter o, not numbers)

 file: /Download/OSG/vpb_task_logs.rar

 It does look like it goes down to level 21 looking at the log file that
 was last accessed but I can't see an error/warning. It just stops

 However when I compare this globe with a globe built by osgdem (also down
 to level 21) - the osgdem globe is way higher resolution both in terrain
 and aerial photo.

 Gert


 On Wed, 01 Apr 2009 02:59:53 +1300,
 osg-users-requ...@lists.openscenegraph.org wrote:

  Hi Gert,

 Could you post the .log files for the failed tasks.

 Robert.

 2009/3/31 Gert van Maren g...@k2vi.com
 Hi Robert,

 Vpbmaster fires up, creates the task files and starts executing the tasks
 but in the very last task I get again errors. See attached dos output. Weird
 thing is that this last task appears to be at level 13 at least looking at
 the subtile naming. osgdem happily builds 21 levels with exactly the same
 input parameters. Maybe an issue with the task list creation?

 Have also attached the build_master.tasks and build_master.source files

 Any ideas?

 Cheers Gert




 --
 Gert van Maren

 Head of Research  Development
 K2Vi Virtual Reality Software
 Data Interface Technologies Ltd

 3 Cliff Wilson street
 Level 2, 9305
 Wanaka, New Zealand
 Phone: +64 21 2855581
 Email: g...@k2vi.com
 Web: http://www.k2vi.com


 ___
 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] Meta-Informations

2009-04-01 Thread Ulrich Hertlein

Hi Alexis,

On 1/4/09 8:15 PM, Alexis wrote:

I would like to know:
1. What are Meta-Informations ? Examples


Good question.  What *are* meta-information?

Where did you come across the term?
I've never heard it in relation to OSG.

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


[osg-users] Meta-Informations

2009-04-01 Thread Alexis
Hi,
i m a new one in this forum. i m learning osg.
I hope i will find here answer to my questions and will later also help other 
people.

I would like to know: 
1. What are Meta-Informations ? Examples
2. Which are the possibilities to keep Meta-Infos in a osg-graph ?  load, read, 
write, store ?

... 

Thank you.

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





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


[osg-users] Object oriented coding

2009-04-01 Thread Tomas Lundberg
Hi,

I have done some small test  projects for fun in OSG, without really learning 
it correctly. Now I have a very general question:

How do I structure my code to make it more object oriented together with OSG?

Let's say I want to visualise an airport with planes coming and leaving. I 
would like to write this program in an object oriented manner, where the 
airport has a number of planes, where each plane has a number of parts etc. A 
plane should of course have properties such speed and engine thrust. Same thing 
goes for parts of a plane. For instance a wing should have a number that 
represents the drag, and also a number for its weight. It should also have 
visual information (shape, position, material etc).

How do I combine this visual information with non-visual information in an 
object oriented manner? I guess visual information should go into the scene 
graph where as the rest does not. Yet, I want all the information about the 
wing to go into the same C++ wing object. Is there any good example showing how 
to manage this? I would love to see simple code examples showing these 
principles as they are easier to understand.

Thank you.

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





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


Re: [osg-users] Meta-Informations

2009-04-01 Thread Ulrich Hertlein

Hi Alexis,

On 1/4/09 8:15 PM, Alexis wrote:

I would like to know:
1. What are Meta-Informations ? Examples


Good question.  What *are* meta-information?
Where did you come across the term?
I've never heard it in relation to OSG.

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


Re: [osg-users] problem using overlay node

2009-04-01 Thread Alexandre Amalric
Hi Rahul and osg-users,

I've recently tried to use overlaynode with blending and i didn't achieve to
make it work...

Is there someone who has a simple sample file with data to show the
community how overlay node works when it comes to set some blending between
overlay and overlay subgraph ??

Kind regards,

2008/8/7 Rahul Jain rah...@darshan3d.com

 Hi all,
 I am trying to overlay a shape file on a terrain  using overlay node.  But
 the  two textures are not blending, instead the overlay texture has replaced
 the terrain texture. I am attaching the final rendered image for you to
 ponder upon.  I am  using the code of osgsimulation example which goes like
 this for my case.

 // Get coordinate system node
 osg::CoordinateSystemNode* csn =
 dynamic_castosg::CoordinateSystemNode*(terrain.get());

 // Set overlay technique
 osgSim::OverlayNode::OverlayTechnique technique =
 osgSim::OverlayNode::OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY;

 // Create overlay node
 osgSim::OverlayNode* overlayNode = new osgSim::OverlayNode(technique);

 // Set blending parameters
 overlayNode-getOrCreateStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);

 overlayNode-getOrCreateStateSet()-setMode(GL_BLEND,
 osg::StateAttribute::ON);

 overlayNode-getOrCreateStateSet()-setTextureAttribute(1, new
 osg::TexEnv(osg::TexEnv::BLEND));
 overlayNode-setOverlaySubgraph(shapefile.get());
 overlayNode-setOverlayTextureSizeHint(1024);
 overlayNode-setOverlayTextureUnit(1);

 // Set clear color
 overlayNode-setOverlayClearColor(osg::Vec4(0.0, 0.0, 0.0, 0.0));

 // insert the OverlayNode between the coordinate system node and its
 children.
 for(unsigned int i=0; icsn-getNumChildren(); ++i)
 {
   overlayNode-addChild( csn-getChild(i) );
 }

 csn-removeChildren(0, csn-getNumChildren());
 csn-addChild(overlayNode);

 // Set scene data
 viewer.setSceneData(csn);



 best regards
 RJ

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




-- 
Alexandre AMALRIC   Ingénieur RD
===
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Eye position and 2nd slave camera

2009-04-01 Thread petr srom
Thank you Robert, your message help me.

And I have another problem, I don't know how to correctly set the 2nd camera 
like mirror (smaller viewport with tank_des.osg). What shall i do for correct 
view?  Let's see screenshot below. Scene and car1 in my 3d world are in .ive 
format and structure is created these way:

viewer
_|
_| - camera master  (viewer-setCamera)
_| - camera slave (viewer-addSlave)

root [osg::Group* root;]
_|
_| - light source [root-addChild (pLightsource);]
_| - fog [root-setStateSet(myst);]
_| - static node - scene
_| - dynamicobj [osg::Group * dynamicobj;]
__| - positioned - node - car 1
__| - positioned - node - car 2


main eye position (setViewMatrixAsLookAt)
x:0.0f ... y:0.0f ... z:1.5f

2nd eye position  (setViewMatrixAsLookAt)
x:0.0f ... y:0.0f ... z:2.5f


model1 position:
x:0.0f ... y:15.0f ... z:0.0f

model2 position (tank):
x:0.0f ... y:-15.0f ... z:0.0f

screenshot is here:
[Image: http://www.jkzsim.cz/petr/screenshot-cams.jpg ]


example camera with cow.osg (mirrored 2nd camera) works well, but these 
settings in my scene not ...


Code:
osg::Matrixf mf;
if (i != 2)
{
mf=osg::Matrix::scale(aspectRatioScale, 1.0, 1.0) * 
osg::Matrix::translate(translate_x, 0.0, 0.0);
viewer.addSlave( camera.get(), mf, osg::Matrix() ); 
}
else 
{
mf=osg::Matrix::scale(-1.0 * aspectRatioScale, 1.0, 
1.0) * osg::Matrix::translate(translate_x, 0.0, 0.0);
viewer.addSlave( camera.get(), mf, osg::Matrix() ); 
}   


Thanks a lot for answers.

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





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


Re: [osg-users] FFmpeg plugin

2009-04-01 Thread Carlos Sanches
Yeah is all ok now .
the problem that I had in my program using xine plugin dont appear with
ffmpeg .
thank you all !
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bug in 2.7.9 with collada

2009-04-01 Thread Pierre Boulenguez
Hi all,

Patrice, I maybe have the same problem as your's. I have posted a test scene on 
this thread : 
http://forum.openscenegraph.org/viewtopic.php?p=9533#9533

Can you reproduce the bug with it ?

Best Regards,
Pierre

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





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


Re: [osg-users] Object oriented coding

2009-04-01 Thread Donald Cipperly
Hi Tomas,

This is a software design question, not really an OpenSceneGraph one.  I'd
recommend reading articles/books on game/object oriented design.  The design
of your classes will depend on your application requirements, taking into
account money/time/etc. constraints.

I'd recommend that your design abstract out rendering such that your OSG
code is in separate rendering components.  We do this in our visualization
applications to allow us to switch renderers.  We do this using a component
based object management design (see
http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/) and it has
worked out really well.

Good luck,

- Donny


On Wed, Apr 1, 2009 at 5:32 AM, Tomas Lundberg tomas...@gmail.com wrote:

 Hi,

 I have done some small test  projects for fun in OSG, without really
 learning it correctly. Now I have a very general question:

 How do I structure my code to make it more object oriented together with
 OSG?

 Let's say I want to visualise an airport with planes coming and leaving. I
 would like to write this program in an object oriented manner, where the
 airport has a number of planes, where each plane has a number of parts etc.
 A plane should of course have properties such speed and engine thrust. Same
 thing goes for parts of a plane. For instance a wing should have a number
 that represents the drag, and also a number for its weight. It should also
 have visual information (shape, position, material etc).

 How do I combine this visual information with non-visual information in an
 object oriented manner? I guess visual information should go into the scene
 graph where as the rest does not. Yet, I want all the information about the
 wing to go into the same C++ wing object. Is there any good example showing
 how to manage this? I would love to see simple code examples showing these
 principles as they are easier to understand.

 Thank you.

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





 ___
 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] Labeling 3D Nodes with HUD style

2009-04-01 Thread Hagen
Hi,

Im trying to label certain points in my 3D - Scene.
Of course I could just use osgText and add it to a transform.
But what i want to do is a little more complicated.
I want to draw rectanlges with text inside that are drawn 2D (HUD like) on the 
screen. They shall only appear on near the border of the screen.

But now (the tricky thing) I need to draw a line or sth. from the 2D Rectangle 
to a certain point in the scene that is given by 3D coordinates.
How do i do that?
I must somehow find out where on the screen my 3D-Point appears.
Or is there another way?

Thank you.
 Hagen

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





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


Re: [osg-users] Textures getting invisible on some system.

2009-04-01 Thread Ümit Uzun
Hi  Pierre,

I really want to help you but unfortunately I hadn't found any solution
except using old version (2.7) on machine which being invisible on it. I
suspect the reason that Graphical Card and OSG inconsistency.

Currently the best suggestion from me is using old version.
Best Regards.

2009/4/1 Pierre Boulenguez pierot...@yahoo.com

 Hello all,

 Ümit, I have the same problem as your's, looking like a regression on
 texture loading since osg 2.8. I have created and attached a minimal Collada
 scene to reproduce the bug.

 The tests were run ubuntu 8.10, collada-dom 2.0, and a GeForce 9800 GTX+.
 Results are :
  OSG 2.6 - texture ok.
  OSG 2.8 - no texture.
  OSG 2.9.2 - no texture.

 Included in the attached zip archive are the three logs generated by :
  OSG_NOTIFY_LEVEL=DEBUG

 A strange fact about this bug is that the scene ROOM.3DS that was uploaded
 by Ümit runs well with textures on my machine with OSG 2.6, 2.8 and 2.9.2 as
 well.

 Help would be greatly appreciated,
 Thank you,
 Pierre

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




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




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


Re: [osg-users] Labeling 3D Nodes with HUD style

2009-04-01 Thread Tomlinson, Gordon

Have a look through the Picking code and examples this shows you how to
transform the 2d window coordinates ( in this case were the mouse is,
but the principle is the same) into  3d scene coordinates
Once you have the coordinates then straight forward to draw a line or
any thing your want ,

We do this for callout type box that can track objects, points etc, (
sorry I'm not able to provide code on how we do this)


Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Hagen
Sent: Wednesday, April 01, 2009 9:40 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Labeling 3D Nodes with HUD style

Hi,

Im trying to label certain points in my 3D - Scene.
Of course I could just use osgText and add it to a transform.
But what i want to do is a little more complicated.
I want to draw rectanlges with text inside that are drawn 2D (HUD like)
on the screen. They shall only appear on near the border of the screen.

But now (the tricky thing) I need to draw a line or sth. from the 2D
Rectangle to a certain point in the scene that is given by 3D
coordinates.
How do i do that?
I must somehow find out where on the screen my 3D-Point appears.
Or is there another way?

Thank you.
 Hagen

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





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


Re: [osg-users] Labeling 3D Nodes with HUD style

2009-04-01 Thread Hagen
Thank you for the fast reply.

But I need the exact opposite of mouse picking.
I want to know the 2d Coordinates given the 3D Coordinates.
So a kind of reverse picking :-)

Thx
 Hagen

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





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


[osg-users] Would like to contribute osg plugin for ply

2009-04-01 Thread Santosh

Hi All,

As part of one of my project I have written an osg plug in for reading 
ply file (Stanford Triangle Format). I would like to contribute this 
plugin to the community. I have written  the plugin according to OSG 
standard and  have also added cmake build system. The plugin is working 
fine on both Linux and Windows and should behave similarly on other OS 
as well.


Now the question is, how do i contribute this plugin to the community ?

Cheers,
Santosh
--

Santosh Gaikwad
MTS Design
Darshan Solutions Limited
www.darshan3d.com http://www.darshan3d.com
# +91-99530-99053

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


Re: [osg-users] Would like to contribute osg plugin for ply

2009-04-01 Thread Robert Osfield
Hi Santosh,

The system for all submissions is to subscribe to the osg-submissions
mailing list and send the files, or typically a .zip file containing all the
files, to the osg-submissions list with a brief on what the submission
does.  Details about subsription on the mailing list page on
openscenegraph.org.

Cheers,
Robert.

2009/4/1 Santosh sant...@darshan3d.com

  Hi All,

 As part of one of my project I have written an osg plug in for reading ply
 file (Stanford Triangle Format). I would like to contribute this plugin to
 the community. I have written  the plugin according to OSG standard and
 have also added cmake build system. The plugin is working fine on both Linux
 and Windows and should behave similarly on other OS as well.

 Now the question is, how do i contribute this plugin to the community ?

 Cheers,
 Santosh --

 Santosh Gaikwad
 MTS Design
 Darshan Solutions Limited
 www.darshan3d.com
 # +91-99530-99053

 ___
 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] Object oriented coding

2009-04-01 Thread Tomas Lundberg
Thanks for the reply.

That's an interesting article. It does make sense when thinking about it, 
although the object oriented stucture is deeply rooted in many programmers' 
heads (mine included) :)

Anyway, I think my question applies to objects and components alike... How does 
adding data to the scene graph (and drawing it) fit in to objects and 
components? 

Staying with object thinking for a while, do people generally create an 
AddToSceneGraph() member function for sub objects that are to be rendered? With 
this approach I suppose there is no Draw() member function in sub objects, as 
this does not go along with drawing the entire scene graph once every frame. Am 
I right?

I know I should probably read some good literature on this, but for now I just 
want to test the concept and get a not-in-depth general understanding. Is there 
any small example out there using an object oriented approach together with 
real OSG code? 

I know this must sound like a real newbie question, but when it comes to games 
and scene graphs I'm still a newbie :)


By the way, is there a way for me to not publish name and email in this forum? 
I saw that it is included near the quoted text in the reply. I don't make good 
friends with spammers  :?

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





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


Re: [osg-users] Labeling 3D Nodes with HUD style

2009-04-01 Thread Tomlinson, Gordon
The code I suggested you look is still pretty relevant you just have to
work the algorithms around a bit 
Do a google on glUnProject and glProject, this is not a new topic :)

Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Hagen
Sent: Wednesday, April 01, 2009 10:11 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Labeling 3D Nodes with HUD style

Thank you for the fast reply.

But I need the exact opposite of mouse picking.
I want to know the 2d Coordinates given the 3D Coordinates.
So a kind of reverse picking :-)

Thx
 Hagen

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





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


Re: [osg-users] Compressed texture

2009-04-01 Thread Yefei He
Hi, Robert,

Thanks for your reply. Yes, I agree it will take quite some 
effort and possibly format change to implement texture sharing 
between ive files with built-in textures. That's why I would like
a quicker way out:) -- using ive files without built-in texture but 
refer to compressed texture in dds format. Is my assumption 
correct that compressed texture in dds format remains compressed 
when loaded into memory and passed on to the osg core and GL layer
without being decompressed, as opposed to say jpeg images which 
are decompressed during loading and then passed on to osg core in 
uncompressed bitmap format?

Thanks,

Yefei

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Wednesday, April 01, 2009 2:52 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Compressed texture

HI Yefei,

The OSG has support for removing duplicate state on an already loaded scene 
graph, but at present there isn't any support in the .ive format for pooling 
imagery/texture between sets of .ive files.  The later feature would be very 
useful though... so please feel free to dive in and implement it :-)

The next question is... how would one go about it.  Perhaps a custom state pool 
Node that does nothing more than hold a map of names/ID to StateAttribute.  
Then you could save this node out to it's own .ive file, then each of the other 
.ive files could include this StatePool node as an external file reference.  
Then use the Registry cache to make sure that each of the separate .ive then 
reuse the same StatePool.  Finally the .ive plugin would need to have some 
kinda of ID system to pull the apprpriate attribute from the current 
StatePool(s).

Robert.

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


Re: [osg-users] Compressed texture

2009-04-01 Thread Robert Osfield
 Hi Yefei,

On Wed, Apr 1, 2009 at 4:24 PM, Yefei He y...@nads-sc.uiowa.edu wrote:

Thanks for your reply. Yes, I agree it will take quite some
 effort and possibly format change to implement texture sharing
 between ive files with built-in textures. That's why I would like
 a quicker way out:) -- using ive files without built-in texture but
 refer to compressed texture in dds format. Is my assumption
 correct that compressed texture in dds format remains compressed
 when loaded into memory and passed on to the osg core and GL layer
 without being decompressed, as opposed to say jpeg images which
 are decompressed during loading and then passed on to osg core in
 uncompressed bitmap format?


Yes this is correct, the OSG loads the S3TC_DXT* compressed formats from the
.dds file and keeps them in that format in the osg::Image and the final
downloaded texture.  You can compress the textures for a file using osgconv:

osgconv --compressed myfile.flt myfile.ive

It won't solve the problem of sharing textures though.

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


[osg-users] ObjectType querry...

2009-04-01 Thread neil.hughes
Hi All,

Can anyone tell me whether there is a way (call) in OSG to say what type of 
object a plugin will produce ? i.e. if I have a file A.jpg and I call 
osgDB::Registry::instance()-getReaderWriterForExtension passing in the file 
extension, I get the readerwriter. What I would like to know is what ObjectType 
that readerwrite would return.

The reason for the question is I'm updating the ReaderWriterZip plugin to 
handle in-memory zip extraction, and I want to be able to give it a zip file 
that contains many files of varying format. Rippling through the zip file I can 
get the individual files, and their content, and unzip them in memory, but the 
issue I have is that I don't really want to have a big If statement in the 
plugin to look at the known file extensions and to say whether I should be 
calling ReadNode or ReadImage. I would like to be able to enquire the type of 
Object that the reader would produce, and then have a simple switch statement 
like the Curl plugin.

One route I thought of would be to add to extend each plugin to have a function 
based that returns the type of object, and I guess this would be fairly 
straight forward, but before delving in, I just wanted to check if there is a 
method already available.

Many thanks for any help.

Neil.

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


Re: [osg-users] ObjectType querry...

2009-04-01 Thread Robert Osfield
Hi Neil,

In OSG-2.8 you can do osgconv --formats to get a listed of all the
capabilities of the plugins.

Robert.

On Wed, Apr 1, 2009 at 5:29 PM, neil.hug...@tesco.net wrote:

 Hi All,

 Can anyone tell me whether there is a way (call) in OSG to say what type of
 object a plugin will produce ? i.e. if I have a file A.jpg and I call
 osgDB::Registry::instance()-getReaderWriterForExtension passing in the file
 extension, I get the readerwriter. What I would like to know is what
 ObjectType that readerwrite would return.

 The reason for the question is I'm updating the ReaderWriterZip plugin to
 handle in-memory zip extraction, and I want to be able to give it a zip file
 that contains many files of varying format. Rippling through the zip file I
 can get the individual files, and their content, and unzip them in memory,
 but the issue I have is that I don't really want to have a big If statement
 in the plugin to look at the known file extensions and to say whether I
 should be calling ReadNode or ReadImage. I would like to be able to enquire
 the type of Object that the reader would produce, and then have a simple
 switch statement like the Curl plugin.

 One route I thought of would be to add to extend each plugin to have a
 function based that returns the type of object, and I guess this would be
 fairly straight forward, but before delving in, I just wanted to check if
 there is a method already available.

 Many thanks for any help.

 Neil.

 ___
 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] osgmovie problem

2009-04-01 Thread Lingyun Yu
Hi,

while I am running osgmovie, I met the warning like 
warning: GraphicsWindowWin32::grabFocus failed grabbing the focus
then only a white window on the screen.

what's wrong with this?

Thank you.

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





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


Re: [osg-users] Object oriented coding

2009-04-01 Thread Donald Cipperly
Tomas,

Check out the osgcatch example.  It's a simple example with a few classes to
encapsulate game objects that may get you going in the right direction.

- Donny


On Wed, Apr 1, 2009 at 9:51 AM, Tomas Lundberg tomas...@gmail.com wrote:

 Thanks for the reply.

 That's an interesting article. It does make sense when thinking about it,
 although the object oriented stucture is deeply rooted in many programmers'
 heads (mine included) :)

 Anyway, I think my question applies to objects and components alike... How
 does adding data to the scene graph (and drawing it) fit in to objects and
 components?

 Staying with object thinking for a while, do people generally create an
 AddToSceneGraph() member function for sub objects that are to be rendered?
 With this approach I suppose there is no Draw() member function in sub
 objects, as this does not go along with drawing the entire scene graph once
 every frame. Am I right?

 I know I should probably read some good literature on this, but for now I
 just want to test the concept and get a not-in-depth general understanding.
 Is there any small example out there using an object oriented approach
 together with real OSG code?

 I know this must sound like a real newbie question, but when it comes to
 games and scene graphs I'm still a newbie :)


 By the way, is there a way for me to not publish name and email in this
 forum? I saw that it is included near the quoted text in the reply. I don't
 make good friends with spammers  :?

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





 ___
 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] How do I add libraries to all linker commands?

2009-04-01 Thread Lucasw

Philip Lowman wrote:
 On Tue, Mar 31, 2009 at 5:07 PM, Lucasw  () wrote:
 
   
  
   From your build tree type make edit_cache, this is the same as running 
   ccmake /path/to/source/tree.
   
   Check the contents of the OPENGL_gl_LIBRARY and OPENGL_glu_LIBRARY 
   variables.  They should be pointed to the libraries you want to use for 
   GL and GLU.  They are under the Advanced section of the cache.
   
   
  
  
  
  
  
  Okay, after running make edit_cache 't' has to be pressed to get the 
  advanced mode where the OPENGL variables are, and then I added 
  /usr/lib/libGL.dll.a and /usr/lib/libGLU.dll.a to those variables 
  (separated from the /usr/lib/w32api libs by semicolons).  Then 'c' for 
  configure and 'g' for generate, and then it exits and everything builds 
  fine.
  
 Strange.  On my Cygwin install with CMake 2.6.2 (on Cygwin) I get:
 
  OPENGL_INCLUDE_DIR  /usr/include/w32api
  OPENGL_gl_LIBRARY   /usr/lib/w32api/libopengl32.a
  OPENGL_glu_LIBRARY  /usr/lib/w32api/libglu32.a
  
 What is the difference between /usr/lib/libGL.dll.a and 
 /usr/lib/w32api/libopengl32.a?  What version of CMake are you using?
 
 
 
 -- 
 Philip Lowman
 
  --
 Post generated by Mail2Forum



I have cmake version 2.6-patch 2

That's what the default settings were, but when I tried to build with them I 
get a bunch of errors like:


CMakeFiles/osg.dir/AlphaFunc.o:AlphaFunc.cpp:(.text+0x14): undefined reference 
to `_glAlphaFunc'
CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp:(.text+0x159): undefined 
reference to `_glGetString'
CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp:


So I looked for those functions in the libs on my system and found them in 
libGL and libGLU, so I added those to cmake with the instructions above. So it 
built fine, but now when I attempt to run an example I get:


Error: OpenGL version test failed, requires valid graphics context.
Error: glCreateShader not supported by OpenGL driver
Error: glShaderSource not supported by OpenGL driver
Error: glCompileShader not supported by OpenGL driver
Error: glGetShaderiv not supported by OpenGL driver
VERTEX glCompileShader  FAILED



So that may have not been the right thing to do.  Does yours link okay without 
libGL and libGLU?

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





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


Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
Now I use osg2.9 to run it. it doesn't have warning anymore, but still just
a white window

On Wed, Apr 1, 2009 at 6:50 PM, Lingyun Yu lingyun.yu...@gmail.com wrote:

 Hi,

 while I am running osgmovie, I met the warning like
 warning: GraphicsWindowWin32::grabFocus failed grabbing the focus
 then only a white window on the screen.

 what's wrong with this?

 Thank you.

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





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




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


Re: [osg-users] Compressed texture

2009-04-01 Thread Luigi Calori

As I' m also interested in texture compression my question is:
when using .osg files or ive files without texture inside (those 
obtained by osgconv -O noTexturesInIVEFile useOriginalExternalReferences 
foo.osg soo.ive)
if there is a chain of pagedlod files that refer to the same texture 
(for example the same material texture is used  for different files at 
different lods)

does it get readed or loaded in txture memory several times?
I though it does not happen... but willing to be sure.
Instead, if it is embedded in ive, it is replicated.
Am I wrong?

Another question: could be feasible to store jpeg as S3TC_DXT* instead 
of uncompressed?
I know it is not happening now... would it be hard to implement? are 
there technical limitations?
it seem to me that other web enabled sw like Google Earth are 
transmitting jpeg texture
I experimented once trying to call the same compression code in osgconv 
inside the jpeg plugin after the read... but the code got unstable and slow.

Has anyone tried this and/or would it be of some interest?


Thanks in advance


Robert Osfield ha scritto:

 Hi Yefei,

On Wed, Apr 1, 2009 at 4:24 PM, Yefei He y...@nads-sc.uiowa.edu 
mailto:y...@nads-sc.uiowa.edu wrote:


   Thanks for your reply. Yes, I agree it will take quite some
effort and possibly format change to implement texture sharing
between ive files with built-in textures. That's why I would like
a quicker way out:) -- using ive files without built-in texture but
refer to compressed texture in dds format. Is my assumption
correct that compressed texture in dds format remains compressed
when loaded into memory and passed on to the osg core and GL layer
without being decompressed, as opposed to say jpeg images which
are decompressed during loading and then passed on to osg core in
uncompressed bitmap format?


Yes this is correct, the OSG loads the S3TC_DXT* compressed formats 
from the .dds file and keeps them in that format in the osg::Image and 
the final downloaded texture.  You can compress the textures for a 
file using osgconv:


osgconv --compressed myfile.flt myfile.ive

It won't solve the problem of sharing textures though.

Robert.


___
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] [build] Build problem with gdk-x11-2.0

2009-04-01 Thread Harry Plantinga
Hi,

I'm trying to build OpenSceneGraph on a SUSE system. Attempts to make version 
2.8 and 2.9.2 both yield the following error. Any suggestions?

Thanks!

--
[ 99%] Built target osgdb_svg
Linking CXX shared module ../../../lib/osgPlugins-2.8.0/osgdb_pdf.so
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: 
cannot find -lgdk-x11-2.0
collect2: ld returned 1 exit status
make[2]: *** [lib/osgPlugins-2.8.0/osgdb_pdf.so] Error 1
make[1]: *** [src/osgPlugins/pdf/CMakeFiles/osgdb_pdf.dir/all] Error 2
make: *** [all] Error 2
--

N.B. libgdk-x11-2.0.so.0 is there in the /opt/gnome/lib64 directory, where it's 
supposed to be according to CMakeCache.txt.

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





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


Re: [osg-users] Textures getting invisible on some system.

2009-04-01 Thread Pierre Boulenguez
Hi Ümit,

Thank you for your reply. As for you, the only workaround that I have found is 
to downgrade to osg 2.6.

Best Regards,

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





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


[osg-users] Node to Geode

2009-04-01 Thread Robert
Hi,

I'm pretty noob to OSG and I have tried to make it myself but I really need 
some help. I'm using readNodeFile to get a Node but I need a Geode.

How can I convert the node to geode?

Thank you.

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





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


Re: [osg-users] Compressed texture

2009-04-01 Thread Yefei He
Hi, Robert,

Is sharing textures a problem even if the textures are externally
referenced by the .ive files? I see that in the implementation of 
read image, there is an option of CACHE_IMAGE. Is this turned on 
be default? Is the image cache indexed by the image file names? If 
so, I would expect shared externally referenced textures won't be 
loaded multiple times. Am I right about this?

Thanks,

Yefei

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Wednesday, April 01, 2009 10:50 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Compressed texture

 Hi Yefei,
On Wed, Apr 1, 2009 at 4:24 PM, Yefei He y...@nads-sc.uiowa.edu wrote:
   Thanks for your reply. Yes, I agree it will take quite some
effort and possibly format change to implement texture sharing
between ive files with built-in textures. That's why I would like
a quicker way out:) -- using ive files without built-in texture but
refer to compressed texture in dds format. Is my assumption
correct that compressed texture in dds format remains compressed
when loaded into memory and passed on to the osg core and GL layer
without being decompressed, as opposed to say jpeg images which
are decompressed during loading and then passed on to osg core in
uncompressed bitmap format?

Yes this is correct, the OSG loads the S3TC_DXT* compressed formats from the 
.dds file and keeps them in that format in the osg::Image and the final 
downloaded texture.  You can compress the textures for a file using osgconv:

osgconv --compressed myfile.flt myfile.ive

It won't solve the problem of sharing textures though.

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


Re: [osg-users] osgmovie problem

2009-04-01 Thread Robert Osfield
Hi Yun,

No one will be able to help you unless you provide more information.  Key
details are graphics card/graphics driver.  Also do other examples run
fine?  Have you compiled with the ffmpeg or quicktime plugins?  What exactly
command line options are you using?

Robert.

2009/4/1 Lingyun Yu lingyun.yu...@gmail.com

 Now I use osg2.9 to run it. it doesn't have warning anymore, but still just
 a white window


 On Wed, Apr 1, 2009 at 6:50 PM, Lingyun Yu lingyun.yu...@gmail.comwrote:

 Hi,

 while I am running osgmovie, I met the warning like
 warning: GraphicsWindowWin32::grabFocus failed grabbing the focus
 then only a white window on the screen.

 what's wrong with this?

 Thank you.

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





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




 --
 Cheers,
 Yun

 ___
 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] Node to Geode

2009-04-01 Thread Robert Osfield
HI Robert,

You can using dynamic_castosg::Geode*(node) in C++, but... this doesn't
mean it'll return anything other than a NULL, as most scene graphs will
typically contain a root node that is not a Geode, but something like a
Group.

Perhaps you could explain what you are actually trying to do rather than a
low level request like casting, as it's pretty likely what you are doing
should be done another way.

Robert.

On Wed, Apr 1, 2009 at 6:43 PM, Robert el_mas_fr...@hotmail.com wrote:

 Hi,

 I'm pretty noob to OSG and I have tried to make it myself but I really need
 some help. I'm using readNodeFile to get a Node but I need a Geode.

 How can I convert the node to geode?

 Thank you.

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





 ___
 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] [build] introducing the osgviewer application into another application

2009-04-01 Thread Romain Cavagna
Hi All,

I try to introduce the 'osgviewer' application into my own application but It 
does not work under linux. Currently, I've build OSG 2.6 under Windows and 
Mandriva. I've made a direct copy of the osgviewer application source code and 
with cmake I've made the necessary link with my compiled 2.6 version of OSG ... 
It works well under windows, but each time under linux I get this error :

#0 0xb79ba6b9   __gnu_cxx::__exchange_and_add() (/usr/lib/libstdc++.so.6:??)
#1 0xb799f159   std::string::assign() (/usr/lib/libstdc++.so.6:??)
#2 0x804a265main(argc=1, argv=0xbf882e94) 
(/usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/../../../../include/c++/4.3.2/bits/basic_string.h:502)

[it corresponds to the line 'arguments.setApplicationName( ...]

I've explored a lot of things but I don't find anything !

So ,I need your help !!! Please !

Thank you.

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





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


Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
Other examples run fine. I already compiled with quicktime plugins.
my graphics card is Nvidia geforce 8800 GTX

I just use 
osgmovie d:\1.avi


robertosfield wrote:
 Hi Yun,
 
 No one will be able to help you unless you provide more information.  Key 
 details are graphics card/graphics driver.  Also do other examples run fine?  
 Have you compiled with the ffmpeg or quicktime plugins?  What exactly command 
 line options are you using?
 
 Robert.
 
 2009/4/1 Lingyun Yu  ()
 
   Now I use osg2.9 to run it. it doesn't have warning anymore, but still 
  just a white window
  
  
  On Wed, Apr 1, 2009 at 6:50 PM, Lingyun Yu  () wrote:
  
   Hi,
   
   while I am running osgmovie, I met the warning like
   warning: GraphicsWindowWin32::grabFocus failed grabbing the focus
   then only a white window on the screen.
   
   what's wrong with this?
   
   Thank you.
   
   --
   Read this topic online here:
   http://forum.openscenegraph.org/viewtopic.php?p=9548#9548 
   (http://forum.openscenegraph.org/viewtopic.php?p=9548#9548)
   
   
   
   
   
   ___
   osg-users mailing list
()
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
   (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
   
  
  
  
  
  
  -- 
  Cheers,
  Yun
  
  ___
  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


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





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


Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus

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





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


Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
another warning

TextureRectangle::apply(..) failed, texture rectangle is not support by your 
OpenGL drivers.

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





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


Re: [osg-users] [build] introducing the osgviewer application into another application

2009-04-01 Thread Robert Osfield
Hi Romain,

I haven't heard of problems like this before (I work under Linux almost 100%
of time). What happens when you run the original osgviewer?

Robert.

On Wed, Apr 1, 2009 at 7:24 PM, Romain Cavagna rcava...@widereality.comwrote:

 Hi All,

 I try to introduce the 'osgviewer' application into my own application but
 It does not work under linux. Currently, I've build OSG 2.6 under Windows
 and Mandriva. I've made a direct copy of the osgviewer application source
 code and with cmake I've made the necessary link with my compiled 2.6
 version of OSG ... It works well under windows, but each time under linux I
 get this error :

 #0 0xb79ba6b9   __gnu_cxx::__exchange_and_add()
 (/usr/lib/libstdc++.so.6:??)
 #1 0xb799f159   std::string::assign() (/usr/lib/libstdc++.so.6:??)
 #2 0x804a265main(argc=1, argv=0xbf882e94)
 (/usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/../../../../include/c++/4.3.2/bits/basic_string.h:502)

 [it corresponds to the line 'arguments.setApplicationName( ...]

 I've explored a lot of things but I don't find anything !

 So ,I need your help !!! Please !

 Thank you.

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





 ___
 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] introducing the osgviewer application intoanother application

2009-04-01 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
What exactly is your own application? Is it another windowing framework?

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Romain
Cavagna
Sent: Wednesday, April 01, 2009 12:25 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [build] introducing the osgviewer application
intoanother application

Hi All,

I try to introduce the 'osgviewer' application into my own application but
It does not work under linux. Currently, I've build OSG 2.6 under Windows
and Mandriva. I've made a direct copy of the osgviewer application source
code and with cmake I've made the necessary link with my compiled 2.6
version of OSG ... It works well under windows, but each time under linux I
get this error :

#0 0xb79ba6b9   __gnu_cxx::__exchange_and_add() (/usr/lib/libstdc++.so.6:??)
#1 0xb799f159   std::string::assign() (/usr/lib/libstdc++.so.6:??)
#2 0x804a265main(argc=1, argv=0xbf882e94)
(/usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/../../../../include/c++/4.3.2/bits/
basic_string.h:502)

[it corresponds to the line 'arguments.setApplicationName( ...]

I've explored a lot of things but I don't find anything !

So ,I need your help !!! Please !

Thank you.

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





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


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


[osg-users] Problem with OSG 2.8 binaries download

2009-04-01 Thread Monakov Yurii
Hi,

I can not downlod any prebuild binaries from 
http://www.openscenegraph.org/projects/osg/wiki/Downloads

It says You don't have permission to access path to binaries on this server.

Is it my problem or server's?

Thank you.

YM

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





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


Re: [osg-users] OpenGL 3.1 at GDC

2009-04-01 Thread R Fritz
Robert Osfield, Paul Martz, Shayne Tuller, thanks for your responses  
to a newbie question.


Randolph

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


[osg-users] testing for multisampling capability

2009-04-01 Thread Peter Amstutz
I'm trying to enable 4x multisampling in my application.  When running 
on systems with decent video drivers this is a simple matter of setting 
traits-sampleBuffers when I create the graphics window and it just 
works.  Unfortunately in testing I've run into a system with an 
integrated Intel graphics driver that appears to not support 
multisampling -- I get pixel format error when I try to create the 
graphics context.  I need to fall back and disable multisampling in this 
case, but presently in our application this requires that the user edit 
an external xml configuration file.  Ideally it should be able to probe 
the driver features to determine if multisampling is available.  What is 
the best way to do this in Open Scene Graph?


I tried creating the graphics window, testing for failure, and if so 
disabling multisampling and trying again.  Unfortunately, in testing 
this approach on a different system I ran into a problem -- it seems 
that once you've requested a graphics context with one multisampling 
setting, you can't ask for a different setting?  I created a multisample 
graphics context, forced the initialization to be considered to fail, 
deleted the context, then asked for a non-multisample context (with all 
the same settings), then reports an invalid pixel format on trying to 
change the multisample settings.  It's very weird.


I'm sort of out in the weeds, here.  It would be nice if there was some 
way to use OSG to ask the driver what it supports rather than having to 
play guessing games with graphics context initialization.  Does anyone 
have any ideas?


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


Re: [osg-users] Problem with OSG 2.8 binaries download

2009-04-01 Thread Martin Beckett
The link seems to point to the directory not the file.
Try: 
http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8/binaries/Windows/VisualStudio9/openscenegraph-all-2.8.0-win32-x86-vc90sp1-Release.tar.gz

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





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


Re: [osg-users] Node to Geode

2009-04-01 Thread Paul Martz
If the top level node isn't a Geode (which it isn't except for the very
simplest of scene graphs), you'll need to walk the scene graph to find the
Geode of interest. In OSG this is done with a NodeVisitor. I suggest you get
the OSG Quick Start Guide and read through it (search at www.lulu.com).

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Sent: Wednesday, April 01, 2009 11:43 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Node to Geode

Hi,

I'm pretty noob to OSG and I have tried to make it myself but I really need
some help. I'm using readNodeFile to get a Node but I need a Geode.

How can I convert the node to geode?

Thank you.

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





___
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] default coordinate system and camera - newbie

2009-04-01 Thread ami guru
Hello forum,


osgViewer , by default uses the world coordinate system that is oriented
with positive X to right , positive Z up, and positive Y into the screen.


Does that mean  the camera' s defualt position is at the origin looking down
into  the screen which is positive Y?


I have tried to extract  the vectors using the function

'
osg::Vec3f eye;
osg::Vec3f dir;
osg::Vec3f up;

viewer.getCamera()-getViewMatrixAsLookAt(eye,dir,up);


cout  The eye  vector:   eye.x() eye.y()
eye.z()  endl;
cout  The look at position:   dir.x() dir.y()
dir.z()  endl;
cout  The up vector is:   up.x() up.y() up.z()
 endl;





The eye  vector: 0 0 0
The look at position: 0 0 -1
The up vector is: 0 1 0


I was wondering if the up vector be Z axis instead


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


Re: [osg-users] Problem with OSG 2.8 binaries download

2009-04-01 Thread Юрий Монаков
OK, I see. Thank you.

BTW, where can I look at file list of this directories (if any)?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with OSG 2.8 binaries download

2009-04-01 Thread Юрий Монаков
Oooo. I've googled it :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] vpbmaster vs osgdem

2009-04-01 Thread Gert van Maren

Hi Robert,

I've put a zip file in the same spot: vpb_task_logs.zip

Weird thing is that all logs are small except the subtiles ones which are  
20Mb+. That suppossed to be?


Thanks Gert

On Thu, 02 Apr 2009 01:44:56 +1300,  
osg-users-requ...@lists.openscenegraph.org wrote:



HI Gert,

I downloaded the file but on attempting to unpack the archive using  
unrar I get an error:


unrar x vpb_task_logs.rar

UNRAR 3.80 freeware  Copyright (c) 1993-2008 Alexander Roshal

The archive header is corrupt

Extracting from vpb_task_logs.rar

Unexpected end of archive
No files to extract

If I run md5sum I get:

md5sum vpb_task_logs.rar
454388294a9cab627e7e60ac7d1d5e36  vpb_task_logs.rar

Is the file OK?   Could you try posting a zipped file?

Robert.


On Wed, Apr 1, 2009 at 7:56 AM, Gert van Maren g...@k2vi.com wrote:
Hi Robert,

I've put the tasks/logs on our ftp server:

ftp.k2vi.com
user: DIT_Guest
password 33Karaka2oo9 (the two o's are the letter o, not numbers)

file: /Download/OSG/vpb_task_logs.rar




--
Gert van Maren

Head of Research  Development
K2Vi Virtual Reality Software
Data Interface Technologies Ltd

3 Cliff Wilson street
Level 2, 9305
Wanaka, New Zealand
Phone: +64 21 2855581
Email: g...@k2vi.com
Web: http://www.k2vi.com


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


[osg-users] [osgPlugins] osgmovie problem

2009-04-01 Thread salvatore
hello to all,
I have a problem: osgmovie use to see a movie. mov but I see a shift in the top 
of the movie screen, you can help me?
Thank you in advance

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





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


[osg-users] [build] Windows binary download

2009-04-01 Thread Martin Beckett
A user on general pointed out that the windows binary links on
http://www.openscenegraph.org/projects/osg/wiki/Downloads 
point to the directory not the file and they can't access them.

It also seems that windows binaries are packed as .tar.gz - could we make them 
.zip? Windows users that are downloading binaries are unlikely to have 
cygwin/ming tools installed.

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





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


Re: [osg-users] default coordinate system and camera - newbie

2009-04-01 Thread Paul Martz
The CameraManipulator (like TrackballManipulator, for example) determines
the default orientation. You can change this default by setting the up
vector in the TrackballManipulator. By default, the TrackballManipulator
uses positive Z up, so if your code is getting positive Y up, either you
have a bug or you are not using the TrackballManipulator or you have changed
its default.
 
The default view position is also determined by the CameraManipulator. The
TrackballManipulator, for example, has a home position that you can set. By
default, it considers the scene bounding volume and tries to position the
view so that the entire scene fits within a 50 degree FOV (I think it's 50,
not sure).
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
+1 303 859 9466
 

  _  

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ami guru
Sent: Wednesday, April 01, 2009 1:58 PM
To: OpenSceneGraph Users
Subject: [osg-users] default coordinate system and camera - newbie


Hello forum,


osgViewer , by default uses the world coordinate system that is oriented
with positive X to right , positive Z up, and positive Y into the screen.


Does that mean  the camera' s defualt position is at the origin looking down
into  the screen which is positive Y?


I have tried to extract  the vectors using the function 

'
osg::Vec3f eye;
osg::Vec3f dir;
osg::Vec3f up;

viewer.getCamera()-getViewMatrixAsLookAt(eye,dir,up);


cout  The eye  vector:   eye.x() eye.y()
eye.z()  endl;
cout  The look at position:   dir.x() dir.y()
dir.z()  endl;
cout  The up vector is:   up.x() up.y() up.z()
 endl;





The eye  vector: 0 0 0
The look at position: 0 0 -1
The up vector is: 0 1 0


I was wondering if the up vector be Z axis instead


Regards
Sajjad


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


Re: [osg-users] [build] How do I add libraries to all linker commands?

2009-04-01 Thread Lucasw

lucasw wrote:
 
 Philip Lowman wrote:
  On Tue, Mar 31, 2009 at 5:07 PM, Lucasw  () wrote:
  

   
From your build tree type make edit_cache, this is the same as 
running ccmake /path/to/source/tree.

Check the contents of the OPENGL_gl_LIBRARY and OPENGL_glu_LIBRARY 
variables.  They should be pointed to the libraries you want to use for 
GL and GLU.  They are under the Advanced section of the cache.


   
   
   I ended up reinstalling cygwin, and now cmake does everything correctly 
   without edit files, and the linking works fine.  The built examples also 
   work, or at least the couple I've spot-checked.
   
   
   Okay, after running make edit_cache 't' has to be pressed to get the 
   advanced mode where the OPENGL variables are, and then I added 
   /usr/lib/libGL.dll.a and /usr/lib/libGLU.dll.a to those variables 
   (separated from the /usr/lib/w32api libs by semicolons).  Then 'c' for 
   configure and 'g' for generate, and then it exits and everything builds 
   fine.
   
  Strange.  On my Cygwin install with CMake 2.6.2 (on Cygwin) I get:
  
   OPENGL_INCLUDE_DIR  /usr/include/w32api
   OPENGL_gl_LIBRARY   /usr/lib/w32api/libopengl32.a
   OPENGL_glu_LIBRARY  /usr/lib/w32api/libglu32.a
   
  What is the difference between /usr/lib/libGL.dll.a and 
  /usr/lib/w32api/libopengl32.a?  What version of CMake are you using?
  
  
  
  -- 
  Philip Lowman
  
   --
  Post generated by Mail2Forum
 
 
 
 I have cmake version 2.6-patch 2
 
 That's what the default settings were, but when I tried to build with them I 
 get a bunch of errors like:
 
 
 CMakeFiles/osg.dir/AlphaFunc.o:AlphaFunc.cpp:(.text+0x14): undefined 
 reference to `_glAlphaFunc'
 CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp:(.text+0x159): undefined 
 reference to `_glGetString'
 CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp:
 
 
 So I looked for those functions in the libs on my system and found them in 
 libGL and libGLU, so I added those to cmake with the instructions above. So 
 it built fine, but now when I attempt to run an example I get:
 
 
 Error: OpenGL version test failed, requires valid graphics context.
 Error: glCreateShader not supported by OpenGL driver
 Error: glShaderSource not supported by OpenGL driver
 Error: glCompileShader not supported by OpenGL driver
 Error: glGetShaderiv not supported by OpenGL driver
 VERTEX glCompileShader  FAILED
 
 
 
 So that may have not been the right thing to do.  Does yours link okay 
 without libGL and libGLU?


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





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


Re: [osg-users] Return of the DepthPartitionNode

2009-04-01 Thread Pasquale Tricarico
Hi Ravi,

I can confirm that the scaling problem seems now to be fixed using the
files attached. I've tested it both in the osgdepthpartition example
provided, and in a more complex scene with objects sizes covering more
than six orders of magnitude. The new code worked flawlessly. Thanks
for fixing this!

Pasquale

2009/4/1 Ravi Mathur ravid...@mail.utexas.edu:
 Hey all,

 OK I have been away for a looong time, but still occasionally watching from
 a distance, and saw the bug people have reported about the
 DepthPartitionNode not handling scaled models properly.

 I believe this is now fixed ... I have attached the new
 DistanceAccumulator.cpp, along with a modified example file that uses a
 PositionAttitudeTransform to draw the Earth's orbit around the Sun.

 Also, I have seen Robert's posts about the DPN not being thread-friendly.
  This is something that I will look into next.

 Thanks!
 Ravi




 ___
 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] osgmovie problem

2009-04-01 Thread Ulrich Hertlein

On 2/4/09 5:32 AM, Lingyun Yu wrote:

another warning

TextureRectangle::apply(..) failed, texture rectangle is not support by your 
OpenGL drivers.


That explains the white rectangle.
The 8800 definitively supports texture rectangles.  Maybe you need to update 
your driver?

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


[osg-users] Fwd: default coordinate system and camera - newbie

2009-04-01 Thread ami guru
Hello Paul,


I have the following snippet that deals with the viewer


**'
int main()
{
//Creating the viewer
osgViewer::Viewer viewer ;


//add some event handler
//to show the statistics
viewer.addEventHandler(new osgViewer::StatsHandler);


/*
  get camera related information

 */
osg::Vec3f eye;
osg::Vec3f dir;
osg::Vec3f up;

viewer.getCamera()-getViewMatrixAsLookAt(eye,dir,up);


cout  The eye  vector:   eye.x() eye.y()
eye.z()  endl;
cout  The look at position:   dir.x() dir.y()
dir.z()  endl;
cout  The up vector is:   up.x() up.y() up.z()
 endl;

//Creating the root node
osg::ref_ptrosg::Node root  = createSceneGraph();





'**


Could you provide some hint where the bug might be , at least  the way to
find it?


I want to implement a very simple scenario. A camera that moves along with
the key press event.

I already have that implemented in OpenGL program where i can roll, pitch
yaw and slide with user key press event.


I want to map that in the scene graph system.


I have the following information predefined

*n* = eye - look;
*u* = *up* * *n*;
*v* = *n* * *u*;


To move the camera in an ineractive way i have to have the access to there
values .


there is a function in the Camera Class called getViewMatrix() , i hope that
it is one to access these values.


Any more reference would be of great help.


-- Forwarded message --
From: Paul Martz pma...@skew-matrix.com
Date: 2009/4/2
Subject: Re: [osg-users] default coordinate system and camera - newbie
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org


 The CameraManipulator (like TrackballManipulator, for example) determines
the default orientation. You can change this default by setting the up
vector in the TrackballManipulator. By default, the TrackballManipulator
uses positive Z up, so if your code is getting positive Y up, either you
have a bug or you are not using the TrackballManipulator or you have changed
its default.

The default view position is also determined by the CameraManipulator. The
TrackballManipulator, for example, has a home position that you can set. By
default, it considers the scene bounding volume and tries to position the
view so that the entire scene fits within a 50 degree FOV (I think it's 50,
not sure).

Paul Martz
*Skew Matrix Software LLC*
http://www.skew-matrix.com
+1 303 859 9466


 --
*From:* osg-users-boun...@lists.openscenegraph.org [mailto:
osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *ami guru
*Sent:* Wednesday, April 01, 2009 1:58 PM
*To:* OpenSceneGraph Users
*Subject:* [osg-users] default coordinate system and camera - newbie

Hello forum,


osgViewer , by default uses the world coordinate system that is oriented
with positive X to right , positive Z up, and positive Y into the screen.


Does that mean  the camera' s defualt position is at the origin looking down
into  the screen which is positive Y?


I have tried to extract  the vectors using the function

'
osg::Vec3f eye;
osg::Vec3f dir;
osg::Vec3f up;

viewer.getCamera()-getViewMatrixAsLookAt(eye,dir,up);


cout  The eye  vector:   eye.x() eye.y()
eye.z()  endl;
cout  The look at position:   dir.x() dir.y()
dir.z()  endl;
cout  The up vector is:   up.x() up.y() up.z()
 endl;





The eye  vector: 0 0 0
The look at position: 0 0 -1
The up vector is: 0 1 0


I was wondering if the up vector be Z axis instead


Regards
Sajjad


___
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] Build problem with gdk-x11-2.0

2009-04-01 Thread Philip Lowman
On Wed, Apr 1, 2009 at 1:28 PM, Harry Plantinga hplan...@calvin.edu wrote:

 Hi,

 I'm trying to build OpenSceneGraph on a SUSE system. Attempts to make
 version 2.8 and 2.9.2 both yield the following error. Any suggestions?

 Thanks!

 --
 [ 99%] Built target osgdb_svg
 Linking CXX shared module ../../../lib/osgPlugins-2.8.0/osgdb_pdf.so
 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
 cannot find -lgdk-x11-2.0
 collect2: ld returned 1 exit status
 make[2]: *** [lib/osgPlugins-2.8.0/osgdb_pdf.so] Error 1
 make[1]: *** [src/osgPlugins/pdf/CMakeFiles/osgdb_pdf.dir/all] Error 2
 make: *** [all] Error 2
 --

 N.B. libgdk-x11-2.0.so.0 is there in the /opt/gnome/lib64 directory, where
 it's supposed to be according to CMakeCache.txt.



Do you have the libgdk development packages installed for your distribution?

There should be a libgdk-x11-2.0.so symbolic link (without .0) somewhere in
/opt/gnome/lib64 along with header files.  On Linux systems build systems
like automake and CMake never search for versioned shared libraries directly
but rather resolve the symbolic link libfoo.so=libfoo.so.1 to know that
libfoo.so.1 is needed at runtime.  Development packages that provide
header files usually provide .so symbolic links or just plain .so files
if versioning is not being used.

OSG's cmake scripts should probably be telling you about this problem at
configure time (this may be a build system bug).

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


[osg-users] Depth buffer data is not clamp to [0.0,1.0].

2009-04-01 Thread YangXiao
Hi everyone:
 Here is My code:
 
depthBuffer-allocateImage(width, height, 1,GL_DEPTH_COMPONENT,GL_FLOAT);
 
viewer.getCamera()-setPostDrawCallback( new ScreenShotCallback());
 
 while (!viewer.done()) 
 {
    viewer.getCamera()-attach(osg::Camera::DEPTH_BUFFER, depthBuffer);
     viewer.frame();
 
  }
 
and in ScreenShotCallback Operator
 
 void operator() (const osg::Camera camera) const 
 {
 
    FILE * fp;
   fp = fopen(file_name, w);
   
   float z ;
   char tmp[15];
   for(int i = 0;iwidth*height;i++)
   { 
z = float ( (depthBuffer-data())[i*4] );
memset(tmp,'\0',sizeof(tmp));
sprintf(tmp,%f ,z);
fprintf(fp, %s, tmp);
if(!(i%width))
 fprintf(fp, \r\n); 

   }
   fclose(fp);
}
 
But all data is clamp to [0,255]  .How can i get real native z-buffer data?
 
  Best regard.  
 
YangXiao 


  ___ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Announcing VR-Vantage - an OSG-based 3D Toolkit

2009-04-01 Thread Richard Baron Penman
Whose idea was it to announce this on April Fools Day?!

From reading the limited information available on their website I think this
framework would offer some useful features for my project. Does anyone have
experience or an opinion about this technology/company?

cheers,
Richard



On Wed, Apr 1, 2009 at 1:24 PM, Len Granowetter lengr...@mak.com wrote:

 Fellow members of the OpenSceneGraph community,

 VT MAK (aka MAK Technologies) is proud to announce the launch today of
 VR-Vantage (http:\\www.VR-Vantage.com) - a new 3D application development
 environment based on OpenSceneGraph!

 MAK has been involved in visual simulation for over 16 years now, and over
 the years, we've talked to a lot of people who have expressed frustration
 about the state of the 3D visualization market: Commercial image generators
 (IGs) always have great features out of the box, but they are usually closed
 systems - often tied to a vendor’s content-generation toolchain, and often
 without a toolkit API for user customization or extension.  On the other end
 of the spectrum are scene graph toolkits like OSG - which offer unlimited
 flexibility, but require lots of application development and content
 integration work just to get to the point where you can really start adding
 your project-specific capabilities.  What's really been missing is a product
 that provides full-featured out-of-the-box applications, *and* the ability
 to extend, customize or embed any of that application-level functionality
 into custom applications.  Missing...until now!

 What we are offering with VR-Vantage is the ability to turbo-charge your
 OSG-based development project.  A typical OSG user (particularly in the
 visual simulation domain) spends lots of money incorporating content, and
 lots of software development time implementing or integrating
 application-level functionality, such as:
 • Game-like or virtual-globe-like navigation interfaces
 • Human character animation
 • Real-time trees and vegetation
 • Graphical User Interface
 • A sky/lighting/environment model
 • An entity management layer
 • Full-featured DIS/HLA support
 • Top-quality 3D vehicle and cultural feature models
 • Run-time configuration system
 • Informational overlays about simulated objects
 • Fully-integrated Distributed Rendering for multi-channel displays
 • Streaming terrain elevation and imagery from web-mapping services
 • Heads-up-displays or interactive cockpit displays

 With VR-Vantage, we've built all of this content and capability into an
 inexpensive off-the-shelf product.  We've licensed all the necessary
 3rd-party technology, and spent the past two years integrating and
 developing a powerful application-level OSG-based toolkit - so that you
 don't have to do it yourself!  The VR-Vantage applications, which include
 the MAK Stealth viewer, and a new desktop IG called Vantage IG, already
 incorporate all of the following as standard features: IDV's SpeedTree
 vegetation, BDI's DI-Guy human characters, DiSTI's GL Studio cockpit
 displays, SunDog Software's SilverLining clouds and environment, Pelican
 Mapping's osgEarth streaming elevation and imagery, a customizable Qt-based
 GUI, native HLA/DIS support based on MAK's own VR-Link toolkit,
 multi-channel distributed rendering, and a library of high-quality 3D models
 from companies like Simthetiq and RealDB. And no 3rd-party run-time licenses
 are required to use any of these capabilities!

 But you still retain the same level of extensibility you’d have with
 OpenSceneGraph.  VR-Vantage offers a higher-level API above the scene graph,
 to provide as much power as possible.  But you always have direct access to
 the OSG layer as well, so that you can easily incorporate existing OSG
 nodekits and file loaders, and can continue working with the API you're
 comfortable with.  Plus, you’ll have MAK to support you, so you can stay
 focused on your project-specific tasks.

 Start with the VR-Vantage Toolkit, and you can immediately begin working on
 your application-specific functionality, giving you a leg up on your
 competition, and allowing you to execute your projects with much lower risk.

 VR-Vantage was previewed at I/ITSEC 2008, and version 1.0 shipped today,
 March 31, 2009.  For more information about VR-Vantage, please see http:\\
 www.VR-Vantage.com, or visit http:\\www.mak.com.

 VT MAK, (formerly known as MAK Technologies), a company of VT Systems,
 develops software to link, simulate and visualize the virtual world.  We are
 best known for our DIS/HLA networking toolkits (VR-Link and the MAK RTI),
 for our computer-generated-forces simulation toolkit (VR-Forces), and for
 our 3D visualization product (MAK Stealth).

   -Len
 --
 Len Granowetter
 VT MAK
 work: (617) 876-8085 Ext. 121
 cell: (617) 256-4368
 email: lengr...@mak.com
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 

Re: [osg-users] Return of the DepthPartitionNode

2009-04-01 Thread Guy
Hi Ravi,

 Last week I asked something about DPN with no response, but maybe you
are the man to refer to, so here I quote myself again:


Hi,

 

 Several days ago I asked about depthpartition, but now I've a more
complex situation that I want to figure out. It begins with depth
partition but ends up with how cameras do work.

 

I tried to combine the depth partition with the osgdistortion code. The
idea was to try to put cameras above and under the depth partition node
and see the effect.

I have DPN node, Scene node (which is a group for the scene) and
Distortion node (which is two pass cameras, one renders to RTT and the
second use the texture, distort it and renders to screen).  

I got pretty much confused. First I tried to put the DPN above the
distorted scene (that means DPN-DISTORTION-SCENE). It did not render
correctly. Only the closer depth interval of the two intervals was
rendered.

So I tried to put the DPN above the scene and under the distortion node.
(DISTORTION-DPN-SCENE). Then NOTHING was rendered. I tried to change
the DPN camera render order to PRE_RENDER. Again, nothing. Then when I
changed it to NESTED_RENDER, all was rendered but not in the correct
order. So I tried to change the RenderOrderNUM of the cameras of the DPN
to ensure that the far intervals will be rendered first (lower
RenderOrderNUM) but it did not help... I tried to reverse the RenderNUM
(higher for farther intervals) with no difference. 

So it brings up questions:

Why does the RenderOrderNUM didn't have effect? 
Where is the correct place to put the DPN? 
Why when the DPN was above the distortion node the closer interval was
rendered, and when there is no DPN at all, the farther interval is
rendered? 
Why when the cameras of the DPN were not NESTED_RENDER nothing was
rendered? 
Would it be more correct to add Slave cameras to the scene instead of
using these cameras only in the culling traverse? 
 

 

I guess that's it for now...

 

Guy.
 

--


Hey all,

OK I have been away for a looong time, but still occasionally watching  
from a distance, and saw the bug people have reported about the  
DepthPartitionNode not handling scaled models properly.

I believe this is now fixed ... I have attached the new  
DistanceAccumulator.cpp, along with a modified example file that uses  
a PositionAttitudeTransform to draw the Earth's orbit around the Sun.

Also, I have seen Robert's posts about the DPN not being thread- 
friendly.  This is something that I will look into next.

Thanks!
Ravi

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