[osg-users] Custom file type loading?

2010-03-18 Thread Peter Bear
Hi, I was wondering if anyone would be able to point me in the right direction 
as to how to add support to load custom file types not currently supported by 
OSG. I've been looking for a while and haven't turned much up that appears to 
be of use.

Thank you!

Cheers,
Peter

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





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


Re: [osg-users] Custom file type loading?

2010-03-18 Thread Ralf Stokholm
Hi Peter

I have no personal experience with this, but from my understanding the most
correct pattern would be to add a new plugin for your file type. Take a look
at the way other files are handled either images like bmp's or models.

Brgs.

Ralf Stokholm

On 18 March 2010 09:06, Peter Bear th3fly...@gmail.com wrote:

 Hi, I was wondering if anyone would be able to point me in the right
 direction as to how to add support to load custom file types not currently
 supported by OSG. I've been looking for a while and haven't turned much up
 that appears to be of use.

 Thank you!

 Cheers,
 Peter

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





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




-- 
Ralf Stokholm
Director RD
Email: a...@arenalogic.com
Phone: +45 28 30 83 52
Web: www.arenalogic.com

This transmission and any accompanying documents are intended only for
confidential use of the designated recipient(s) identified above.  This
message contains proprietary information belonging to Arenalogic Aps.  If
you have received this message by error, please notify the sender.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] DatabasePager::updateSceneGraph() notices

2010-03-18 Thread Robert Osfield
Hi Farshid,

Yesterday afternoon I checked in the disabling of this debug timing
info.  The timing info was for tracking the effects of various changes
to the way that the DatabasePager managed PagedLOD and node paths, it
was the mutex locks that the DatabasePager acquires that are the
potential trouble spot performance wise so it was a case of monitoring
it carefully for frames for when there is contention.

The new code has been working pretty well so no need for the debug
info now.  An svn update will get you this change.

Robert.

On Wed, Mar 17, 2010 at 9:17 PM, Farshid Lashkari fla...@gmail.com wrote:
 Hi,
 Does anybody have any objections to changing the notification
 in DatabasePager::updateSceneGraph() from NOTICE to INFO? I'm getting these
 notices pretty frequently and I don't really understand its importance. I'm
 getting these notices on scenes with no PagedLODs and can foresee this
 causing confusion for customers.
 Cheers,
 Farshid
 ___
 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] osgText quality issue

2010-03-18 Thread Robert Osfield
Hi Farshid,

An interesting result.  I'm afraid I can't recall the reason for the
change, it will have been done quite a while ago.  subversion's
revisions might be able to unearth why sizeAdjustment is now 1- but
it's pretty likely it was an attempt to improve one aspect of
rendering so if we change it there is good chance that we'll improve
on one area but make another area worse.   If we can find out what
cases require sizeAdjustment of 1 then perhaps we'll be able to build
a test that reproduces both the issue you are seeing and this other
one then we can come up with an all round solution.

Robert.

On Wed, Mar 17, 2010 at 8:29 PM, Farshid Lashkari fla...@gmail.com wrote:
 Hi,
 I'm in the process of porting our application from OSG 1.2 to 2.9. One major
 issue that immediately stood out was the quality of osgText. All the letters
 seem to be cut off by one pixel along the edges. There has been a lot of
 changes since 1.2, but I did find one setting that seemed to fix the issue
 for me.
 On line 539 of Font.cpp there is a hard-coded variable called sizeAdjustment
 that is set to 1. In OSG 1.2 this value was set to 0. Changing this value
 back to 0 pretty much resolves the quality issue for me. I've attached a
 screenshot comparing the result of changing the value.
 Does anybody else notice these artifacts? Is there a downside to changing
 the sizeAdjustment value back to 0? Any insight is appreciated.
 Cheers,
 Farshid
 ___
 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] Mac Serializer Compile Error

2010-03-18 Thread Robert Osfield
HI Matrin  Wang Rui

On Thu, Mar 18, 2010 at 3:15 AM, Wang Rui wangra...@gmail.com wrote:
 Hi Martins,

 I have no experience in Mac. But it seems that type definition of
 GLint changes to some other types in your system. In most other cases,
 we have:

 typedef int GLint;

 in the gl.h header. And an ADD_INT_SERIALIZER is workable with it.

 Maybe we should have more tests on 64bit systems and try to find out
 if an independent ADD_GLINT_SERIALIZER was required to keep compatible
 on different platforms.

An ADD_GLINT_SERIALIZER may well be required.  We'd need to
static_cast the GLint to int for portability of the data format.

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


Re: [osg-users] Custom file type loading?

2010-03-18 Thread Robert Osfield
Hi Peter,

There over 70 plugins in src/osgPlugins/ that illustrate how to create
a reader/writers, I would recommend having a look at simple one like
src/osgPlugins/rgb or bmp.

You needn't implement it as a plugin though, you can write your own
ReaderWrtier directly in your application, all you need to do is
subclass from osgDB::ReaderWriter and then register this class with
the osgDB::Registry using osgDB::RegisterReaderWriterProxy or
associated REGISTER_OSGPLUGIN macro.  Have a look at the
examples/osgphotoalbum to see a in application loader implemented.

Robert.

On Thu, Mar 18, 2010 at 8:06 AM, Peter Bear th3fly...@gmail.com wrote:
 Hi, I was wondering if anyone would be able to point me in the right 
 direction as to how to add support to load custom file types not currently 
 supported by OSG. I've been looking for a while and haven't turned much up 
 that appears to be of use.

 Thank you!

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


Re: [osg-users] osgText quality issue

2010-03-18 Thread Mathias Fröhlich

Hi,

On Wednesday 17 March 2010, Farshid Lashkari wrote:
 I'm in the process of porting our application from OSG 1.2 to 2.9. One
 major issue that immediately stood out was the quality of osgText. All the
 letters seem to be cut off by one pixel along the edges. There has been a
 lot of changes since 1.2, but I did find one setting that seemed to fix the
 issue for me.

 On line 539 of Font.cpp there is a hard-coded variable called
 sizeAdjustment that is set to 1. In OSG 1.2 this value was set to 0.
 Changing this value back to 0 pretty much resolves the quality issue for
 me. I've attached a screenshot comparing the result of changing the value.

 Does anybody else notice these artifacts? Is there a downside to changing
 the sizeAdjustment value back to 0? Any insight is appreciated.
Yes, I was coding around that in the QFont implementation by an own margin 
that appeared to fix that problem. That left the original reason on the todo 
list ...
Glad to see that we know where this happens.

Greetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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


Re: [osg-users] bluring model edges

2010-03-18 Thread yann le paih
Hi,

Morphological Antialiasing (MLAA) is a Post Processing technique. you could
try with  osgPPU.

ie can this methodology be performed in milliseconds? :

Like other Post Processing technique, it's depend of your shader complexity
and your output resolution.

An example :

http://www.highdefforum.com/gaming-systems/107094-mlaa-technique-can-give-results-4x-better-than-16x-msaa.html



-- 
Yann Le Paih
Keraudrono
56150 BAUD
Portable: +33(0)610524356
lepaih.y...@gmail.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgText quality issue

2010-03-18 Thread Ralf Stokholm
Hi

Im not sure if this is the last time it was changed, but inspecting the log
it was changed a revision 6602 from

unsigned int sizeAdjustment = 0; // was 1.
to
unsigned int sizeAdjustment = 1;

With the following comment: *Reorganised the managment of margins around
glyphs so that is done entirely with src/osgText/Font.cpp rather than the
font plugins or Text.cpp*
**
Not really sure why, but I couldent help looking for it so I might as well
share.

Brgs.

Ralf Stokholm



2010/3/18 Mathias Fröhlich m.froehl...@science-computing.de


 Hi,

 On Wednesday 17 March 2010, Farshid Lashkari wrote:
  I'm in the process of porting our application from OSG 1.2 to 2.9. One
  major issue that immediately stood out was the quality of osgText. All
 the
  letters seem to be cut off by one pixel along the edges. There has been a
  lot of changes since 1.2, but I did find one setting that seemed to fix
 the
  issue for me.
 
  On line 539 of Font.cpp there is a hard-coded variable called
  sizeAdjustment that is set to 1. In OSG 1.2 this value was set to 0.
  Changing this value back to 0 pretty much resolves the quality issue for
  me. I've attached a screenshot comparing the result of changing the
 value.
 
  Does anybody else notice these artifacts? Is there a downside to changing
  the sizeAdjustment value back to 0? Any insight is appreciated.
 Yes, I was coding around that in the QFont implementation by an own margin
 that appeared to fix that problem. That left the original reason on the
 todo
 list ...
 Glad to see that we know where this happens.

 Greetings

 Mathias

 --
 Dr. Mathias Fröhlich, science + computing ag, Software Solutions
 Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
 Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
 --
 Vorstand/Board of Management:
 Dr. Bernd Finkbeiner, Dr. Roland Niemeier,
 Dr. Arno Steitz, Dr. Ingrid Zech
 Vorsitzender des Aufsichtsrats/
 Chairman of the Supervisory Board:
 Michel Lepert
 Sitz/Registered Office: Tuebingen
 Registergericht/Registration Court: Stuttgart
 Registernummer/Commercial Register No.: HRB 382196


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




-- 
Ralf Stokholm
Director RD
Email: a...@arenalogic.com
Phone: +45 28 30 83 52
Web: www.arenalogic.com

This transmission and any accompanying documents are intended only for
confidential use of the designated recipient(s) identified above.  This
message contains proprietary information belonging to Arenalogic Aps.  If
you have received this message by error, please notify the sender.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgText quality issue

2010-03-18 Thread Robert Osfield
Hi Ralf,

On Thu, Mar 18, 2010 at 9:22 AM, Ralf Stokholm alfma...@arenalogic.com wrote:
 Im not sure if this is the last time it was changed, but inspecting the log
 it was changed a revision 6602 from

Thanks for the detective work.  From Tracs the changes are:

http://www.openscenegraph.org/projects/osg/changeset/6602/OpenSceneGraph/trunk/src/osgText/Font.cpp
http://www.openscenegraph.org/projects/osg/changeset/6602/OpenSceneGraph/trunk/src/osgText/Text.cpp


From what I can make out the texture coordinate set up is the part
that is critical, and the new code is effectively using
xpos/(textureWidth-1) to compute a texture coordinate, while for
Farshid and others are reporting that use of xpos/(textureWidth-0) is
producing better results.

However there is more going on with margins and the actual quad
geometry that Text.cpp uses, as well as the potential for the clamp
mode on the texture to effect things as well, so right now I'm not
ready to make any decision about what the correct code should be, but
it's likely to involve more than just changing a 0 to 1.  I suspect a
wider review of the maths of placement of the glyphs in the texture,
the maths used by the GPU to map the tex coordinates to the texels,
and the sizes of the quads used by Text.cpp.  Note the quad geometry
will be oversized slightly to make sure that mipmapping does loose the
border of the glyph.

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


Re: [osg-users] Render to Texture with independent framerate (Solution)

2010-03-18 Thread Georg Martius
Hi folks,

I would like to post my solution to the problem of rendering to a texture 
independently on the framerate of the viewer, the code is attached.

My solution is to derived a Viewer from osgViewer::Viewer, added a custom 
offScreenRender() function mimicking frame() and (offScreen)renderTraversal() 
function without statistics and swapbuffer. 
In the offScreenRender() function I exchange the child of the main camera 
 by the off screen rendering node containing only the RTT cameras and switch 
it back afterwards. This works great except that the shadows do not work 
correctly in the RTT camera. It seems that the light position is wrongly 
detected, which is done in the cull traversal as far as I could understand 
from looking at the code. How do I perform this properly in the 
offScreenRenderTraversal()  function?


Cheers,
Georg


/* -*-c++-*- Taken from osgprerenderer.cpp
 *
 * This application is open source and may be redistributed and/or modified   
 * freely and without restriction, both in commericial and non commericial applications,
 * as long as this copyright notice is maintained.
 * 
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 g++ -losgShadow -losgText -losgUtil -losgViewer -losgGA -lOpenThreads -losg -lGL -lGLU -lglut async_test.cpp

*/
#include osgDB/ReadFile
#include osgDB/WriteFile

#include osgUtil/Optimizer
#include osg/CoordinateSystemNode

#include osg/Switch
#include osgText/Text

#include osgViewer/Viewer
#include osgViewer/ViewerEventHandlers
#include osgViewer/Renderer


#include osgGA/TrackballManipulator
#include osgGA/FlightManipulator
#include osgGA/DriveManipulator
#include osgGA/KeySwitchMatrixManipulator
#include osgGA/StateSetManipulator

#include iostream
#include sstream
#include string.h


class AsyncRTTViewer : public osgViewer::Viewer {
public:

  AsyncRTTViewer(){
asyncRTTViewerConstructorInit();
  }

  AsyncRTTViewer(osg::ArgumentParser arguments)
: osgViewer::Viewer(arguments) {
asyncRTTViewerConstructorInit();
  }

  AsyncRTTViewer(const osgViewer::Viewer viewer, 
 const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY)  
: osgViewer::Viewer(viewer,copyop) {
asyncRTTViewerConstructorInit();
  }

  virtual ~AsyncRTTViewer() {}

  /// adds a render to texture camera 
  void addOffScreenRTTNode(osg::Node* node){
offScreenNodes-addChild(node);
  }

  /// removes a render to texture camera 
  void removeOffScreenRTTNode(osg::Node* node){
offScreenNodes-removeChild(node);  
  }

  /** call this function to render the off screen scene.
  If no off screen nodes (RTT) are supplied than nothing is done  
  */
  virtual void renderOffScreen( ) {
if (_done || offScreenNodes-getNumChildren() == 0) return;
  
osg::Node* origNode = _camera-getChild(0);
_camera-setChild(0,offScreenNodes);
//printf(before offscreen\n);
offScreenRenderingTraversals();
//printf(after offscreen\n);
_camera-setChild(0,origNode);
  }

protected:


  virtual void offScreenRenderingTraversals() {
  
/*** This is copied from ViewerBase::renderingTraversals() and 
 statistics and swapbuffer and so on are removed.   
*/
  
if (_done) return;
  
offScreenNodes-getBound();
  
Contexts contexts;
getContexts(contexts);
  
Cameras cameras;
getCameras(cameras);
  
Contexts::iterator itr;
  
bool doneMakeCurrentInThisThread = false;
  
if (_endDynamicDrawBlock.valid())
  {
_endDynamicDrawBlock-reset();
  }
  
// dispatch the rendering threads
if (_startRenderingBarrier.valid()) _startRenderingBarrier-block();
  
// reset any double buffer graphics objects
for(Cameras::iterator camItr = cameras.begin();
camItr != cameras.end();
++camItr)
  {
osg::Camera* camera = *camItr;
osgViewer::Renderer* renderer = dynamic_castosgViewer::Renderer*(camera-getRenderer());
if (renderer)
  {
if (!renderer-getGraphicsThreadDoesCull()  !(camera-getCameraThread()))
  {
renderer-cull();
  }
  }
  
  }
  
for(itr = contexts.begin();
itr != contexts.end();
++itr)
  {
if (_done) return;
if (!((*itr)-getGraphicsThread())  (*itr)-valid())
  {
doneMakeCurrentInThisThread = true; 
makeCurrent(*itr);
(*itr)-runOperations();
  }
  }

// osg::notify(osg::NOTICE)Joing _endRenderingDispatchBarrier block _endRenderingDispatchBarrier.get()std::endl;

// wait till the rendering dispatch is done.
if (_endRenderingDispatchBarrier.valid()) _endRenderingDispatchBarrier-block();

// wait till the dynamic draw is 

Re: [osg-users] 2.8.3 release likely, need community assistance

2010-03-18 Thread PCJohn
Hi Paul -- Confirming: Inventor plugin works very well. However, I found 
out that FindInventor.cmake is very poor and very old - it is not 
capable to find new version of required libraries for the plugin, 
particularly Coin3. Attaching new version that may be already included 
in OSG 2.9.6.

John

Paul Martz wrote:

PCJohn wrote:
Is it possible to include plugins? I am particularly interested in 
updated Inventor plugin.

John


Hi John -- I've merged the latest Inventor plugin onto the 2.8 branch. 
Can you test, please? I don't have the dependencies, so don't build 
this plugin.

   -Paul


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
#
# Find Open Inventor
#
# This module defines:
#  INVENTOR_FOUND, if false, do not try to link against Inventor.
#  INVENTOR_INCLUDE_DIR, where to find headers.
#  INVENTOR_LIBRARY, the library to link against.
#  INVENTOR_LIBRARY_DEBUG, the debug library to link against.
#  INVENTOR_SOWIN_LIBRARY, the SoWin library - window binding library for 
Inventor
#  INVENTOR_SOWIN_LIBRARY, the SoWin debug library
#  INVENTOR_SOXT_LIBRARY, the SoXt library - window binding library for Inventor
#  INVENTOR_SOXT_LIBRARY, the SoXt debug library
#


#
#  Inventor
#
#  notes:
#  - Coin is honored over SGI Inventor
#  - Coin is detected by coin-config script, COINDIR environment variable,
#and finally standard system locations are searched
#  - SGI Inventor is searched at standard system locations only
#

# coin-config tells much of Coin instalation (if present)
execute_process (COMMAND coin-config --prefix
 OUTPUT_VARIABLE COIN_PREFIX
 OUTPUT_STRIP_TRAILING_WHITESPACE)

# try to find Inventor includes (priority paths)
FIND_PATH(INVENTOR_INCLUDE_DIR Inventor/So.h
${COIN_PREFIX}/include
$ENV{COINDIR}/include
NO_DEFAULT_PATH
)

# try to find Inventor includes (regular paths)
FIND_PATH(INVENTOR_INCLUDE_DIR Inventor/So.h
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
)

# default Inventor lib search paths
SET(INVENTOR_LIB_SEARCH_PATH
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
)

# try to find Coin release lib (priority paths)
FIND_LIBRARY(INVENTOR_LIBRARY_RELEASE
NAMES coin5 coin4 coin3 coin2 coin1 Coin
PATHS ${COIN_PREFIX}/lib
  $ENV{COINDIR}/lib
NO_DEFAULT_PATH
)

# try to find Coin release lib (regular paths)
FIND_LIBRARY(INVENTOR_LIBRARY_RELEASE
NAMES coin5 coin4 coin3 coin2 coin1 Coin
PATHS ${INVENTOR_LIB_SEARCH_PATH}
)

# try to find SGI Inventor lib
FIND_LIBRARY(INVENTOR_LIBRARY_RELEASE
NAMES Inventor
PATHS ${INVENTOR_LIB_SEARCH_PATH}
)

# try to find Coin debug lib (priority paths)
FIND_LIBRARY(INVENTOR_LIBRARY_DEBUG
NAMES coin5d coin4d coin3d coin2d coin1d
PATHS ${COIN_PREFIX}/lib
  $ENV{COINDIR}/lib
NO_DEFAULT_PATH
)

# try to find Coin debug lib (regular paths)
FIND_LIBRARY(INVENTOR_LIBRARY_DEBUG
NAMES coin5d coin4d coin3d coin2d coin1d
PATHS ${INVENTOR_LIB_SEARCH_PATH}
)

# set release to debug if only debug found
IF(NOT INVENTOR_LIBRARY_RELEASE AND INVENTOR_LIBRARY_DEBUG)
  SET(INVENTOR_LIBRARY_RELEASE ${INVENTOR_LIBRARY_DEBUG})
ENDIF(NOT INVENTOR_LIBRARY_RELEASE AND INVENTOR_LIBRARY_DEBUG)

# set debug to release (if only release found)
IF(NOT INVENTOR_LIBRARY_DEBUG AND INVENTOR_LIBRARY_RELEASE)
  SET(INVENTOR_LIBRARY_DEBUG ${INVENTOR_LIBRARY_RELEASE})
ENDIF(NOT INVENTOR_LIBRARY_DEBUG AND INVENTOR_LIBRARY_RELEASE)

# INVENTOR_LIBRARY
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
  SET(INVENTOR_LIBRARY
  optimized ${INVENTOR_LIBRARY_RELEASE}
  debug ${INVENTOR_LIBRARY_DEBUG})
ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
  SET(INVENTOR_LIBRARY
  ${INVENTOR_LIBRARY_RELEASE})
ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)

# set INVENTOR_FOUND appropriately
SET(INVENTOR_FOUND NO)
IF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)
SET(INVENTOR_FOUND YES)
ENDIF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)


#
#  SoWin
#
# notes: SoWin is searched by COINDIR environment variable
#(as expected to be located at Windows platform)

# try to find SoWin lib (priority paths)
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY
NAMES sowin1
PATHS $ENV{COINDIR}/lib
NO_DEFAULT_PATH
)

# try to find SoWin lib (regular paths)
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY
NAMES sowin1
PATHS ${INVENTOR_LIB_SEARCH_PATH}
)

# try to find SoWin debug lib (priority paths)
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY_DEBUG
NAMES sowin1d
PATHS $ENV{COINDIR}/lib
NO_DEFAULT_PATH
)

# try to find SoWin debug lib (regular paths)
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY_DEBUG
NAMES sowin1d
PATHS ${INVENTOR_LIB_SEARCH_PATH}
)

# SoWin debug library defaults to non-debug lib
IF(NOT INVENTOR_SOWIN_LIBRARY_DEBUG)

[osg-users] Why I reveive less email these days

2010-03-18 Thread ijustfu
Dear All,
  I find during the passed several day, I received less emails than before. 
Is there any problem?
Regards


2010-03-18 



ijustfu 



发件人: Georg Martius 
发送时间: 2010-03-18  18:36:23 
收件人: osg-users@lists.openscenegraph.org 
抄送: 
主题: [?? Probable Spam] Re: [osg-users] Render to Texture with independent 
framerate(Solution) 
 
Hi folks,
I would like to post my solution to the problem of rendering to a texture 
independently on the framerate of the viewer, the code is attached.
My solution is to derived a Viewer from osgViewer::Viewer, added a custom 
offScreenRender() function mimicking frame() and (offScreen)renderTraversal() 
function without statistics and swapbuffer. 
In the offScreenRender() function I exchange the child of the main camera 
 by the off screen rendering node containing only the RTT cameras and switch 
it back afterwards. This works great except that the shadows do not work 
correctly in the RTT camera. It seems that the light position is wrongly 
detected, which is done in the cull traversal as far as I could understand 
from looking at the code. How do I perform this properly in the 
offScreenRenderTraversal()  function?
Cheers,
Georg
___
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] Mac Serializer Compile Error

2010-03-18 Thread Martins Innus

Wang Rui,

Looking at gl.h under the different SDK's here are the typedefs:

10.4 : long
10.5 : int
10.6 : int

So I'm not sure what that means in terms of being able to support 
different types with the serializer.


Martins

On 3/17/2010 11:15 PM, Wang Rui wrote:

Hi Martins,

I have no experience in Mac. But it seems that type definition of
GLint changes to some other types in your system. In most other cases,
we have:

typedef int GLint;

in the gl.h header. And an ADD_INT_SERIALIZER is workable with it.

Maybe we should have more tests on 64bit systems and try to find out
if an independent ADD_GLINT_SERIALIZER was required to keep compatible
on different platforms.

Wang Rui


2010/3/18 Martins Innusmin...@ccr.buffalo.edu:

Hello,

I get the following 2 errors when trying to compile the latest svn on a Mac
running 10.6 but using the 10.4 SDK.  This compiles fine using the 10.6 SDK
with gcc-4.2, but since the 10.4 SDK requires gcc-4.0, I assume its a
compiler quirk.  Any suggestions on how to get around it?

/util/src/osgsvn/src/osgWrappers/serializers/osg/LineStipple.cpp: In
function 'void wrapper_propfunc_LineStipple(osgDB::ObjectWrapper*)':
/util/src/osgsvn/src/osgWrappers/serializers/osg/LineStipple.cpp:11: error:
no matching function for call to 'osgDB::PropByValSerializerMyClass,
int::PropByValSerializer(const char [7], int, GLint
(osg::LineStipple::*)()const, void (osg::LineStipple::*)(GLint))'
/util/src/osgsvn/include/osgDB/Serializer:205: note: candidates are:
osgDB::PropByValSerializerC, P::PropByValSerializer(const char*, P, P
(C::*)()const, void (C::*)(P), bool) [with C = MyClass, P = int]
/util/src/osgsvn/include/osgDB/Serializer:199: note:
osgDB::PropByValSerializerMyClass, int::PropByValSerializer(const
osgDB::PropByValSerializerMyClass, int)

/util/src/osgsvn/src/osgWrappers/serializers/osg/Texture.cpp: In function
'void wrapper_propfunc_Texture(osgDB::ObjectWrapper*)':
/util/src/osgsvn/src/osgWrappers/serializers/osg/Texture.cpp:89: error: no
matching function for call to 'osgDB::PropByValSerializerMyClass,
int::PropByValSerializer(const char [12], int, GLint
(osg::Texture::*)()const, void (osg::Texture::*)(GLint))'
/util/src/osgsvn/include/osgDB/Serializer:205: note: candidates are:
osgDB::PropByValSerializerC, P::PropByValSerializer(const char*, P, P
(C::*)()const, void (C::*)(P), bool) [with C = MyClass, P = int]
/util/src/osgsvn/include/osgDB/Serializer:199: note:
osgDB::PropByValSerializerMyClass, int::PropByValSerializer(const
osgDB::PropByValSerializerMyClass, int)


Thanks

Martins
___
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] Rendering two scenes at once?

2010-03-18 Thread Adrian Lindberg
Okay, first off, what I wish to do I know I can do with FBO and off-screen 
rendering but at the moment it is not how I wish to conduct my execution. In 
standard OGL what I wish to do is easy. So how do I translate it to OSG? 
Consider the following:

(1) I wish to render my scene (with my root node) to the screen as usual
(2) I wish to clear the depth buffer only
(3) I wish to render a new scene to the screen (with the same camera movement, 
possibly the same or an identical camera)

Kind of like having multiple rendering planes.

Since I don't have control over when things are rendered I guess it would be 
easier to create a second camera which renders after the first one (setting the 
ClearMask) and having my second scene for the second camera.

I'm a bit lost as how to do this though. Currently using 2.9.6 and the default 
osgViewer. Anyone willing to lend me a helping hand?

Cheers,
Adrian

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





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


Re: [osg-users] [osgPlugins] iv plugin with coin4 from svn

2010-03-18 Thread PCJohn

j...@dudell:/data$ osgviewerd cube.iv
osgDB::ReaderWriterIV::readNode() Reading file cube.iv
osgDB::ReaderWriterIV::readNode() File cube.iv loaded successfully.
j...@dudell:/data$

I see no problem with the model - it is loads and renders without any 
problem on my OSG 2.8.2 and Coin 3

John


Michele Fiorentino wrote:

Hi,

this is the simple model i could find.. and gives assert!
the same eror from vrml and more complex files...

cube.iv

Code:
#Inventor V2.1 ascii


DEF _CUBE_SEP Separator {

   Cube {
width 0.1
height 0.1
depth 0.1
}

}






Code:
C:\dev\external_libs\OSG-dataosgviewerglutd cube.iv
osgDB::ReaderWriterIV::readNode() Reading file cube.iv
Assertion failed: unit  PRIVATE(this)-unitdata.getLength(), file ..\..\src\ele
ments\SoMultiTextureCoordinateElement.cpp, line 435







Thank you!

Cheers,
Michele

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





___
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] Rendering two scenes at once?

2010-03-18 Thread Jean-Sébastien Guay

Hi Adrian,


Since I don't have control over when things are rendered I guess it would be 
easier to create a second camera which renders after the first one (setting the 
ClearMask) and having my second scene for the second camera.


From what you describe, yes, that's exactly how you would do it.


RF (so it renders from the same position as your master camera with an identity 
viewI'm a bit lost as how to do this though. Currently using 2.9.6 and the 
default osgViewer. Anyone willing to lend me a helping hand?


You do it exactly how you've described it above... Create an 
osg::Camera, add your second scene as child of it, set its RenderOrder 
to POST_RENDER, its ClearMask to GL_DEPTH_BUFFER_BIT and its 
ReferenceFrame to RELATIVE_ matrix) and add it as a child of your master 
camera.


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] osgText quality issue

2010-03-18 Thread Robert Osfield
Hi All,

I've been reviewing the texcoord maths in Font.cpp and Text.cpp and
believe that the sizeAdjustment should actually be 0.0, and the we
need to also add CLAMP_TO_EDGE.   I have been testing using the
osgfont example and this change results in better looking text, inline
with Farshid's result.

   osgfont fonts/arial.ttf  10 15 20 25 30 40 80

An svn update will get these changes.

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


[osg-users] Increase image-quality - increase 'Draw' time

2010-03-18 Thread Rick Appleton
Hi everyone,

We were just doing some performance testing when we noticed that increasing the 
image quality in the NVidia control panel (adding anisotropic filtering, 
anti-aliasing and multi-sampling) makes the time spent in the 'Draw' section 
increase greatly. This wasn't something we were expecting. The time in GPU also 
goes up, but that is to be expected.

We're assuming the extra time is spent in the driver somewhere, but we have no 
clue why.

Would anyone dare to hazard a guess?

Thank you!

Cheers,
Rick

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





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


Re: [osg-users] Increase image-quality - increase 'Draw' time

2010-03-18 Thread Robert Osfield
Hi Rick,

The way that OpenGL drivers work is that there is an OpenGL FIFO per
graphics context, your application fills the FIFO with data and OpenGL
tokens, and then the driver sucks the tail of the FIFO in batches and
fires it off GPU.  This fifo decouples the application thread from the
GPU, so in effect the CPU and the GPU can largely work in a parallel.

However, if OpenGL FIFO fills up because the rate at which you are
pushing data into it exceeds the rate at which it's been emptied then
the application thread will stall and the draw dispatch times will go
up.  Sometimes you can see some rather no linear draw dispatch times
due to small changes in load on the GPU suddenly causing the app to
stall.  Even when this happens there is still a bit of leeway before
you start dropping frames.

Another reason for seeing large draw dispatch times is the presence of
OpenGL operations that require getting data back from OpenGL (such
glGet or glReadPixels), because this forces OpenGL to push all the
data ahead of it down to the GPU, read back the result and then
finally get this back to application thread.  This roundtrip is very
expensive and should be avoided where possible.

Robert.

On Thu, Mar 18, 2010 at 3:18 PM, Rick Appleton
rick.apple...@altenpts.nl wrote:
 Hi everyone,

 We were just doing some performance testing when we noticed that increasing 
 the image quality in the NVidia control panel (adding anisotropic filtering, 
 anti-aliasing and multi-sampling) makes the time spent in the 'Draw' section 
 increase greatly. This wasn't something we were expecting. The time in GPU 
 also goes up, but that is to be expected.

 We're assuming the extra time is spent in the driver somewhere, but we have 
 no clue why.

 Would anyone dare to hazard a guess?

 Thank you!

 Cheers,
 Rick

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





 ___
 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] bluring model edges

2010-03-18 Thread Allen Saucier
Guy, I have tried this code snippet, too, and I am not getting any results.  
None.  No changes in the look of my model or a constructed pyramid.  Could you 
perhaps tell me what I am missing?

I have attached my blend app, which is a direct copy of the blendequation app 
from the OSG website.  I commented out the blend equation code  dropped this 
snippet in.

Thanks.


Guy wrote:
 
 For example:
 
   osg::StateSet * stateset = geode-getOrCreateStateSet();
   stateset-setMode(GL_POLYGON_SMOOTH, osg::StateAttribute::  ON);
 
 
   osg::BlendFunc *fn = new osg::BlendFunc();
   fn-setFunction(osg::BlendFunc::SRC_ALPHA,  
   osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
 
   
   stateset-setAttributeAndModes(fn,
   osg::StateAttribute:: ON);
   stateset-setMode(GL_BLEND, osg::StateAttribute:: ON);
   stateset-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
 
 


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




Attachments: 
http://forum.openscenegraph.org//files/main_blendexample_210.cpp


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


[osg-users] Load balancing on multiple cores

2010-03-18 Thread Jesse Stimpson
Hello,

OSG is a great product and I hope I can tap into the great support you folks
offer!

I have an Intel Core 2 Duo processor, and I'm running OSG 2.8.2 on Windows
XP. And I have VSync turned off, by the way.

When I run osgviewerd.exe (debug) I notice that the stats reported are very
erratic. That is, the graphs displaying the Event, Update, Cull, Draw
traversals are not flat line but go up and down unpredictably. I get ~100
fps. If I go into the Windows Task Manager and set the affinity of the
osgviewerd.exe process to a single core, then the stats flat line and my
framerate goes way up (~160 fps).

Running osgviewer.exe (release) with affinity in the Task Manager to both
cores yields flat line graphs and frame rate ~200 fps.

Obviously, 100 fps is more than enough, but that is for a simple scene. In
our application, which embeds OSG into an MFC window, I see a framerate of
about 20 fps in debug. My colleague, who has a quad core machine, sees about
3 fps in debug! Is there something we're not understanding correctly about
how to load balance OSG across multiple cores? We don't want to limit our
application to one core because then we obviously lose parallel processing
(database pager, etc). I really appreciate any help you guys can offer.

Thanks, and keep up the great work!

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


Re: [osg-users] Custom file type loading?

2010-03-18 Thread Chris 'Xenon' Hanson
On 3/18/2010 2:06 AM, Peter Bear wrote:
 Hi, I was wondering if anyone would be able to point me in the right 
 direction as to how to add support to load custom file types not currently 
 supported by OSG. I've been looking for a while and haven't turned much up 
 that appears to be of use.

  There have been a couple of ggod answers so far, but if you tell us what it 
is you're
trying to load, you might get even better info.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
There is no Truth. There is only Perception. To Perceive is to Exist. - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] MultiThreaded Culling

2010-03-18 Thread Dan R
Hi, could someone tell me where the culling takes place if
multithreading is set to DrawThreadPerContext? I can't seem to trace
it in the code. It seems like it should happen in the runOperations
function of GraphicsContext when it goes through the camera list, but
it seems like that just calls the draw method.

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


Re: [osg-users] FBX plugin sets material diffuse color alpha to 0?

2010-03-18 Thread Paul Martz

Hi J-S --

It seems like the objects would only be invisible if blending is on. If 
blending is off, then the alpha would essentially be ignored and 
everything would be visible. I know osgviewer doesn't enable blending, 
and I suspect osganimationviewer doesn't either. That means blending 
must be enabled in your model. If that's the case, then it seems like 
it's being rendered correctly -- invisible.


However, I do agree there might be some confusion in how the fbx plugin 
is setting the alpha value.


I have an fbx file that I've been doing some work with lately. It 
renders visible, and Material diffuseColor always has alpha 1.0. So I 
suspect there is some issue with how your model was created.

   -Paul




Jean-Sébastien Guay wrote:

Hi all,

I've been looking at the FBX plugin over the last few days, and it seems 
to me that it sets all material diffuseColor to have 0 alpha... So the 
loaded objects aren't visible. This happens both when loading an FBX 
file I created myself in Softimage XSI Mod Tool 7.5, and when loading an 
FBX file downloaded from the net, for example:


http://creators.xna.com/en-US/sample/skinnedmodel

The zip file SkinningSample.zip from the above page contains a dude.fbx 
file in the directory SkinningSample\SkinningSample\Content. Loading 
this in either osgviewer or osganimationviewer (recent SVN, updated and 
compiled yesterday), you won't see anything. If I osgconv it to .osg, I 
can see that indeed, all Materials have the diffuseColor alpha set to 0. 
If I just set it to 1 and load that .osg file, everything is visible as 
it should.


I can see this code in the fbx plugin:

  pOsgMat-setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4(
  static_castfloat(color[0] * factor),
  static_castfloat(color[1] * factor),
  static_castfloat(color[2] * factor),
  static_castfloat(1.0 -
 pFbxLambert-GetTransparencyFactor().Get(;

Why is it done that way? Are the files I've been using invalid (i.e. 
setting transparency as if it was opacity or vice versa)? It seems weird 
to me, since as I said I've confirmed this with both models created in 
XSI and a model I downloaded from the XNA samples. What models has this 
been tested with?


BTW, I was using XSI 7.5 Mod Tool with CrossWalk 4.1. Not sure what the 
sample model I downloaded was created with.


Thanks in advance,

J-S

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


Re: [osg-users] Load balancing on multiple cores

2010-03-18 Thread Jean-Sébastien Guay

Hi Jesse,

I'll let others reply specifically about the threading, but I wanted to 
react to one part of your post:



When I run osgviewerd.exe (debug) I notice that the stats reported are
very erratic.


Never do any performance testing in debug, especially using Visual C++! 
An erratic frame rate and stats is exactly what I have come to expect in 
debug. Visual C++ and its iterator and other debugging facilities really 
get in the way and make the stats useless.


If you get the performance you want in release, that's all that matters. 
You won't ship debug binaries to your clients will you?


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


[osg-users] helps! using mingw compile vpb, link problem.

2010-03-18 Thread zouwan
I have use vs 2008 to compile OSG and VPB from latest SVN , everything is
OK. 

 

But When I use mingw gcc 3.4.4, OSG is OK, VPB has some link error. Many
thanks!

 

 

error message:

 

-*- mode: compilation; default-directory:
e:/code/OpenSceneGraph/build_vpb_mingw/src/vpb/ -*-

Compilation started at Fri Mar 19 00:05:05

 

make -k

-- Configuring done

-- Generating done

-- Build files have been written to: E:/code/OpenSceneGraph/build_vpb_mingw

Linking CXX shared library ..\..\lib\libvpb.dll

Creating library file: ..\..\lib\libvpb.dll.a

CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced5unrefEv[osg::Refe
renced::unref() const]+0x10):BuildLog.cpp: undefined reference to
`_imp___ZN11OpenThreads6AtomicmmEv'

CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced3refEv[osg::Refere
nced::ref() const]+0x10):BuildLog.cpp: undefined reference to
`_imp___ZN11OpenThreads6AtomicppEv'

CMakeFiles\vpb.dir\System.obj(.text$_ZNK3osg10Referenced14referenceCountEv[o
sg::Referenced::referenceCount() const]+0x10):System.cpp: undefined
reference to `_imp___ZNK11OpenThreads6AtomiccvjEv'

collect2: ld returned 1 exit status

make[2]: *** [lib/libvpb.dll] Error 1

make[2]: Target `src/vpb/CMakeFiles/vpb.dir/build' not remade because of
errors.

make[1]: *** [src/vpb/CMakeFiles/vpb.dir/all] Error 2

make[1]: Target `src/vpb/all' not remade because of errors.

make: *** [all] Error 2

make: Target `default_target' not remade because of errors.

 

Compilation exited abnormally with code 2 at Fri Mar 19 00:05:20

 

 

 



Zou wan

Spatial Infomation Technology Lab
Institute of Computing Technology
Chinese Academy of Sciences

Beijing, 100190, China

 

 mailto:zou...@ict.ac.cn zou...@gmail.com

 

-- 



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


Re: [osg-users] Increase image-quality - increase 'Draw' time

2010-03-18 Thread Brian ...

Rick,

The draw/gpu time is going up because you're making it do more work. Google is 
your friend, look up the terms to get a basic understanding what they are.

Brian

 From: rick.apple...@altenpts.nl
 Date: Thu, 18 Mar 2010 15:18:07 +
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Increase image-quality - increase 'Draw' time
 
 Hi everyone,
 
 We were just doing some performance testing when we noticed that increasing 
 the image quality in the NVidia control panel (adding anisotropic filtering, 
 anti-aliasing and multi-sampling) makes the time spent in the 'Draw' section 
 increase greatly. This wasn't something we were expecting. The time in GPU 
 also goes up, but that is to be expected.
 
 We're assuming the extra time is spent in the driver somewhere, but we have 
 no clue why.
 
 Would anyone dare to hazard a guess?
 
 Thank you!
 
 Cheers,
 Rick
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=25798#25798
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850553/direct/01/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MultiThreaded Culling

2010-03-18 Thread Robert Osfield
Hi Dan,

When you use DrawThreadPerContext the viewers main frame loop does the
culling for the viewers cameras.

Robert.

On Thu, Mar 18, 2010 at 4:10 PM, Dan R nice...@gmail.com wrote:
 Hi, could someone tell me where the culling takes place if
 multithreading is set to DrawThreadPerContext? I can't seem to trace
 it in the code. It seems like it should happen in the runOperations
 function of GraphicsContext when it goes through the camera list, but
 it seems like that just calls the draw method.

 Thanks,
 Dan
 ___
 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] 2.8.3 release likely, need community assistance

2010-03-18 Thread Paul Martz
Thanks for testing, John. Good catch. I just merged r11033 from trunk, 
so the FindInventor.cmake should now be up to date on the 2.8 branch.

   -Paul



PCJohn wrote:
Hi Paul -- Confirming: Inventor plugin works very well. However, I found 
out that FindInventor.cmake is very poor and very old - it is not 
capable to find new version of required libraries for the plugin, 
particularly Coin3. Attaching new version that may be already included 
in OSG 2.9.6.

John

Paul Martz wrote:

PCJohn wrote:
Is it possible to include plugins? I am particularly interested in 
updated Inventor plugin.

John


Hi John -- I've merged the latest Inventor plugin onto the 2.8 branch. 
Can you test, please? I don't have the dependencies, so don't build 
this plugin.

   -Paul


___
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] Load balancing on multiple cores

2010-03-18 Thread Jesse Stimpson

Hi J-S,
Never do any performance testing in debug, especially using Visual 
C++! An erratic frame rate and stats is exactly what I have come to 
expect in debug. Visual C++ and its iterator and other debugging 
facilities really get in the way and make the stats useless.


If you get the performance you want in release, that's all that 
matters. You won't ship debug binaries to your clients will you?
You're correct. We never will be shipping debug binaries. However, it's 
come to the point where the debug performance is hindering our 
development. My colleague with the quad core desktop sees ~3 fps, and 
it's decreasing his productivity.


I'd be willing to live with having to go into the task manager and set 
the processor affinity if we are using the debug build, or setting it 
programmatically for debug builds, but if there's a root cause that can 
be fixed, I'd rather do that. That way, the debug and release builds 
stay as similar as possible and testing in one is likely to produce the 
same results as the other.


Having said that, your insight on the STL debugging facilities is very 
helpful. Thanks for your reply.


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


Re: [osg-users] helps! using mingw compile vpb, link problem.

2010-03-18 Thread Robert Osfield
HI Zou wan,

OSG and VPB compile just fine with gcc just fine under Linux and other
OS's, my guess there is a bug in Mingw's implementation of gcc.

I don't personally use Windows, perhaps others might have some
experience with using gcc and Mingw and VPB/OSG. If not I'd suggest
trying to update Mingw to see if it fixes the problem.

Robert.

On Thu, Mar 18, 2010 at 4:27 PM, zouwan zou...@gmail.com wrote:
 I have use vs 2008 to compile OSG and VPB from latest SVN , everything is
 OK.



 But When I use mingw gcc 3.4.4, OSG is OK, VPB has some link error. Many
 thanks!





 error message:



 -*- mode: compilation; default-directory:
 e:/code/OpenSceneGraph/build_vpb_mingw/src/vpb/ -*-

 Compilation started at Fri Mar 19 00:05:05



 make -k

 -- Configuring done

 -- Generating done

 -- Build files have been written to: E:/code/OpenSceneGraph/build_vpb_mingw

 Linking CXX shared library ..\..\lib\libvpb.dll

 Creating library file: ..\..\lib\libvpb.dll.a

 CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced5unrefEv[osg::Referenced::unref()
 const]+0x10):BuildLog.cpp: undefined reference to
 `_imp___ZN11OpenThreads6AtomicmmEv'

 CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced3refEv[osg::Referenced::ref()
 const]+0x10):BuildLog.cpp: undefined reference to
 `_imp___ZN11OpenThreads6AtomicppEv'

 CMakeFiles\vpb.dir\System.obj(.text$_ZNK3osg10Referenced14referenceCountEv[osg::Referenced::referenceCount()
 const]+0x10):System.cpp: undefined reference to
 `_imp___ZNK11OpenThreads6AtomiccvjEv'

 collect2: ld returned 1 exit status

 make[2]: *** [lib/libvpb.dll] Error 1

 make[2]: Target `src/vpb/CMakeFiles/vpb.dir/build' not remade because of
 errors.

 make[1]: *** [src/vpb/CMakeFiles/vpb.dir/all] Error 2

 make[1]: Target `src/vpb/all' not remade because of errors.

 make: *** [all] Error 2

 make: Target `default_target' not remade because of errors.



 Compilation exited abnormally with code 2 at Fri Mar 19 00:05:20







 

 Zou wan

 Spatial Infomation Technology Lab
 Institute of Computing Technology
 Chinese Academy of Sciences

 Beijing, 100190, China



 zou...@gmail.com



 --


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


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


[osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jean-Sébastien Guay

Hi all,

I have been checking out osgAnimation in the past few days, and one 
thing that hasn't been clear to me is whether it supports animation 
mixing or blending, and how. For example, if a character goes from 
standing to walking, then walking to running, can I set it up so that 
the transition between these animations is smooth? Supposing I have a 
walk cycle and a run cycle animations set up correctly of course.


Next question, where could I find an example of this (assets and 
possibly code - though with a good explanation I can work the code out 
myself I'm sure)? I've found one walking character here:


http://creators.xna.com/en-US/sample/skinnedmodel

but he has only a walk cycle. Could anyone point me to an example model 
that would have multiple animations set up so I can look at how it's 
been done and try it out? Preferably in Collada or FBX format.


On the subject of models, does anyone know of any place (web site) where 
I could buy skinned and animated models of characters? I presume such a 
resource exists, but I wanted to know if people had a specific one to 
recommend.


Finally, osganimationhardware nathan.osg is giving me problems. It 
crashes after showing the first frame in State::setVertexAttribPointer() 
called from RigGeometry::drawImplementation() - stack trace below.


I'd really like to be able to see the hardware skinning. With the 
character at the link above, osganimationviewer (software skinning I 
presume) runs well but the update time is close to 16ms per frame on my 
pretty recent machine. I'm thinking if that time is spent updating the 
vertex arrays for the skinning, there might be a chance the hardware 
skinning would reduce that? Obviously using a lighter mesh would too, 
and I won't be using that exact mesh in our project, but anything that 
can help us maintain a good frame rate is welcome.


Thanks in advance,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/


Stack trace for crash when osganimationhardware nathan.osg

 	msvcp90d.dll!std::_Debug_message(const wchar_t * message=0x660de5c0, 
const wchar_t * file=0x660de608, unsigned int line=764)  Line 24	C++


osg66-osgd.dll!std::vectorosg::GLBufferObject::BufferEntry,std::allocatorosg::GLBufferObject::BufferEntry 
::operator[](unsigned int _Pos=61)  Line 764 + 0x17 bytes	C++
 	osg66-osgd.dll!osg::GLBufferObject::getOffset(unsigned int i=61) 
Line 209 + 0x1d bytes	C++
	osg66-osgd.dll!osg::State::setVertexAttribPointer(unsigned int 
unit=11, const osg::Array * array=0x058dbaf0, unsigned char 
normalized=0)  Line 1153 + 0x11 bytes	C++
 	osg66-osgd.dll!osg::Geometry::drawImplementation(osg::RenderInfo  
renderInfo={...})  Line 1046	C++


osg66-osgAnimationd.dll!osgAnimation::RigGeometry::drawImplementation(osg::RenderInfo 
 renderInfo={...})  Line 94 + 0xf bytes	C++
 	osg66-osgd.dll!osg::Drawable::draw(osg::RenderInfo  
renderInfo={...})  Line 907 + 0x13 bytes	C++
 	osg66-osgUtild.dll!osgUtil::RenderLeaf::render(osg::RenderInfo  
renderInfo={...}, osgUtil::RenderLeaf * previous=0x09a567e8)  Line 63 + 
0x19 bytes	C++


osg66-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo  
renderInfo={...}, osgUtil::RenderLeaf *  previous=0x09a567e8)  Line 475 
+ 0x19 bytes	C++


osg66-osgUtild.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo 
 renderInfo={...}, osgUtil::RenderLeaf *  previous=0x09a567e8)  Line 
1353	C++
 	osg66-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo  
renderInfo={...}, osgUtil::RenderLeaf *  previous=0x09a567e8)  Line 420 
+ 0x17 bytes	C++
 	osg66-osgUtild.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo  
renderInfo={...}, osgUtil::RenderLeaf *  previous=0x09a567e8, bool  
doCopyTexture=false)  Line 925	C++
 	osg66-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo  
renderInfo={...}, osgUtil::RenderLeaf *  previous=0x09a567e8)  Line 
1192 + 0x1b bytes	C++

osg66-osgUtild.dll!osgUtil::SceneView::draw()  Line 1426 + 0x37 bytes   
C++
 	osg66-osgViewerd.dll!osgViewer::Renderer::draw()  Line 491 + 0xf 
bytes	C++


osg66-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext * 
context=0x00262998)  Line 734 + 0xf bytes	C++
 	osg66-osgd.dll!osg::GraphicsContext::runOperations()  Line 750 + 
0x33 bytes	C++
 	osg66-osgd.dll!osg::RunOperations::operator()(osg::GraphicsContext * 
context=0x00262998)  Line 138	C++
 	osg66-osgd.dll!osg::GraphicsOperation::operator()(osg::Object * 
object=0x00262998)  Line 53 + 0x19 bytes	C++

osg66-osgd.dll!osg::OperationThread::run()  Line 413 + 0x26 bytes   
C++
osg66-osgd.dll!osg::GraphicsThread::run()  Line 41  C++

ot12-OpenThreadsd.dll!OpenThreads::ThreadPrivateActions::StartThread(void * 
data=0x05899904)  Line 113 + 0xf bytes	C++

msvcr90d.dll!_callthreadstartex()  Line 348 + 0xf bytes C

Re: [osg-users] Load balancing on multiple cores

2010-03-18 Thread Robert Osfield
Hi Jesse,

On Thu, Mar 18, 2010 at 4:36 PM, Jesse Stimpson
jesse.stimp...@gmail.com wrote:
 You're correct. We never will be shipping debug binaries. However, it's come
 to the point where the debug performance is hindering our development. My
 colleague with the quad core desktop sees ~3 fps, and it's decreasing his
 productivity.

We'll if VisualStudio's debug performance is too bad to develop with
routinely avoid using debug unless you actually need to do debugging,
or pick a better compiler or see if you can tweak compiler options to
avoid the pitfalls of VisualStudio.

Personally in dev work I just use an optimized build, then perhaps a
couple of times a month I might come across an issue that really needs
a stack trace or a putting a break point into to monitor something and
I will do a debug build.  A will often go several weeks on the trot
without ever using debug.  This is even under Linux where the gcc
compiler can do debug builds without totally killing performance.

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


Re: [osg-users] FBX plugin sets material diffuse color alpha to 0?

2010-03-18 Thread Jean-Sébastien Guay

Hi Paul,


It seems like the objects would only be invisible if blending is on. If
blending is off, then the alpha would essentially be ignored and
everything would be visible. I know osgviewer doesn't enable blending,
and I suspect osganimationviewer doesn't either. That means blending
must be enabled in your model. If that's the case, then it seems like
it's being rendered correctly -- invisible.


You're right, blending is on, and that seems to come from the fact that 
the fbx plugin thinks the object should be transparent when it reads it, 
and adds an osg::BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) to the 
model's stateset.


So if the fbx plugin didn't think the model was transparent, it would be 
ok. Which brings us to:



However, I do agree there might be some confusion in how the fbx plugin
is setting the alpha value.

I have an fbx file that I've been doing some work with lately. It
renders visible, and Material diffuseColor always has alpha 1.0. So I
suspect there is some issue with how your model was created.


I would accept that, except for two things.

First, as I said, I've tested this both with a file I created and one I 
downloaded. I'm willing to admit I can do something wrong, but I doubt a 
model that's made by others (and used in other software) would have the 
same problem.


Second, even for the model I created myself, it's fully visible in 
XSI... Even if I export the fbx file and then re-import it, the model is 
visible. So it should be visible when read by OSG's fbx plugin, I would 
think... So I would pin the problem on the way the fbx plugin interprets 
the file, and not the file itself.


And even for the model I downloaded, it's an fbx file, and it's visible 
when I open it in XSI, but not in OSG. Check the link I gave in my first 
post if you're curious...


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] osgAnimation and animation mixing/blending

2010-03-18 Thread Cedric Pinson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jean Sebastien,

On 03/18/10 17:40, Jean-Sébastien Guay wrote:
 Hi all,

 I have been checking out osgAnimation in the past few days, and
 one thing that hasn't been clear to me is whether it supports
 animation mixing or blending, and how. For example, if a character
 goes from standing to walking, then walking to running, can I set
 it up so that the transition between these animations is smooth?
 Supposing I have a walk cycle and a run cycle animations set up
 correctly of course.

Yes it's possible but the api of BasicAnimationManager does not expose
it, the TimelineAnimationManager let you to setup stuff with more details.
Have a look to the example osganimationtimeline, and in the file
include/osgAnimation/ActionStripAnimation.

 Next question, where could I find an example of this (assets and
 possibly code - though with a good explanation I can work the code
 out myself I'm sure)? I've found one walking character here:

 http://creators.xna.com/en-US/sample/skinnedmodel

 but he has only a walk cycle. Could anyone point me to an example
 model that would have multiple animations set up so I can look at
 how it's been done and try it out? Preferably in Collada or FBX
 format.

 On the subject of models, does anyone know of any place (web site)
 where I could buy skinned and animated models of characters? I
 presume such a resource exists, but I wanted to know if people had
 a specific one to recommend.
I can't help about data, all data i used was exporter from the blender
exporter, an example of what you can do with osgAnimation is on this
live stream http://stream.pok.me/stream.ogg
You can have a look to the source code here http://hg.plopbyte.net/pokme/

 Finally, osganimationhardware nathan.osg is giving me problems. It
 crashes after showing the first frame in
 State::setVertexAttribPointer() called from
 RigGeometry::drawImplementation() - stack trace below.

 I'd really like to be able to see the hardware skinning. With the
 character at the link above, osganimationviewer (software skinning
 I presume) runs well but the update time is close to 16ms per frame
 on my pretty recent machine. I'm thinking if that time is spent
 updating the vertex arrays for the skinning, there might be a
 chance the hardware skinning would reduce that? Obviously using a
 lighter mesh would too, and I won't be using that exact mesh in our
 project, but anything that can help us maintain a good frame rate
 is welcome.
Yes hardware should improve, not that for small skinned mesh, it does
not help at all.
I will have a look at that crash this evening.

 Thanks in advance,

 J-S

Cedric

- -- 

Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuiYCEACgkQs6ZHzVQN0Ii7LwCggAwBfZGVLIAYLXZDB6gFam7R
mo4AniU1KoMgrJy7FoUZbQ1xyFerbe5J
=L0rF
-END PGP SIGNATURE-

attachment: cedric_pinson.vcf___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Load balancing on multiple cores

2010-03-18 Thread Jesse Stimpson
Hi Robert,

Thanks for the response.


 We'll if VisualStudio's debug performance is too bad to develop with
 routinely avoid using debug unless you actually need to do debugging,
 or pick a better compiler or see if you can tweak compiler options to
 avoid the pitfalls of VisualStudio.

 I do plan to try some compiler options. Although, if others have had
similar experiences, then I can reduce the amount of time I spin my wheels
so to speak.


 Personally in dev work I just use an optimized build, then perhaps a
 couple of times a month I might come across an issue that really needs
 a stack trace or a putting a break point into to monitor something and
 I will do a debug build.  A will often go several weeks on the trot
 without ever using debug.  This is even under Linux where the gcc
 compiler can do debug builds without totally killing performance.

 Unfortunately, this isn't an option for us.

I feel that we're diverging from what I think is most perplexing about what
I'm seeing. When I restrict the process to use less cores, I get increased
rendering performance. This is what leads me to believe there are some
load-balancing issues.

Also, if I have the OSG process set to both cores and I run another
single-threaded process in the background, the other process gets assigned
to one core, and OSG rendering speeds up, presumably because it is being
processed mainly on a single core.

I've been playing with the OSG threading models as well. In debug,
SingleThreaded mode seems to run the best on my machine. Is there
documentation on the implications of the threading models? If I understand
correctly, SingleThreaded means only the rendering is single threaded, and
the database pager is still a separate thread. Is this right? Are reasons we
shouldn't consider using SingleThreaded mode?

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


Re: [osg-users] OSG and vrJuggler

2010-03-18 Thread Rohit Vijay Bapat
Hi,
Lucie , VE Suite is an Application built on vrJuggler as platform . It is 
something like end user software . 
... 

Thank you!

Cheers,
Rohit

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





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


Re: [osg-users] OSG and vrJuggler

2010-03-18 Thread Rohit Vijay Bapat
Hi,Todd
Thanks for your reply . I have vr juggler configured on my cluster . And I also 
have OpenSceneGraph. But I am not perfectly able to run examples in the 
vrJuggler kit. 

I am trying to develop a simple scene using OSG and vrJuggler to run on cluster 
. Can you send a sample code for osg::AppViewer to load a simple model ? So 
that I will get some guide line..
... 

Thank you!

Cheers,
Rohit

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





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


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Cedric Pinson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/18/10 17:40, Jean-Sébastien Guay wrote:
 Hi all,

 I have been checking out osgAnimation in the past few days, and
 one thing that hasn't been clear to me is whether it supports
 animation mixing or blending, and how. For example, if a character
 goes from standing to walking, then walking to running, can I set
 it up so that the transition between these animations is smooth?
 Supposing I have a walk cycle and a run cycle animations set up
 correctly of course.

 Next question, where could I find an example of this (assets and
 possibly code - though with a good explanation I can work the code
 out myself I'm sure)? I've found one walking character here:

 http://creators.xna.com/en-US/sample/skinnedmodel

 but he has only a walk cycle. Could anyone point me to an example
 model that would have multiple animations set up so I can look at
 how it's been done and try it out? Preferably in Collada or FBX
 format.

 On the subject of models, does anyone know of any place (web site)
 where I could buy skinned and animated models of characters? I
 presume such a resource exists, but I wanted to know if people had
 a specific one to recommend.

 Finally, osganimationhardware nathan.osg is giving me problems. It
 crashes after showing the first frame in
 State::setVertexAttribPointer() called from
 RigGeometry::drawImplementation() - stack trace below.

 I'd really like to be able to see the hardware skinning. With the
 character at the link above, osganimationviewer (software skinning
 I presume) runs well but the update time is close to 16ms per frame
 on my pretty recent machine. I'm thinking if that time is spent
 updating the vertex arrays for the skinning, there might be a
 chance the hardware skinning would reduce that? Obviously using a
 lighter mesh would too, and I won't be using that exact mesh in our
 project, but anything that can help us maintain a good frame rate
 is welcome.

 Thanks in advance,

 J-S
I remember that shaders are not loaded from osg-data, so i was forced
to copy shaders directory from osg-data in the current directory i run
osganimationhardware.

Cheers,
Cedric

- -- 

Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuiaFMACgkQs6ZHzVQN0IjJ1ACfeR4OwF/6xiAXW1jmGma2QyYo
G/oAoJvoU40wrOPkHqZWytf25Ght02fL
=7bgu
-END PGP SIGNATURE-

attachment: cedric_pinson.vcf___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-03-18 Thread Jason Daly

ted morris wrote:


yeah, looked through that one a while ago. I was hoping there will be 
an osgpolytopeintersection demo out there with

some of these ideas.


I think the OSG Quick Start Guide uses a PolytopeIntersector to 
demonstrate picking.  Not exactly what you're trying to do, but it at 
least shows how to set up the intersector.  That's the only other 
example I know of.


--J

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


[osg-users] OpenFlight meshing problem

2010-03-18 Thread Guy Volckaert
I'm hoping that someone can help me with a weird problem I'm having with an 
openflight terrain I have. 

It seems that when I mesh my terrain (with Multigen Creator 2.5.1)  I can't see 
it anyore. Note that the problem only occurs when I disable lighting (i.e 
GL_LIGHTING). However, when I un-mesh the terrain (seperate faces) then it 
works correctly, regarless of the lighting state. 

I converted the *.FLT to *.OSG so that I can look at the different between the 
meshed and un-meshed version. What I discovered was that the color array in the 
meshed version contained invalid RGBA components - they do not correspond to 
the color set within Creator. The color should be (1,1,1,1) but I'm getting 
(1,0,1,0). So it's normal that I don't see the terrain because the alpha is 0. 
The green component also 0, which I can't understand as well.

For example:


Code:

  ColorBinding PER_VERTEX
  ColorArray Vec4Array 9
  {
1 0 1 0
1 0 1 0
1 0 1 0
1 0 1 0
1 0 1 0
1 0 1 0
1 0 1 0
1 0 1 0
1 0 1 0
  }




The reason why I want to use the meshed version of the terrain is to improve 
rendering performance.

We've isolated the problem in the LocalVertexPool::readRecord() function in the 
openflight plugin. It seems that the alphaIndex value extracted from the FLT 
is incorrect (see snipit below).


Code:

virtual void readRecord(RecordInputStream in, Document document)
{
[...]
if (mask  HAS_COLOR_INDEX)
{
uint32 alphaIndex = in.readUInt32(); [b]//  Bad 
alphaIndex.[/b]

int index = alphaIndex  0x00ff;
uint8 alpha = alphaIndex  24;
osg::Vec4 color = document.getColorPool()-getColor(index);
color.a() = (float)alpha/255;
vertex.setColor(color);

if (!color.valid())
{
osg::notify(osg::NOTICE)Warning: data error detected in 
LocalVertexPool::readRecord color=color.r() color.g() 
color.b() color.a()std::endl;
}
}

[...]
}




Obviously, the meshed FLT file  could ne invalid, right? So I used a different 
application (an old 3D Explorer app) to load the meshed version and it works 
correctly. 

I can't exaplin it.

I've attached a snipit of the terrain for you to look at. It contains the 
following files:

.\gr01.rgb 
.\gr01.rgb .attr
.\small_faces.flt   : unmeshed version
.\small_faces.osg
.\small_mesh.flt   : meshed version
.\small_mesh.osg

Can anyone shed some light of this problem?

Cheers,
Guy

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




Attachments: 
http://forum.openscenegraph.org//files/smallflt_129.zip


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


Re: [osg-users] osgText quality issue

2010-03-18 Thread Farshid Lashkari
Hi Robert,

I just tried the latest changes and the text looks good. Thanks!

Cheers,
Farshid

On Thu, Mar 18, 2010 at 7:42 AM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi All,

 I've been reviewing the texcoord maths in Font.cpp and Text.cpp and
 believe that the sizeAdjustment should actually be 0.0, and the we
 need to also add CLAMP_TO_EDGE.   I have been testing using the
 osgfont example and this change results in better looking text, inline
 with Farshid's result.

   osgfont fonts/arial.ttf  10 15 20 25 30 40 80

 An svn update will get these changes.

 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] [build] windows 64bit ot11-openthreadsd.dll problem

2010-03-18 Thread Chad Zeluff
Hi,

Thanks for responding.

I've kept looking into it, and now it actually appears that my problem is that 
the 64 bit osgdb_freetype plugin won't compile for me with the default CMake 
setup. I get about 20 linker errors on that one. And I've verified that that's 
why I crash, i'm missing that dll. I tried going through CMake again, 
everything with osgdb_freetype seems to be ok in CMake. Anybody else have this 
problem? Anything I have to change in CMake or visual studio project settings 
for that plugin? When I use the defaults from CMake to compile for 32 bit, 
everything is successful.

Thank you!

Cheers,
Chad

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





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


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jason Daly

Jean-Sébastien Guay wrote:

Hi all,

I have been checking out osgAnimation in the past few days, and one 
thing that hasn't been clear to me is whether it supports animation 
mixing or blending, and how. For example, if a character goes from 
standing to walking, then walking to running, can I set it up so that 
the transition between these animations is smooth? Supposing I have a 
walk cycle and a run cycle animations set up correctly of course.
  


I think Cedric answered this, but...

We don't use osgAnimation (yet), but the code to do basic animation 
blending is pretty trivial.  We just do a basic slerp or nlerp 
(normalized lerp) at each joint.  Most of the time, you don't even need 
to take joint limits into account (at least for humans) to get decent 
results.  This can get a lot fancier, of course, but we haven't had a 
need for it yet.


but he has only a walk cycle. Could anyone point me to an example model 
that would have multiple animations set up so I can look at how it's 
been done and try it out? Preferably in Collada or FBX format.
  


I've got a few Collada characters that we created, although I'm not sure 
if I'm allowed to hand them out (e-mail me privately if you're 
interested).  Again, though, I don't use osgAnimation, so I'm not sure 
if they're completely compatible.  The Collada spec is kind of flexible 
on how multiple animations are handled on a single character in the same 
document.  It seems as if it's up to the application to determine how it 
wants to interpret the library_animations hierarchy.


For our characters, we just have a set of top-level animations (walk, 
jog, run), with the actual animation curves for each joint declared 
underneath each top-level animation.


On the subject of models, does anyone know of any place (web site) where 
I could buy skinned and animated models of characters? I presume such a 
resource exists, but I wanted to know if people had a specific one to 
recommend.
  


turbosquid.com always looked impressive to me, but I can't say we've 
ever actually bought anything.



Finally, osganimationhardware nathan.osg is giving me problems. It 
crashes after showing the first frame in State::setVertexAttribPointer() 
called from RigGeometry::drawImplementation() - stack trace below.


I'd really like to be able to see the hardware skinning. With the 
character at the link above, osganimationviewer (software skinning I 
presume) runs well but the update time is close to 16ms per frame on my 
pretty recent machine. I'm thinking if that time is spent updating the 
vertex arrays for the skinning, there might be a chance the hardware 
skinning would reduce that? Obviously using a lighter mesh would too, 
and I won't be using that exact mesh in our project, but anything that 
can help us maintain a good frame rate is welcome.
  


From my experience, hardware skinning is critical.  For models of 
decent complexity (a couple thousand verts), the CPU just isn't up to 
the task if you get more than a couple of them on screen (at least not 
without significant efforts to optimize the code, but writing a vertex 
shader is a lot easer).


--J

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


Re: [osg-users] Scalar bar warning message

2010-03-18 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2010-03-17 19:42, Yanling Liu wrote:
 Hello,
 
 When using the osgSim::ScalarBar on a linux machine, I keep getting
 warning messages like Warning: font file fonts/arial.ttf not found.
 Is there a way to turn off such warning message? After all
 fonts/arial.ttf may only be valid on windows.
 
 Yanling
 

Actually the most common reason for this is that it cannot find the file
 fonts/arial.ttf in the current directory and you do not have the
OSG_FILE_PATH environment variable set neither.

Either make the fonts subdirectory in your current directory and put
the font there install the OpenSceneGraph data archive and point the
OSG_FILE_PATH environment variable to the directory with it.

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLondPn11XseNj94gRAqeQAKDdTCUtfgErOpu7UbFOmFZk4mftwQCfZsNY
nW8bt9qYa4GlTPbimkL5lho=
=DoK4
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jean-Sébastien Guay

Hi Jason,

Thanks for answering. As I said I'm looking into osgAnimation, the goal 
is to see if it would fit our needs to do some basic character 
animation. Our needs will probably grow with time, of course, which is 
why I want to see if the content-creation pipeline would work for us and 
also if osgAnimation would scale well enough to be future-proof for a 
reasonable amount of time.


We were also looking into DIGuy, they say it integrates easily into OSG 
but I'll have to see if it does hardware skinning, and also the runtime 
licensing costs seem pretty high. I would prefer osgAnimation, but only 
if it can be proven reasonably stable and if we can get our content into 
it easily.



We don't use osgAnimation (yet),


What do you use? Your own code?


The Collada spec is kind of flexible on
how multiple animations are handled on a single character in the same
document. It seems as if it's up to the application to determine how it
wants to interpret the library_animations hierarchy.


I've been investigating the fbx format as a way of getting the models 
and animation into OSG, and something similar to the above seems to be 
happening with that format too. It's giving me a bit of trouble right 
now... Here's what I'm seeing:


1. The fbx sample model (with the walk cycle) downloaded from the XNA 
site works well in osganimationviewer (I have to convert it to .osg and 
set all Material diffuseColor alphas to 1, see the other thread, but 
osgconv understands that fbx model well)
2. If I import the fbx file into XSI Mod Tool and re-export it in fbx 
format, then the fbx plugin (either through osgconv or 
osganimationviewer) asserts when trying to read it. The file size is 
similar but not the same as the original fbx file I downloaded, so I 
assume XSI moves things around in the hierarchy when importing or 
exporting the file that makes the fbx plugin not understand the file 
anymore...


I don't have time to debug the plugin right now to see what changes in 
the file's structure between step 1 and 2, but I'd like to, just so that 
the plugin would work with XSI (which is my personal favorite 3D app, 
even though I'm not a modeler/artist in any way).



 From my experience, hardware skinning is critical. For models of decent
complexity (a couple thousand verts), the CPU just isn't up to the task
if you get more than a couple of them on screen (at least not without
significant efforts to optimize the code, but writing a vertex shader is
a lot easer).


That's what I thought. Hopefully Cedric will be able to find and fix the 
problem that makes it crash and I'll be able to have a look.


Thanks,

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] OSG and vrJuggler

2010-03-18 Thread Doug McCorkle

Hello Rohit,

As Todd noted before, if you have questions about VR Juggler I would  
recommend asking them on the VR Juggler list. Also, if you have  
questions about VE-Suite I would recommend asking them on the VE-Suite  
list.


Doug

On Mar 18, 2010, at 12:41 PM, Rohit Vijay Bapat wrote:


Hi,Todd
Thanks for your reply . I have vr juggler configured on my cluster .  
And I also have OpenSceneGraph. But I am not perfectly able to run  
examples in the vrJuggler kit.


I am trying to develop a simple scene using OSG and vrJuggler to run  
on cluster . Can you send a sample code for osg::AppViewer to load a  
simple model ? So that I will get some guide line..

...

Thank you!

Cheers,
Rohit

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


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jason Daly

Jean-Sébastien Guay wrote:

What do you use? Your own code?
  


Yeah, we were doing this work before osgAnimation and the collada plugin 
in OSG existed.  We also had some existing framework for animation 
(using Cal3D characters), so we just worked the new functionality into 
our existing framework.




...
I don't have time to debug the plugin right now to see what changes in 
the file's structure between step 1 and 2, but I'd like to, just so that 
the plugin would work with XSI (which is my personal favorite 3D app, 
even though I'm not a modeler/artist in any way).
  


I'm not familiar with XSI or FBX (except just passing knowledge), so I 
can't offer much help there.  Sorry.  I guess the nice thing about 
Collada being XML is that you can do diffs on it  :-)


--J

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


Re: [osg-users] FBX plugin sets material diffuse color alpha to 0?

2010-03-18 Thread Michael Platings
Hi J-S,
I looked at the model you linked to and all the TransparencyFactor values
are 1, which according to the documentation in kfbxsurfacelambert.h means
totally transparent - the model has been incorrectly exported.

The same thing happened with DAE - Google Sketchup used to export models
with the transparency inverted. To deal with that I used a simple heuristic
to guess whether the model needed its transparency inverting. I've put the
same technique into the FBX plugin, and your model now looks as the artist
intended :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jean-Sébastien Guay

Hi Jason,


I guess the nice thing about Collada being XML is that you can do diffs on it 
:-)


Definitely. I'll have to revisit Collada I guess, in the past I've been 
disappointed at how hard it was to get the plugin compiling and reading 
files reliably.


How stable is the current Collada plugin in OSG? Does it support 
animation well? And will content creation tools export Collada in a way 
that osg and osgAnimation will understand?


Content pipelines are complex beasts... I understand why game companies 
often have teams managing that aspect alone of the development process.


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] osgAnimation and animation mixing/blending

2010-03-18 Thread Michael Platings
 How stable is the current Collada plugin in OSG?


It should be very robust now. I've got it displaying all the test models
from the https://collada.org/owl/ with the exception of the one that uses
morphing (AKA vertex blending).
Another issue is that some models assume that they will be rendered with
two-sided lighting and without back-face culling, which for OSG isn't the
case. However I have no intention of changing this as doing so would
compromise the speed of rendering for nicely designed models.

Does it support animation well?


Yes, all skinned animations should work perfectly, if not then please let me
know.

And will content creation tools export Collada in a way that osg and
 osgAnimation will understand?


Yes, AFAIK. Again, if you find any files that don't work (aside from the
known issues above) then please let me know.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG and vrJuggler

2010-03-18 Thread Rohit Vijay Bapat
Well Doug no offence but if there is something that concerns OSG as well as 
vrJuggler what should one do ? I am not trying to start a new OSG+vrJuggler 
forum here ! But have a problem that has haunted me for a month ..

If you kindly give an assurity  that mailing list of vrJuggler would give 
answer to my simple request I shall do that ! Because I have tried that as well 
. 

Regarding VE Suite I am well through that , absolutely undoubted about using VE 
Suite .


Doug McCorkle wrote:
 Hello Rohit,
 
 As Todd noted before, if you have questions about VR Juggler I would  
 recommend asking them on the VR Juggler list. Also, if you have  
 questions about VE-Suite I would recommend asking them on the VE-Suite  
 list.
 
 Doug
 
 On Mar 18, 2010, at 12:41 PM, Rohit Vijay Bapat wrote:
 
 
  Hi,Todd
  Thanks for your reply . I have vr juggler configured on my cluster .  
  And I also have OpenSceneGraph. But I am not perfectly able to run  
  examples in the vrJuggler kit.
  
  I am trying to develop a simple scene using OSG and vrJuggler to run  
  on cluster . Can you send a sample code for osg::AppViewer to load a  
  simple model ? So that I will get some guide line..
  ...
  
  Thank you!
  
  Cheers,
  Rohit
  
 ___
 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=25834#25834





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


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jason Daly

Jean-Sébastien Guay wrote:


Definitely. I'll have to revisit Collada I guess, in the past I've been 
disappointed at how hard it was to get the plugin compiling and reading 
files reliably.
  


Indeed.  I actually talked with Robert a while ago about the possibility 
of ditching the COLLADA DOM in the dae plugin.  When I was developing my 
reader, I looked at the DOM briefly, and quickly decided to just parse 
the XML myself.  Effectively, I created my own DOM implementation.  It 
wasn't as hard as it sounds, since I could assume a lot more than a 
general-purpose DOM library can.  If I had the time, I'd pursue changing 
the dae plugin, but time is scarce these days.



How stable is the current Collada plugin in OSG? Does it support 
animation well? 


I don't know, I don't use it  :-)


And will content creation tools export Collada in a way 
that osg and osgAnimation will understand?
  


The OpenCollada exporters seem to work pretty well (at least for 3ds MAX).


Content pipelines are complex beasts... I understand why game companies 
often have teams managing that aspect alone of the development process.
  


Indeed.  Even in our little lab it was a bit of a challenge to come up 
with a working system between me and our artists.  I'm still not all 
that happy with it, although it's gotten a lot better since we started.


--J

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


Re: [osg-users] helps! using mingw compile vpb, link problem.

2010-03-18 Thread Alberto Luaces
Hi,

it seems that OpenThreads is not found while linking VPB. As a
workaround, you can try to specify that library in the linking options
of CMake.

--
Alberto

zouwan writes:

 I have use vs 2008 to compile OSG and VPB from latest SVN , everything is OK.

 But When I use mingw gcc 3.4.4, OSG is OK, VPB has some link error. Many 
 thanks!

 error message:

 -*- mode: compilation; default-directory: 
 e:/code/OpenSceneGraph/build_vpb_mingw/src/vpb/ -*-

 Compilation started at Fri Mar 19 00:05:05

 make -k

 -- Configuring done

 -- Generating done

 -- Build files have been written to: E:/code/OpenSceneGraph/build_vpb_mingw

 Linking CXX shared library ..\..\lib\libvpb.dll

 Creating library file: ..\..\lib\libvpb.dll.a

 CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced5unrefEv[osg::Referenced::unref()
  const]+0x10):BuildLog.cpp:
 undefined reference to `_imp___ZN11OpenThreads6AtomicmmEv'

 CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced3refEv[osg::Referenced::ref()
  const]+0x10):BuildLog.cpp:
 undefined reference to `_imp___ZN11OpenThreads6AtomicppEv'

 CMakeFiles\vpb.dir\System.obj(.text$_ZNK3osg10Referenced14referenceCountEv[osg::Referenced::referenceCount()
  const]
 +0x10):System.cpp: undefined reference to 
 `_imp___ZNK11OpenThreads6AtomiccvjEv'

 collect2: ld returned 1 exit status

 make[2]: *** [lib/libvpb.dll] Error 1

 make[2]: Target `src/vpb/CMakeFiles/vpb.dir/build' not remade because of 
 errors.

 make[1]: *** [src/vpb/CMakeFiles/vpb.dir/all] Error 2

 make[1]: Target `src/vpb/all' not remade because of errors.

 make: *** [all] Error 2

 make: Target `default_target' not remade because of errors.

 Compilation exited abnormally with code 2 at Fri Mar 19 00:05:20

 

 Zou wan

 Spatial Infomation Technology Lab
 Institute of Computing Technology
 Chinese Academy of Sciences

 Beijing, 100190, China

 zou...@gmail.com

 --

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


Re: [osg-users] helps! using mingw compile vpb, link problem.

2010-03-18 Thread Jason Daly


Actually, it's only failing on the Atomic class.  I'm thinking it's 
finding OpenThreads fine, but the configuration of Atomic between OSG 
and VPB is somehow ending up different (the rest of OSG finds it, but 
VPB doesn't for some reason).


--J


Alberto Luaces wrote:

Hi,

it seems that OpenThreads is not found while linking VPB. As a
workaround, you can try to specify that library in the linking options
of CMake.

--
Alberto

zouwan writes:

  

I have use vs 2008 to compile OSG and VPB from latest SVN , everything is OK.

But When I use mingw gcc 3.4.4, OSG is OK, VPB has some link error. Many thanks!

error message:

-*- mode: compilation; default-directory: 
e:/code/OpenSceneGraph/build_vpb_mingw/src/vpb/ -*-

Compilation started at Fri Mar 19 00:05:05

make -k

-- Configuring done

-- Generating done

-- Build files have been written to: E:/code/OpenSceneGraph/build_vpb_mingw

Linking CXX shared library ..\..\lib\libvpb.dll

Creating library file: ..\..\lib\libvpb.dll.a

CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced5unrefEv[osg::Referenced::unref()
 const]+0x10):BuildLog.cpp:
undefined reference to `_imp___ZN11OpenThreads6AtomicmmEv'

CMakeFiles\vpb.dir\BuildLog.obj(.text$_ZNK3osg10Referenced3refEv[osg::Referenced::ref()
 const]+0x10):BuildLog.cpp:
undefined reference to `_imp___ZN11OpenThreads6AtomicppEv'

CMakeFiles\vpb.dir\System.obj(.text$_ZNK3osg10Referenced14referenceCountEv[osg::Referenced::referenceCount()
 const]
+0x10):System.cpp: undefined reference to `_imp___ZNK11OpenThreads6AtomiccvjEv'

collect2: ld returned 1 exit status

make[2]: *** [lib/libvpb.dll] Error 1

make[2]: Target `src/vpb/CMakeFiles/vpb.dir/build' not remade because of errors.

make[1]: *** [src/vpb/CMakeFiles/vpb.dir/all] Error 2

make[1]: Target `src/vpb/all' not remade because of errors.

make: *** [all] Error 2

make: Target `default_target' not remade because of errors.

Compilation exited abnormally with code 2 at Fri Mar 19 00:05:20



Zou wan

Spatial Infomation Technology Lab
Institute of Computing Technology
Chinese Academy of Sciences

Beijing, 100190, China

zou...@gmail.com

--

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


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

  


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


Re: [osg-users] FBX plugin sets material diffuse color alpha to 0?

2010-03-18 Thread Jean-Sébastien Guay

Hi Michael,


I looked at the model you linked to and all the TransparencyFactor
values are 1, which according to the documentation in
kfbxsurfacelambert.h means totally transparent - the model has been
incorrectly exported.


Geez, can't trust anyone anymore, not even Microsoft /sarcasm

Seriously, though, it's a pretty old format from what I understand, so I 
would have thought software would be able to save it correctly by now.


I checked in XSI, and in the lambert material's properties, there's a 
transparency checkbox (meaning transparency is enabled - you *can* use 
transparency on that material) but the transparency color is set to 
black, meaning that the object is completely opaque. I just checked, and 
changing that color to all white (in which case the object disappears in 
XSI of course :) ) doesn't seem to change the output value... The object 
is still invisible in OSG. I had to uncheck transparency for the 
object to appear (that's without the changes you mention below).



The same thing happened with DAE - Google Sketchup used to export models
with the transparency inverted. To deal with that I used a simple
heuristic to guess whether the model needed its transparency inverting.
I've put the same technique into the FBX plugin, and your model now
looks as the artist intended :)


Thanks a lot.

BTW, if I send you a version of the model re-exported out of XSI (i.e. 
the model you downloaded was imported into XSI and then exported again 
still in fbx format), could you check to see why it doesn't load through 
the OSG FBX plugin? It gets to resolveBindMatrices() 
(ReaderWriterFBX.cpp line 273) but then at line 117 nodeMap is empty, so 
resolveBindMatrices() asserts. It would seem that the XSI fbx importer 
or exporter changed the structure of the scene in a way that the fbx 
plugin doesn't understand. :-(


I can send you the exported file privately if you have time to check it out.

In any case, thanks for the previous fix at least :-)

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] OSG and vrJuggler

2010-03-18 Thread Doug McCorkle


On Mar 18, 2010, at 2:27 PM, Rohit Vijay Bapat wrote:

Well Doug no offence but if there is something that concerns OSG as  
well as vrJuggler what should one do ? I am not trying to start a  
new OSG+vrJuggler forum here ! But have a problem that has haunted  
me for a month ..


If you kindly give an assurity  that mailing list of vrJuggler would  
give answer to my simple request I shall do that ! Because I have  
tried that as well .
I have not seen a post from you on that list. You may want to try  
posting again.


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


Re: [osg-users] OSG and vrJuggler

2010-03-18 Thread Doug McCorkle


On Mar 18, 2010, at 12:41 PM, Rohit Vijay Bapat wrote:


Hi,Todd
Thanks for your reply . I have vr juggler configured on my cluster .  
And I also have OpenSceneGraph. But I am not perfectly able to run  
examples in the vrJuggler kit.


I am trying to develop a simple scene using OSG and vrJuggler to run  
on cluster . Can you send a sample code for osg::AppViewer to load a  
simple model ?


There is no OSG example that runs an osgViewer app across a cluster.  
To do that you need another toolkit like VR Juggler or Equalizer or  
you could write your own clustering code to handle some of the sync  
issues. I believe both VR Juggler and Equalizer have example  
applications that load models across clusters.


Doug

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


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jean-Sébastien Guay

Hi Michael,

Thanks a lot for your answers, I'm going to have a look at compiling and 
trying the Collada plugin now. One possible stumbling point is that we 
already use boost in our software, so the Collada plugin would have to 
be built with the same version, but I guess it should work.



with the exception of the one that uses morphing (AKA vertex blending).


What was the problem there? Are you talking about hardware skinning or 
something else? If we were to use osgAnimation and the Collada plugin to 
feed it data, we'd definitely want to use hardware skinning, but I would 
think that's orthogonal to how the data is read and given to osgAnimation?


Thanks again for the info.

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] osgAnimation and animation mixing/blending

2010-03-18 Thread Jean-Sébastien Guay

Hi Jason,


Indeed. I actually talked with Robert a while ago about the possibility
of ditching the COLLADA DOM in the dae plugin. When I was developing my
reader, I looked at the DOM briefly, and quickly decided to just parse
the XML myself. Effectively, I created my own DOM implementation. It
wasn't as hard as it sounds, since I could assume a lot more than a
general-purpose DOM library can. If I had the time, I'd pursue changing
the dae plugin, but time is scarce these days.


Yeah, I remember those discussions. It would be nice if that could go 
forward, as the number of dependencies for the Collada plugin makes it 
look more daunting than it is... Hence my initial inclination to try FBX 
first...


Thanks for the info.

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


[osg-users] [osgPPU] osgPPU Windows XP Install Guide

2010-03-18 Thread Allen Saucier
Hi,

Would someone please point me to an installation guide of osgPPU on Win XP, if 
one exists?  I can not find one on the website.

Plus, I am following the osg example of windows installation using cmake and 
when compiling, the project cudakernel does not compile because it can not find 
gl.h.

Being on a windows platform with OSG 2.8.2 installed, I thought for sure osgPPU 
would use OSG's opengl files.  It may but not for opengl.

I'm using an nVidia 9600gt card.  Are the openGL drivers/dev files susposed to 
be installed with the card installation software?

Thank you!

Cheers,
Allen

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





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


Re: [osg-users] bluring model edges

2010-03-18 Thread Allen Saucier
Thank you Yann.

Does anyone know how to install osgPPU on windows?  I'm close but I am getting 
errors that gl.h can not be found, yet I've installed OSG by following the osg 
installation method given for windows xp.

I had to install cudatoolkit from nVida - I'm running on an nVidia card: 9600gt.

So, I used CMake on osgPPU to build an MSVS 2005 sln for osgPPU.  Well, all 
compiles well except for cudakernel, which seems to require the openGL  gl.h 
file.

Or is this question best asked in another thread all-together?


yann le paih wrote:
 Hi,
 
 Morphological Antialiasing (MLAA) is a Post Processing technique. you could 
 try with  osgPPU.
 
 ie can this methodology be performed in milliseconds? :
 
 Like other Post Processing technique, it's depend of your shader complexity 
 and your output resolution.
 
 An example : 
    
 http://www.highdefforum.com/gaming-systems/107094-mlaa-technique-can-give-results-4x-better-than-16x-msaa.html
  
 (http://www.highdefforum.com/gaming-systems/107094-mlaa-technique-can-give-results-4x-better-than-16x-msaa.html)
 
 
 -- 
 Yann Le Paih
 Keraudrono
 56150 BAUD
 Portable: +33(0)610524356
  ()
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Cedric Pinson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/18/2010 08:52 PM, Jean-Sébastien Guay wrote:
 Hi Jason,

 Indeed. I actually talked with Robert a while ago about the
 possibility
 of ditching the COLLADA DOM in the dae plugin. When I was
 developing my
 reader, I looked at the DOM briefly, and quickly decided to just parse
 the XML myself. Effectively, I created my own DOM implementation. It
 wasn't as hard as it sounds, since I could assume a lot more than a
 general-purpose DOM library can. If I had the time, I'd pursue
 changing
 the dae plugin, but time is scarce these days.

 Yeah, I remember those discussions. It would be nice if that could
 go forward, as the number of dependencies for the Collada plugin
 makes it look more daunting than it is... Hence my initial
 inclination to try FBX first...

 Thanks for the info.

 J-S
Hi Jean Sebastion,

I am not able to reproduce the crash on linux, even if i remove the
copy of the shaders directory in the current directory of examples.
I have updated my source tree to be synced with osg and osg-data, I
tried in debug and release to be sure there is not a differents.
 
Is there any chance that you could use an old version of osg-data ?

About the pipeline production i am completely agree with you, it takes
a lot of time, and the way i did osgAnimation was while setting up a
pipeline production for video game, so it can explain some choices i
made. Off course it's not perfect but have been improved a lot by
contributors.

Many thanks to them

Cheers,
Cedric

- -- 

Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuirIgACgkQs6ZHzVQN0Ig7ygCeJ1qo0mD2OxKE0HkYCiAnqKBf
mLEAnRA+UsaxSWm/PEqu7v/NllbbaZf/
=h66H
-END PGP SIGNATURE-

attachment: cedric_pinson.vcf___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Cedric Pinson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/18/2010 08:23 PM, Michael Platings wrote:

 How stable is the current Collada plugin in OSG?


 It should be very robust now. I've got it displaying all the test
 models from the https://collada.org/owl/ with the exception of the
 one that uses morphing (AKA vertex blending). Another issue is that
 some models assume that they will be rendered with two-sided
 lighting and without back-face culling, which for OSG isn't the
 case. However I have no intention of changing this as doing so
 would compromise the speed of rendering for nicely designed
 models.

 Does it support animation well?


 Yes, all skinned animations should work perfectly, if not then
 please let me know.

 And will content creation tools export Collada in a way that osg
 and osgAnimation will understand?


 Yes, AFAIK. Again, if you find any files that don't work (aside
 from the known issues above) then please let me know.


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

Michael,

About morphing now the architecture should be able to handle it.
Because now the source is a osg::Geometry. It could be possible to
modify the Geometry source of the RigGeometry. I think it would need a
bit of code, but most of elements are there for someone that would
need to go in this way.

Cheers,
Cedric

- -- 

Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuirWIACgkQs6ZHzVQN0IgtbgCfUhu7nhrziai/clXuAszFhgqP
4dwAn1egZP8JHtR1T5O06WnRVho8EcSi
=DDN6
-END PGP SIGNATURE-

attachment: cedric_pinson.vcf___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Jean-Sébastien Guay

Hi Cedric,

Sorry my first reply went to you directly...


I am not able to reproduce the crash on linux, even if i remove the
copy of the shaders directory in the current directory of examples.
I have updated my source tree to be synced with osg and osg-data, I
tried in debug and release to be sure there is not a differents.


I really doubt the problem is down to loading the shaders. It wouldn't 
crash in setVertexAttribPointer of RigGeometry if that were the case...


In my case it crashes both in debug and release.


Is there any chance that you could use an old version of osg-data ?


I have updated it about a week ago, but I'll try again. Otherwise I'll 
try to debug a bit more on my side since you can't reproduce the crash.


Thanks,

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