Re: [osg-users] radius2

2015-02-04 Thread Robert Osfield
Hi Jethro,

I'm a bit perplexed by your suggestion, as:

0.25 == 0.5 squared.

Having the 0.5 multiplication within the brackets would force the operation
to work on a temporary vec3 rather than a singe float so would take three
times as much computation.

Robert.

On 4 February 2015 at 00:15, Jethro Leevers j.leev...@aamgroup.com wrote:

 Hi,

 Looking in the osg\BoundingBox template it seems to have a function
 radius2, this function seems to return 1/4 of the diameter squared, is
 there a reason for this?

 Code:

 return 0.25*((_max-_min).length2());



 I thought the following would be a more accurate radius2 function

 Code:

 return ((_max-_min)*0.5).length2();




 Thank you!

 Cheers,
 Jethro[/code]

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





 ___
 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] Xcode: Cannot find install manifest

2015-02-04 Thread Robert Osfield
HI Robert,

On 3 February 2015 at 22:40, Robert Graf muzzlebu...@gmail.com wrote:

 Easiest solution:
 Simply activate the ALL_BUILD scheme from the drop-down menu at the top of
 the window. It defaults to uninstall, which probably is not desirable.


I have just checked OpenSceneGraph/CMakeLists.txt and it refers to install
before uninstall and my Makefile the install is provided before the
uninstall.  I'm not an OSX user let alone an XCode one so can't comment
when CMake or XCode might be doing wrong to screw things up, but it looks
like at least on the OSG CMake side the isn't anything I've seen so far
that would cause this ordering issue.

When I have used OSX I've in the past I've always used the Makefile to
build as it's simpler and quicker to do, I found XCode was just made simple
things awkward to do. Mostly I would expect OSG users to just want to build
and install the OSG so you might well be able to just use the Makefile
system.

BTW, you don't need to tell CMake to use Makefiles under unices as this is
the default.

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


Re: [osg-users] Node/Object Serialization

2015-02-04 Thread Robert Osfield
Hi Jeremy,

You don't really provide enough info about how you are doing things to know
what be going amiss so I'll provide general information.

Since OSG-3.2 I have done quite a bit of work on making the serialization
scheme support introspection sufficient for the purposes of integrating the
OSG with scripting languages.  There is now a lua plugin that uses this to
allow you to create and modify scene graphs all with lua and have this
integrated with the OSG application via callbacks etc.

The make the introspection a bit more user friendly I have write a
osgDB::ClassInterface class that provides a range of methods for enquiring
about properties of classes, creating objects and setting/getting
properties and invoking methods.  This is available in the OSG-3.3.x dev
releases and svn/trunk.

I would have thought your usage case would fit well with the capabilities
of the new ClassInterface.

Robert.



On 4 February 2015 at 01:12, Jeremy jswig...@gmail.com wrote:

 Is the serialization support of osg in active development? I made an
 attempt to implement a custom osgDB::OutputStream class along
 with writeObjectFields in order to try and piggy back the built in
 serialization functionality in order to be able to populate a GUI tree view
 I'm working on.


 https://www.dropbox.com/s/07t5zk7hw8jp2r7/Screenshot%202015-01-24%2023.06.38.png?dl=0

 It quickly became apparent that the serialization output in OSG is lacking
 in enough ways that it doesn't appear that I can use it in this way, which
 is very unfortunate. The same issues I ran into appear to be issues with
 the in built serialization mechanisms, because the ascii and xml versions
 of ReaderWriterOSG2 appear to be awkwardly formatted as well.

 Since the serializers are implemented as a streaming set of values,
 including 'count' type variables, there isn't enough context interleaved
 through the stream to isolate the write* values for the property values
 from formatting writes such as counts and type names and such.

 I don't suppose there is any ongoing effort to improve upon this or
 possibly add an alternate parallel reflection interface that one could
 query and iterate the named properties of the entire hierarchy. Ultimately
 I'm looking for a way to visualize the internal state of all the various
 osg object types to a UI, or to script interfaces or whatever.

 Thanks
 Jeremy

 ___
 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] Xcode: Cannot find install manifest

2015-02-04 Thread Robert Graf
Thanks a bunch Robert for checking on this and getting back. The suggestion 
about avoiding Xcode on OS X is good too. It also is simple enough to make sure 
the ALL_BUILD scheme is active before running the build.

Thanks again for the help!
-Robert

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





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


Re: [osg-users] Offscreen rendering (e.g. pbuffer) and event processing

2015-02-04 Thread Robert Osfield
Hi Émeric,

Thanks for spotting to typo.  I hadn't noticed this before, and it hadn't
been reported either.  I am fixing this and will get it checked in once my
clean build has completed.

As for implementing an off screen viewer functionality using a pbuffer.  I
haven't ever tried this on contemplated it.  It should be possible to mimic
traditional window events by injecting them into the EventQueue, and you've
spotted passing on the appropriate window size will be required.   I can't
provide any specific advice though as you are already further down the road
of trying something I haven't done yet :-)

Robert.

On 4 February 2015 at 12:12, Émeric MASCHINO emeric.masch...@gmail.com
wrote:

 Hi,

 I should have said that I was drawing the viewer in a pixel buffer in
 my other question [1], that now leads to this one...
 I'm streaming the pixel buffer data and displaying/manipulating the
 scene in/from a webpage.
 The offscreen viewer obviously hasn't any window, nor associated event
 queue.
 I would like to forward the keyboard/mouse inputs emitted by the
 JavaScript code in my webpage, so that I can leverage upon the OSG
 manipulators (namely, trackball).

 At the moment, I'm doing the following:

 viewer.getEventQueue()-setGraphicsContext(pbuffer);
 viewer.getEventQueue()-syncWindowRectangleWithGraphcisContext();

 These operations are normally performed when initializing a
 GraphicsWindow, e.g. in GraphicsWindowWin32::init() and are thus
 missing when initializing a pbuffer, in e.g. PixelBufferWin32::init().

 The syncWindowRectangleWithGraphcisContext (ever noticed the
 misspelling?) was the missing thing for me in [1]. Thus, the
 GUIEventAdapter created when processing an event in the EventQueue had
 its _Xmin, _Xmax, _Ymin, _Ymax, _windowWidth and _windowHeight had
 their default values.

 So, am I adding correctly an event queue to an offscreen viewer/view this
 way?

  Émeric

 [1]
 http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2015-February/269273.html
 ___
 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] Question about osgShadow::ShadowedScene

2015-02-04 Thread Alexandre Vaillancourt
Thanks Robert,

The shadow technique being used is ViewDependentShadowMap.

I understand that trying to find where the issue comes from is like
searching for a needle in a stack of hay. I'm trying to figure out myself
how the system is being programmed as I'm not at all familiar with that
aspect of OSG and the way we're using it regarding shaders/shadow, as I'm
not the one who programmed it, so, don't worry, I'm not expecting exact
reasons why stuff don't work.

Checking the diff between 3.1.1 and 3.2.0 regarding shadows does not reveal
anything that I would think of being a game changer, so this is why I'm
confused.


I'm under windows 8.1, visual studio 2013, GeForce GTX 780 Ti, driver
version 347.09.

In the mean time, I've been able to find a way to have the objects visible
again by changing the node mask of the main node shadowed and the node mask
of the nodes that were hidden.



If anyone cares (that's not much of importance :P), here are the rough
changes I did :
with:
unsigned int CAST_SHADOW_TRAVERSAL_MASK  = 0x0002;
unsigned int RECEIVE_SHADOW_TRAVERSAL_MASK   = 0x0001;
shadowSetting-setCastsShadowTraversalMask( CAST_SHADOW_TRAVERSAL_MASK );
shadowSetting-setReceivesShadowTraversalMask(
RECEIVE_SHADOW_TRAVERSAL_MASK );

the ShadowedNode was set like this
mEnvShadowedNode-setNodeMask( mEnvShadowedNode-getNodeMask() 
CAST_SHADOW_TRAVERSAL_MASK ); // Now set to 2... maybe nodes below were
culled because of that, I could not figure it out.

and the nodes in the ShadowedNode
mobileObject-setNodeMask( CAST_SHADOW_TRAVERSAL_MASK ); // assume cast AND
receive
staticObject-setNodeMask( RECEIVE_SHADOW_TRAVERSAL_MASK ); // assume
receive only

So assuming that the CAST mask is no longer sufficient to have it receive
as well, I removed the nodemask setting from the mEnvShadowedNode and the
mobileObject (now using the default values of all 1) and I set the nodemask
to the static object to something like:
staticObject-setShadowMask( staticObject-getShadowMask()  !
CAST_SHADOW_TRAVERSAL_MASK ); // This way we disable the shadow casting,
while keeping the receiving and keeping the other parts of the mask.

Now it displays as expected, but I'm not sure yet if there are other parts
of the code that no longer behave appropriately.




--
Alexandre Vaillancourt

2015-02-04 9:31 GMT-05:00 Robert Osfield robert.osfi...@gmail.com:

 HI Alexandre,

 On 4 February 2015 at 13:23, Alexandre Vaillancourt 
 alexandre.vaillancourt.l...@gmail.com wrote:

 I've been told that objects that were casting shadow were automatically
 set to receive shadows as well, and that it was an implementation
 constraint that was not avoidable.

 Has this constraint been resolved, making it so that if we want an object
 to cast and receive shadows we have to set both mask explicitly (not only
 cast)?


 This will depend upon the ShadowTechnique being used.  I don't recall the
 which ones have what constraints though, been a couple of years since I've
 worked on osgShadow.

 I'm trying to figure out issues that seemed to have appeared after from
 upgrading from 3.1.1 to 3.2.0 but I can't figure out what went wrong. (Some
 objects went missing from sight.)


 There are too few details for us to be able to guess what might be wrong.
 We don't know what shadow technique you are using, the data you are working
 with, what types of objects are going missing, what platform/hardware you
 are working on.

 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] (no subject)

2015-02-04 Thread Jeremy
I am having this problem with OSG 3.3.3 and Qt5 and MSVC2013

Commenting out the #define GL_ARB_vertex_buffer_object in osg/BufferObject
does indeed allow it to compile.

On Sun, Feb 1, 2015 at 10:56 AM, Robert Osfield robert.osfi...@gmail.com
wrote:

 Hi Phileppe,

 I presume Qt5.4 is define the various GL values in it's headers as well as
 the OSG.  You could try changing the include order of the Qt and OSG
 headers to see if that can resolve the issue.  I don't have Qt5.4 on my
 system to test against so I'll have to defer to you to see if you can find
 a solution.  If you do just let me know the changes required and we can
 then discuss how to tweak the OSG or it's Qt usage to avoid the issues.

 Robert.

 On 31 January 2015 at 22:03, philippe renon philippe_re...@yahoo.fr
 wrote:

 I am also seeing this warnings multiple times:

 [ 92%] Building CXX object
 src/applications/osgearth_package_qt/CMakeFiles/application_osgearth_package_qt.dir/package_qt.cpp.obj
 In file included from
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtGui/qopengl.h:123:0,
  from
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtOpenGL/qgl.h:39,
  from
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtOpenGL/QGLWidget:1,
  from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osgQt/GraphicsWindowQt:17,
  from
 d:/Projects/OpenPilot/3rdparty/osgearth/src/osgEarthQt/ViewerWidget:26,
  from
 d:\Projects\OpenPilot\3rdparty\osgearth\src\applications\osgearth_package_qt\package_qt.cpp:26:
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtGui/qopenglext.h:2431:0:
 warning: GL_SHADER_STORAGE_BARRIER_BIT redefined
  #define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
  ^
 In file included from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osg/GLExtensions:18:0,
  from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osg/BufferObject:19,
  from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osg/Array:46,
  from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osg/Shape:21,
  from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osg/KdTree:17,
  from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osgDB/Registry:21,
  from
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osgDB/FileUtils:17,
  from
 d:\Projects\OpenPilot\3rdparty\osgearth\src\applications\osgearth_package_qt\package_qt.cpp:21:
 D:/Projects/OpenPilot/build/3rdparty/install/osg-3.3.3-mingw491_32-qt-5.4.0/include/osg/GLDefines:496:0:
 note: this is the location of the previous definition
  #define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
  ^

 PS : sorry for the missing email object.




   Le Samedi 31 janvier 2015 21h44, philippe renon 
 philippe_re...@yahoo.fr a écrit :



 Hi,

 Compilation of osg 3.2.1 against Qt 5.4.0 (mingw) was working perfectly
 fine.

 After switching to 3.3.3 we are seeing this compilation error :

 In file included from
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtGui/qopengl.h:123:0,
  from
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtOpenGL/qgl.h:39,
  from
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtOpenGL/QGLWidget:1,
  from
 d:/Projects/OpenPilot/3rdparty/osg/include/osgQt/GraphicsWindowQt:17,
  from
 d:\Projects\OpenPilot\3rdparty\osg\examples\osgviewerQt\osgviewerQt.cpp:12:
 d:/Projects/OpenPilotTools/qt-5.4.0/5.4/mingw491_32/include/QtGui/qopenglext.h:10653:130:
 error: 'GLintptrARB' has not been declared
  typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint
 video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);

 The issue comes from a conflict between
osg/include/osg/BufferObject
 and
qt-5.4.0/5.4/mingw491_32/include/QtGui/qopenglext.h

 within the section starting with:
#ifndef GL_ARB_vertex_buffer_object
#define GL_ARB_vertex_buffer_object

 I beleive that this issue was introduced by openscenegraph/osg
 https://github.com/openscenegraph/osg/commit/2c9d3671404583e797e9fdd5cc7687985c1bdf3b#diff-9e6bea70325f4962c2d5c856e6e5001c


 [image: image]
 https://github.com/openscenegraph/osg/commit/2c9d3671404583e797e9fdd5cc7687985c1bdf3b#diff-9e6bea70325f4962c2d5c856e6e5001c





 openscenegraph/osg
 https://github.com/openscenegraph/osg/commit/2c9d3671404583e797e9fdd5cc7687985c1bdf3b#diff-9e6bea70325f4962c2d5c856e6e5001c
 osg - OpenSceneGraph git mirror
 Afficher sur github.com
 

[osg-users] Question about bump mapping

2015-02-04 Thread Alexandre Vaillancourt
Hi All,

I'm not too knowledgeable in the field of shaders and bump map, but lately
I've had the task of fixing something related to it in our software.

The issue is that some faces in our software are bumpmapped (I see the 3
different texture units used in the .osg file, as well as in the original
.flt model), but the node itself does not seem to have an osg::Program (nor
osg::VertexProgram or osg::FragmentProgram) part of its stateset's state
attributes.

The question is this: is it possible that there is a way that a chunk of
code of OSG could set up bump mapping on a node by itsefl and NOT add an
osg::Program to it? For instance, if it finds more than one texture units
in the .osg file, it would find a way to add a shader to enable the bump
maping..?

I'm really wondering how that node could be bump mapped...

Thanks

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


Re: [osg-users] Node/Object Serialization

2015-02-04 Thread Jeremy
Robert. Are there plans to expose more information through this interface?
Currently It appears that it is largely exposing the properties that are
serialized, and I was also hoping to expose read only access to
informational data about the various object types as well.

On Wed, Feb 4, 2015 at 5:08 AM, Jeremy jswig...@gmail.com wrote:

 Excellent. Sounds perfect for my needs. I will check that out. I'm on 3.2
 at the moment.
 On Feb 4, 2015 2:30 AM, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi Jeremy,

 You don't really provide enough info about how you are doing things to
 know what be going amiss so I'll provide general information.

 Since OSG-3.2 I have done quite a bit of work on making the serialization
 scheme support introspection sufficient for the purposes of integrating the
 OSG with scripting languages.  There is now a lua plugin that uses this to
 allow you to create and modify scene graphs all with lua and have this
 integrated with the OSG application via callbacks etc.

 The make the introspection a bit more user friendly I have write a
 osgDB::ClassInterface class that provides a range of methods for enquiring
 about properties of classes, creating objects and setting/getting
 properties and invoking methods.  This is available in the OSG-3.3.x dev
 releases and svn/trunk.

 I would have thought your usage case would fit well with the capabilities
 of the new ClassInterface.

 Robert.



 On 4 February 2015 at 01:12, Jeremy jswig...@gmail.com wrote:

 Is the serialization support of osg in active development? I made an
 attempt to implement a custom osgDB::OutputStream class along
 with writeObjectFields in order to try and piggy back the built in
 serialization functionality in order to be able to populate a GUI tree view
 I'm working on.


 https://www.dropbox.com/s/07t5zk7hw8jp2r7/Screenshot%202015-01-24%2023.06.38.png?dl=0

 It quickly became apparent that the serialization output in OSG is
 lacking in enough ways that it doesn't appear that I can use it in this
 way, which is very unfortunate. The same issues I ran into appear to be
 issues with the in built serialization mechanisms, because the ascii and
 xml versions of ReaderWriterOSG2 appear to be awkwardly formatted as well.

 Since the serializers are implemented as a streaming set of values,
 including 'count' type variables, there isn't enough context interleaved
 through the stream to isolate the write* values for the property values
 from formatting writes such as counts and type names and such.

 I don't suppose there is any ongoing effort to improve upon this or
 possibly add an alternate parallel reflection interface that one could
 query and iterate the named properties of the entire hierarchy. Ultimately
 I'm looking for a way to visualize the internal state of all the various
 osg object types to a UI, or to script interfaces or whatever.

 Thanks
 Jeremy

 ___
 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] [osgPlugins] Loading dae-File results in the object without textures

2015-02-04 Thread Andreas Schreiber
Hi,

sorry for dumb question. 
Found the problem.
It was the letter ß in the path to the objects.

The diffuse texture is loading fine now =).

Lets see how to activate the specular.
 
... 

Thank you!

Cheers,
Andreas

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





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


[osg-users] Offscreen rendering (e.g. pbuffer) and event processing

2015-02-04 Thread Émeric MASCHINO
Hi,

I should have said that I was drawing the viewer in a pixel buffer in
my other question [1], that now leads to this one...
I'm streaming the pixel buffer data and displaying/manipulating the
scene in/from a webpage.
The offscreen viewer obviously hasn't any window, nor associated event queue.
I would like to forward the keyboard/mouse inputs emitted by the
JavaScript code in my webpage, so that I can leverage upon the OSG
manipulators (namely, trackball).

At the moment, I'm doing the following:

viewer.getEventQueue()-setGraphicsContext(pbuffer);
viewer.getEventQueue()-syncWindowRectangleWithGraphcisContext();

These operations are normally performed when initializing a
GraphicsWindow, e.g. in GraphicsWindowWin32::init() and are thus
missing when initializing a pbuffer, in e.g. PixelBufferWin32::init().

The syncWindowRectangleWithGraphcisContext (ever noticed the
misspelling?) was the missing thing for me in [1]. Thus, the
GUIEventAdapter created when processing an event in the EventQueue had
its _Xmin, _Xmax, _Ymin, _Ymax, _windowWidth and _windowHeight had
their default values.

So, am I adding correctly an event queue to an offscreen viewer/view this way?

 Émeric

[1] 
http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2015-February/269273.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] radius2

2015-02-04 Thread Jethro Leevers
Hi Robert,

The maths works out the same in the end I guess, just a little confusing to 
read.

On the topic of the BoundingBox, I have been having linking issues with 
BoundingBoxd symbols being defined multiple times in different libs (osg, 
osgEarth and my application). Specifically when using the 
OSG_USE_FLOAT_BOUNDINGBOX OFF cmake directive. (typedef BoundingBoxd 
BoundingBox;)

I know this is probably an osgEarth issue, but possibly due to some of the 
BoundingBoxImpl member functions not being inline or having and OSG_EXPORT 
directive?

Thank you!

Cheers,
Jethro

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





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


Re: [osg-users] How to save camera position between manipulators switching?

2015-02-04 Thread Dan Shebounin
KeySwitcherMatrixManipulator doing exactly, as you're described: getMatrix from 
current, and set it to manipulator, that becomes current. But this default 
behavior does not work.

Cheers,
Dan

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





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


[osg-users] How to save camera position between manipulators switching?

2015-02-04 Thread Dan Shebounin
Hello!

I'm using KeySwitchMatrixManipulator with two added manipulators: 
TrackballManipulator and NodeTrackerManipulator.

autoComputeHome is true for KeySwitch manipulator.

TrackballManipulator centered by default in a center of a scene

NodeTracker is looking at one of scene's model.

When I switching a manipulators, camera position and angle changes randomly. Is 
it possible to preserve a camera position and direction of view between changes?

Thank you!

Cheers,
Dan

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





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


Re: [osg-users] How to save camera position between manipulators switching?

2015-02-04 Thread Christian Buchner
You have to transfer the view matrix from the old camera manipulator to the
new one during switching.
I think there is a setByMatrix member function in the camera manipilator
base class.

Try to use this, after getting the previous manipulator's matrix with
getMatrix
http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00094.html#ac473ec73eca1a1f50997d668fe914317
http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00094.html#aef5f7bfdb9d7cf2e10ed0e8d47309163





Christian


2015-02-04 13:38 GMT+01:00 Dan Shebounin danil.shebou...@gmail.com:

 Hello!

 I'm using KeySwitchMatrixManipulator with two added manipulators:
 TrackballManipulator and NodeTrackerManipulator.

 autoComputeHome is true for KeySwitch manipulator.

 TrackballManipulator centered by default in a center of a scene

 NodeTracker is looking at one of scene's model.

 When I switching a manipulators, camera position and angle changes
 randomly. Is it possible to preserve a camera position and direction of
 view between changes?

 Thank you!

 Cheers,
 Dan

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





 ___
 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] Question about osgShadow::ShadowedScene

2015-02-04 Thread Alexandre Vaillancourt
Hello,

I've been told that objects that were casting shadow were automatically set
to receive shadows as well, and that it was an implementation constraint
that was not avoidable.

Has this constraint been resolved, making it so that if we want an object
to cast and receive shadows we have to set both mask explicitly (not only
cast)?

I'm trying to figure out issues that seemed to have appeared after from
upgrading from 3.1.1 to 3.2.0 but I can't figure out what went wrong. (Some
objects went missing from sight.)

Thanks

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


Re: [osg-users] Question about osgShadow::ShadowedScene

2015-02-04 Thread Robert Osfield
HI Alexandre,

On 4 February 2015 at 13:23, Alexandre Vaillancourt 
alexandre.vaillancourt.l...@gmail.com wrote:

 I've been told that objects that were casting shadow were automatically
 set to receive shadows as well, and that it was an implementation
 constraint that was not avoidable.

 Has this constraint been resolved, making it so that if we want an object
 to cast and receive shadows we have to set both mask explicitly (not only
 cast)?


This will depend upon the ShadowTechnique being used.  I don't recall the
which ones have what constraints though, been a couple of years since I've
worked on osgShadow.

I'm trying to figure out issues that seemed to have appeared after from
 upgrading from 3.1.1 to 3.2.0 but I can't figure out what went wrong. (Some
 objects went missing from sight.)


There are too few details for us to be able to guess what might be wrong.
We don't know what shadow technique you are using, the data you are working
with, what types of objects are going missing, what platform/hardware you
are working on.

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


Re: [osg-users] Node/Object Serialization

2015-02-04 Thread Jeremy
Excellent. Sounds perfect for my needs. I will check that out. I'm on 3.2
at the moment.
On Feb 4, 2015 2:30 AM, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi Jeremy,

 You don't really provide enough info about how you are doing things to
 know what be going amiss so I'll provide general information.

 Since OSG-3.2 I have done quite a bit of work on making the serialization
 scheme support introspection sufficient for the purposes of integrating the
 OSG with scripting languages.  There is now a lua plugin that uses this to
 allow you to create and modify scene graphs all with lua and have this
 integrated with the OSG application via callbacks etc.

 The make the introspection a bit more user friendly I have write a
 osgDB::ClassInterface class that provides a range of methods for enquiring
 about properties of classes, creating objects and setting/getting
 properties and invoking methods.  This is available in the OSG-3.3.x dev
 releases and svn/trunk.

 I would have thought your usage case would fit well with the capabilities
 of the new ClassInterface.

 Robert.



 On 4 February 2015 at 01:12, Jeremy jswig...@gmail.com wrote:

 Is the serialization support of osg in active development? I made an
 attempt to implement a custom osgDB::OutputStream class along
 with writeObjectFields in order to try and piggy back the built in
 serialization functionality in order to be able to populate a GUI tree view
 I'm working on.


 https://www.dropbox.com/s/07t5zk7hw8jp2r7/Screenshot%202015-01-24%2023.06.38.png?dl=0

 It quickly became apparent that the serialization output in OSG is
 lacking in enough ways that it doesn't appear that I can use it in this
 way, which is very unfortunate. The same issues I ran into appear to be
 issues with the in built serialization mechanisms, because the ascii and
 xml versions of ReaderWriterOSG2 appear to be awkwardly formatted as well.

 Since the serializers are implemented as a streaming set of values,
 including 'count' type variables, there isn't enough context interleaved
 through the stream to isolate the write* values for the property values
 from formatting writes such as counts and type names and such.

 I don't suppose there is any ongoing effort to improve upon this or
 possibly add an alternate parallel reflection interface that one could
 query and iterate the named properties of the entire hierarchy. Ultimately
 I'm looking for a way to visualize the internal state of all the various
 osg object types to a UI, or to script interfaces or whatever.

 Thanks
 Jeremy

 ___
 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