[osg-users] Using osgdem, Why the memory doesn't free when I far from the complex osga scene to its single layer?

2008-03-02 Thread FreeSouth
 
 Hi all:
 
 Using osgdem, Why the memory doesn't free when I far from the complex osga 
scene to its single layer?
 
 I use this cmd to test:  osgdem --xx 10 --yy 10 -v 0.1 -d h.tif 
--PagedLOD -l 4 -o a.ive -a a.osga
 
 
Regards
 
Yang ShiXing___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG file format and textures...

2008-03-02 Thread Robert Osfield
Hi Neil,

Is this simply a file path issue?

FYI, .osg doesn't embed imagery in any way, it only has external
refrences.  The .ive format can embed images though.

Robert.

On Sat, Mar 1, 2008 at 7:45 PM,  [EMAIL PROTECTED] wrote:
 Hi All,

  Sorry if this is an old chestnut, but I got a question about the .osg file 
 format.

  I've got a scene created, and I save the universe out as a .osg file. I've 
 passed no options through in the the call, so the file that's created appears 
 to have the textures that the scene uses actually embedded within the osg 
 file. For my purposes this is great. However, when I double click on the osg 
 file, and view it with the osgviewer, no textures appear.

  I should add at this point that I'm still using OSG 1.2 - would love to move 
 on but no time at the moment.

  So, has anyone come across this problem before ?

  The textures that have been used are targas and jpegs if that's any help.

  It appears that using the options parameter I could force the save to merely 
 record a reference to the texture, and this would solve my immediate problem, 
 however I thought that I may have stumbled across a minor bug, and wanted to 
 check if anyone knew about it.

  Thanks for any comments

  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


Re: [osg-users] Distributed rendering of scene graph

2008-03-02 Thread Robert Osfield
HI Benjamin,

Thanks for the more structured explanation.  I'm not sure that the
overall approach will be the most efficient way to tackle the task for
a wide range of usages, so I'd recommend exploring the possibilities
of different ways to implement that various usages rather than just
sticking to one approach - different approaches are very likely to be
suitable for different usages.

  o What is my question at all?
  I am searching for a interface where I can grab these visible nodes and put
  them into a list. I need them so I can analyse them to run the balancing
  algorithm and send the data to the rendering nodes. I think that it might be
  possible to use the DrawImplementation of the Drawable nodes.

What it sounds like you are suggesting/looking for is a distributed
render graph.  The OSG's render graph is the rendering back end that
the OSG produces from its cull traversal.  The render graph containts
osgUtil::RenderStage/Bin, a osgUtil::StateGraph and
osgUtil::RenderLeaf.  The RenderLeaf contain pointers to the
projection and modelview matrices, the drawable and the point on the
StateGraph that specifies the accumulated state that must applied for
that drawable.

Once the the OSG's cull traversal creates the render graph, the draw
traversal then traverses this render graph in a controlled order that
ensures that the scene builds up in the correct way - for instances
opaque objects first, then depth sorted transparent objects.   Now you
could implement a system where rather than the local machine
traversing the render graph to do the rendering, you could broadcast
this rendering graph to the cluster and get them all render a portion
of it, then to collate the result back of the frame buffer chunks.

I don't think you should be doing things at as low level as trying to
overriding the OpenGL functions that the OSG uses in its Drawables and
StateAttributes.  To go this low level you might as well use a
distributed GL implementation and save yourself a lot of time.   You
mention transforms and drawables in your text, whereas you actually
need all OpenGL state that the OSG manages as well, you really do need
the whole render graph, yes it is more complex but its what is
actually required to get things to render properly.

There are also issues of performance - you want to be distributing as
little data as possible, and doing a small a compute on the master as
possible, this means differing the most work you can to the slaves,
and minimizing the amount of the data that you have to distribute to
the slaves and get back.  Low level distributed GL loads the network
and the master CPU massively, high level distributed application/IG
has the lowest network and master CPU load, and since you system is
only as fast as the slowest bottleneck then the high level system will
always provide the greatest peformance.  Your distributed render graph
system is somewhere in the middle.

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


Re: [osg-users] Using osgdem, Why the memory doesn't free when I far from the complex osga scene to its single layer?

2008-03-02 Thread Robert Osfield
Hi ShiXing,

2008/3/2 FreeSouth [EMAIL PROTECTED]:

  Hi all:

  Using osgdem, Why the memory doesn't free when I far from the complex
 osga scene to its single layer?

  I use this cmd to test:  osgdem --xx 10 --yy 10 -v 0.1 -d h.tif
 --PagedLOD -l 4 -o a.ive -a a.osga

What memory isn't freeing?  osgdem isn't freeing memory?  A viewer
that you are using to view the scene?  What metric are you using that
indicates memory isn't being freed?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using osgdem, Why the memory doesn't free when I far from the complex osga scene to its single layer?

2008-03-02 Thread FreeSouth
Hello:
 
   I have use the cmd like this:osgdem --xx 10 --yy 10 -v 0.1 -d h.tif  
--PagedLOD -l 10 -o a.ive -a a.osga 
   
   , then, I use osgviewer to open this file(a.osga).
 
   The memery is Occupied 1378360KB when the viewer point face the scene (a 
high detail), I think that when I control the viewer point to a far distant, 
the scene change into a low detail, the memery maybe occupied less than 
1378360KB.  But not. It also 1378360KB, more or less than it.
 
   I don't know I think like this correct or not.
 
Regards
Yang ShiXing
 
 Hi ShiXing, 


2008/3/2 FreeSouth [EMAIL PROTECTED]: 


  Hi all: 


  Using osgdem, Why the memory doesn't free when I far from the complex 
 osga scene to its single layer? 


  I use this cmd to test:  osgdem --xx 10 --yy 10 -v 0.1 -d h.tif 
 --PagedLOD -l 4 -o a.ive -a a.osga 



What memory isn't freeing?  osgdem isn't freeing memory?  A viewer 
that you are using to view the scene?  What metric are you using that 
indicates memory isn't being freed? 
 
 
 
 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Distributed rendering of scene graph

2008-03-02 Thread Benjamin Eikel
Hello Robert,

On Sunday 02 March 2008 at 11:42:24, Robert Osfield wrote:
 HI Benjamin,

 Thanks for the more structured explanation.  I'm not sure that the
 overall approach will be the most efficient way to tackle the task for
 a wide range of usages, so I'd recommend exploring the possibilities
 of different ways to implement that various usages rather than just
 sticking to one approach - different approaches are very likely to be
 suitable for different usages.
You have a point there. But we want to implement a very specialized system for 
only our kind of factory scenes. Of course our system will perform very bad 
with other kind of scenes (nature for example).

   o What is my question at all?
   I am searching for a interface where I can grab these visible nodes and
  put them into a list. I need them so I can analyse them to run the
  balancing algorithm and send the data to the rendering nodes. I think
  that it might be possible to use the DrawImplementation of the Drawable
  nodes.

 What it sounds like you are suggesting/looking for is a distributed
 render graph.  The OSG's render graph is the rendering back end that
 the OSG produces from its cull traversal.  The render graph containts
 osgUtil::RenderStage/Bin, a osgUtil::StateGraph and
 osgUtil::RenderLeaf.  The RenderLeaf contain pointers to the
 projection and modelview matrices, the drawable and the point on the
 StateGraph that specifies the accumulated state that must applied for
 that drawable.
Thank you for that insight. That was something I did not know and that was the 
part that was missing in my puzzle. This sound exactly like the thing I am 
searching. So if I want to get this RenderStage object I could get it from 
the SceneView after doing the update and cull traversal?

 Once the the OSG's cull traversal creates the render graph, the draw
 traversal then traverses this render graph in a controlled order that
 ensures that the scene builds up in the correct way - for instances
 opaque objects first, then depth sorted transparent objects.   Now you
 could implement a system where rather than the local machine
 traversing the render graph to do the rendering, you could broadcast
 this rendering graph to the cluster and get them all render a portion
 of it, then to collate the result back of the frame buffer chunks.
Okay right. We will only have one render bin which eases the thing a little 
bit because we will not support transparent objects.

 I don't think you should be doing things at as low level as trying to
 overriding the OpenGL functions that the OSG uses in its Drawables and
 StateAttributes.  To go this low level you might as well use a
 distributed GL implementation and save yourself a lot of time.   You
 mention transforms and drawables in your text, whereas you actually
 need all OpenGL state that the OSG manages as well, you really do need
 the whole render graph, yes it is more complex but its what is
 actually required to get things to render properly.
Yes you are right. I did not know that this render graph does exist and only 
looked at the documentation and the code. But I did not get this insight that 
you gave me by your explanations above. So I assumend that overwriting the 
DrawImplementation for getting the information about the visible nodes would 
be a possible way. It might be possible, but as you said, not a good 
approach.

Yes you are right, in general we need the whole state, but as we do not want 
to implement texturing I hope the state does not change that often and it 
might be possible to use the same state for the whole scene (except for the 
model-view matrix and vertex data of course).

 There are also issues of performance - you want to be distributing as
 little data as possible, and doing a small a compute on the master as
 possible, this means differing the most work you can to the slaves,
 and minimizing the amount of the data that you have to distribute to
 the slaves and get back.  Low level distributed GL loads the network
 and the master CPU massively, high level distributed application/IG
 has the lowest network and master CPU load, and since you system is
 only as fast as the slowest bottleneck then the high level system will
 always provide the greatest peformance.  Your distributed render graph
 system is somewhere in the middle.
Yes that is clear. We have to see how the system performs with that single 
central node which has to do the culling etc.

Thank you very much for your time and help.

Regards,
Benjamin

 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


Re: [osg-users] Using osgdem, Why the memory doesn't free when I far from the complex osga scene to its single layer?

2008-03-02 Thread Robert Osfield
2008/3/2 FreeSouth [EMAIL PROTECTED]:
 Hello:

I have use the cmd like this:osgdem --xx 10 --yy 10 -v 0.1 -d h.tif
 --PagedLOD -l 10 -o a.ive -a a.osga

, then, I use osgviewer to open this file(a.osga).

The memery is Occupied 1378360KB when the viewer point face the scene (a
 high detail), I think that when I control the viewer point to a far distant,
 the scene change into a low detail, the memery maybe occupied less than
 1378360KB.  But not. It also 1378360KB, more or less than it.

The database pager only pages out after an expiry delay that defaults
to 20 seconds, and then it only expires according to a set of metrics
within the pager - the metrics are user controllable.  See the
include/osgDB/DatabasePager for details.

Also, for the second time, how are you measuring memory consumption?
If you are using an OS measure then it may well mean the OS is being
lazy with its reclaiming of freed memory.

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


[osg-users] camera node in osg file

2008-03-02 Thread Erik Sundnes Løvlie
Hello everyone,

I have a few questions regarding the osg file format (and the blender export
plugin), and I couldn't find the answer when searching the mailing list
archive (for this mailing list or the blender mailing lists + forums) and
google.

Short intro / background: I am trying to write a small game using blender
for creating the 3d content and openscenegraph for the real-time
visualization. I am using version 2.44 of blender and 2.2.0 of osg (checked
out from svn). My environment is kubuntu 7.10.

So I have three questions that I hope someone can help me with:

1) I haven't been able to get the camera information (position +
orientation) into the osg file when I export from blender. Looking at the
python code for the exporter, it seems it ignores the camera nodes
completely. Does anyone know if this is a limitation in the osg file format,
or the blender plugin, or neither? I haven't been able to find camera info
in any of the .osg files in the OpenSceneGraph-Data-2.0 archive.

2) How do people normally use the osg file format in their projects? Many
.osg files with one mesh in each, keeping the scene setup (camera, lights,
etc) in some other file?

3) Does anyone have a feeling about which file format is the most common to
use in games projects using openscenegraph? Could it be collada perhaps?

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


[osg-users] [osg_users] Contractor search Client

2008-03-02 Thread David Callu
Hi all

   I have created my company named CGDS (Computer Graphics Development
Service) in September 2007.
   Since this date, I work for Robert Osfield on OpenSceneGraph and
VirtualPlaneteBuilder. Like a mentor,
   Robert help me to launch my professional activity and advise me in
several task that he give me.
   Among other things, I update Delta3D from OSG 1.2 to OSG 2.x (main task
is change Producer to osgViewer),
   integrated in OSG existing code to create 3D text, improve shapefile
loader in OSG, ...

   The time has come for me to found client without Robert's help.
   So, like is write in the subject of this mail, I look for contractor job.


   I am based on Paris, France.
   I am available now.
   You can contact me here : callu.david 'at' gmail 'dot' com

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


Re: [osg-users] Distributed rendering of scene graph

2008-03-02 Thread Robert Osfield
On Sun, Mar 2, 2008 at 11:41 AM, Benjamin Eikel [EMAIL PROTECTED] wrote:
   Thanks for the more structured explanation.  I'm not sure that the
   overall approach will be the most efficient way to tackle the task for
   a wide range of usages, so I'd recommend exploring the possibilities
   of different ways to implement that various usages rather than just
   sticking to one approach - different approaches are very likely to be
   suitable for different usages.
  You have a point there. But we want to implement a very specialized system 
 for
  only our kind of factory scenes. Of course our system will perform very bad
  with other kind of scenes (nature for example).

Even for you factory scene what approach to use will depend upon what
you are viewing - its relatively small section then a distributed
approach will be slower than a local rendering.

You have to bare in mind the overheads and bottlenecks inherit with a
distributed system, throwing lots of hardware at the problem won't
help if you are introducing greater bottlenecks in the process of
using the cluster.


   What it sounds like you are suggesting/looking for is a distributed
   render graph.  The OSG's render graph is the rendering back end that
   the OSG produces from its cull traversal.  The render graph containts
   osgUtil::RenderStage/Bin, a osgUtil::StateGraph and
   osgUtil::RenderLeaf.  The RenderLeaf contain pointers to the
   projection and modelview matrices, the drawable and the point on the
   StateGraph that specifies the accumulated state that must applied for
   that drawable.
  Thank you for that insight. That was something I did not know and that was 
 the
  part that was missing in my puzzle. This sound exactly like the thing I am
  searching. So if I want to get this RenderStage object I could get it from
  the SceneView after doing the update and cull traversal?

You get the root RenderStage after cull traversal.
osgViewer::Renderer has the SceneView that you can get the RenderStage
from.  The root RenderStage has everything you need.

Might I recommend using osgViewer as your base and then just having a
custom renderingTraversals method that you can override the cull and
draw traversals if need be.  If need be is the key part as you may
well find using standard local rendering will often be better than a
distributed implementation.

  Okay right. We will only have one render bin which eases the thing a little
  bit because we will not support transparent objects.

Much of modern rendering is done with multiple pass techniques that go
well beyond just the need for transparent bins.  Don't forget there
techniques like using of the occlussion query extension requires
multipass, and its one technique that is well suited for complex CAD
models.  Paul Martz was even commission recently to add support for
this in the OSG for the purpose of better handling CAD models.

So, while limiting what types of rendering you can use to just
standard opaque models might make your tasks easier, there is a real
danger of excluding modern rendering techniques that help solve the
performance problems in a better way.

   I don't think you should be doing things at as low level as trying to
   overriding the OpenGL functions that the OSG uses in its Drawables and
   StateAttributes.  To go this low level you might as well use a
   distributed GL implementation and save yourself a lot of time.   You
   mention transforms and drawables in your text, whereas you actually
   need all OpenGL state that the OSG manages as well, you really do need
   the whole render graph, yes it is more complex but its what is
   actually required to get things to render properly.
  Yes you are right. I did not know that this render graph does exist and only
  looked at the documentation and the code. But I did not get this insight that
  you gave me by your explanations above. So I assumend that overwriting the
  DrawImplementation for getting the information about the visible nodes would
  be a possible way. It might be possible, but as you said, not a good
  approach.

  Yes you are right, in general we need the whole state, but as we do not want
  to implement texturing I hope the state does not change that often and it
  might be possible to use the same state for the whole scene (except for the
  model-view matrix and vertex data of course).

If I was to tackle render graph distribution (I have been
contemplating this approach for number of years) I'd sereailize the
whole render graph and distribute this to the cluster.  One would take
care to cache objects like osg::StateSet's, osg::StateAttribute and
osg::Drawables locally, and only update them any time they are
updated.  osgIntrospection could potentially be used for
serialization.

The slaves would then listen to render graph dispatch then cull the
render graph down to just the required viewing volume then rendering,
then dispatch back their portion of the colour and depth (if required)
buffers.



Re: [osg-users] Distributed rendering of scene graph

2008-03-02 Thread Benjamin Eikel
Hello Robert,

thank you again for your helpful advice. I will meet with our team tomorrow 
and talk with them and decide what approach we will implement in the end.

Regards,
Benjamin

On Sunday 02 March 2008 at 14:58:41, Robert Osfield wrote:
 On Sun, Mar 2, 2008 at 11:41 AM, Benjamin Eikel [EMAIL PROTECTED] wrote:
Thanks for the more structured explanation.  I'm not sure that the
overall approach will be the most efficient way to tackle the task for
a wide range of usages, so I'd recommend exploring the possibilities
of different ways to implement that various usages rather than just
sticking to one approach - different approaches are very likely to be
suitable for different usages.
 
   You have a point there. But we want to implement a very specialized
  system for only our kind of factory scenes. Of course our system will
  perform very bad with other kind of scenes (nature for example).

 Even for you factory scene what approach to use will depend upon what
 you are viewing - its relatively small section then a distributed
 approach will be slower than a local rendering.

 You have to bare in mind the overheads and bottlenecks inherit with a
 distributed system, throwing lots of hardware at the problem won't
 help if you are introducing greater bottlenecks in the process of
 using the cluster.

What it sounds like you are suggesting/looking for is a distributed
render graph.  The OSG's render graph is the rendering back end that
the OSG produces from its cull traversal.  The render graph containts
osgUtil::RenderStage/Bin, a osgUtil::StateGraph and
osgUtil::RenderLeaf.  The RenderLeaf contain pointers to the
projection and modelview matrices, the drawable and the point on the
StateGraph that specifies the accumulated state that must applied for
that drawable.
 
   Thank you for that insight. That was something I did not know and that
  was the part that was missing in my puzzle. This sound exactly like the
  thing I am searching. So if I want to get this RenderStage object I could
  get it from the SceneView after doing the update and cull traversal?

 You get the root RenderStage after cull traversal.
 osgViewer::Renderer has the SceneView that you can get the RenderStage
 from.  The root RenderStage has everything you need.

 Might I recommend using osgViewer as your base and then just having a
 custom renderingTraversals method that you can override the cull and
 draw traversals if need be.  If need be is the key part as you may
 well find using standard local rendering will often be better than a
 distributed implementation.

   Okay right. We will only have one render bin which eases the thing a
  little bit because we will not support transparent objects.

 Much of modern rendering is done with multiple pass techniques that go
 well beyond just the need for transparent bins.  Don't forget there
 techniques like using of the occlussion query extension requires
 multipass, and its one technique that is well suited for complex CAD
 models.  Paul Martz was even commission recently to add support for
 this in the OSG for the purpose of better handling CAD models.

 So, while limiting what types of rendering you can use to just
 standard opaque models might make your tasks easier, there is a real
 danger of excluding modern rendering techniques that help solve the
 performance problems in a better way.

I don't think you should be doing things at as low level as trying to
overriding the OpenGL functions that the OSG uses in its Drawables and
StateAttributes.  To go this low level you might as well use a
distributed GL implementation and save yourself a lot of time.   You
mention transforms and drawables in your text, whereas you actually
need all OpenGL state that the OSG manages as well, you really do need
the whole render graph, yes it is more complex but its what is
actually required to get things to render properly.
 
   Yes you are right. I did not know that this render graph does exist and
  only looked at the documentation and the code. But I did not get this
  insight that you gave me by your explanations above. So I assumend that
  overwriting the DrawImplementation for getting the information about the
  visible nodes would be a possible way. It might be possible, but as you
  said, not a good approach.
 
   Yes you are right, in general we need the whole state, but as we do not
  want to implement texturing I hope the state does not change that often
  and it might be possible to use the same state for the whole scene
  (except for the model-view matrix and vertex data of course).

 If I was to tackle render graph distribution (I have been
 contemplating this approach for number of years) I'd sereailize the
 whole render graph and distribute this to the cluster.  One would take
 care to cache objects like osg::StateSet's, osg::StateAttribute and
 osg::Drawables locally, and only update them any time 

Re: [osg-users] camera node in osg file

2008-03-02 Thread Robert Osfield
Hi Erik,

What do you mean by a camera in the scene graph in this context?  Are
you looking to control the camera view and animation path?  Or do you
require to control the capturing of images via an active camera such
as a RTT effect?

Robert.

On Sun, Mar 2, 2008 at 1:47 PM, Erik Sundnes Løvlie
[EMAIL PROTECTED] wrote:
 Hello everyone,

 I have a few questions regarding the osg file format (and the blender export
 plugin), and I couldn't find the answer when searching the mailing list
 archive (for this mailing list or the blender mailing lists + forums) and
 google.

 Short intro / background: I am trying to write a small game using blender
 for creating the 3d content and openscenegraph for the real-time
 visualization. I am using version 2.44 of blender and 2.2.0 of osg (checked
 out from svn). My environment is kubuntu 7.10.

 So I have three questions that I hope someone can help me with:

 1) I haven't been able to get the camera information (position +
 orientation) into the osg file when I export from blender. Looking at the
 python code for the exporter, it seems it ignores the camera nodes
 completely. Does anyone know if this is a limitation in the osg file format,
 or the blender plugin, or neither? I haven't been able to find camera info
 in any of the .osg files in the OpenSceneGraph-Data-2.0 archive.

 2) How do people normally use the osg file format in their projects? Many
 .osg files with one mesh in each, keeping the scene setup (camera, lights,
 etc) in some other file?

 3) Does anyone have a feeling about which file format is the most common to
 use in games projects using openscenegraph? Could it be collada perhaps?

 Regards,
 Erik Lovlie


 ___
  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] OpenProducer's Compile Error

2008-03-02 Thread ümit uzun


Hi All;

I try to compile Producer-1.1-1 by typing make command. But it give an error 
like make[2]: arch: Command not found. I can't understand what it means.
I added a terminal_screen text file to see all of compiling information and 
of course given errors.

Thanks so much.

ÜMİT UZUN

_
Yeni nesil Windows Live Servisleri’ne şimdi ulaşın!
http://get.live.com

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


Re: [osg-users] camera node in osg file

2008-03-02 Thread Erik Sundnes Løvlie
Yes, I need to control the camera view and animation path, and I would like
to be able to set up the complete scene (or level if you will, in game
terms) in blender and export it (meshes, cameras, lights, etc) to a single
file (.osg would be simplest I guess). In the code I imagine I can then
simply use the camera (or cameras) in the scene graph, with the stored
position and orientation.

Erik

On Sun, Mar 2, 2008 at 3:00 PM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Erik,

 What do you mean by a camera in the scene graph in this context?  Are
 you looking to control the camera view and animation path?  Or do you
 require to control the capturing of images via an active camera such
 as a RTT effect?

 Robert.

 On Sun, Mar 2, 2008 at 1:47 PM, Erik Sundnes Løvlie
 [EMAIL PROTECTED] wrote:
  Hello everyone,
 
  I have a few questions regarding the osg file format (and the blender
 export
  plugin), and I couldn't find the answer when searching the mailing list
  archive (for this mailing list or the blender mailing lists + forums)
 and
  google.
 
  Short intro / background: I am trying to write a small game using
 blender
  for creating the 3d content and openscenegraph for the real-time
  visualization. I am using version 2.44 of blender and 2.2.0 of osg
 (checked
  out from svn). My environment is kubuntu 7.10.
 
  So I have three questions that I hope someone can help me with:
 
  1) I haven't been able to get the camera information (position +
  orientation) into the osg file when I export from blender. Looking at
 the
  python code for the exporter, it seems it ignores the camera nodes
  completely. Does anyone know if this is a limitation in the osg file
 format,
  or the blender plugin, or neither? I haven't been able to find camera
 info
  in any of the .osg files in the OpenSceneGraph-Data-2.0 archive.
 
  2) How do people normally use the osg file format in their projects?
 Many
  .osg files with one mesh in each, keeping the scene setup (camera,
 lights,
  etc) in some other file?
 
  3) Does anyone have a feeling about which file format is the most common
 to
  use in games projects using openscenegraph? Could it be collada perhaps?
 
  Regards,
  Erik Lovlie
 
 
  ___
   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] camera node in osg file

2008-03-02 Thread Robert Osfield
Hi Erik,

On Sun, Mar 2, 2008 at 5:05 PM, Erik Sundnes Løvlie
[EMAIL PROTECTED] wrote:
 Yes, I need to control the camera view and animation path, and I would like
 to be able to set up the complete scene (or level if you will, in game
 terms) in blender and export it (meshes, cameras, lights, etc) to a single
 file (.osg would be simplest I guess). In the code I imagine I can then
 simply use the camera (or cameras) in the scene graph, with the stored
 position and orientation.

OK, what you are looking for is a means of tagging a node in the scene
graph that you want to effectively be the camera dolly (mounting) or a
camera view, rather than a camera itself in OSG terms.

A camera in OSG terms is an object that is much more akin to an OpenGL
camera, and specifies both the placement of scene relative to the
camera, the flim of the camera (its graphics context/FBO) and the
scene that the camera will take a picture.  The scene that the camera
takes a picture is specified explicitly by having children underneath
the Camera - curiously here the scene is actually owned by the camera
taking a picture of it, rather than a scene having a camera (although
render to texture effects do have cameras in a scene, but this is a
topic for another day).  This role is obviously much more sweeping in
terms of control of what a camera does in real life, rather than just
specifying where the camera should take its picture from which is what
modelling packages normally conceptually use.

Back to where I started, what you need to place in the scene that you
tag as your camera view, and in fact the OSG actually has
osg::CameraView transform node for just this purpose, but as yet its
not been supported by any of loaders as far as I know.  A CameraView
in itself doesn't solve the complete task though, as you still need to
sync a Camera, that decorates the whole scene,  to a CameraView that
is placed in the scene.  The NodeTackerCallback can be attached to an
osg::Camera to do this job, where you provide the path to the
CameraView and the callback then accumulates the transform and applies
it to the camera.  Unfortunately we don't have an example showing this
in action so you'll have to wire it up yourself.

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


[osg-users] Code porting

2008-03-02 Thread Jon
Hello,

I'm currently working on a scene and I try to reproduce the sun light.
I looked at osgmanylight tutorial from osg web site.
But I'm facing a problem with this code:

//do not allow the osgProducer's internal RenderStage clear the frame buffer
//if the RenderStage did clear the frame buffer, we would lose all of
//the rendering we did in the light passes
osgProducer::OsgCameraGroup::SceneHandlerList shvec =
viewer.getSceneHandlerList();
for( osgProducer::OsgCameraGroup::SceneHandlerList::iterator itr =
shvec.begin();
   itr != shvec.end(); ++itr ) {
  (*itr)-getSceneView()-getRenderStage()-setClearMask(0);
}

What is the equivalent in osg 2x?
The tutorial code :
http://www.fx.clemson.edu/~acnatha/devnull/osg/osgmanylights.tar.gz

Thanks in advance, 
Best regards.

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


[osg-users] animation synchronisation

2008-03-02 Thread dkfm4
Hello!

How can/should I synchronize the application flow-control to the end of
an animation (realized as osg::AnimationPath) ?

Assume: we have a projectile that should be animated.
1. we calculate the trajectory and setup the animation-path with some 
trajectory data.
2. then the animation-path will be applied to the projectile-node (the
exact way to do this, is still vague to me; the only information source
I found untill now, is the osganimation example, which handles only a
single animation type, with endless animation)

3. == now: how can I sync the rest of the application with the end of the
projectile-animation ? ==
e.g. expand scene graph with new data, start other animation(s), etc...

The way with polling the timer seems somehow crude to me... There should
be a better way ?! (better documentation !)

Thanks,
Alexej



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


[osg-users] Volume rendering software

2008-03-02 Thread Tony Glover
Hi all,
I've just been revisiting the list a little lately, as I'm afraid to
say that I know longer use OSG, but have used it successfully in the
past and would recommend it.
I've been seeing some interest in volume rendering/medical image
visualisation and thought that I would let users download some software
that I developed a while back for just such purposes. We formed a
collaboration with a couple of companies and used the software to
analyse genuine patient data. Anyway, to cut a long story short, it
seems a shame just to let this sit on my external hard drive when
someone else may get some usage out of it. You can download it from here:-

http://www.stoanymoth.co.uk/VolumeRender.zip

I can't offer any support I'm afraid as I'm currently very busy and
don't stop by on the list all that often, but if you need any help you
can always mail me and see what happens.
Bare in mind that the software was the ongoing development of a
commercial project and that the download version was very much a beta,
but it may nevertheless offer someone a shortcut to a bigger, better
project. It was developed for windows but should be capable of being
ported as it uses OSG and Fox. The versions would be those that were
current over a year ago, so it may also need some development to get it
up to date (but at least it's free!).

I will also be updating my website in a month or so, so the download may
well disappear in a few weeks, so feel free to put the zip file
somewhere more convenient.
Hope it's useful to someone.

Thanks,

Tony.



This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

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


[osg-users] slave cameras and transparent bin

2008-03-02 Thread Jason Coposky

quick question:

i have two adjacent slave cameras with a 45 degree heading view 
offset from single point of projection.

if i have overlapping geometry with partially transparent textures 
they will render correctly in one camera but incorrectly in the other
in that the background is no longer properly blended through the
transparent portions of the geometry.

im testing this with two gaussian blobs which fall off to 100% transparent
which are overlapped.  

my guess is that the z sort is done once for the master camera and not
for the view offset of the slave cameras.  is there some simple way
to remedy this or will i have to create multiple viewers and manually
set the view offset every frame in a predraw callback?

much thanks

~jason coposky




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Volume rendering software

2008-03-02 Thread hesicong2006
Thanks very much, I'm now developing a volume render project too. Hope 
your demo help me!

Tony Glover wrote:
 div class=moz-text-flowed style=font-family: -moz-fixedHi all,
I've just been revisiting the list a little lately, as I'm afraid to
 say that I know longer use OSG, but have used it successfully in the
 past and would recommend it.
 I've been seeing some interest in volume rendering/medical image
 visualisation and thought that I would let users download some software
 that I developed a while back for just such purposes. We formed a
 collaboration with a couple of companies and used the software to
 analyse genuine patient data. Anyway, to cut a long story short, it
 seems a shame just to let this sit on my external hard drive when
 someone else may get some usage out of it. You can download it from 
 here:-

 http://www.stoanymoth.co.uk/VolumeRender.zip

 I can't offer any support I'm afraid as I'm currently very busy and
 don't stop by on the list all that often, but if you need any help you
 can always mail me and see what happens.
 Bare in mind that the software was the ongoing development of a
 commercial project and that the download version was very much a beta,
 but it may nevertheless offer someone a shortcut to a bigger, better
 project. It was developed for windows but should be capable of being
 ported as it uses OSG and Fox. The versions would be those that were
 current over a year ago, so it may also need some development to get it
 up to date (but at least it's free!).

 I will also be updating my website in a month or so, so the download may
 well disappear in a few weeks, so feel free to put the zip file
 somewhere more convenient.
 Hope it's useful to someone.

 Thanks,

 Tony.



 This message has been checked for viruses but the contents of an 
 attachment
 may still contain software viruses, which could damage your computer 
 system:
 you are advised to perform your own checks. Email communications with the
 University of Nottingham may be monitored as permitted by UK legislation.


 /div

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


[osg-users] how to update the Camera

2008-03-02 Thread Wu Xiaodong
Hi, I am freshman in OpenSceneGrapph.  Now I have some issue on updating the
Camera when the Geode under it was updated.

the details of the issue is as following.

 1st step. I build a viewer and its scene graph with only one osg::Geometry
which contains nothing. and set a TrackballManipulator to the viewer's
camera;

*osg::ref_ptrosgGA::TrackballManipulator trackBall = new
osgGA::TrackballManipulator;
setCameraManipulator( trackBall.get() );
* 2nd step. I update the one Geometry by a object of  the class derived from
the Geometry node's UpdateCallBack class;

the default track ball center seems to be the (0,0,0); when the Gemetry is
updated, the Geometry node's center is changed into (x0,y0,z0); but the
track ball rotate around the vertex ( 0,0,0). How can I make it rotate
around the (x0,y0,z0 );

   I read the OSG's reference docs, may I can achieve it by
setPreDrawCallbackfile:///E:/Oil/OpenSceneGraphReferenceDocs/a01059.html#a76(
DrawCallback file:///E:/Oil/OpenSceneGraphReferenceDocs/a01061.html *cb) .

  Is there any advice about the application above, Thanks.

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


[osg-users] warning C6246 UpdateVisitor

2008-03-02 Thread IceSharK
Hi~

warning *C6246*: Local declaration of variable hides declaration of same
name in outer scope. Additional Information: See previous declaration at
location.

This warning indicates that two declarations have the same name at local
scope. The name at outer scope is hidden by the declaration at the inner
scope. Any intended use of the outer scope declaration will result in the
use of local declaration.
 OSG 2.3.4

UpdateVisitor

#91
osg::NodeCallback* *callback* = geode.getUpdateCallback();
if (callback) (*callback)(geode,this);

// Call the app callbacks on the drawables.
for(unsigned int i=0;igeode.getNumDrawables();++i)
{
osg::Drawable::UpdateCallback* *callback* =
geode.getDrawable(i)-getUpdateCallback();
if (callback) callback-update(this,geode.getDrawable(i));

handle_callbacks(geode.getDrawable(i)-getStateSet());
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] double vs. float precision in camera position + osg::MatrixTransform question

2008-03-02 Thread Roni Rosenzweig
Hello

I made a small demo using osg 2.2, of an object moving on a terrain with a
camera looking at it from above, and lowering towards it.
When the location of the object+camera is near the (0,0,0) the demo works
smoothly.
However when their location is far (for example at location (3, 5000,
100)), there are vibrations in the move of both the camera and the object.

I narrowed it down to a precision problem between float and double, and made
it much better using Vec3d/Matrixd instead of Vec3f/Matrixf for the camera
position.
However for the object I'm using a osg::MatrixTransform, which uses a Matrix
and not a Matrixd. I think this is causing the precision problems in the
object movement.

Did anyone else bump into this problem?
Is there a version of osg::MatrixTransform using a Matrixd for double
precision?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org