Re: [osg-users] Virtual walk on my scene

2010-06-21 Thread Elmar Alizade
Hi Trajce,
Where I can get samples about using osgGA::FirstPersonManipulator?

... 

Thank you!

Cheers,
Elmar

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





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


Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Ricky Flintoff
Hi,

As a solution, I decided to change the viewpoint of the camera and then take 
pictures as I change the viewpoint. However, with the code I have, it's really 
slow (cow rotates very slowly) Any suggestions or ways I can over come this 
problem?


Code:
 
//capture an image of the scenegraph
class CCameraPostDrawCallback: public osg::Camera::DrawCallback {
public:
CCameraPostDrawCallback(const int cX, const int cY, const int w,
const int h, const std::string str) {
centerX = cX;
centerY = cY;
width = w;
height = h;
fileName = str;
}

void operator () (const osg::Camera cam) const {
//take a picture of the scene
osg::ref_ptrosg::Image screenShot = new osg::Image;
screenShot-readPixels(centerX, centerY, width, height, GL_RGB, 
GL_UNSIGNED_BYTE);
osgDB::writeImageFile(*screenShot, fileName);
}
private:
int centerX;
int centerY;
int width;
int height;
std::string fileName;
};

osg::Node* CreateScene() { //add rendering modifications
//load the osg model
osg::Node* loadedModel = osgDB::readNodeFile(cow.osg);
return loadedModel;
}

int main(int argc, char *argv[]) {
osgViewer::Viewer viewer;
viewer.setSceneData(CreateScene());
viewer.getCamera()-setProjectionMatrixAsPerspective(60., 1., 1., 100. );
viewer.setUpViewInWindow(0, 0, 500, 500);

//create a matrix to specify a distance from the viewpoint.
osg::Matrix trans;
trans.makeTranslate(0., 0., -12.);

//Rotation angle (in radians)
double angle(0.);
while (!viewer.done()) {
viewer.getCamera()-setPostDrawCallback(new CCameraPostDrawCallback(0, 
0, 500, 500, screenshot.jpg));

//Create the rotation matrix.
osg::Matrix rot;
rot.makeRotate(angle, osg::Vec3(1, 0., 0.));
angle += 0.01;
viewer.getCamera()-setViewMatrix(rot * trans);
viewer.frame();
}
}




 
Thank you!

Cheers,
Ricky

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





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


Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Robert Osfield
Hi Ricky,

You are doing two things that are very expensive - reading back from
GPU and writing to disk.  You can help lower the cost of GPU read by
using double buffer of PBO, and the cost of writng to disk by using a
separate thread.  Both topics aren't straight forward and pretty
advanced topics.  Go read the osg-users archives for guidance on these
topics.

Robert.

On Mon, Jun 21, 2010 at 8:21 AM, Ricky Flintoff rickyflint...@gmail.com wrote:
 Hi,

 As a solution, I decided to change the viewpoint of the camera and then take 
 pictures as I change the viewpoint. However, with the code I have, it's 
 really slow (cow rotates very slowly) Any suggestions or ways I can over come 
 this problem?


 Code:

 //capture an image of the scenegraph
 class CCameraPostDrawCallback: public osg::Camera::DrawCallback {
 public:
    CCameraPostDrawCallback(const int cX, const int cY, const int w,
            const int h, const std::string str) {
        centerX = cX;
        centerY = cY;
        width = w;
        height = h;
        fileName = str;
    }

    void operator () (const osg::Camera cam) const {
        //take a picture of the scene
        osg::ref_ptrosg::Image screenShot = new osg::Image;
        screenShot-readPixels(centerX, centerY, width, height, GL_RGB, 
 GL_UNSIGNED_BYTE);
        osgDB::writeImageFile(*screenShot, fileName);
    }
 private:
    int centerX;
    int centerY;
    int width;
    int height;
    std::string fileName;
 };

 osg::Node* CreateScene() { //add rendering modifications
    //load the osg model
    osg::Node* loadedModel = osgDB::readNodeFile(cow.osg);
    return loadedModel;
 }

 int main(int argc, char *argv[]) {
    osgViewer::Viewer viewer;
    viewer.setSceneData(CreateScene());
    viewer.getCamera()-setProjectionMatrixAsPerspective(60., 1., 1., 100. );
    viewer.setUpViewInWindow(0, 0, 500, 500);

    //create a matrix to specify a distance from the viewpoint.
    osg::Matrix trans;
    trans.makeTranslate(0., 0., -12.);

    //Rotation angle (in radians)
    double angle(0.);
    while (!viewer.done()) {
        viewer.getCamera()-setPostDrawCallback(new CCameraPostDrawCallback(0, 
 0, 500, 500, screenshot.jpg));

        //Create the rotation matrix.
        osg::Matrix rot;
        rot.makeRotate(angle, osg::Vec3(1, 0., 0.));
        angle += 0.01;
        viewer.getCamera()-setViewMatrix(rot * trans);
        viewer.frame();
    }
 }





 Thank you!

 Cheers,
 Ricky

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





 ___
 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] OpenSceneGaph 2.9.8 dev release tagged :-)

2010-06-21 Thread Robert Osfield
Hi Magnus, Maxim, et. al,

Magnus' fix is now checked into svn/trunk and will be part of the the
next dev release 2.9.9.

Cheers,
Robert.

2010/6/19 Magnus Kessler magnus.kess...@gmx.net:
 On Friday 18 Jun 2010 20:10:16 Maxim Gammer wrote:
 error:
 Scanning dependencies of target osgQt
 [ 98%] Building CXX object
 src/osgQt/CMakeFiles/osgQt.dir/QFontImplementation.o [ 98%] Building CXX
 object src/osgQt/CMakeFiles/osgQt.dir/QGraphicsViewAdapter.o [ 98%]
 Building CXX object src/osgQt/CMakeFiles/osgQt.dir/QWidgetImage.o [ 98%]
 Building CXX object
 src/osgQt/CMakeFiles/osgQt.dir/__/__/include/osgQt/moc_QGraphicsViewAdapter
 .o
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/inclu
 de/osgQt/moc_QGraphicsViewAdapter.cxx:11:2: error: #error The header file
 'QGraphicsViewAdapter' doesn't include QObject.
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:19: error: expected constructor,
 destructor, or type conversion before 'static'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:45: error: 'QMetaObject' does not name
 a type
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:54: error: expected initializer before
 '*' token
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:59: error: 'osgQt' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx: In function 'void* qt_metacast(const
 char*)':
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:62: error: 'strcmp' was not declared
 in this scope
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected type-specifier
 before 'QGraphicsViewAdapter'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected '' before
 'QGraphicsViewAdapter'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected '(' before
 'QGraphicsViewAdapter'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: 'QGraphicsViewAdapter' was
 not declared in this scope
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected primary-expression
 before '' token
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: invalid use of 'this' in
 non-member function
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected ')' before ';'
 token
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:64: error: 'QObject' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx: At global scope:
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: 'osgQt' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: 'QMetaObject' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: expected primary-expression
 before 'int'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: expected primary-expression
 before 'void'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: warning: initializer expression
 list treated as compound expression
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/inclu
 de/osgQt/moc_QGraphicsViewAdapter.cxx:68: error: expected ',' or ';' before
 '{' token
 make[2]: ***
 [src/osgQt/CMakeFiles/osgQt.dir/__/__/include/osgQt/moc_QGraphicsViewAdapt
 er.o] Ошибка 1
 make[1]: *** [src/osgQt/CMakeFiles/osgQt.dir/all] Ошибка 2
 make: *** [all] Ошибка 2

 I have just come across the same error, when building OSG 2.9.8 out-of-source
 through a gentoo ebuild. Building the same in-source seems to work OK.

 After looking at the documentation for FindQt4.cmake I came up with the
 solution to pass the -f OPTION to QT4_WRAP_CPP:

 diff --git a/src/osgQt/CMakeLists.txt b/src/osgQt/CMakeLists.txt
 index 69cc12f..6794d57 100644
 --- a/src/osgQt/CMakeLists.txt
 +++ b/src/osgQt/CMakeLists.txt
 @@ -12,7 +12,7 @@ 

Re: [osg-users] OpenSceneGaph 2.9.8 dev release tagged :-)

2010-06-21 Thread Maxim Gammer
ok)

21 июня 2010 г. 16:21 пользователь Robert Osfield
robert.osfi...@gmail.com написал:
 Hi Magnus, Maxim, et. al,

 Magnus' fix is now checked into svn/trunk and will be part of the the
 next dev release 2.9.9.

 Cheers,
 Robert.

 2010/6/19 Magnus Kessler magnus.kess...@gmx.net:
 On Friday 18 Jun 2010 20:10:16 Maxim Gammer wrote:
 error:
 Scanning dependencies of target osgQt
 [ 98%] Building CXX object
 src/osgQt/CMakeFiles/osgQt.dir/QFontImplementation.o [ 98%] Building CXX
 object src/osgQt/CMakeFiles/osgQt.dir/QGraphicsViewAdapter.o [ 98%]
 Building CXX object src/osgQt/CMakeFiles/osgQt.dir/QWidgetImage.o [ 98%]
 Building CXX object
 src/osgQt/CMakeFiles/osgQt.dir/__/__/include/osgQt/moc_QGraphicsViewAdapter
 .o
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/inclu
 de/osgQt/moc_QGraphicsViewAdapter.cxx:11:2: error: #error The header file
 'QGraphicsViewAdapter' doesn't include QObject.
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:19: error: expected constructor,
 destructor, or type conversion before 'static'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:45: error: 'QMetaObject' does not name
 a type
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:54: error: expected initializer before
 '*' token
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:59: error: 'osgQt' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx: In function 'void* qt_metacast(const
 char*)':
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:62: error: 'strcmp' was not declared
 in this scope
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected type-specifier
 before 'QGraphicsViewAdapter'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected '' before
 'QGraphicsViewAdapter'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected '(' before
 'QGraphicsViewAdapter'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: 'QGraphicsViewAdapter' was
 not declared in this scope
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected primary-expression
 before '' token
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: invalid use of 'this' in
 non-member function
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected ')' before ';'
 token
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:64: error: 'QObject' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx: At global scope:
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: 'osgQt' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: 'QMetaObject' has not been
 declared
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: expected primary-expression
 before 'int'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: expected primary-expression
 before 'void'
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
 e/osgQt/moc_QGraphicsViewAdapter.cxx:67: warning: initializer expression
 list treated as compound expression
 /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/inclu
 de/osgQt/moc_QGraphicsViewAdapter.cxx:68: error: expected ',' or ';' before
 '{' token
 make[2]: ***
 [src/osgQt/CMakeFiles/osgQt.dir/__/__/include/osgQt/moc_QGraphicsViewAdapt
 er.o] Ошибка 1
 make[1]: *** [src/osgQt/CMakeFiles/osgQt.dir/all] Ошибка 2
 make: *** [all] Ошибка 2

 I have just come across the same error, when building OSG 2.9.8 out-of-source
 through a gentoo ebuild. Building the same in-source seems to work OK.

 After looking at the documentation for FindQt4.cmake I came up with the
 solution to pass the -f OPTION to QT4_WRAP_CPP:

 diff --git a/src/osgQt/CMakeLists.txt b/src/osgQt/CMakeLists.txt
 index 69cc12f..6794d57 

Re: [osg-users] Virtual walk on my scene

2010-06-21 Thread Trajce (Nick) Nikolov
Hi Elmar,

have a look at osgviewer. or you can do viewer.setCameraManipulator( new
osgGA::FirstPersonManipulator ) - that is only you need

-Nick


On Mon, Jun 21, 2010 at 8:04 AM, Elmar Alizade elmar_aliz...@hotmail.comwrote:

 Hi Trajce,
 Where I can get samples about using osgGA::FirstPersonManipulator?

 ...

 Thank you!

 Cheers,
 Elmar

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





 ___
 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] OpenSceneGaph 2.9.8 dev release tagged :-)

2010-06-21 Thread Michael Gronager
Hi Robert,

Congratz with this, but perhaps you should update the date (applies for 2.9.7 
as well):

* OpenSceneGraph-2.9.8, released on 18th June 2009, key

I guess it should be 2010...

Apart from that it builds fairly ok on a OSX, though I am a bit puzzled about 
the lack of ability to build frameworks from Xcode - should I stick with the 
Makefiles ?

Cheers,

Michael (joining the list again for a 3D hobby project with my son...)



On 18/06/2010, at 18:42, Robert Osfield wrote:

 Hi All,
 
 I have just tagged the OpenSceneGraph-2.9.8 dev release.  Thanks to
 all those who've contributed to development these four months since
 the last dev release, and all those that have been testing/debugging
 over the last day.  I've put a  quick summary of changes up on
 
http://www.openscenegraph.org/projects/osg/wiki/Downloads/DeveloperReleases
 
 Which reads:
 
* OpenSceneGraph-2.9.8, released on 18th June 2009, key
 deliverables in this dev release are:
  o Revamped 3ds plugin that supports and reading and writing,
 and now uses a latest lib3ds source code.
  o New osgDB serializers and associated .osgt (text), .osgb
 (binary) and .osgx (xml) file formats that are extensible, and
 deprecate the old .osg and .ive formats.
  o Revamp of osgGA CameraManipulators
  o New osgQT library for integrating QT and OpenSceneGraph
  o Range of improvements to the FBX plugin
  o Rewrite of osg::observer_ptr and osg::Observer, with
 introduce of new ObserverNodePath class, for addressing threading
 issues with old implementation.
  o A range of improvements to DatabasePager to improve
 performance, reduced memory usage, and address crashes/deadlocks.
  o Fixes to memory usage in TerraPage (.txp) plugin.
  o Improvements to the Graphviz .dot plugin and added support
 for dot diagrams to !Present3D application.
  o Improvements to COLLADA .dae plugin, including adding
 support for animation using osgAnimation.
  o Support for static linking of OpenGL ES 2.0.
  o Improvements to Inventor and VRML plugins.
  o Support for automatic boundary equalization in osgTerrain
 databases (requires databases to built with updated
 VirtualPlanetBuilder to take advantage of it.)
  o New OSG_INFO/OSG_NOTICE/OSG_WARN/OSG_DEBUG macro's that
 add a condition infront of the underlying osg::notify(..) call they
 provide to avoid executing stream code when messages were being
 discarded, and also done in a way that compilers can optimize the
 notification code out completely when notification is completely
 disabled via the new cmake GOSG_NOTIFY_DISABLE variable. Under Windows
 this new feature avoids a hitting a contended global mutex that
 Microsoft uses in it ostream implementation and results in a
 noticeable improvement in speed. All platforms will benefit from lower
 overheads as well, but not quite as dramatic as under windows.
  o Many general bug fixes and minor feature
 improvements/optimizations.
 
source package : OpenSceneGraph-2.9.8.zip
svn tag: svn co
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.9.8
 OpenSceneGraph
 
 Cheers,
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Michael Gronager, PhD
NDGF Director
Nordic Data Grid Facility
NORDUnet A/S
Kastruplundgade 22, 1
2770 Kastrup
Phone: +45 32 46 25 00
Fax: +45 45 76 23 66
Mobile: +45 31 62 14 01
E-mail: grona...@ndgf.org


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


[osg-users] Texture2D problem

2010-06-21 Thread Stephane Dumon
Hi,
I'm working on virtual camera distortion using the method describes in Model 
View Geometry and osgdistortion example. My problem is that I have some bad 
edges as you can see in the following screenshot.

[Image: http://img686.imageshack.us/img686/305/testpp.jpg ] 
(http://img686.imageshack.us/i/testpp.jpg/)

Uploaded with ImageShack.us (http://imageshack.us)

How could I remove these gray pixels and force the view area to be only the 
distort texture?

Thank you!

Cheers,
Stephane

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





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


[osg-users] Making objects transparent without using textures at all

2010-06-21 Thread nikhil raprolu simha
Hi,

I want to know if it is possible to make objects transparent without using a 
transparent texture .I am using the following code but it turns out to be 
opaque. 

  

ss-ref();
ss-setMode(GL_BLEND, StateAttribute::ON);
ss-setMode(GL_FOG, StateAttribute::ON);
 ---ss-setAttribute(fog,osg::StateAttribute::ON);
|   ss-setRenderBinDetails(11,RenderBin);
|
Am i doing something wrong with the fog properties?
or 
is there a property of fog wich should be enabled to make the object 
transparent?

Thank you!

Cheers,
nikhil

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





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


Re: [osg-users] Making objects transparent without using textures at all

2010-06-21 Thread Gordon Tomlinson




__
Gordon Tomlinson 

gor...@gordontomlinson.com IM: gordon3db...@3dscenegraph.com 
www.vis-sim.com
www.gordontomlinson.com
www.PhotographyByGordon.com

__

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of nikhil
raprolu simha
Sent: Monday, June 21, 2010 1:20 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Making objects transparent without using textures at
all

Hi,

I want to know if it is possible to make objects transparent without using a
transparent texture .I am using the following code but it turns out to be
opaque. 

  

ss-ref();
ss-setMode(GL_BLEND, StateAttribute::ON);
ss-setMode(GL_FOG, StateAttribute::ON);
 ---ss-setAttribute(fog,osg::StateAttribute::ON);
|   ss-setRenderBinDetails(11,RenderBin);
|
Am i doing something wrong with the fog properties?
or 
is there a property of fog wich should be enabled to make the object
transparent?

Thank you!

Cheers,
nikhil

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





___
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] Making objects transparent without using textures at all

2010-06-21 Thread nikhil raprolu simha
Hi,

Thanks for the reply gordon.
Which examples are you referring to?


Cheers,
nikhil

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





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


[osg-users] Transform Feedback

2010-06-21 Thread Ethan Kerzner
Hi,

I am interested in using a geometry shader to do calculations on the GPU but 
instead of drawing the result, it should be piped back into a vertex buffer. 

A high level description of the process is:

1. Load scene and shaders to be used for transform feedback. (I do not know if 
I would load the shaders in an osg::Program, or in my own OpenGL context)

2. Enable shaders, and enable transform feedback to discard the rasterization 
of the GPU pipeline

3. Set up a buffer receive data that would usually be rasterized 
(glTransformFeedbackVaryings, and glBindBufferBase)

4. Draw the scene once

5. The data of interest will be piped into the buffer set up in step 3.


Can you please recommend a good resource for implementing transform feedback in 
osg? Otherwise, could you please recommend a guide to running your own OpenGL 
code inside a program?

Thanks,
Ethan

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





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


Re: [osg-users] VPBMaster failing - build_master.source not loaded correctly.

2010-06-21 Thread Robert Osfield
Hi Brad,

I have now reviewed Wang Rui's fixes and rather than adopt these
directly, I've learnt from them what the problem was - which enabled
me to recreate the problem under Linux, so can confirm now that it's
now Windows specific issue, it was just I wasn't quite recreating the
same usage.

With the new knowledge of the problem in hand I've implemented a
variation on Wang Rui's fix which handles the failing case as well as
provides syntax which is a bit more succint than Wang Rui's changes
and bit closer to the original .osg style syntax.

I've checked my changes into OSG svn/trunk, could you do an svn update
and let me know how you get on.

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


[osg-users] Future of osgIntrospection + genwrapper, volunteers required.

2010-06-21 Thread Robert Osfield
Hi All,

As part of my prep work of the OSG for the up coming 3.0 I will be
moving osgIntrospection and the associated wrappers out into their
separate project, and looking for a member of the OSG community to
step up and take over management of this project.  My thought is that
one would place the osgIntrospection library, the introspection
wrappers and the genwrapper tool into this project, with something
like the following structure:



 ProjectName/include/osgIntrospection
 ProjectName/src/osgIntrospection

 ProjectName/src/genwrapper

 ProjectName/src/osgWrappers/osg/
 ProjectName/src/osgWrappers/osgDB
 ProjectName/src/osgWrappers/osgUtil
 ...

The osgIntrospection library itself could actually be renamed as it is
actually OSG specific - it was written by Marco Jez to be able to wrap
any C++ project, so could easily be rename to something like
cppIntrospection/introspection,or whatever the new project lead feels
appropriate.   genwrapper is also not specific to OSG.

The only part that need be specific to the OSG is the wrappers that
genwrapper generates, potentially this could even be maintained as
another separate project, so you have a generic library and
application for generating wrappers, then you have the prebuilt OSG
wrappers.

I would like parties that use osgIntrospeciton to come forward on what
they would like to do with project and also for individuals/groups to
come forward and volunteer to lead/contribute to this project.  Once
we get some consensus I'll package up the project in a way that makes
it appropriate to pick up and take the reigns on.

I would like to inject some urgency into this effort as my plan for
the next developer release of the OpenSceneGaph (2.9.9) is for it to
be made with osgIntrospection already moved out, and would like to
make 2.9.9 in the next week to ten days.  My desire to get the ball
rolling on this is that I'm shaping up the OSG dev release series for
the 3.0 stable release, to be made this summer.

Thanks in advance for your help,

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


[osg-users] Help setting up a cave-like device viewer

2010-06-21 Thread nick waller
Hello.

I'm working on configuring a cave-like device using OSG.  The device has 3 
walls along side each other, the two on the outside rotated in about 30 
degrees.  To account for this, I tried rotating the slave camera's that display 
to the outside screens but this doesn't seem to work.  Instead it clips the 
image and I get a strange view-slot on the rotated screens.  I am rotating them 
by rotating rotating the projection matrix when I create the slave camera's.  
This is clearly not working.  Can someone point me in the right direction?
Thanks

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





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


Re: [osg-users] Compilation Process of OSG Programs IDE Questions for OSG

2010-06-21 Thread Christian Richardt
This is not related to OSG, please refer to the Qt website at
http://qt.nokia.com/products/developer-tools/.

Christian.

On Mon, Jun 21, 2010 at 5:17 PM, nikhil raprolu simha
r.nikhilsi...@gmail.com wrote:
 Hi,

 how to use qt creator?

 Thanks in advance

 Cheers,
 nikhil

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





 ___
 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] Compilation Process of OSG Programs IDE Questions for OSG

2010-06-21 Thread nikhil raprolu simha
Hi,

Sorry, I meant how to use qt along with osg ,i mean the how the .pro file must 
be directed to osg libs  
Thank you!

Cheers,
nikhil

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





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


Re: [osg-users] Help setting up a cave-like device viewer

2010-06-21 Thread Todd J. Furlong

Hi Nick,

This is usually where I chime in and say that we use VR Juggler 
(http://code.google.com/p/vrjuggler/) with OSG for displays like that. 
VR Juggler handles things like view frustum calculations, clustering, 
and input device management.


Regards,
Todd

On 6/21/2010 12:54 PM, nick waller wrote:

Hello.

I'm working on configuring a cave-like device using OSG.  The device has 3 
walls along side each other, the two on the outside rotated in about 30 
degrees.  To account for this, I tried rotating the slave camera's that display 
to the outside screens but this doesn't seem to work.  Instead it clips the 
image and I get a strange view-slot on the rotated screens.  I am rotating them 
by rotating rotating the projection matrix when I create the slave camera's.  
This is clearly not working.  Can someone point me in the right direction?
Thanks

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





___
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] Help setting up a cave-like device viewer

2010-06-21 Thread nick waller
We were hoping to do it without VR Juggler because we had issues getting it to 
run on our systems, but it looks like we are just going to have to bite the 
bullet and see if we can't get it to run.  

Thanks



Todd J. Furlong wrote:
 Hi Nick,
 
 This is usually where I chime in and say that we use VR Juggler 
 (http://code.google.com/p/vrjuggler/) with OSG for displays like that. 
 VR Juggler handles things like view frustum calculations, clustering, 
 and input device management.
 
 Regards,
 Todd
 
 On 6/21/2010 12:54 PM, nick waller wrote:
 
  Hello.
  
  I'm working on configuring a cave-like device using OSG.  The device has 3 
  walls along side each other, the two on the outside rotated in about 30 
  degrees.  To account for this, I tried rotating the slave camera's that 
  display to the outside screens but this doesn't seem to work.  Instead it 
  clips the image and I get a strange view-slot on the rotated screens.  I am 
  rotating them by rotating rotating the projection matrix when I create the 
  slave camera's.  This is clearly not working.  Can someone point me in the 
  right direction?
  Thanks
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=29222#29222
  
  
  
  
  
  ___
  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=29231#29231





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


Re: [osg-users] Help setting up a cave-like device viewer

2010-06-21 Thread Jan Ciger
On Mon, Jun 21, 2010 at 9:35 PM, nick waller nhwalke...@yahoo.com wrote:
 We were hoping to do it without VR Juggler because we had issues getting it 
 to run on our systems, but it looks like we are just going to have to bite 
 the bullet and see if we can't get it to run.

 Thanks


You may want to look at osgEqualizer, it does more-or-less exactly
what you need.

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


Re: [osg-users] Help setting up a cave-like device viewer

2010-06-21 Thread Todd J. Furlong

Nick,

What's your platform?  We posted some VS2008 32-bit binaries to the VR 
Juggler mailing list not very long ago.


-Todd

On 6/21/2010 3:35 PM, nick waller wrote:

We were hoping to do it without VR Juggler because we had issues getting it to 
run on our systems, but it looks like we are just going to have to bite the 
bullet and see if we can't get it to run.

Thanks



Todd J. Furlong wrote:

Hi Nick,

This is usually where I chime in and say that we use VR Juggler
(http://code.google.com/p/vrjuggler/) with OSG for displays like that.
VR Juggler handles things like view frustum calculations, clustering,
and input device management.

Regards,
Todd

On 6/21/2010 12:54 PM, nick waller wrote:


Hello.

I'm working on configuring a cave-like device using OSG.  The device has 3 
walls along side each other, the two on the outside rotated in about 30 
degrees.  To account for this, I tried rotating the slave camera's that display 
to the outside screens but this doesn't seem to work.  Instead it clips the 
image and I get a strange view-slot on the rotated screens.  I am rotating them 
by rotating rotating the projection matrix when I create the slave camera's.  
This is clearly not working.  Can someone point me in the right direction?
Thanks


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


Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Ricky Flintoff
Hi,

Thank you very very much for your suggestion! I actually ran into another 
problem with the code. I tend to get segmentation faults. My idea was to take 
multiple pictures as I changed the position of my camera. 
Any way I can get rid of these seg faults?
Thank you!

Cheers,
Ricky

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





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


Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Tom Pearce
Ricky,

Based on the code you posted, you're taking a screenshot every frame - and from 
the same position, no less.  You're creating the same matrix each time, and 
thus setting the view matrix to be identical each frame.  Then you're doing 
file I/O that is the exact same too.

When I ran your code without doing all of this on every frame (i.e. returning 
after the first frame or two) everything seemed to work.  In fact, I also ran 
it exactly as you'd posted it, and it still executed without error, just very 
slowly.  I'm not sure where the seg faults are coming from but perhaps you're 
just bogging stuff down too much since the code isn't really doing something 
you actually want it to do...?  In principle I don't see a problem with moving 
the camera from one view to another and taking a picture from two (or more) 
points - but the way it is set up right now isn't right.  At least, not as I 
see it.

Cheers,
Tom

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





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


[osg-users] Dynamic instancing some .ive models

2010-06-21 Thread Roman Grigoriev
Hi,
I created some models in ive formats and want to do instancing. As far as I red 
to get good FPS I should avoid using glLoadMatrix but store my matrixtransforms 
as uniforms and use glDrawElementsInstanced but in .ive file all primitiveset 
are DrawElementsUshort. 
Maybe someone already have done hardware instancing with models?
... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] VPBMaster failing - build_master.source not loaded correctly.

2010-06-21 Thread Christiansen, Brad
Hi Robert,

I have just completed an update and build and all seems to be running correctly 
again. Thanks so much to yourself and Wang Rui for solving the issue 
(especially given I was kicking back on holidays at the time! : ). I will now 
be able to move on to testing your fixes to the DB pager, hopefully today, if 
not tomorrow.

Thanks again,

Brad

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Monday, 21 June 2010 10:46 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] VPBMaster failing - build_master.source not loaded 
correctly.

Hi Brad,

I have now reviewed Wang Rui's fixes and rather than adopt these
directly, I've learnt from them what the problem was - which enabled
me to recreate the problem under Linux, so can confirm now that it's
now Windows specific issue, it was just I wasn't quite recreating the
same usage.

With the new knowledge of the problem in hand I've implemented a
variation on Wang Rui's fix which handles the failing case as well as
provides syntax which is a bit more succint than Wang Rui's changes
and bit closer to the original .osg style syntax.

I've checked my changes into OSG svn/trunk, could you do an svn update
and let me know how you get on.

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



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--

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