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

2010-09-08 Thread Paul Martz

Alberto Luaces wrote:

"Davide Byron" writes:

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

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


to sort out those problems, I recommend you to use Process Monitor
(http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) for the
first, finding where does the system expect for the plugin DLLs to be,
and Dependency Walker (http://dependencywalker.com/) for the latter.


Which plugin are you having trouble with? What do you see when you turn up the 
OSG Notify level? Have you included any 3rd party dependencies?


Are you experienced at packaging MS executables for redistribution? You don't 
just build an .exe and pass it out; you need something like innosetup or 
InstallShield to make sure you've got everything. Which install package system 
are you using?


I'll point you to osgwwhich: 
http://code.google.com/p/osgworks/wiki/GettingStarted

It allows you to find the path of the plugin that OSG will try to load for a 
particular extension. For example:


  C:\Projects>osgwwhich -p flt
  Using plugin name: "osgPlugins-2.8.3/osgdb_openflight.dll".
  C:\Program Files\OpenSceneGraph\bin\osgPlugins-2.8.3\osgdb_openflight.dll

If osgwwhich can find it, but your executable still fails to load it, then 
that's certainly an indication that you've failed to distribute a dependency, 
such as the CRT libraries or some 3rd party dependency.


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


[osg-users] Using osgShadow in combination with self written shaders

2010-09-08 Thread Werner Modenbach
Hi all,

I have successfully implemented my own code for bump mapping by creating a 
normal matrix and implementing my own shaders.
Everything works fine except ...
All my scene is attached to an osgShadow node. Before implementing my own 
shaders I was able to swith on and off the shadow.
Now nothing happens any more. 
I tryed to copy some lines from the shader code into my fragment shader but it 
doesn't give the desired effect.
I carefully assigned my base texture to unit 0 and my bump map to unit 2 
because osgShadow uses unit 1.

Where am I going wrong?
In general, how is the handling if several shaders are used along the scene 
hierarchie? Do I kick out former shaders when assigning new ones?

Thanks for any hint.

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


Re: [osg-users] Drawing a subset of a vertex buffer...

2010-09-08 Thread Frank Sullivan
Oh! That is fantastic, thank you.

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





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


Re: [osg-users] Drawing a subset of a vertex buffer...

2010-09-08 Thread Robert Osfield
Hi Frank,

On Wed, Sep 8, 2010 at 7:33 PM, Frank Sullivan  wrote:
> Thanks very much, Robert. Do you happen to know how I would specify the range 
> of verts that an osg::Geometry object is responsible for drawing?

You don't need to specify anything as the PrimitiveSet's will tell
OpenGL what parts of the VBO's they will be using.

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


Re: [osg-users] Drawing a subset of a vertex buffer...

2010-09-08 Thread Frank Sullivan
Thanks very much, Robert. Do you happen to know how I would specify the range 
of verts that an osg::Geometry object is responsible for drawing?

Thanks again,
Frank


robertosfield wrote:
> Hi Frank,
> 
> You can share a single osg::Vec3Array between multiple osg::Geometry,
> in the lastest OSG in svn/trunk and the 2.9.x dev series the buffer
> object support should also be flexible enough for you to manually
> specify the VBO for that particular Vec3Array.
> 
> Robert.
> 
> On Wed, Sep 8, 2010 at 7:01 PM, Frank Sullivan <> wrote:
> 
> > Hello there,
> > 
> > IIRC, OpenGL allows you to stuff several meshes into a single VBO, and then 
> > when it comes time to draw a mesh, you can specify an offset into this VBO 
> > along with the number of primitives to draw, in essence drawing only a 
> > subset of this VBO at a time.
> > 
> > I was wondering if this same functionality is exposed in OpenSceneGraph? 
> > What I'd like to do is something like this: stuff the vertex positions into 
> > a single Vec3Array, and hand this array over to a single Geometry object. 
> > Then, instantiate one or more Geodes that each share this Geometry object, 
> > but each draws only a subset of the Geometry (each possibly drawing a 
> > different subset). Is this possible?
> > 
> > Thank you!
> > 
> > Cheers,
> > Frank
> > 
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=31431#31431
> > 
> > 
> > 
> > 
> > 
> > ___
> > osg-users mailing list
> > 
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > 
> > 
> ___
> osg-users mailing list
> 
> 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=31436#31436





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


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

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

Hi Davide,


as for dependency walker, i've found some missing dlls and i copied them over. 
dependency walker doesn't complain anymore, but the application doesn't work... 
so i'm blind again here too...


Since plugins are loaded at runtime and not when the application 
initially starts (so-called delay-loaded dynamic libraries), dependency 
walker won't show errors related to them initially, but you have to 
start a "Profiling" run within dependency walker. If you do that, your 
app will start and dependency walker will be able to tell you if the 
plugins can be loaded correctly.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Drawing a subset of a vertex buffer...

2010-09-08 Thread Robert Osfield
Hi Frank,

You can share a single osg::Vec3Array between multiple osg::Geometry,
in the lastest OSG in svn/trunk and the 2.9.x dev series the buffer
object support should also be flexible enough for you to manually
specify the VBO for that particular Vec3Array.

Robert.

On Wed, Sep 8, 2010 at 7:01 PM, Frank Sullivan  wrote:
> Hello there,
>
> IIRC, OpenGL allows you to stuff several meshes into a single VBO, and then 
> when it comes time to draw a mesh, you can specify an offset into this VBO 
> along with the number of primitives to draw, in essence drawing only a subset 
> of this VBO at a time.
>
> I was wondering if this same functionality is exposed in OpenSceneGraph? What 
> I'd like to do is something like this: stuff the vertex positions into a 
> single Vec3Array, and hand this array over to a single Geometry object. Then, 
> instantiate one or more Geodes that each share this Geometry object, but each 
> draws only a subset of the Geometry (each possibly drawing a different 
> subset). Is this possible?
>
> Thank you!
>
> Cheers,
> Frank
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31431#31431
>
>
>
>
>
> ___
> 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 osgGA/Event Handlers with SceneView

2010-09-08 Thread Robert Osfield
Hi Bob,

SceneView is low level osgUtil class that knows about osgGA or any of
it's event handlers, so it's not really not a case of making event
handlers work with SceneView.  Instead you should be thinking about
adding event handlers to your own custom viewer code, or... just use
osgViewer::Viewer along with GraphicsWindowEmbedded, it'll not only
give you event handlers support, but support for database paging and
lots of sophisticated viewer support.  I really wouldn't recommend
using SceneView directly these days.

Robert.

On Tue, Sep 7, 2010 at 1:11 PM, Bob Smith  wrote:
> Hi,
>
> I'm using osgUtil::SceneView and would like to use event handlers. In 
> osgViewer, there's the function addEventHandler, but I can't figure out a way 
> to get this working with SceneView. Is this possible?
>
> Thank you!
>
> Cheers,
> Bob
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31378#31378
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2010-09-08 Thread Davide Byron
thanks for the reply Alberto,
i've downloaded and fiddled with the programs you mentioned, but their output 
means nothing to me...

with process monitor i got a lot of wrong path messages on the machine where 
the application works, and same messages on the machine where the app doesn't 
work, so i have no idea what the problem could be... can you point me out to a 
tutorial or something? i've read the doc that comes with the program but got no 
help from it...

as for dependency walker, i've found some missing dlls and i copied them over. 
dependency walker doesn't complain anymore, but the application doesn't work... 
so i'm blind again here too...

i'm pretty sure that with more knowledge on those programs i could fix the 
problem, so if there's some docs i can read or anything, please point me to them

Thanks

Cheers,
Davide

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





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


[osg-users] Drawing a subset of a vertex buffer...

2010-09-08 Thread Frank Sullivan
Hello there,

IIRC, OpenGL allows you to stuff several meshes into a single VBO, and then 
when it comes time to draw a mesh, you can specify an offset into this VBO 
along with the number of primitives to draw, in essence drawing only a subset 
of this VBO at a time.

I was wondering if this same functionality is exposed in OpenSceneGraph? What 
I'd like to do is something like this: stuff the vertex positions into a single 
Vec3Array, and hand this array over to a single Geometry object. Then, 
instantiate one or more Geodes that each share this Geometry object, but each 
draws only a subset of the Geometry (each possibly drawing a different subset). 
Is this possible?

Thank you!

Cheers,
Frank

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





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


[osg-users] Using osgGA/Event Handlers with SceneView

2010-09-08 Thread Bob Smith
Hi,

I'm using osgUtil::SceneView and would like to use event handlers. In 
osgViewer, there's the function addEventHandler, but I can't figure out a way 
to get this working with SceneView. Is this possible?

Thank you!

Cheers,
Bob

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





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


Re: [osg-users] CityGML

2010-09-08 Thread Florian Haenel
Hi JoachimP,

I´m testing your ReaderWriterCityGml.cpp an I get some errors I dont understand.
I´m using Microsoft Virtual Studio 2005 and my Viewer of choice is the DBViewer.
I´ve downloaded the examples Files from the official citygml Site and converted 
them to an osg File.

Files like waldbruecke, Berlin Alexanderplatz and the British Ordonance Survey 
are working very well...but if I convert for example Ettenheim-LOD3 the 
Geometry is corrupted and the whole Scene is flickering while I navigate 
through.

If an CityGml includes textures, the DBViewer allways crashes because of a 
memory failure.

Hope you can help me to find a solution for this problem.



Thank you!

Cheers,
Florian

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




Attachments: 
http://forum.openscenegraph.org//files/ettenheim_182.jpg


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


[osg-users] How to change the size of TranslateAxisDragger?

2010-09-08 Thread Vitali Anselm
Hi,

I'm using the TranslateAxisDragger to manipulate the position of my object.
Unfortunately the three axes of the dragger are rather thin, so that I have to 
zoom in to be able to catch them by mouse click. I know how to scale the 
dragger's axes, but I would like to change the thickness of the axes, too.
Do you know how to achieve it?

Thank you!

Cheers,
Vitali

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





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


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

2010-09-08 Thread Vitali Anselm
Hi,

this issue is solved already. Now, I get the position from the Dragger 
(TranslateAxisDragger) class via:

Code:
_draggerPos = dragger->getMatrix().getTrans(); // get the dragger's position



Thank you!

Cheers,
Vitali[/code]

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





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


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

2010-09-08 Thread Robert Osfield
Hi Paul,

There are a couple of other options...  all you can do with the OSG
right now - use Slave Camera's, one Slave Camera for each eye.  It's
straight forward to setup, it's how I've always intended that stereo
should be done with osgViewer, but haven't yet had the chance to write
the convenience methods for setting it up.  Using osgViewer's Slave
capability is far more natural than the hack that is currently down in
SceneView.

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


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

2010-09-08 Thread Paul Martz

Johannes Scholz wrote:

Hi Paul,

well, I just opened an issue at the osgWorks wiki.


Thanks for opening that issue. It's good to have a record of these types of 
problems. Copying osgworks-users on this reply...


AbsoluteModelTransform can't work unless it has the view matrix. 
AbsoluteModelTransform gets the current Camera from the CullVisitor, and obtains 
the view matrix from that Camera. In stereo, we expect there are two different 
Cameras with two different views, one for left eye and one for right eye.


I ran the amt test under the debugger. By stopping in computeLocalToWorld(), I 
noticed that the CullVisitor's current Camera is the same, regardless of whether 
we're processing the left or right eye. Subsequently, the view queried from that 
Camera is always the same. The visual result is zero eye separation for anything 
under an AbsoluteModelTransform.


I tracked this down to SceneView's cull() method. SceneView has only one Camera, 
and it is set up as a master view. To render the left eye, SceneView computes an 
offset for that eye, then pushes the view matrix onto the CullVisitor's 
modelview stack, then does the cull traversal. Sequentially, it follows that 
with the same operation for the right eye. So, the view matrix that 
AbsoluteModelTransform needs isn't in a Camera at all. It's the first entry in 
the CullVisitor's modelview stack. Unfortunately, the modelview stack is 
protected and therefore not accessible, nor is there an accessor for the stack, 
nor is there a way to obtain an arbitrary entry in the stack. As a result, 
AbsoluteModelTransform is unable to obtain the view matrix that it needs.


This seems like a flaw in OSG. Cameras and Views are prevalent concepts 
throughout the OSG API, and it seems contrary for SceneView to make the view so 
inaccessible. This is perhaps one reason why Robert has often mentioned 
deprecating SceneView. However, it seems like this issue could be addressed 
simply by adding an accessor to CullVisitor for the modelview matrix stack, so 
that AbsoluteModelTransform could retrieve the view matrix by accessing 
_modelStack.front().


I do have some workarounds available:

1) Reparent the visual representation subgraph of your rigid body to your scene 
root Group node. Instead of using an AbsoluteModelTransform, use a MatrixTransform.


2) Use VR Juggler instead of osgViewer. VR Juggler uses one SceneView for each 
eye. We know AbsoluteModelTransform works in this situation, as this is the 
usage employed by VE-Suite.


3) Submit a patch to OSG so that SceneView uses two Cameras for stereo, one for 
each eye.


4) It is possible to grab the view matrix from the CullVisitor modelview stack 
with a root Group node CullCallback, and then pass that matrix to the 
AbsoluteModelTransform.  AbsoluteModelTransform would need to be modified to 
have a “user specified view” mode of operation in order for this to work. Also, 
since this involves writing data during cull, this would only work for single 
display scenarios, and only if right/left eye cull are guaranteed to be 
sequential. If these conditions aren't met, then this might still be possible 
using a mutex.


Option 1 is the most straightforward solution. Option 2 is also known to work, 
but would probably require a significant porting effort on your part.


While I believe option 3 is feasible, ultimately it's up to Robert whether such 
a submission would be accepted or not.


I'm reluctant to implement option 4 because this amounts to modifying osgWorks 
to be compatible with a part of OSG that Robert has already declared to be 
deprecated.


While I don't think this is a bug in osgWorks that merits a fix, I'm open to 
other ideas and suggestions on how to make this work, including changes that 
would facilitate a workaround.


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


Re: [osg-users] Update callbacks and LOD

2010-09-08 Thread Tim Moore
On Wed, Sep 8, 2010 at 2:26 PM, Vincent Bourdier  wrote:

>  Hi,
>
> To my mind there are two solutions :
>
> 1. You put your callback on the LOD child you want, so when the child will
> be hidden by a upper-detailed level child, the callback should not be
> traversed
>
No, the update traversal visits all children.  The eye point is not
available in the update traversal so the LOD choice cannot be made. Also, an
update callback might change the position of a node and thus change the LOD
calculation.

>
> 2. in your callback you check if your node is still active, and if not,
> just do nothing.
>
> Yes, you can do some approximation of the LOD test, though again, you'd
have to specify a view point outside of OSG.

Another strategy would be to turn your update callback into a "stateless"
cull callback that alters the model-view matrix on the fly without actually
changing the child nodes. You have to be careful about the bounding volumes
of objects to which you do this; otherwise they might disappear from view
unexpectedly.

Tim
...

>
> Le 08/09/2010 14:20, Roman Grigoriev a écrit :
>
>  Hi,
>> I have LOD with 3 nodes and use updatecallback to Animate children, I
>> setup updatecallback to my highest LOD, my when i switch to medium lod my
>> update callback worked also. Is it possible to switch it off when my model
>> switches to another LOD.
>> my updatecallback
>> class ModelNodeCallbackTower : public osg::NodeCallback
>> {
>> public:
>>virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
>>{
>>   osg::MatrixTransform* mtx =
>> dynamic_cast(node);
>>
>> if (mtx&&  nv->getFrameStamp())
>> {
>>  std::cout<<"!!!"<> }
>>
>>
>> traverse(node, nv);
>>}
>> };
>>
>> ...
>>
>> Thank you!
>>
>> Cheers,
>> Roman
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=31412#31412
>>
>>
>>
>>
>>
>> ___
>> 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


[osg-users] Wiki editing

2010-09-08 Thread Javier Taibo
  I would like to have editing access to the OSG Wiki. I sent two e-mails to
the address in the page
http://www.openscenegraph.org/projects/osg/wiki/About/WikiEditing leaving a
month between them and I had no response.

  Maybe the address is no longer this?

  Thanks in advance.

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


Re: [osg-users] osgFX Outline Patch

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

Hi Todd,


Thanks for the suggestions. I just tried that, and unfortunately this
particular exception seems to occur *after* exit. It seems to be this
error:
http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/afebacc2-65e6-43f8-b7aa-73bfd5ade11d

Anyway, thanks again. I'm pretty sure this isn't an OSG problem, but
I'll post an update if it turns out to be one.


Well that post relates to VB garbage collection and Crystal Reports, so 
I'm pretty sure it's not related :-)


A crash on exit is generally a double-delete... Are you using ref_ptrs 
for all your OSG variables? Or are you doing weird things with memory 
allocation?


Small anecdote on that subject:

A while ago we had a class in our code base that derived from an OSG 
class (so from osg::Referenced indirectly) but declared its destructor 
public. So users of that class could delete it while it was still in the 
scene graph, and when OSG (through ref counts falling to 0 and cascading 
deletes of ref_ptrs) came to delete it, it had already been deleted, 
thus the app crashed on exit. So making the destructor of an 
osg::Referenced-derived class public is a no-no, unless you can make 
sure to remove it from all OSG structures before you delete it (which is 
a lot of work for not much gain, IMHO, so just keep that destructor 
protected and all will be fine).


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgFX Outline Patch

2010-09-08 Thread Todd J. Furlong

On 9/8/2010 9:58 AM, Jean-Sébastien Guay wrote:

Hi Todd,


So far, this crash seems to be an odd one because the debugger doesn't
seem to catch it. All I get is this friendly message:
"The exception unknown software exception (0xc0020001) occurred in the
application at location 0x7c812afb"


In Visual Studio, enable all exceptions by going to Debug -
Exceptions... and checking all the boxes. Then the debugger should catch
the exception and break at the point where it was thrown. You can then
go a few levels up the stack to pinpoint the cause.

Hope this helps,

J-S


Thanks for the suggestions.  I just tried that, and unfortunately this 
particular exception seems to occur *after* exit.  It seems to be this 
error:

http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/afebacc2-65e6-43f8-b7aa-73bfd5ade11d

Anyway, thanks again.  I'm pretty sure this isn't an OSG problem, but 
I'll post an update if it turns out to be one.


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


Re: [osg-users] osgFX Outline Patch

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

Hi Todd,


So far, this crash seems to be an odd one because the debugger doesn't
seem to catch it. All I get is this friendly message:
"The exception unknown software exception (0xc0020001) occurred in the
application at location 0x7c812afb"


In Visual Studio, enable all exceptions by going to Debug - 
Exceptions... and checking all the boxes. Then the debugger should catch 
the exception and break at the point where it was thrown. You can then 
go a few levels up the stack to pinpoint the cause.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Update callbacks and LOD

2010-09-08 Thread Roman Grigoriev
Hi,Robert
In osg terms Active children are childrens with nodemasks with 0x or not.
Culled childs ( not in view frustum) are active or not in osg terms?
Could you please advice me how to make this thing in osg:
highest LOD have update callback and medium an lowest don't have it.
Could you please give me some sample how can I apply cullcallback to my node.
Thank you!

Cheers,
Roman

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





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


Re: [osg-users] osgFX Outline Patch

2010-09-08 Thread Todd J. Furlong

J-S,

Thanks for the reply. I will have to give that a try.

So far, this crash seems to be an odd one because the debugger doesn't 
seem to catch it.  All I get is this friendly message:
"The exception unknown software exception (0xc0020001) occurred in the 
application at location 0x7c812afb"


-Todd

On 9/8/2010 9:24 AM, Jean-Sébastien Guay wrote:

Hello Todd,


While we are on the topic of the Outline class, I'm experiencing
something strange: My application crashes on exit with an "unknown
exception" if an osgFX::Outline node is in the scenegraph, but it
doesn't crash otherwise. I haven't been able to trace this, so I was
wondering if anyone else had a similar experience. This is on Windows.


Does "osgoutline cow.osg" work for you? If so, then you'll have to run
your code in debug and in the debugger, in order to find the source of
the crash. Crashes are actually pretty much the simplest bugs to find
the source of, since the debugger will immediately point the place where
it crashed...

J-S


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


Re: [osg-users] Update callbacks and LOD

2010-09-08 Thread Robert Osfield
Hi Roman,

On Wed, Sep 8, 2010 at 2:34 PM, Roman Grigoriev  wrote:
> Hi, Vincent
>
> 1.I've already placed my update callback under LOD child and it traversed, 
> maybe I need to setup viewer or over thing in osg to not travers hidden 
> childs?

The UpdateVisitor by default traverses all children, but you can
change it to traverse just the active children via:

viewer.getUpdateVisitor()->setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);

There is however a problem in that LOD's activity is selected during
the cull traversal... the update visitor can only assume the highest
level of detail children.

> 2. How can I check in callback if node is active or not?

A cull callback on the child will tell you whether that child is active or not.

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


Re: [osg-users] Update callbacks and LOD

2010-09-08 Thread Roman Grigoriev
Hi, Vincent

1.I've already placed my update callback under LOD child and it traversed, 
maybe I need to setup viewer or over thing in osg to not travers hidden childs?
2. How can I check in callback if node is active or not?
... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] osgFX Outline Patch

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

Hello Todd,


While we are on the topic of the Outline class, I'm experiencing
something strange: My application crashes on exit with an "unknown
exception" if an osgFX::Outline node is in the scenegraph, but it
doesn't crash otherwise. I haven't been able to trace this, so I was
wondering if anyone else had a similar experience. This is on Windows.


Does "osgoutline cow.osg" work for you? If so, then you'll have to run 
your code in debug and in the debugger, in order to find the source of 
the crash. Crashes are actually pretty much the simplest bugs to find 
the source of, since the debugger will immediately point the place where 
it crashed...


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] TerraPage terrain LODs are jumping again - have LOD ranges to be sorted?

2010-09-08 Thread Luc Frauciel
Robert Osfield  Wrote:
"For PagedLOD nodes the children should always be ordered from lowest
resolution/ furthest distance first, to highest resolution/near
distance last.   What you describe fits this just fine."

Would it be possible to add this constraint in PagedLOD header ?

The only information available in the source for now is in LOD header :
"LOD may display multiple children simultaneously
if their corresponding ranges overlap. Children can be in any order,
and don't need to be sorted by range or amount of detail. If the 
number of
ranges (m) is less than the number of children (n), then children m+1 
through
n are ignored."

and could be misleading regarding the behaviour of PagedLOD which inherits 
from LOD.
I've been fooled by this in the past :)


  Best Regards,

Luc




Robert Osfield  
Envoyé par : osg-users-boun...@lists.openscenegraph.org
09/08/2010 02:19 PM
Veuillez répondre à
OpenSceneGraph Users 


A
osg-users@lists.openscenegraph.org
cc

Objet
Re: [osg-users] TerraPage terrain LODs are jumping again - have LOD ranges 
to be sorted?






Hi Martin,

For PagedLOD nodes the children should always be ordered from lowest
resolution/ furthest distance first, to highest resolution/near
distance last.   What you describe fits this just fine.

The TerraPage plugin has extra scheme above PagedLOD that seek to hold
back use of higher resolution children when a neighbouring tile is of
too low a resolution for the boundary meshes to be able to fit
together.  This scheme is pretty complicated and is very specific to
the way that TerraPage maintains central and boundary meshes.  I
haven't personally seen the cycling you talk about but my guess is
that this is the most fruitful area to look at when searching for a
cause.

Robert.

On Wed, Sep 8, 2010 at 12:18 PM, Martin Scheffler  
wrote:
> Hi,
>
> this is a problem that was fixed some time ago but pops up again now. I 
have a terrapage terrain that loads fine, but every few seconds the 
detailed LODs are swapped against lower res ones and back again. This 
looks funny and bogs down the system. After poking around with a debugger 
the only thing that I noticed is that the LOD ranges are sorted high to 
low:
> For example:
> _rangeList[0] goes from 1000 to MAX_FLOAT
> _rangeList[1] goes from 0 to 1000
>
> Can this cause these problems?
>
> Thank you!
>
> Cheers,
> Martin
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31409#31409
>
>
>
>
>
> ___
> 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] osgFX Outline Patch

2010-09-08 Thread Todd J. Furlong
While we are on the topic of the Outline class, I'm experiencing 
something strange: My application crashes on exit with an "unknown 
exception" if an osgFX::Outline node is in the scenegraph, but it 
doesn't crash otherwise.  I haven't been able to trace this, so I was 
wondering if anyone else had a similar experience.  This is on Windows.


-Todd

On 9/8/2010 3:27 AM, Florian Kolbe wrote:

Salut Jean-Sébastien,

   thank you for your advice. I already had the line


Code:
osg::DisplaySettings::instance()->setMinimumNumStencilBits(1);



set as in osgoutline. Just to make sure, I disabled it to see that the line 
does not make any difference...

Then I noticed how osgViewer::View feeds the osg::GraphicsContext::Traits from 
various fields of osg::DisplaySettings, as for example in 
View::setUpViewOnSingleScreen(). Since I am using my own call to 
osg::GraphicsContext::createGraphicsContext() I was missing a line such as:


Code:
traits->stencil = ds->getMinimumNumStencilBits();



Problem solved!

Thank you!

Cheers,
Florian

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





___
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] Update callbacks and LOD

2010-09-08 Thread Vincent Bourdier

 Hi,

To my mind there are two solutions :

1. You put your callback on the LOD child you want, so when the child 
will be hidden by a upper-detailed level child, the callback should not 
be traversed


2. in your callback you check if your node is still active, and if not, 
just do nothing.


Hope this will help you.

Regards,
Vincent.

Le 08/09/2010 14:20, Roman Grigoriev a écrit :

Hi,
I have LOD with 3 nodes and use updatecallback to Animate children, I setup 
updatecallback to my highest LOD, my when i switch to medium lod my update 
callback worked also. Is it possible to switch it off when my model switches to 
another LOD.
my updatecallback
class ModelNodeCallbackTower : public osg::NodeCallback
 {
 public:
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
   osg::MatrixTransform* mtx = 
dynamic_cast(node);

 if (mtx&&  nv->getFrameStamp())
 {
  std::cout<<"!!!"

[osg-users] Update callbacks and LOD

2010-09-08 Thread Roman Grigoriev
Hi,
I have LOD with 3 nodes and use updatecallback to Animate children, I setup 
updatecallback to my highest LOD, my when i switch to medium lod my update 
callback worked also. Is it possible to switch it off when my model switches to 
another LOD.
my updatecallback
class ModelNodeCallbackTower : public osg::NodeCallback
{
public:
   virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
   {
   osg::MatrixTransform* mtx = 
dynamic_cast(node);

 if (mtx && nv->getFrameStamp())
 {
  std::cout<<"!!!"

Re: [osg-users] TerraPage terrain LODs are jumping again - have LOD ranges to be sorted?

2010-09-08 Thread Robert Osfield
Hi Martin,

For PagedLOD nodes the children should always be ordered from lowest
resolution/ furthest distance first, to highest resolution/near
distance last.   What you describe fits this just fine.

The TerraPage plugin has extra scheme above PagedLOD that seek to hold
back use of higher resolution children when a neighbouring tile is of
too low a resolution for the boundary meshes to be able to fit
together.  This scheme is pretty complicated and is very specific to
the way that TerraPage maintains central and boundary meshes.  I
haven't personally seen the cycling you talk about but my guess is
that this is the most fruitful area to look at when searching for a
cause.

Robert.

On Wed, Sep 8, 2010 at 12:18 PM, Martin Scheffler  wrote:
> Hi,
>
> this is a problem that was fixed some time ago but pops up again now. I have 
> a terrapage terrain that loads fine, but every few seconds the detailed LODs 
> are swapped against lower res ones and back again. This looks funny and bogs 
> down the system. After poking around with a debugger the only thing that I 
> noticed is that the LOD ranges are sorted high to low:
> For example:
> _rangeList[0] goes from 1000 to MAX_FLOAT
> _rangeList[1] goes from 0 to 1000
>
> Can this cause these problems?
>
> Thank you!
>
> Cheers,
> Martin
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31409#31409
>
>
>
>
>
> ___
> 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] TerraPage terrain LODs are jumping again - have LOD ranges to be sorted?

2010-09-08 Thread Martin Scheffler
I just noticed that I only get the effect when I have long-running operations 
in the cull traversal. I'll try to post a replicable test scenario.

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





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


[osg-users] TerraPage terrain LODs are jumping again - have LOD ranges to be sorted?

2010-09-08 Thread Martin Scheffler
Hi,

this is a problem that was fixed some time ago but pops up again now. I have a 
terrapage terrain that loads fine, but every few seconds the detailed LODs are 
swapped against lower res ones and back again. This looks funny and bogs down 
the system. After poking around with a debugger the only thing that I noticed 
is that the LOD ranges are sorted high to low:
For example:
_rangeList[0] goes from 1000 to MAX_FLOAT
_rangeList[1] goes from 0 to 1000

Can this cause these problems?

Thank you!

Cheers,
Martin

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





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


Re: [osg-users] update problem

2010-09-08 Thread Robert Osfield
On Wed, Sep 8, 2010 at 10:57 AM, Gianni Ambrosio  wrote:
> robertosfield wrote:
>>
>> The ReferenceTime is the elapsed actual time in seconds
>
> "elapsed" from what?

The start tick is initialized when the viewer is realized, but you may
reset via viewer.setStartTick(..). The Tick being the
osg::Timer::tick().

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


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

2010-09-08 Thread Johannes Scholz
Hi Paul,

well, I just opened an issue at the osgWorks wiki.

Best regards,
Johannes

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





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


Re: [osg-users] update problem

2010-09-08 Thread Gianni Ambrosio
Thanks Robert.
I found in a previous thread of the forum that the simulation time can be set 
by the viewer.frame() call. In that call I pass my simulation time (got from my 
animation manager), so I can get it from the NodeVisitor in the UpdateCallback 
and it works fine.

Anyway I didn't get which is the starting time of the ReferenceTime. I mean 
when you say:


robertosfield wrote:
> 
> The ReferenceTime is the elapsed actual time in seconds

"elapsed" from what?

Regards
Gianni

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





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


Re: [osg-users] update problem

2010-09-08 Thread Robert Osfield
HI Gianni,

The ReferenceTime is the elapsed actual time in seconds, while
SimulationTime is the time that physical simulations/animations should
use - by default SimulationTIme will be the same as ReferenceTime, but
you can override this to speed up or slow down the animation speeds.
Calling viewer.frame(mySimulationTime) each frame will set the
SimulationTime, and leave ReferenceTime incrementing in actual time.

Robert.

On Wed, Sep 8, 2010 at 9:32 AM, Gianni Ambrosio  wrote:
> I found that the NodeVisitor has a getFrameStamp() method but I really don't 
> understand how to use the getReferenceTime() or getSimulationTime() methods 
> of the returned FrameStamp. Which is the difference between them (they seem 
> returning the same value)? Which is the unit of the returned double? What is 
> that time referred to? Which is the starting time I can compare it with and 
> how can I get it?
> I looked at the source code also but unfortunately without having any answer 
> to those questions.
>
> Regards
> Gianni
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31404#31404
>
>
>
>
>
> ___
> 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] update problem

2010-09-08 Thread Gianni Ambrosio
I found that the NodeVisitor has a getFrameStamp() method but I really don't 
understand how to use the getReferenceTime() or getSimulationTime() methods of 
the returned FrameStamp. Which is the difference between them (they seem 
returning the same value)? Which is the unit of the returned double? What is 
that time referred to? Which is the starting time I can compare it with and how 
can I get it?
I looked at the source code also but unfortunately without having any answer to 
those questions.

Regards
Gianni

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





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


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

2010-09-08 Thread Alberto Luaces
"Davide Byron" writes:

> Hi all,
>
> i've happily developed an application based on osg/osgART and i was
> proudly giving it to my friends. Unfortunately, noone of them is able
> to run it.
> The main problem is the inability to find the plugins. i get the
> error:
> plugin "-1" unknown
> no matter where i put the plugins, in the same folder as the
> executable, or in a folder called osgPlugins-2.8.3
> i've searched the forum without luck... can anyone point me in the
> right direction, please?
>
> Also, some have complained about missing config, and that problems
> seems to be related to the lack of microsoft vc++ redistributable. in
> some cases installing vcredist_x68.exe fixed the problem, in other it
> didn't...
> any advice on this too?

Hi David,

to sort out those problems, I recommend you to use Process Monitor
(http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) for the
first, finding where does the system expect for the plugin DLLs to be,
and Dependency Walker (http://dependencywalker.com/) for the latter.

-- 
Alberto

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


Re: [osg-users] osgFX Outline Patch

2010-09-08 Thread Florian Kolbe
Salut Jean-Sébastien,

  thank you for your advice. I already had the line


Code:
osg::DisplaySettings::instance()->setMinimumNumStencilBits(1);



set as in osgoutline. Just to make sure, I disabled it to see that the line 
does not make any difference...

Then I noticed how osgViewer::View feeds the osg::GraphicsContext::Traits from 
various fields of osg::DisplaySettings, as for example in 
View::setUpViewOnSingleScreen(). Since I am using my own call to 
osg::GraphicsContext::createGraphicsContext() I was missing a line such as:


Code:
traits->stencil = ds->getMinimumNumStencilBits();



Problem solved!

Thank you!

Cheers,
Florian

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





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