Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Andrea Negri

Hi Wang,

any chance to see an english version of your book in the near future?

Congratulation for your work, indeed. :)

Regards,

Andrea Negri

Wang Rui wrote:

Hi all,
 
After 3 months of long waiting (from the SIGGRAPH to present), I am 
very pleased to announce that, the book /OpenSceneGraph Design and 
Implementation/, which is written by Wang Rui and Qian Xuelei and 
predicted on the OSG BOF, finally COMES OUT!
 
Wang Rui and Qian Xuelei, OpenSceneGraph Design and Implementation, 
Tsinghua University Press, 2009.11;
ISBN: 978-7-302-21303-1; Price: 45.00Yuan (about $6.6); Paperback, 377 
pages.
 
Please visit the Tsinghua University Press website for more 
information about this book:
http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45 
http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45
 
Chinese readers may order it from:

http://product.dangdang.com/product.aspx?product_id=20732977
 
The book resource website:

http://code.google.com/p/osgenginebook/
 
You may freely download the full examples source code and have an 
overview of them here. Hope the 38 very short examples may help you 
even without reading the book. I try to build the website 
Chinese-English bilingual, so don't worry about language limitations. :)
 
More snapshots could be found at http://code.google.com/p/osgenginebook/
 
I’d like to thank Don Burns and Robert Osfield for their creative 
efforts to give birth to OpenSceneGraph, as well as over 1700 (maybe 
even more today?) members of the OSG core community and over 2400 
members of the osgChina community, for their support and contribution 
all the time!
 
Many thanks to Paul Martz of the Skew Matrix, for his tremendous 
passion for improving OSG documentations and great help on supporting 
the publication of this book. He also took time out of his busy 
schedule writing the foreword.
 
Thanks to Wei Zhanying, Guan Yanling, Chen Xuexia and Su Yuyang of 
Beijing Geo-Vision, for providing all kinds of assistance to the 
author during writing.
 
Thanks to Xiong Jian of Tsinghua University Press, Zhu Youhong of 
3DVRI, Gao Feng of Appsoft, Xu Mingliang of Zhejiang University, CG 
Laboratory of Beijing Forestry University and Yang Shixing, Xiao Peng 
and He Sicong of the osgChina Team, for technical reviewing, providing 
images and examples, and contributing in some other way.
 
Thanks to my co-author Dr. Qian Xuelei, for helping me finish some 
chapters and proofread the entire text.
 
Finally, I should thank my parents Wang Lihang and Bao Ximei, and my 
fiancee Leng Qin. I could not have done this without their patience 
and moral support during the whole time.
 
Best wishes,
 
Wang Rui
 



___
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] VBO's - lifetime.

2009-11-26 Thread Robert Osfield
Hi Nico,

osgcamera -r Tetra.osg is failing due to issue with clean up of the
buffer object pool.  I have already tracked down a bug in the clean up
of the texture object pool, and found the same problem in the buffer
object pool and applied the same fix, but alas still the problem
persists so there must be other problems lurking in the clean up of
the buffer object code as well.

I'll keep plugging away at it today.

Robert.

On Wed, Nov 25, 2009 at 8:06 PM, Nico Kruithof nicokruit...@gmail.com wrote:
 Hi Robert,
 Not too much good news I'm afraid. I tried my application and the osgcamera.
 I have to stop now. I might have some time to test tomorrow night (it's a
 private project for now).
 I attached the model I'm using. It loads fine in my application, but crashes
 when I close it. The osgcamera doesn't work either:
 osgcamerad.exe d:\tetra.osg
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 osgcamerad.exe -j 3 d:\tetra.osg
 + New viewer 
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
 and crashes after the first viewer.
 I wrote down the callstack when the crash occurs in my application:
 void BufferObject::releaseGLObjects(State* state) const, with state == 0
 void GLBufferObject::releaseGLBufferObject(unsigned int contextID,
 GLBufferObject* to), with contextID==0
 void GLBufferObjectManager::releaseGLBufferObject(GLBufferObject* to)
 void GLBufferObjectSet::orphan(GLBufferObject* to)
 The osgcamera example with the slider doesn't work either. Again, the output
 is correct for the first renderer, but not for the second and third. Here is
 the output again:
 osgcamerad.exe -r 3 d:\glider.osg
 + New viewer 
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 osgcamerad.exe -r 3 --vbo d:\glider.osg
 + New viewer 
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
 GLBufferObjectSet::GLBufferObjectSet _profile._size=640
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Warning: detected OpenGL error 'invalid value' at After Renderer::compile
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Warning: detected OpenGL error 'invalid value' at After Renderer::compile
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0

 osgcamerad.exe -r 3 --vbo --shared d:\glider.osg
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 + New viewer 
 GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
 GLBufferObjectSet::GLBufferObjectSet _profile._size=640
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
  Viewer ended --
 

Re: [osg-users] [osgOcean] Wake effects?

2009-11-26 Thread Kim Bale
Hi Peter,

Well this is really what the many weird and wonderful configurable
options are for in OceanScene, nearly every effect can be turned off
an on to suit the graphics card configuration. I think it's probably
better to do it this way, rather than grouping them together to give
the low,medium and high settings, as you can fine tune the rendering
to suit the available hardware.

The core water shader itself isn't so expensive, it's largely the pre
render passes that bring down the frame rate and all of these can be
turned off and on as desired.

(I think) the problem with Tians card at the moment is that the water
shader in the trunk has used up all the maximum number of uniforms
permitted on nvidia 7 series card which use a version of glsl that I'm
not 100% sure of. But I think this can be worked around, I just
haven't got round to it yet (plus it's quite hard to test without a
suitable card)

K.


2009/11/26 Peter Bear th3fly...@gmail.com:
 Would it be possible to implement sort of a config option with 2 or more 
 shaders for multiple quality levels? This would allow for the use of one 
 shader if you have a more powerful card, or another shader for an older card.
 Peter

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





 ___
 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] How to properly use the OSG_GL3_AVAILABLE CMake option?

2009-11-26 Thread Robert Osfield
Hi John,

On Wed, Nov 25, 2009 at 9:02 PM, John Price john.pric...@gmail.com wrote:

 My project is still in development and has a long term objective. My view is 
 forward looking, so I am interested in embracing gl3 as development 
 progresses. I am primarily developing for nVidia hardware, and am 
 particularly interested in nVidia extensions to gl3 that they refer to as 
 Bindness Graphics.

 nVidia states:
        Bindless Graphics refers to changes to OpenGL that can enable close to 
 an order of magnitude improvement in the CPU-limitedness         of graphics 
 applications.

        Bindless Graphics has the following desirable properties:
 •       The driver need not dereference a vertex buffer or constant buffer on 
 the CPU in order for the GPU to use it.
 •       Relieves the limits on how many buffer objects can be accessed at 
 once by shaders
 •       Buffer objects are accessed as C-style pointer dereferences in the 
 shading language
 •       Allows for dependent pointer fetches, enabling more complex scene 
 graph structures to be built into buffer objects providing significant new 
 flexibility in the use of shaders.

 Measurements have shown that bindless graphics can result in more than 7x 
 speedup!

I'm pretty curious about the bindless graphics extension, it would be
great to reduce the CPU overhead of making lots of fine grained OpenGL
calls.  The 7x speed up is very very unlikely to be something you'll
see though, my guess is that they probably had to really squeeze out a
contrived example to produce that type of bottleneck with the old
calls, with real world usage the speed up will far less and often will
result in no speed up at all as the bottleneck is more often fill rate
rather getting data to the GPU.  For you own app I'd aks the simple
question - is your bottleneck draw dispatch, if not then bindless
graphics won't make any difference for you.

Bindless graphics will complicate trying to manage code that works on
both bindless and non bindless as the extensions not only affect the
the GL calls doing dispatch of the data but also shaders, so you'd
need to keep multiple sets of shaders to handle the different
hardware/driver capabilities.

So I'm keen to see bindless graphics make it's way into the OSG to
help reduce the draw dispatch overhead, more important for GL3 now
that display lists are no longer supported, but we should be realistic
about the potential benefits/pitfalls.

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


Re: [osg-users] Custom code in OSG core

2009-11-26 Thread Robert Osfield
Hi Sukender,

So what you are after is a proxy Image class :-)

One possible tweak would be to enable th OSG to carry osg::Image which
have their FileName field set, but have their data set to null so they
contain no data.  This is the easy part as you can do this right now -
the next bit is getting the OSG to handle these osg::Image objects
gracefully.

The issue of proxy image is something that the osg::Texture's
UnrefImageAfterApply could do with as it currently discards the whole
osg::Image, so later on when you try to save the model there is no
Image to provide the FileName to use to write to file you want to
write out.

So... this type of feature I can see having multiple uses beyond this
particular plugin and worthy of support into the core OSG.

Robert.

On Wed, Nov 25, 2009 at 10:26 PM, Sukender suky0...@free.fr wrote:
 Hi Robert and Paul,

 Oh, I'm sorry I shouldn't have written core OSG: it's maybe more in osg 
 plugins I guess...
 I have to load huge models. By huge I mean a few thouthands triangles but GB 
 of textures. Of course loading such a model simply leads to a std::bad_alloc. 
 This is why I posted something about lazy textures/images on the mailing 
 list: I must load the model but I don't want all the textures to be loaded at 
 the same time. Depending on what I want to acheive I may need:
 1. To leave textures unloaded, but I want writers plugins to do as if the 
 texture was loaded (= the writer simply says the texture is abcd.jpg).
 2. To load low-res textures (or maybe not loaded at all), but I want hi-res 
 ones to be switched when needed, especially when writing.

 I don't expect solutions to be suited for realtime rendering. I only need 
 those huge models to be loaded, then processed (= modifiy geometry without 
 touching the texture or vice-versa, modify only a part of the scene...) and 
 written to disk for future rendering.

 I got a few ideas for these needs:
 - Add a noTexture option to readers that stores somewhere the path of the 
 texture file, and add an option to writers to do as if the texture was 
 loaded (but only write to the file the path of the image). This is why I have 
 custom code in reader/writers. But this is clearly an ugly solution as I need 
 to modify each reader/writer.
 - Create a lazy image, which is loaded only when accessing pixel data. But 
 I don't know if it's easy, and how to do it (as discussed in the 
 corresponding post).

 And a final note: all my code is given to osg-submissions once stable... I 
 won't violate the OSGPL/LGPL :)

 So... any idea? If I can acheive this without modifying OSG source code, then 
 I'd be very happpy...

 Thank you.

 Sukender
 PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

 - Robert Osfield robert.osfi...@gmail.com a écrit :
 Hi Sukender,

 On Wed, Nov 25, 2009 at 2:26 PM, Sukender suky0...@free.fr wrote:
  I'm trying to add custom code in some osg plugins (especially 3DS and 
  FBX). I often have to write things like:
  ADD_DEFINITIONS(-DMY_CUSTOM_CODE) in CMakeLists.txt (or #define 
  MY_CUSTOM_CODE)
 
  #ifdef MY_CUSTOM_CODE
  ...
  #endif
 
  - Can I submit such code (without the #define of course)?
  - Do you think there could be a nicer way to isolate custom code?
  - And finally, do you think this could be a good idea to have a CMake 
  option such as USER_DEFINES? And then:
  FOREACH(CUR_DEFINE ${USER_DEFINES})
     ADD_DEFINITIONS(-D${CUR_DEFINE})
  ENDFOREACH()

 The OSG isn't the place for custom code, both for a licensing issues,
 build issues and maintenance issues.  The question really should be
 how to avoid need for custom code in the core OSG.  The use of custom
 code embedded in the OSG code would suggest that the OSG doesn't
 support particular features, or isn't extensible enough, or just the
 that code is tackled in the wrong way.

 Could you enumerate what custom code you are wanting to put it and
 why?  Perhaps we can figure a way to avoid the need for it completely.

 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

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


[osg-users] question on status of dae (collada) plugin

2009-11-26 Thread Frederic Marmond
Hello world,

I'm trying to load some collada files from osg, using osgviewer,
recent trunk version on msvc8.
I tried on those found on the collada-dom package
(collada-dom/dom/test/1.4/data/*.dae ), but only one (cube.dae) is
really loading. Some crash (segfault), some display an empty scene,
and others don't find any scene at all.
Aren't those data files considered as reference ones ?

I also tried on some kml files (the google's format based on collada
one), without success (even if I rename the .kml in .dae, of course):
Warning: The DOM was unable to create an element named kml at line 15.
Probably a schema violation.

= is the dae plugin supposed to be usable, or is it in early
development state (or am I badly using it) ?

thanks for any information/confirmation !

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


Re: [osg-users] help me with osg::Imagestream and osg::Image

2009-11-26 Thread Robert Osfield
On Thu, Nov 26, 2009 at 5:57 AM, Ivan Salguero r_kenshin...@hotmail.com wrote:
 yes yes but i execute osgmovie and it say me that i need a pluging what kind 
 of pluging i need?? so it's weird because when i compile the code some libs 
 las image and imagestream doesn't have some functions but .exe it's work 
 correctly why happen that?

You need a plugin to read the movie, such as the xine plugin under
Linux, or the quicktime plugin under OSX/Windows, or the ffmpeg plugin
now available in svn/trunk for all platforms.

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


Re: [osg-users] IntersectVisitor does not recognize Nodes on different Projection

2009-11-26 Thread Peter Hrenka

Hi Thorsten,

Thorsten Werner schrieb:

Hi,

I've got a loaded model which is a child of the root.
the second child of the root node is a ortho2d projection, which i use for the 
GUI. Now i've taken the example osgkeyboardmouse from the osg site and my 
problem is that it only catches intersections with the loaded model. Not with 
the Goedes which are at the Ortho2D ProjectionMatrix.

double w(.05), h(.05);
osgUtil::PolytopeIntersector* picker =
new osgUtil::PolytopeIntersector(
osgUtil::Intersector::PROJECTION,
x-w, y-h, x+w, y+h);
osgUtil::IntersectionVisitor iv(picker);
viewer-getCamera()-accept(iv);

this is how i configured the Visitor. I've tried to change the Intersector into a osg::Intersector::WINDOW. ut then absolutely nothing happens anymore. 


What kind of primitives are you trying to pick?
For Triangles/Quads it is more efficient to use the 
LineSegementIntersector (which is the default when you start

osgkeyboardmouse, you can toggle using 'p'). The osgpick example
always uses the LineSegementIntersector.

Assuming you want to use PolytopeIntersector, I have to say
that it not work well when Projections are involved.
To fix that properly we might need a completely different
approach.
As a workaround you could try to call PolytopeIntersector
on your (unprojected) HUD-Node directly and see if it helps.



Thanks in advance.

Cheers,
Thorsten


Cheers

Peter
--
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] how to suspend rendering context thread

2009-11-26 Thread Jakob Ruhe
Hi Forest.

Your question fits better in a forum for MFC or Windows programming.
You can use the Win32 API function GetForegroundWindow to see which
window has the focus or you can use GetWindowPlacement to get the
state about a specific window.
You should also consider using on-demand rendering mode in OSG to
reduce the CPU usage. Search for it in this mailing list or visit the
OSG blog to see what it is. Good luck!

Best regards

Jakob Ruhe

2009/11/25 forest fores...@163.com:
 hi all,
    When I use osgMFCViewer, I create multiple rendering context,that's
 to say there are many HWND, each HWND is related to one Render thread ,so
 much CPU resource is taken up.  This is what I want to do: When one viewport
 is maximazed, the others will be hidden ,so these hidden context do not need
 continue the rendering. I want to suspend and resume some rendering thread
 depends on message CWnd::OnSize(UINT nType,   int cx, int cy ). I checked
 the MSDN and find that the parameter nType can be one of the following
 values
 SIZE_MAXIMIZED   Window has been maximized.
 SIZE_MINIMIZED   Window has been minimized.
 SIZE_RESTORED   Window has been resized, but neither SIZE_MINIMIZED nor
 SIZE_MAXIMIZED applies.
 SIZE_MAXHIDE   Message is sent to all pop-up windows when some other window
 is maximized.
 SIZE_MAXSHOW   Message is sent to all pop-up windows when some other window
 has been restored to its former size.

 My problem is that I never get SIZE_MAXHIDE or SIZE_MAXSHOW message.
 Is there anyone who has used SIZE_MAXHIDE or SIZE_MAXSHOW message? Or is
 there any other way to reduce the CPU resource usage?

 thanks in advance
 best regards
 forest
 ___
 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] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Ümit Uzun
Thanks Wang,

But is there anyone who is OSG user and knows Chinese and wants to translate
this book to english in the future? :) Or will you translate it to make it
more universe?

Regards.

Ümit Uzun


2009/11/26 Andrea Negri andrea.ne...@gmail.com

 Hi Wang,

 any chance to see an english version of your book in the near future?

 Congratulation for your work, indeed. :)

 Regards,

 Andrea Negri

 Wang Rui wrote:

 Hi all,
  After 3 months of long waiting (from the SIGGRAPH to present), I am very
 pleased to announce that, the book /OpenSceneGraph Design and
 Implementation/, which is written by Wang Rui and Qian Xuelei and predicted
 on the OSG BOF, finally COMES OUT!
  Wang Rui and Qian Xuelei, OpenSceneGraph Design and Implementation,
 Tsinghua University Press, 2009.11;
 ISBN: 978-7-302-21303-1; Price: 45.00Yuan (about $6.6); Paperback, 377
 pages.
  Please visit the Tsinghua University Press website for more information
 about this book:
 http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45 
 http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45

  Chinese readers may order it from:
 http://product.dangdang.com/product.aspx?product_id=20732977
  The book resource website:
 http://code.google.com/p/osgenginebook/
  You may freely download the full examples source code and have an
 overview of them here. Hope the 38 very short examples may help you even
 without reading the book. I try to build the website Chinese-English
 bilingual, so don't worry about language limitations. :)
  More snapshots could be found at http://code.google.com/p/osgenginebook/
  I’d like to thank Don Burns and Robert Osfield for their creative efforts
 to give birth to OpenSceneGraph, as well as over 1700 (maybe even more
 today?) members of the OSG core community and over 2400 members of the
 osgChina community, for their support and contribution all the time!
  Many thanks to Paul Martz of the Skew Matrix, for his tremendous passion
 for improving OSG documentations and great help on supporting the
 publication of this book. He also took time out of his busy schedule writing
 the foreword.
  Thanks to Wei Zhanying, Guan Yanling, Chen Xuexia and Su Yuyang of
 Beijing Geo-Vision, for providing all kinds of assistance to the author
 during writing.
  Thanks to Xiong Jian of Tsinghua University Press, Zhu Youhong of 3DVRI,
 Gao Feng of Appsoft, Xu Mingliang of Zhejiang University, CG Laboratory of
 Beijing Forestry University and Yang Shixing, Xiao Peng and He Sicong of the
 osgChina Team, for technical reviewing, providing images and examples, and
 contributing in some other way.
  Thanks to my co-author Dr. Qian Xuelei, for helping me finish some
 chapters and proofread the entire text.
  Finally, I should thank my parents Wang Lihang and Bao Ximei, and my
 fiancee Leng Qin. I could not have done this without their patience and
 moral support during the whole time.
  Best wishes,
  Wang Rui
  


 ___
 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] [osgOcean] Wake effects?

2009-11-26 Thread Tian Ma
Hi Kim:

Thanks for your helpful work!

Does the information inf file ocean_output.txt help?

Regards,
Tian


Kim Bale wrote:
 Hi Peter,
 
 Well this is really what the many weird and wonderful configurable
 options are for in OceanScene, nearly every effect can be turned off
 an on to suit the graphics card configuration. I think it's probably
 better to do it this way, rather than grouping them together to give
 the low,medium and high settings, as you can fine tune the rendering
 to suit the available hardware.
 
 The core water shader itself isn't so expensive, it's largely the pre
 render passes that bring down the frame rate and all of these can be
 turned off and on as desired.
 
 (I think) the problem with Tians card at the moment is that the water
 shader in the trunk has used up all the maximum number of uniforms
 permitted on nvidia 7 series card which use a version of glsl that I'm
 not 100% sure of. But I think this can be worked around, I just
 haven't got round to it yet (plus it's quite hard to test without a
 suitable card)
 
 K.
 
 
 2009/11/26 Peter Bear :
 
  Would it be possible to implement sort of a config option with 2 or more 
  shaders for multiple quality levels? This would allow for the use of one 
  shader if you have a more powerful card, or another shader for an older 
  card.
  Peter
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=20395#20395
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Pierre Bourdin (gmail)
Hi Wang and felicitations,
I've had a very quick look at the sample and they are pretty good.
Illustrating each particular point very clearly.

I really miss reading Chinese, if you have any chance to translate the
book, I'll be interested too.

Regards, Pierre.

Le jeudi 26 novembre 2009 à 10:17 +0100, Andrea Negri a écrit :
 Hi Wang,
 
 any chance to see an english version of your book in the near future?
 
 Congratulation for your work, indeed. :)
 
 Regards,
 
 Andrea Negri
 
 Wang Rui wrote:
  Hi all,
   
  After 3 months of long waiting (from the SIGGRAPH to present), I am 
  very pleased to announce that, the book /OpenSceneGraph Design and 
  Implementation/, which is written by Wang Rui and Qian Xuelei and 
  predicted on the OSG BOF, finally COMES OUT!
   
  Wang Rui and Qian Xuelei, OpenSceneGraph Design and Implementation, 
  Tsinghua University Press, 2009.11;
  ISBN: 978-7-302-21303-1; Price: 45.00Yuan (about $6.6); Paperback, 377 
  pages.
   
  Please visit the Tsinghua University Press website for more 
  information about this book:
  http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45 
  http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45
   
  Chinese readers may order it from:
  http://product.dangdang.com/product.aspx?product_id=20732977
   
  The book resource website:
  http://code.google.com/p/osgenginebook/
   
  You may freely download the full examples source code and have an 
  overview of them here. Hope the 38 very short examples may help you 
  even without reading the book. I try to build the website 
  Chinese-English bilingual, so don't worry about language limitations. :)
   
  More snapshots could be found at http://code.google.com/p/osgenginebook/
   
  I’d like to thank Don Burns and Robert Osfield for their creative 
  efforts to give birth to OpenSceneGraph, as well as over 1700 (maybe 
  even more today?) members of the OSG core community and over 2400 
  members of the osgChina community, for their support and contribution 
  all the time!
   
  Many thanks to Paul Martz of the Skew Matrix, for his tremendous 
  passion for improving OSG documentations and great help on supporting 
  the publication of this book. He also took time out of his busy 
  schedule writing the foreword.
   
  Thanks to Wei Zhanying, Guan Yanling, Chen Xuexia and Su Yuyang of 
  Beijing Geo-Vision, for providing all kinds of assistance to the 
  author during writing.
   
  Thanks to Xiong Jian of Tsinghua University Press, Zhu Youhong of 
  3DVRI, Gao Feng of Appsoft, Xu Mingliang of Zhejiang University, CG 
  Laboratory of Beijing Forestry University and Yang Shixing, Xiao Peng 
  and He Sicong of the osgChina Team, for technical reviewing, providing 
  images and examples, and contributing in some other way.
   
  Thanks to my co-author Dr. Qian Xuelei, for helping me finish some 
  chapters and proofread the entire text.
   
  Finally, I should thank my parents Wang Lihang and Bao Ximei, and my 
  fiancee Leng Qin. I could not have done this without their patience 
  and moral support during the whole time.
   
  Best wishes,
   
  Wang Rui
   
  
 
  ___
  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

Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com


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


Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Pierre Bourdin (gmail)
Dear Wang,

I just wanted to add a small question off the mailing-list.

I've seen in the mail, you have been collaborating with many Chinese
Universities among which some people of the Beijing Forestry
University...

I am just starting a project about Virtual Landscape Visualization with
Xavier Pueyo from the University of Girona (SPAIN) and Marc Jaeger from
the CIRAD (France), and other partners...

I know Marc Jaeger is working with a lot with Chinese Partners, since he
was one of the joint Director of the LIAMA (Sino/French Laboratory for
Computer Sciences: http://liama.ia.ac.cn/wiki/)

Could you be interested in collaborating with us on an international
project on the topic of Landscape Visualisation ?
  
Nothing is started yet, but we are already looking for partners.

Regards, Pierre.

Le jeudi 26 novembre 2009 à 10:28 +0800, Wang Rui a écrit :
 Hi all,
  
 After 3 months of long waiting (from the SIGGRAPH to present), I am
 very pleased to announce that, the book OpenSceneGraph Design and
 Implementation, which is written by Wang Rui and Qian Xuelei and
 predicted on the OSG BOF, finally COMES OUT!
  
 Wang Rui and Qian Xuelei, OpenSceneGraph Design and Implementation,
 Tsinghua University Press, 2009.11;
 ISBN: 978-7-302-21303-1; Price: 45.00Yuan (about $6.6); Paperback, 377
 pages.
  
 Please visit the Tsinghua University Press website for more
 information about this book:
 http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45
  
 Chinese readers may order it from:
 http://product.dangdang.com/product.aspx?product_id=20732977
  
 The book resource website:
 http://code.google.com/p/osgenginebook/
  
 You may freely download the full examples source code and have an
 overview of them here. Hope the 38 very short examples may help you
 even without reading the book. I try to build the website
 Chinese-English bilingual, so don't worry about language
 limitations. :)
  
 More snapshots could be found at
 http://code.google.com/p/osgenginebook/
  
 I’d like to thank Don Burns and Robert Osfield for their creative
 efforts to give birth to OpenSceneGraph, as well as over 1700 (maybe
 even more today?) members of the OSG core community and over 2400
 members of the osgChina community, for their support and contribution
 all the time!
  
 Many thanks to Paul Martz of the Skew Matrix, for his tremendous
 passion for improving OSG documentations and great help on supporting
 the publication of this book. He also took time out of his busy
 schedule writing the foreword.
  
 Thanks to Wei Zhanying, Guan Yanling, Chen Xuexia and Su Yuyang of
 Beijing Geo-Vision, for providing all kinds of assistance to the
 author during writing.
  
 Thanks to Xiong Jian of Tsinghua University Press, Zhu Youhong of
 3DVRI, Gao Feng of Appsoft, Xu Mingliang of Zhejiang University, CG
 Laboratory of Beijing Forestry University and Yang Shixing, Xiao Peng
 and He Sicong of the osgChina Team, for technical reviewing, providing
 images and examples, and contributing in some other way.
  
 Thanks to my co-author Dr. Qian Xuelei, for helping me finish some
 chapters and proofread the entire text.
  
 Finally, I should thank my parents Wang Lihang and Bao Ximei, and my
 fiancee Leng Qin. I could not have done this without their patience
 and moral support during the whole time.
  
 Best wishes,
  
 Wang Rui
  
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com


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


Re: [osg-users] [osgOcean] Wake effects?

2009-11-26 Thread Kim Bale
Hi Tian,

It did highlight some useful stuff. Unfortunately I won't get round to
fixing this immediately.

However, if you want to use the version in the trunk you can probably
get round it by replacing the uniform booleans one by one with hard
coded values in the water shader for the options you want to enable
until it stop complaining. Obviously this is a temporary fix until I
get round to investigating further.

K.

2009/11/26 Tian Ma tianxiao...@foxmail.com:
 Hi Kim:

 Thanks for your helpful work!

 Does the information inf file ocean_output.txt help?

 Regards,
 Tian


 Kim Bale wrote:
 Hi Peter,

 Well this is really what the many weird and wonderful configurable
 options are for in OceanScene, nearly every effect can be turned off
 an on to suit the graphics card configuration. I think it's probably
 better to do it this way, rather than grouping them together to give
 the low,medium and high settings, as you can fine tune the rendering
 to suit the available hardware.

 The core water shader itself isn't so expensive, it's largely the pre
 render passes that bring down the frame rate and all of these can be
 turned off and on as desired.

 (I think) the problem with Tians card at the moment is that the water
 shader in the trunk has used up all the maximum number of uniforms
 permitted on nvidia 7 series card which use a version of glsl that I'm
 not 100% sure of. But I think this can be worked around, I just
 haven't got round to it yet (plus it's quite hard to test without a
 suitable card)

 K.


 2009/11/26 Peter Bear :

  Would it be possible to implement sort of a config option with 2 or more 
  shaders for multiple quality levels? This would allow for the use of one 
  shader if you have a more powerful card, or another shader for an older 
  card.
  Peter
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=20395#20395
 
 
 
 
 
  ___
  osg-users mailing list
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list

 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

  --
 Post generated by Mail2Forum


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





 ___
 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] [3rdparty] osg::Image chosen library

2009-11-26 Thread Ant Kennedy
Hi,

hopefully someone will be able to help as this has been doing my head in. Is 
there any way to force the library which osg::Image uses when opening a file as 
I am having issues when trying to load a .png file and it is not using 
osgdb_png. 

Many Thanks
Ant

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





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


[osg-users] OT: GLSL syntax highlighting for VS2008

2009-11-26 Thread Kim Bale
Hello all,

The lack of glsl syntax highlighting has always bugged me in visual
studio, there were a number of workarounds that sort of worked but
they all had their problems. So I thought I'd share this link I found
today for pretty decent syntax highlighter plugin for visual studio
2008, I'm sure some of you will find it useful :)

http://nshader.codeplex.com/

Regards,

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


Re: [osg-users] question on status of dae (collada) plugin

2009-11-26 Thread Roger James




Frederic Marmond wrote:

  Hello world,

I'm trying to load some collada files from osg, using osgviewer,
recent trunk version on msvc8.
I tried on those found on the collada-dom package
(collada-dom/dom/test/1.4/data/*.dae ), but only one (cube.dae) is
really loading. Some crash (segfault), some display an empty scene,
and others don't find any scene at all.
Aren't those data files considered as reference ones ?

I also tried on some kml files (the google's format based on collada
one), without success (even if I rename the .kml in .dae, of course):
Warning: The DOM was unable to create an element named kml at line 15.
Probably a schema violation.

= is the dae plugin supposed to be usable, or is it in early
development state (or am I badly using it) ?

thanks for any information/confirmation !

Fred
  

Fred,

The dae reader should be stable, it has not had any changes made to it
since the osg 2.8.2 release which is working for me. All the new
development work on it is being being done in a separate repository. It
certainly should not crash. The data files in the Collada respository
should mostly work although I have not checked them recently, and
strangely some of them were in the past not fully compliant Collada and
might still be!

Google KML files are not Collada .dae files and will not work! However
Google KMZ archive files usually do contain Collada .dae files. The
.kmz files are really .zip archives and if you rename the .kmz
extension to .zip you can then run a standard zip archive tool to
extract the .dae file from them.

I suspect that your build of the OSG Collada plugin has a problem. One
thing you should check is that you have linked against the dom
libraries that implement the 1.4 version of the Collada specification
not the 1.5 version. I link against libcollada14dom22 (that is Collada
specification version 1.4 dom library version 2.2).

Roger




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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Robert Osfield
Hi Nico,

I've tracked down issues with both the clean up of the texture object
pool and buffer object pool that has required introduction of some new
methods for cleanup.  I have checked into svn/trunk the initial cut of
this code, it enables osgcamera -r 5 tetra.osg to work just fine, as
well as a range of other test models.

The new code is only provisional though - it outputs lots of debug
info the console, and isn't yet tidied up and completed, it is
however, far enough along to warrant wider testing.  Could you check
out OSG svn/trunk and then test this against your app and let me know
how you get on.

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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-26 Thread Robert Osfield
Hi J.P,

I have done a lot more investigation in the context clean up issues
and have checked in a provisional fix for the issues.  Could you
please do an svn update and then test against your own applications to
see if things are fixed.

The code I've just checked in still has lots of debug info in place,
and I haven't completed all parts of the work, through this afternoon
I'll work on cleaning it up, but right now it should in a good enough
state to test out.  Could you do this against your app and let me know
how you get on.

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


Re: [osg-users] [3rdparty] osg::Image chosen library

2009-11-26 Thread Ant Kennedy
Looks like I found my answer reading through the documentation. In case anyone 
is interested I just had to specify in the constructor

[code]osgDB::Registry::instance()-createLibraryNameForFile(x.png);[/code]

Cheers anyway

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





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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Nico Kruithof
Sure, I'll do that tonight. Thanks a lot for looking into this.

-- Nico

On Thu, Nov 26, 2009 at 1:36 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nico,

 I've tracked down issues with both the clean up of the texture object
 pool and buffer object pool that has required introduction of some new
 methods for cleanup.  I have checked into svn/trunk the initial cut of
 this code, it enables osgcamera -r 5 tetra.osg to work just fine, as
 well as a range of other test models.

 The new code is only provisional though - it outputs lots of debug
 info the console, and isn't yet tidied up and completed, it is
 however, far enough along to warrant wider testing.  Could you check
 out OSG svn/trunk and then test this against your app and let me know
 how you get on.

 Thanks,
 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


[osg-users] imageio problems and possible solutions on loading some PNG images.

2009-11-26 Thread Tatsuhiro Nishioka
Hi there,

I have two problems in drawing PNG image using imageio on Mac OS X.

One problem is that 16-bit grayscale textures (PNG images) cannot be loaded due 
to the following errors:

Error: CGBitmapContextCreate: unsupported parameter combination: 8 integer 
bits/component; 16 bits/pixel; 1-component colorspace; kCGImageAlphaLast; 512 
bytes/row. 
Error: CGContextDrawImage: invalid context

The cause of this is that CGBitmapContextCreate doesn't accept the combination 
of 1 component colorspace and 16bps. One solution I can think of at this moment 
is to create a bitmap context using RGBA colorspace (as the same as the 32bit 
RGBA image). This works fine on FlightGear but I'm not so sure if this works on 
all 16bpp images.


Another problem is that imageio's libpng doesn't properly handle transparency 
in PNG file. The problem I have is that the transparency in PNG files are not 
at all handled and we see a lot of unexpected black or dark portions.  I 
strongly recommend the use of osgdb_png.so (or .dylib) for handling png images 
instead of imageio.

More detail explanation, screenshots, and an experimental patch for solving 
these two problems are available from:
http://macflightgear.sourceforge.net/home/development-notes/devnote-nov-26-2009 
Please try my patch and see if it also works on many OSG applications.

FYI, I'm using OSG/svn as of a few day back on Mac OS 10.5.8 / intel.

Best,

Tat

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


Re: [osg-users] question on status of dae (collada) plugin

2009-11-26 Thread Frederic Marmond
Hi Roger,

In fact, I based my build on this 'howto' :
http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/Collada
where it is suggested to rename the .kml to .dae
Maybe this doc is wrong or outdated ? (by the way, the page is
currently unaccessible...)

Ok, reading .dae from other locations than collada-dom package works better :)
thanks!

Fred

On Thu, Nov 26, 2009 at 1:21 PM, Roger James
ro...@beardandsandals.co.uk wrote:
 Frederic Marmond wrote:

 Hello world,

 I'm trying to load some collada files from osg, using osgviewer,
 recent trunk version on msvc8.
 I tried on those found on the collada-dom package
 (collada-dom/dom/test/1.4/data/*.dae ), but only one (cube.dae) is
 really loading. Some crash (segfault), some display an empty scene,
 and others don't find any scene at all.
 Aren't those data files considered as reference ones ?

 I also tried on some kml files (the google's format based on collada
 one), without success (even if I rename the .kml in .dae, of course):
 Warning: The DOM was unable to create an element named kml at line 15.
 Probably a schema violation.

 = is the dae plugin supposed to be usable, or is it in early
 development state (or am I badly using it) ?

 thanks for any information/confirmation !

 Fred


 Fred,

 The dae reader should be stable, it has not had any changes made to it since
 the osg 2.8.2 release which is working for me. All the new development work
 on it is being being done in a separate repository. It certainly should not
 crash. The data files in the Collada respository should mostly work although
 I have not checked them recently, and strangely some of them were in the
 past not fully compliant Collada and might still be!

 Google KML files are not Collada .dae files and will not work! However
 Google KMZ archive files usually do contain Collada .dae files. The .kmz
 files are really .zip archives and if you rename the .kmz extension to .zip
 you can then run a standard zip archive tool to extract the .dae file from
 them.

 I suspect that your build of the OSG Collada plugin has a problem. One thing
 you should check is that you have linked against the dom libraries that
 implement the 1.4 version of the Collada specification not  the 1.5 version.
 I link against libcollada14dom22 (that is Collada specification version 1.4
 dom library version 2.2).

 Roger



 ___
 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] Problem with Camera::inheritCullSettings

2009-11-26 Thread Robert Osfield
HI Paul,

My inclination would be to add an extra CullSettings inheritance mask
value for inheriting the ClearMask - as this would fit the way that
other variables are inherited down.

As for the naming of inheritCullSettings, I do also feel that it's not
perfect for conveying what it does, as ordinarily we would think of
cull to do just with scene graph traversal, rather than traversal of
the topmost Camera.  However, in implementation these settings control
what happens in the cull phase, and this does encompass traversal of
cameras as well as the scene graph. Given this I think it's not too
bad a naming.

Robert.

On Wed, Nov 25, 2009 at 5:13 PM, Paul Martz pma...@skew-matrix.com wrote:
 Hi Robert -- I've encountered a problem with how parent Camera values
 inherit down to slave Cameras, and wanted to discuss it before I launched
 into coding a fix.

 Quick summary: master Camera clear mask doesn't inherit down to slave
 Cameras. As a workaround, I can loop over slave Cameras and set the clear
 mask manually.

 Example use case: On a multidisplay system, create a Viewer configured to
 setUpViewAcrossAllDisplays. Get the Viewer's Camera, set the clear color to
 blue and set the clear mask to 0. Then call run. The windows incorrectly
 clear to blue -- they shouldn't clear at all, because the clear mask is set
 to 0.

 I managed to divine that slave Cameras get their clear colors set in
 Camera::inheritCullSettings, if the CLEAR_COLOR bit is set. If I modify this
 code to also copy the master Camera clear mask down to the slave Camera,
 then I get the expected result (no clearing occurs).

 It seems like there are two ways to fix this: One is to just piggyback clear
 mask onto the CLEAR_COLOR bit, or we could also add another bit specifically
 for clear mask.

 The second way, I'm not sure about. But the name inheritCullSettings fails
 to imply that clear color, possibly clear mask, read buffer, and draw buffer
 are all set in that function. So I wonder if inheritCullSettings is the
 right place to inherit these values? Or should master-to-slave value setting
 be done somewhere else?

 I'd appreciate your input on this, and I'd be glad to code a solution if you
 can provide some direction. Thanks.
 --
 Paul Martz
 Skew Matrix Software LLC
 _http://www.skew-matrix.com_ http://www.skew-matrix.com/
 +1 303 859 9466

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

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


Re: [osg-users] question on status of dae (collada) plugin

2009-11-26 Thread Jan Ciger
Roger James ro...@beardandsandals.co.uk wrote:
  Frederic Marmond wrote:
 Hello world,
 
 I'm trying to load some collada files from osg, using osgviewer,
 recent trunk version on msvc8.
 I tried on those found on the collada-dom package
 (collada-dom/dom/test/1.4/data/*.dae ), but only one (cube.dae) is
 really loading. Some crash (segfault), some display an empty scene,
 and others don't find any scene at all.
 Aren't those data files considered as reference ones ?

The plugin works ok for me, but make sure that the transparency in your files 
is correct. It is likely that it was exported wrong (reversed) and the scene 
is actually displayed, but all transparent. E.g. the default Blender plugin 
and Google Sketchup export it incorrectly reversed.

An easy way to check for this is to use osgconv and convert the dae file into 
an osg file - if the data are there but you cannot see them, it is the 
transparency problem.

Regards,

Jan


signature.asc
Description: This is a digitally signed message part.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] imageio problems and possible solutions on loading some PNG images.

2009-11-26 Thread Robert Osfield
HI Tat,

I don't have a OSX system to test against personally, but for those
who do have OSX and wish to help investigate this bug with the imageio
plugin it would be worth putting together a small set of test images
that you see problems so that they can reproduce the problem
themselves.

Also if we can settle upon an existing OSG example or a small mod to
one that can help illustrate the issue then this would also help.  For
instance do you see the problem if you do something as simple as:

  osgviewer --image myimage.png

Cheers,
Robert.

On Thu, Nov 26, 2009 at 1:12 PM, Tatsuhiro Nishioka
tat.fgmac...@gmail.com wrote:
 Hi there,

 I have two problems in drawing PNG image using imageio on Mac OS X.

 One problem is that 16-bit grayscale textures (PNG images) cannot be loaded 
 due to the following errors:

 Error: CGBitmapContextCreate: unsupported parameter combination: 8 integer 
 bits/component; 16 bits/pixel; 1-component colorspace; kCGImageAlphaLast; 512 
 bytes/row.
 Error: CGContextDrawImage: invalid context

 The cause of this is that CGBitmapContextCreate doesn't accept the 
 combination of 1 component colorspace and 16bps. One solution I can think of 
 at this moment is to create a bitmap context using RGBA colorspace (as the 
 same as the 32bit RGBA image). This works fine on FlightGear but I'm not so 
 sure if this works on all 16bpp images.


 Another problem is that imageio's libpng doesn't properly handle transparency 
 in PNG file. The problem I have is that the transparency in PNG files are not 
 at all handled and we see a lot of unexpected black or dark portions.  I 
 strongly recommend the use of osgdb_png.so (or .dylib) for handling png 
 images instead of imageio.

 More detail explanation, screenshots, and an experimental patch for solving 
 these two problems are available from:
 http://macflightgear.sourceforge.net/home/development-notes/devnote-nov-26-2009
 Please try my patch and see if it also works on many OSG applications.

 FYI, I'm using OSG/svn as of a few day back on Mac OS 10.5.8 / intel.

 Best,

 Tat

 ___
 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] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Wang Rui
Hi guys,

I'd like to help translate my book or any other materials into English, at
any time. But a major problem is, the copyright holder of this book is
Tsinghua University Press, and it may be inappropriate to publish it under
CC license or any other free ones again. Do you think that we could contact
with any presses in the USA to import this book?

Regards,

Wang Rui
2009/11/26 Ümit Uzun umituzu...@gmail.com

 Thanks Wang,

 But is there anyone who is OSG user and knows Chinese and wants to
 translate this book to english in the future? :) Or will you translate it to
 make it more universe?

 Regards.

 Ümit Uzun


 2009/11/26 Andrea Negri andrea.ne...@gmail.com

 Hi Wang,

 any chance to see an english version of your book in the near future?

 Congratulation for your work, indeed. :)

 Regards,

 Andrea Negri

 Wang Rui wrote:

 Hi all,
  After 3 months of long waiting (from the SIGGRAPH to present), I am very
 pleased to announce that, the book /OpenSceneGraph Design and
 Implementation/, which is written by Wang Rui and Qian Xuelei and predicted
 on the OSG BOF, finally COMES OUT!
  Wang Rui and Qian Xuelei, OpenSceneGraph Design and Implementation,
 Tsinghua University Press, 2009.11;
 ISBN: 978-7-302-21303-1; Price: 45.00Yuan (about $6.6); Paperback, 377
 pages.
  Please visit the Tsinghua University Press website for more information
 about this book:
 http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45 
 http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45

  Chinese readers may order it from:
 http://product.dangdang.com/product.aspx?product_id=20732977
  The book resource website:
 http://code.google.com/p/osgenginebook/
  You may freely download the full examples source code and have an
 overview of them here. Hope the 38 very short examples may help you even
 without reading the book. I try to build the website Chinese-English
 bilingual, so don't worry about language limitations. :)
  More snapshots could be found at
 http://code.google.com/p/osgenginebook/
  I’d like to thank Don Burns and Robert Osfield for their creative
 efforts to give birth to OpenSceneGraph, as well as over 1700 (maybe even
 more today?) members of the OSG core community and over 2400 members of the
 osgChina community, for their support and contribution all the time!
  Many thanks to Paul Martz of the Skew Matrix, for his tremendous passion
 for improving OSG documentations and great help on supporting the
 publication of this book. He also took time out of his busy schedule writing
 the foreword.
  Thanks to Wei Zhanying, Guan Yanling, Chen Xuexia and Su Yuyang of
 Beijing Geo-Vision, for providing all kinds of assistance to the author
 during writing.
  Thanks to Xiong Jian of Tsinghua University Press, Zhu Youhong of 3DVRI,
 Gao Feng of Appsoft, Xu Mingliang of Zhejiang University, CG Laboratory of
 Beijing Forestry University and Yang Shixing, Xiao Peng and He Sicong of the
 osgChina Team, for technical reviewing, providing images and examples, and
 contributing in some other way.
  Thanks to my co-author Dr. Qian Xuelei, for helping me finish some
 chapters and proofread the entire text.
  Finally, I should thank my parents Wang Lihang and Bao Ximei, and my
 fiancee Leng Qin. I could not have done this without their patience and
 moral support during the whole time.
  Best wishes,
  Wang Rui
  



 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Robert Osfield
Hi Wang Rui,

First up, congrats on the new book ;-)

On Thu, Nov 26, 2009 at 2:13 PM, Wang Rui wangra...@gmail.com wrote:
 I'd like to help translate my book or any other materials into English, at
 any time. But a major problem is, the copyright holder of this book is
 Tsinghua University Press, and it may be inappropriate to publish it under
 CC license or any other free ones again. Do you think that we could contact
 with any presses in the USA to import this book?

We currently publish the Quick Start Guide using Lulu.com, Lulu
prints books to order, and all you need to do to upload your pdf
document for them to print.  Might this be possible?  Tsinghua
University Press should be able to retain the copyright and all
revenue through Lulu.

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


Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Jean-Sébastien Guay

Hello Wang Rui,

After 3 months of long waiting (from the SIGGRAPH to present), I am very 
pleased to announce that, the book /OpenSceneGraph Design and 
Implementation/, which is written by Wang Rui and Qian Xuelei and 
predicted on the OSG BOF, finally COMES OUT!


Great work on getting your book out! I was glad to hear about so much 
involvement in the OSG community in China at the BOF this year, and it's 
great to see that this knowledge is being shared to a wide audience.


I also hope you can get it translated to English, but I will probably 
order a Chinese copy anyways as enocuragement!


But why didn't Paul write his preface in Mandarin? :-)

http://osgenginebook.googlecode.com/svn/tags/images/preface.jpg

It was nice to meet you at the BOF as well, hope to see you again next 
year to announce the English translation (I can hope :-) )


Again, great work, keep it up.

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] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Jean-Sébastien Guay

Hi again Wang Rui,

I just went to the product page on dangdang.com, and it seems it's out 
of stock?


http://product.dangdang.com/product.aspx?product_id=20732977
http://translate.google.com/translate?js=yprev=_thl=enie=UTF-8u=http%3A%2F%2Fproduct.dangdang.com%2Fproduct.aspx%3Fproduct_id%3D20732977sl=zh-CNtl=en

I hope you can help me order a copy of your book :-)

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] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Wang Rui
Hi Pierre,

Is the project open source? Or just funded by some companies or
organizations? I'd like to always work with open source teams with passion
and without any price. :) Otherwise, I would be glad to help after ensuring
that it won't affect my current work too much. I'm working for Beijing
Geo-Vision Co. (www.jx4.com) as a 3d GIS software engineer.

Wang Rui


2009/11/26 Pierre Bourdin (gmail) bour...@imerir.com

 Dear Wang,

 I just wanted to add a small question off the mailing-list.

 I've seen in the mail, you have been collaborating with many Chinese
 Universities among which some people of the Beijing Forestry
 University...

 I am just starting a project about Virtual Landscape Visualization with
 Xavier Pueyo from the University of Girona (SPAIN) and Marc Jaeger from
 the CIRAD (France), and other partners...

 I know Marc Jaeger is working with a lot with Chinese Partners, since he
 was one of the joint Director of the LIAMA (Sino/French Laboratory for
 Computer Sciences: http://liama.ia.ac.cn/wiki/)

 Could you be interested in collaborating with us on an international
 project on the topic of Landscape Visualisation ?

 Nothing is started yet, but we are already looking for partners.

 Regards, Pierre.

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


Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Wang Rui
Hi Robert,

Thanks for your information. Tomorrow I will ask Tsinghua University Press
if it possible.
Cheers,

Wang Rui


2009/11/26 Robert Osfield robert.osfi...@gmail.com


 We currently publish the Quick Start Guide using Lulu.com, Lulu
 prints books to order, and all you need to do to upload your pdf
 document for them to print.  Might this be possible?  Tsinghua
 University Press should be able to retain the copyright and all
 revenue through Lulu.

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


Re: [osg-users] Custom code in OSG core

2009-11-26 Thread Jean-Sébastien Guay

Hi Robert, Sukender,


The issue of proxy image is something that the osg::Texture's
UnrefImageAfterApply could do with as it currently discards the whole
osg::Image, so later on when you try to save the model there is no
Image to provide the FileName to use to write to file you want to
write out.


I had also considered making a proxy image class eventually for this 
exact reason. If you search the archives for proxy image, Sukender, 
you should find the discussion I and Robert had about this a while ago.


An additional benefit would be when doing runtime creation/destruction 
of contexts. Right now, if you do that, you need to turn off 
unrefImageAfterApply, or else in the new contexts the textures will be 
missing. But this completely removes the benefit of unrefImageAfterApply 
of course, so you have duplicate image data on the CPU memory and GPU 
memory even if you never (or seldom) create new contexts.


So with a proxy image class, you could run a visitor on your models at 
load time which would replace all images with this proxy image, and then 
keep unrefImageAfterApply turned on. Then, the image data would only be 
on the GPU, and at the time when you create a new context, the image 
would be reloaded by the proxy image, applied to the Texture in the new 
context, and unreffed again. Since creating new contexts is done seldom, 
the cost of reloading the image is small and you'd gain the CPU memory 
back afterwards.


Anyways, that's to say that a proxy image was on my to do list (my free 
time to do list of course, so it will take some time to get to it :-( ) 
but if you get to it first it could help you and help others at the same 
time.


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] question on status of dae (collada) plugin

2009-11-26 Thread Roger James




Jan Ciger wrote:

  Roger James ro...@beardandsandals.co.uk wrote:
  
  
 Frederic Marmond wrote:
Hello world,

I'm trying to load some collada files from osg, using osgviewer,
recent trunk version on msvc8.
I tried on those found on the collada-dom package
(collada-dom/dom/test/1.4/data/*.dae ), but only one (cube.dae) is
really loading. Some crash (segfault), some display an empty scene,
and others don't find any scene at all.
Aren't those data files considered as reference ones ?

  
  
The plugin works ok for me, but make sure that the transparency in your files 
is correct. It is likely that it was exported wrong (reversed) and the scene 
is actually displayed, but all transparent. E.g. the default Blender plugin 
and Google Sketchup export it incorrectly reversed.

An easy way to check for this is to use osgconv and convert the dae file into 
an osg file - if the data are there but you cannot see them, it is the 
transparency problem.

Regards,

Jan
  

Jan,

The latest version of Sketchup now gets it the right way round. However
that now breaks a fix that I put in some time ago. This fix checks for
the string "Google Sketchup" in the authoring_tool field at the
start of the dae document. So you can defeat it by changing that to
something else. I was going to back out this fix in the trunk once the
major changes regarding animation etc. have been integrated. Do you
know if the Blender export is still broken.

Roger


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


Re: [osg-users] Custom code in OSG core

2009-11-26 Thread Sukender
Hi Robert, hi all,

Glad to see there's a half-solution. But I must admit I got more questions than 
before!

I guess UnrefImageAfterApply won't be called if I don't even display the scene, 
so how will writers behave? If they try to read image data, that won't work of 
course.
But will they simply write the image filename, and will writeImageFile() simply 
do nothing with an Image having no data?

Do you think it would be useful that we (or I) create an osg::ImageProxy 
class? Derivated from osg::Image? Or is there something that already does it?
This ImageProxy may be handled by image reader/writers by simply copying or 
ignoring the file (if there is no change in the file extension).

And about the texture, should it call something like bool Image::onApplied() 
in UnrefImageAfterApply()?
- For Images, it would simply return true, meaning the texture should unref the 
image,
- For ProxyImages, it would unload the data and return false, meaning the 
texture must not unref.

If you got better ideas, I'm all ears!
Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Robert Osfield robert.osfi...@gmail.com a écrit :

 Hi Sukender,
 
 So what you are after is a proxy Image class :-)
 
 One possible tweak would be to enable th OSG to carry osg::Image
 which
 have their FileName field set, but have their data set to null so
 they
 contain no data.  This is the easy part as you can do this right now
 -
 the next bit is getting the OSG to handle these osg::Image objects
 gracefully.
 
 The issue of proxy image is something that the osg::Texture's
 UnrefImageAfterApply could do with as it currently discards the whole
 osg::Image, so later on when you try to save the model there is no
 Image to provide the FileName to use to write to file you want to
 write out.
 
 So... this type of feature I can see having multiple uses beyond this
 particular plugin and worthy of support into the core OSG.
 
 Robert.
 
 On Wed, Nov 25, 2009 at 10:26 PM, Sukender suky0...@free.fr wrote:
  Hi Robert and Paul,
 
  Oh, I'm sorry I shouldn't have written core OSG: it's maybe more
 in osg plugins I guess...
  I have to load huge models. By huge I mean a few thouthands
 triangles but GB of textures. Of course loading such a model simply
 leads to a std::bad_alloc. This is why I posted something about lazy
 textures/images on the mailing list: I must load the model but I don't
 want all the textures to be loaded at the same time. Depending on what
 I want to acheive I may need:
  1. To leave textures unloaded, but I want writers plugins to do as
 if the texture was loaded (= the writer simply says the texture is
 abcd.jpg).
  2. To load low-res textures (or maybe not loaded at all), but I want
 hi-res ones to be switched when needed, especially when writing.
 
  I don't expect solutions to be suited for realtime rendering. I
 only need those huge models to be loaded, then processed (= modifiy
 geometry without touching the texture or vice-versa, modify only a
 part of the scene...) and written to disk for future rendering.
 
  I got a few ideas for these needs:
  - Add a noTexture option to readers that stores somewhere the path
 of the texture file, and add an option to writers to do as if the
 texture was loaded (but only write to the file the path of the image).
 This is why I have custom code in reader/writers. But this is clearly
 an ugly solution as I need to modify each reader/writer.
  - Create a lazy image, which is loaded only when accessing pixel
 data. But I don't know if it's easy, and how to do it (as discussed in
 the corresponding post).
 
  And a final note: all my code is given to osg-submissions once
 stable... I won't violate the OSGPL/LGPL :)
 
  So... any idea? If I can acheive this without modifying OSG source
 code, then I'd be very happpy...
 
  Thank you.
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 
  - Robert Osfield robert.osfi...@gmail.com a écrit :
  Hi Sukender,
 
  On Wed, Nov 25, 2009 at 2:26 PM, Sukender suky0...@free.fr
 wrote:
   I'm trying to add custom code in some osg plugins (especially 3DS
 and FBX). I often have to write things like:
   ADD_DEFINITIONS(-DMY_CUSTOM_CODE) in CMakeLists.txt (or #define
 MY_CUSTOM_CODE)
  
   #ifdef MY_CUSTOM_CODE
   ...
   #endif
  
   - Can I submit such code (without the #define of course)?
   - Do you think there could be a nicer way to isolate custom
 code?
   - And finally, do you think this could be a good idea to have a
 CMake option such as USER_DEFINES? And then:
   FOREACH(CUR_DEFINE ${USER_DEFINES})
      ADD_DEFINITIONS(-D${CUR_DEFINE})
   ENDFOREACH()
 
  The OSG isn't the place for custom code, both for a licensing
 issues,
  build issues and maintenance issues.  The question really should
 be
  how to avoid need for custom code in the core OSG.  The use of
 custom
  code embedded in the OSG code would suggest that the OSG doesn't
  support 

Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Wang Rui
Hi J-S,

Thank you for the encouragement. Yes, dangdang.com is out of stock
temporarily, because of the over 2400 osgChina members waiting for this
book. :-D

I'd like to help anybody here order this book and post it, or just bring it
to the next OSG BOF if possible. Just remind me at the mail list.
Wang Rui

2009/11/26 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com

 Hi again Wang Rui,

 I just went to the product page on dangdang.com, and it seems it's out of
 stock?


 http://product.dangdang.com/product.aspx?product_id=20732977

 http://translate.google.com/translate?js=yprev=_thl=enie=UTF-8u=http%3A%2F%2Fproduct.dangdang.com%2Fproduct.aspx%3Fproduct_id%3D20732977sl=zh-CNtl=en

 I hope you can help me order a copy of your book :-)


 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Jean-Sébastien Guay

Hi Wang Rui,

Well the next OSG BOF is in August next year - I'll wait to see if 
dangdang.com has stock soon and try to order it then.


Well, I think I was able to register at dangdang.com and sign up to be 
notified when there is more stock for your book... Yay for Google 
Translate :-)


It said:

亲爱的Skylark13:

您已成功提交,我们会在到货后尽快通知您!
本窗口0秒后自动关闭!

We can always poke fun at automatic translations but they get the job done.

Looking forward to getting that e-mail.

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] Custom code in OSG core

2009-11-26 Thread Robert Osfield
Hi J-S,

On Thu, Nov 26, 2009 at 2:09 PM, Jean-Sébastien Guay
jean-sebastien.g...@cm-labs.com wrote:
 An additional benefit would be when doing runtime creation/destruction of
 contexts. Right now, if you do that, you need to turn off
 unrefImageAfterApply, or else in the new contexts the textures will be
 missing. But this completely removes the benefit of unrefImageAfterApply of
 course, so you have duplicate image data on the CPU memory and GPU memory
 even if you never (or seldom) create new contexts.

The issue of the incompatibility of UnrefImageAfterApply with creating
a series of graphics contexts can to mind yesterday as I was working
on the texture/buffer object pools - what would be useful would be to
be able suppress this feature via a osg::State setting, so that even
if the scene graphs asks for image to be unref'd the osg::State
setting overrides this and prevents it.   I have already implemented a
similar check for when the texture pools are enabled, as you can't mix
UnrefImageAfterApply with texture pools so it's only a small step
beyond.

Another possibility, albeit more radical, would be to get rid of
UnrefImageAfterApply completely and just rely on texture pools
completely for managing memory... ;-)

This doesn't take away form the usefulness of a proxy image capability.

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


Re: [osg-users] Custom code in OSG core

2009-11-26 Thread Robert Osfield
Hi Sukender,

I feel that just adding an flag into osg::Image or a callback to do
the loading, would be better than requiring a whole new osg::Image
subclass.  This way osg::ImageStream would also benefit from the
capability.

The real question is how do to wire it all up?  Do we just rely on
user code to invoke the loading or do we do it automatically? If we
did it automatically do we the load in the thread that requires the
concrete osg::Image data or do we have it do in the osgDB::ImagePager
a bit like the way that PagedLOD/ProxyNode work?

I guess the first step would be to do the load manually. Then take it
from there.

Robert.

On Thu, Nov 26, 2009 at 2:49 PM, Sukender suky0...@free.fr wrote:
 Hi Robert, hi all,

 Glad to see there's a half-solution. But I must admit I got more questions 
 than before!

 I guess UnrefImageAfterApply won't be called if I don't even display the 
 scene, so how will writers behave? If they try to read image data, that won't 
 work of course.
 But will they simply write the image filename, and will writeImageFile() 
 simply do nothing with an Image having no data?

 Do you think it would be useful that we (or I) create an osg::ImageProxy 
 class? Derivated from osg::Image? Or is there something that already does it?
 This ImageProxy may be handled by image reader/writers by simply copying or 
 ignoring the file (if there is no change in the file extension).

 And about the texture, should it call something like bool 
 Image::onApplied() in UnrefImageAfterApply()?
 - For Images, it would simply return true, meaning the texture should unref 
 the image,
 - For ProxyImages, it would unload the data and return false, meaning the 
 texture must not unref.

 If you got better ideas, I'm all ears!
 Cheers,

 Sukender
 PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

 - Robert Osfield robert.osfi...@gmail.com a écrit :

 Hi Sukender,

 So what you are after is a proxy Image class :-)

 One possible tweak would be to enable th OSG to carry osg::Image
 which
 have their FileName field set, but have their data set to null so
 they
 contain no data.  This is the easy part as you can do this right now
 -
 the next bit is getting the OSG to handle these osg::Image objects
 gracefully.

 The issue of proxy image is something that the osg::Texture's
 UnrefImageAfterApply could do with as it currently discards the whole
 osg::Image, so later on when you try to save the model there is no
 Image to provide the FileName to use to write to file you want to
 write out.

 So... this type of feature I can see having multiple uses beyond this
 particular plugin and worthy of support into the core OSG.

 Robert.

 On Wed, Nov 25, 2009 at 10:26 PM, Sukender suky0...@free.fr wrote:
  Hi Robert and Paul,
 
  Oh, I'm sorry I shouldn't have written core OSG: it's maybe more
 in osg plugins I guess...
  I have to load huge models. By huge I mean a few thouthands
 triangles but GB of textures. Of course loading such a model simply
 leads to a std::bad_alloc. This is why I posted something about lazy
 textures/images on the mailing list: I must load the model but I don't
 want all the textures to be loaded at the same time. Depending on what
 I want to acheive I may need:
  1. To leave textures unloaded, but I want writers plugins to do as
 if the texture was loaded (= the writer simply says the texture is
 abcd.jpg).
  2. To load low-res textures (or maybe not loaded at all), but I want
 hi-res ones to be switched when needed, especially when writing.
 
  I don't expect solutions to be suited for realtime rendering. I
 only need those huge models to be loaded, then processed (= modifiy
 geometry without touching the texture or vice-versa, modify only a
 part of the scene...) and written to disk for future rendering.
 
  I got a few ideas for these needs:
  - Add a noTexture option to readers that stores somewhere the path
 of the texture file, and add an option to writers to do as if the
 texture was loaded (but only write to the file the path of the image).
 This is why I have custom code in reader/writers. But this is clearly
 an ugly solution as I need to modify each reader/writer.
  - Create a lazy image, which is loaded only when accessing pixel
 data. But I don't know if it's easy, and how to do it (as discussed in
 the corresponding post).
 
  And a final note: all my code is given to osg-submissions once
 stable... I won't violate the OSGPL/LGPL :)
 
  So... any idea? If I can acheive this without modifying OSG source
 code, then I'd be very happpy...
 
  Thank you.
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 
  - Robert Osfield robert.osfi...@gmail.com a écrit :
  Hi Sukender,
 
  On Wed, Nov 25, 2009 at 2:26 PM, Sukender suky0...@free.fr
 wrote:
   I'm trying to add custom code in some osg plugins (especially 3DS
 and FBX). I often have to write things like:
   ADD_DEFINITIONS(-DMY_CUSTOM_CODE) in 

Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-26 Thread Paul Martz
Another option here is that Addison-Wesley might be interested in 
purchasing the English translation rights from Tsinghua University 
Press. Wang Rui, if there is some way you could email me a PDF of 
everything up to the end of the 2nd chapter, just as an example, I could 
pass it on to my editor at A-W and see if they are interested. Then 
maybe they'd pay us some small honorarium to be technical 
editors/proofreaders.


Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466

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


Re: [osg-users] imageio problems and possible solutions on loading some PNG images.

2009-11-26 Thread Stephan Maximilian Huber
Hi,

Tatsuhiro Nishioka schrieb:
 Another problem is that imageio's libpng doesn't properly handle transparency 
 in PNG file. The problem I have is that the transparency in PNG files are not 
 at all handled and we see a lot of unexpected black or dark portions.  I 
 strongly recommend the use of osgdb_png.so (or .dylib) for handling png 
 images instead of imageio.

looks like that the current implementation of imageio works with
premultiplied alpha, ideally all occurences of
kCGImageAlphaPremultipliedFirst should be replaced by
kCGImageAlphaFirst, but some test-data could help isolating the problem.

cheers,
Stephan

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


Re: [osg-users] Question about osgManipulator::GridConstraint

2009-11-26 Thread Matthias Asselborn
Hello, Robert, 

did you get the file? 

Thank you!

Cheers,
Matthias

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





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


Re: [osg-users] Custom code in OSG core

2009-11-26 Thread Sukender
Hi Robert, JS and all,

Ok. So, I suggest:
- Image::get/setProxyLoadCallback (but isn't it the same as subloadcallbacks??)
- An option for readers to not load textures but define a callback instead
- Calls to if (!data  proxy) (*proxy)(); when accessing pixel data
- Image::onApplied(), as described in my previous post

Does it sounds good to you?

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Robert Osfield robert.osfi...@gmail.com a écrit :

 Hi Sukender,
 
 I feel that just adding an flag into osg::Image or a callback to do
 the loading, would be better than requiring a whole new osg::Image
 subclass.  This way osg::ImageStream would also benefit from the
 capability.
 
 The real question is how do to wire it all up?  Do we just rely on
 user code to invoke the loading or do we do it automatically? If we
 did it automatically do we the load in the thread that requires the
 concrete osg::Image data or do we have it do in the osgDB::ImagePager
 a bit like the way that PagedLOD/ProxyNode work?
 
 I guess the first step would be to do the load manually. Then take it
 from there.
 
 Robert.
 
 On Thu, Nov 26, 2009 at 2:49 PM, Sukender suky0...@free.fr wrote:
  Hi Robert, hi all,
 
  Glad to see there's a half-solution. But I must admit I got more
 questions than before!
 
  I guess UnrefImageAfterApply won't be called if I don't even display
 the scene, so how will writers behave? If they try to read image data,
 that won't work of course.
  But will they simply write the image filename, and will
 writeImageFile() simply do nothing with an Image having no data?
 
  Do you think it would be useful that we (or I) create an
 osg::ImageProxy class? Derivated from osg::Image? Or is there
 something that already does it?
  This ImageProxy may be handled by image reader/writers by simply
 copying or ignoring the file (if there is no change in the file
 extension).
 
  And about the texture, should it call something like bool
 Image::onApplied() in UnrefImageAfterApply()?
  - For Images, it would simply return true, meaning the texture
 should unref the image,
  - For ProxyImages, it would unload the data and return false,
 meaning the texture must not unref.
 
  If you got better ideas, I'm all ears!
  Cheers,
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 
  - Robert Osfield robert.osfi...@gmail.com a écrit :
 
  Hi Sukender,
 
  So what you are after is a proxy Image class :-)
 
  One possible tweak would be to enable th OSG to carry osg::Image
  which
  have their FileName field set, but have their data set to null so
  they
  contain no data.  This is the easy part as you can do this right
 now
  -
  the next bit is getting the OSG to handle these osg::Image objects
  gracefully.
 
  The issue of proxy image is something that the osg::Texture's
  UnrefImageAfterApply could do with as it currently discards the
 whole
  osg::Image, so later on when you try to save the model there is no
  Image to provide the FileName to use to write to file you want to
  write out.
 
  So... this type of feature I can see having multiple uses beyond
 this
  particular plugin and worthy of support into the core OSG.
 
  Robert.
 
  On Wed, Nov 25, 2009 at 10:26 PM, Sukender suky0...@free.fr
 wrote:
   Hi Robert and Paul,
  
   Oh, I'm sorry I shouldn't have written core OSG: it's maybe
 more
  in osg plugins I guess...
   I have to load huge models. By huge I mean a few thouthands
  triangles but GB of textures. Of course loading such a model
 simply
  leads to a std::bad_alloc. This is why I posted something about
 lazy
  textures/images on the mailing list: I must load the model but I
 don't
  want all the textures to be loaded at the same time. Depending on
 what
  I want to acheive I may need:
   1. To leave textures unloaded, but I want writers plugins to do
 as
  if the texture was loaded (= the writer simply says the texture
 is
  abcd.jpg).
   2. To load low-res textures (or maybe not loaded at all), but I
 want
  hi-res ones to be switched when needed, especially when writing.
  
   I don't expect solutions to be suited for realtime rendering.
 I
  only need those huge models to be loaded, then processed (=
 modifiy
  geometry without touching the texture or vice-versa, modify only a
  part of the scene...) and written to disk for future rendering.
  
   I got a few ideas for these needs:
   - Add a noTexture option to readers that stores somewhere the
 path
  of the texture file, and add an option to writers to do as if
 the
  texture was loaded (but only write to the file the path of the
 image).
  This is why I have custom code in reader/writers. But this is
 clearly
  an ugly solution as I need to modify each reader/writer.
   - Create a lazy image, which is loaded only when accessing
 pixel
  data. But I don't know if it's easy, and how to do it (as discussed
 in
  the corresponding post).
  
   And a final note: all my 

Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Nico Kruithof
Hi Robert,

Perfect! My application works exits normally again. The glider works as
well. Only the tetra file didn't. It crashes after the first viewer.

osgcamerad.exe -j 3 d:\tetra.osg:

Warning: Could not find plugin to read objects from file 3.
GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
Constucting BufferObject 01F1AD18
GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
Constucting BufferObject 01F1AC98
GLBufferObjectSet::deleteAllGLBufferObjects() not implemented yet.
GLBufferObjectSet::deleteAllGLBufferObjects() not implemented yet.
Texture::TextureObjectManager::deleteAllTextureObjects() _contextID=0
GLBufferObjectSet::discardAllGLBufferObjects()
Destucting BufferObject 01F1AD18
GLBufferObjectSet::discardAllGLBufferObjects()
Destucting BufferObject 01F1AC98
Texture::TextureObjectManager::discardAllTextureObjects() _contextID=0
_numActiveTextureObjects=0
BufferObject::releaseGLObjects()
BufferObject::releaseGLObjects()
BufferObject::releaseGLObjects()

-- Nico

On Thu, Nov 26, 2009 at 1:57 PM, Nico Kruithof nicokruit...@gmail.comwrote:

 Sure, I'll do that tonight. Thanks a lot for looking into this.

 -- Nico


 On Thu, Nov 26, 2009 at 1:36 PM, Robert Osfield 
 robert.osfi...@gmail.comwrote:

 Hi Nico,

 I've tracked down issues with both the clean up of the texture object
 pool and buffer object pool that has required introduction of some new
 methods for cleanup.  I have checked into svn/trunk the initial cut of
 this code, it enables osgcamera -r 5 tetra.osg to work just fine, as
 well as a range of other test models.

 The new code is only provisional though - it outputs lots of debug
 info the console, and isn't yet tidied up and completed, it is
 however, far enough along to warrant wider testing.  Could you check
 out OSG svn/trunk and then test this against your app and let me know
 how you get on.

 Thanks,
 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] imageio problems and possible solutions on loading some PNG images.

2009-11-26 Thread Tatsuhiro Nishioka
Hi Robert and Stephan,

I can see the problem using osgviewer.
The images I use are available from:
http://cvs.flightgear.org/viewvc/data/Textures/Sky/


Here I list some images that show the problems:

[Black Edges instead of transparency]
broken_n.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
cirrus_n.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
cl_cb.png: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced
cl_cu.png: PNG image data, 1024 x 512, 8-bit/color RGBA, non-interlaced
cl_cu2.png: PNG image data, 512 x 256, 8-bit/color RGBA, non-interlaced
cl_cumulus.png: PNG image data, 1024 x 1024, 8-bit/color RGBA, non-interlaced
cl_ns.png: PNG image data, 1024 x 1024, 8-bit/color RGBA, non-interlaced
cl_ns_white.png: PNG image data, 1024 x 1024, 8-bit/color RGBA, non-interlaced
cl_stratus.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
cloud.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
few_n.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
inner_halo.png: PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced
moon.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
outer_halo.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
scattered_n.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
sun.png: PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced

[CGBitmapContextCreate got error]
broken.png: PNG image data, 256 x 256, 8-bit gray+alpha, non-interlaced
cirrus.png: PNG image data, 256 x 256, 8-bit gray+alpha, non-interlaced
cl_cumulus2.png: PNG image data, 1024 x 1024, 8-bit gray+alpha, non-interlaced
cl_st.png: PNG image data, 256 x 256, 8-bit gray+alpha, non-interlaced
few.png: PNG image data, 256 x 256, 8-bit gray+alpha, non-interlaced
scattered.png: PNG image data, 256 x 256, 8-bit gray+alpha, non-interlaced


Stephan, 
I tried kCGImageAlphaFirst as you said, but it only showed the following errors 
on loading RGBA images (e.g. cl_cumulus.png):
Error: CGBitmapContextCreate: unsupported parameter combination: 8 integer 
bits/component; 32 bits/pixel; 3-component colorspace; kCGImageAlphaFirst; 4096 
bytes/row.
Error: CGContextDrawImage: invalid context

Could you make some tests with these images on your end too?

Best,
Tat

On Nov 26, 2009, at 11:07 PM, Robert Osfield wrote:

 HI Tat,

 I don't have a OSX system to test against personally, but for those
 who do have OSX and wish to help investigate this bug with the imageio
 plugin it would be worth putting together a small set of test images
 that you see problems so that they can reproduce the problem
 themselves.

 Also if we can settle upon an existing OSG example or a small mod to
 one that can help illustrate the issue then this would also help.  For
 instance do you see the problem if you do something as simple as:

  osgviewer --image myimage.png

 Cheers,
 Robert.

 On Thu, Nov 26, 2009 at 1:12 PM, Tatsuhiro Nishioka
 tat.fgmac...@gmail.com wrote:
 Hi there,

 I have two problems in drawing PNG image using imageio on Mac OS X.

 One problem is that 16-bit grayscale textures (PNG images) cannot be loaded 
 due to the following errors:

 Error: CGBitmapContextCreate: unsupported parameter combination: 8 integer 
 bits/component; 16 bits/pixel; 1-component colorspace; kCGImageAlphaLast; 
 512 bytes/row.
 Error: CGContextDrawImage: invalid context

 The cause of this is that CGBitmapContextCreate doesn't accept the 
 combination of 1 component colorspace and 16bps. One solution I can think of 
 at this moment is to create a bitmap context using RGBA colorspace (as the 
 same as the 32bit RGBA image). This works fine on FlightGear but I'm not so 
 sure if this works on all 16bpp images.


 Another problem is that imageio's libpng doesn't properly handle 
 transparency in PNG file. The problem I have is that the transparency in PNG 
 files are not at all handled and we see a lot of unexpected black or dark 
 portions.  I strongly recommend the use of osgdb_png.so (or .dylib) for 
 handling png images instead of imageio.

 More detail explanation, screenshots, and an experimental patch for solving 
 these two problems are available from:
 http://macflightgear.sourceforge.net/home/development-notes/devnote-nov-26-2009
 Please try my patch and see if it also works on many OSG applications.

 FYI, I'm using OSG/svn as of a few day back on Mac OS 10.5.8 / intel.

 Best,

 Tat

 ___
 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

Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Robert Osfield
HI Nico,

On Thu, Nov 26, 2009 at 5:16 PM, Nico Kruithof nicokruit...@gmail.com wrote:
 Hi Robert,
 Perfect! My application works exits normally again. The glider works as
 well. Only the tetra file didn't. It crashes after the first viewer.

So you still have a crash with tetra.osg then?  FYI, I've made a
couple of other fixes this afternoon, but the code isn't ready to
integrate yet.  I can't say whether it will fix anything more for you
as the tetra.osg model has been working fine since my fixes I checked
in this morning and notified you about.

 osgcamerad.exe -j 3 d:\tetra.osg:
 Warning: Could not find plugin to read objects from file 3.

The -j option is not valid, trying using -r for repeat ;-)


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


Re: [osg-users] Slave camera configuration by config file

2009-11-26 Thread Paul Martz

Paul Martz wrote:

 OSG_CAMERA_FILE=Configuration/AllScreens.view osgviewer cow.osg

   ^^
Oops, that's OSG_CONFIG_FILE, of course.
   -Paul


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


Re: [osg-users] Slave camera configuration by config file

2009-11-26 Thread Jean-Sébastien Guay

Hi Paul,

I have a system with four displays arranged as a 2x2 powerwall. If I 
simply bring up osgviewer cow.osg, osgViewer seems to think that the 
four displays are arranged horizontally. That seems like a fine default 
assumption.


Yes, I've seen this too. On Windows (and I expect on Linux and OSX too) 
there's an API call you can make to get the actual offset of a screen, 
so you can detect how the screens are physically arranged (as long as 
the system's display properties are set correctly of course). We use 
this in our software to set up layouts like the one you want, and I was 
thinking of submitting a modification to osgViewer (probably 
GraphicsWindowWin32) to take this into account.


But yeah, if you can find a way to make a config file that will do it as 
you want, that will be a good solution. And simpler than autodetecting 
correctly :-)


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] [3rdparty] How to configure VPB to start compiling database at random tiles.

2009-11-26 Thread Torben Dannhauer
Hi,

I compile a large Database (800GB terraindata) to a single database.

so far it is compiling, but besides 2 processes, all other osgdem instances are 
more or less at idle, waiting for disk.

My source data is spreaded above 4 Disks to lower the disk load an consist of 
the following directories with their content files:
-North
-South
-East
-West
-HiRes-Inlay
-DEM

unfortunately VPB starts to render in the south section and assign worktasks 
from south to all cores - therefore my disk containtin south is under heavy 
load, and all other disks are at idle.

Is it possible to configure VPB to start at random tiles, so some tasks are 
working on north data, some other at HiRes and so on?
This way ALL disks would be under load and no osgdem instance would have to 
idle :)

Thank you for your help.

Torben



Thank you!

Cheers,
Torben

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





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


Re: [osg-users] broken osgconv.exe

2009-11-26 Thread Mattias Helsing
Hi Ted, J-S, all,

First - all creds and kudos for the vc90 binary win32 2.8.2 packages
to Sukender, not me.

Second - did you (Ted) sort this out? Can we drop it or do you still
have problems?

Mattias

On Wed, Nov 25, 2009 at 1:03 PM, Mattias Helsing helsin...@gmail.com wrote:
 Hi again Ted,

 I can't find any dll that depends on msvc*80 runtime dll but may have
 some clues to a solution.

 On Tue, Nov 24, 2009 at 9:03 PM, ted morris ted.mor...@gmail.com wrote:

 Yes, I think I resolved finding the 3rdparty dependencies. But for some
 reason, the osgdb_xxx pluggins listed in the last e-mail:

 osgdb_gz
 osgdb_curl
 osgdb_ive
 osgdb_png
 osgdb_tiff
 osgdb_tiffd

 These all depend on zlib1.dll, which on my system depend correctly on
 msvcp90.dll. I'm guessing that somehow your system picks up some other
 zlib1. The zlib module is very common so there is a good chance you
 already got it embedded with other software. Try setting the PATH
 explicitly like:
 set PATH=vc90_dependencis\bin;vc90_osg\bin
 before running dependency walker or osgviewer


 dependencywalker shows that these pluggin dlls are still looking for
 MSVCR80.DLL  *and* MSVCR90.DLL

 No, osgdb_tiff, _curl and the other plugin in your list depends on
 msvcr90.dll. However they also depend on many other modules that may,
 in turn, depend on whatever runtime they were compiled against.
 Hitting f9 in dependency walker will show you the full path to all
 listed dlls


 And the other pluggins can't find MSVCR90.DLL.

 I think this is a flaw in dependency walker. I don't have your system,
 but my system reports this too where top dependency msvcp90 depends on
 msvcr90. If this is the case also for you then just ignore.

 I'm dropping this for now since I can't find anything wrong with the
 binaries on the website. Drop me screenshots, text logs or whatever
 and I'll investigate further.

 cheers
 Mattias


 bizarre.

 thanks,
 t



 Well, I tried dependencywalker.com and opened up the pluggins.

 On Mon, Nov 23, 2009 at 7:24 PM, Mourad Boufarguine
 mourad.boufargu...@gmail.com wrote:

 Hi Ted,
 You can use the Dependency Walker (http://www.dependencywalker.com/) to
 check the version number of the runtime, the dependencies were compiled
 against.
 I just tried it with the zlib and png dlls contained in VisualStudio 9
 (2008) SP1 prebuild dependencies
 (http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies),
 and I found that the release versions were compiled with the 9.0.30729
 runtime, which is actually 2008 SP1. The debug version, though, was
 compiled with the 9.0.21022 runtime , which is the 2008 runtime. The zlib
 is used in both ive and gz plugins. I don't see  how you get the message
 about the 2005 runtime dependency. Double check in the output window of VS
 that the zlib and png dlls that are actually loaded are the good ones.
 Regards,
 Mourad
 On Tue, Nov 24, 2009 at 1:21 AM, ted morris ted.mor...@gmail.com wrote:

 credist_x86 VisualStudio 2005 (v8) runtimes

 ___
 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] normal vectors aren't causing culling

2009-11-26 Thread Jim Brooks
This is very basic

This test-code snippet is supposed to create a simple square with a
normal vector (or vectors).
After rotating it around with the trackball manipulator, the square is
never culled.
Same behavior on OSG 2.6 and 2.8.

Also, having trouble with with a dome composed of squares constructed similarly.
No matter how the normal vectors are assigned, every square is culled
when the viewpoint is inside the dome (the opposite is needed).
Is OSG computing normal vectors after the app sets them?

void
MakeModelSquare( void )
{
osg::ref_ptrosg::Geometry geom = new osg::Geometry;

// Vertexs.
osg::ref_ptrosg::Vec3Array vertexs = new osg::Vec3Array;
const fp x =  10.0f;
const fp y = -50.0f;  // Z (viewplane depth)
const fp z =  10.0f;
vertexs-push_back( osg::Vec3f(  x, y,  z ) );
vertexs-push_back( osg::Vec3f( -x, y,  z ) );
vertexs-push_back( osg::Vec3f( -x, y, -z ) );
vertexs-push_back( osg::Vec3f(  x, y, -z ) );
geom-setVertexArray( vertexs.get() );

// Colors.
osg::ref_ptrosg::Vec4Array colors = new osg::Vec4Array;
colors-push_back( osg::Vec4f( 1.0f, 1.0f, 0.0f, 1.0f ) );
geom-setColorArray( colors.get() );
geom-setColorBinding( osg::Geometry::BIND_OVERALL );

// Normal vectors.
const osg::Vec3f crossProduct = ((*vertexs)[0]) ^ ((*vertexs)[1]);
osg::ref_ptrosg::Vec3Array normals = new osg::Vec3Array;
#if 0
normals-push_back( crossProduct );
geom-setNormalArray( normals.get() );
geom-setNormalBinding( osg::Geometry::BIND_OVERALL );
#else
normals-push_back( crossProduct );
normals-push_back( crossProduct );
normals-push_back( crossProduct );
normals-push_back( crossProduct );
geom-setNormalArray( normals.get() );
geom-setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
#endif

// Compose geode.
osg::ref_ptrosg::Geode geode = new osg::Geode;
geom-addPrimitiveSet( new osg::DrawArrays( GL_QUADS, 0, 4 ) );
geode-addDrawable( geom.get() );

// Attach to scene-graph.
mRootGroup-addChild( geode.get() );
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] normal vectors aren't causing culling

2009-11-26 Thread Simon Hammett
2009/11/26 Jim Brooks jimbl...@gmail.com

 This is very basic

 This test-code snippet is supposed to create a simple square with a
 normal vector (or vectors).
 After rotating it around with the trackball manipulator, the square is
 never culled.
 Same behavior on OSG 2.6 and 2.8.


Culling is not enabled by default, you have to explicitly enable it.

With OpenGL, normal vectors have nothing to do with culling,
they are only used for lighting purposes; culling is determined
by the primitive vertices and the sign of the area they give
after projection to screen(ish) coordinates.



 Also, having trouble with with a dome composed of squares constructed
 similarly.
 No matter how the normal vectors are assigned, every square is culled
 when the viewpoint is inside the dome (the opposite is needed).
 Is OSG computing normal vectors after the app sets them?


No, OSG never computes normals for you.
For your dome you either need to swap the vertex order,
or change the culling mode:

http://www.opengl.org/sdk/docs/man/xhtml/glCullFace.xml

Can't recall the OSG equivalent at the mo, you'll have to look it up.


// Normal vectors.
const osg::Vec3f crossProduct = ((*vertexs)[0]) ^ ((*vertexs)[1]);


This is wrong. You are doing the crossproduct of 2 vertices, not 2 vectors.
You want:

osg::Vec3Array  vx = *vertexs.get();
osg::Vec3fcrossProduct = (vx[2] - vx[1]) ^ (vx[1] - vx[0]);

The rest looks OK though.

Btw, the plural of vertex is vertices, not vertexs.

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


Re: [osg-users] [osgOcean] Wake effects?

2009-11-26 Thread Tian Ma
Hi Kim:

Thank you!

By now, I am using the olde version. And I will try more.

Regards,
Tian



Kim Bale wrote:
 Hi Tian,
 
 It did highlight some useful stuff. Unfortunately I won't get round to
 fixing this immediately.
 
 However, if you want to use the version in the trunk you can probably
 get round it by replacing the uniform booleans one by one with hard
 coded values in the water shader for the options you want to enable
 until it stop complaining. Obviously this is a temporary fix until I
 get round to investigating further.
 
 K.
 
 2009/11/26 Tian Ma :
 
  Hi Kim:
  
  Thanks for your helpful work!
  
  Does the information inf file ocean_output.txt help?
  
  Regards,
  Tian
  
  
  Kim Bale wrote:
  
   Hi Peter,
   
   Well this is really what the many weird and wonderful configurable
   options are for in OceanScene, nearly every effect can be turned off
   an on to suit the graphics card configuration. I think it's probably
   better to do it this way, rather than grouping them together to give
   the low,medium and high settings, as you can fine tune the rendering
   to suit the available hardware.
   
   The core water shader itself isn't so expensive, it's largely the pre
   render passes that bring down the frame rate and all of these can be
   turned off and on as desired.
   
   (I think) the problem with Tians card at the moment is that the water
   shader in the trunk has used up all the maximum number of uniforms
   permitted on nvidia 7 series card which use a version of glsl that I'm
   not 100% sure of. But I think this can be worked around, I just
   haven't got round to it yet (plus it's quite hard to test without a
   suitable card)
   
   K.
   
   
   2009/11/26 Peter Bear :
   
   
Would it be possible to implement sort of a config option with 2 or 
more shaders for multiple quality levels? This would allow for the use 
of one shader if you have a more powerful card, or another shader for 
an older card.
Peter

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





___
osg-users mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



   ___
   osg-users mailing list
   
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
   
    --
   Post generated by Mail2Forum
   
  
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=20410#20410
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] [build] How to properly use the OSG_GL3_AVAILABLE CMake option?

2009-11-26 Thread John Price
Hi Robert,

My understanding of the way bindness graphics actually achieves its speedup is 
by not requiring CPU dereferencing of graphic object pointers and the likely L2 
cache misses this causes.

nVidia states:

OpenGL has evolved in a way that allows applications to replace many of the 
original state machine variables with blocks of user-defined data. For example, 
the current vertex state has been augmented by vertex buffer objects, 
fixed-function shading state and parameters have been replaced by 
shaders/programs and constant buffers, etc.. Applications switch between coarse 
sets of state by binding objects to the context or to other container objects 
(e.g. vertex array objects) instead of manipulating state variables of the 
context. In terms of the number of GL commands required to draw an object, this 
enables applications to be an order of magnitude more efficient. However, this 
explosion of objects bound to other objects has led to a new bottleneck - 
pointer chasing and CPU L2 cache misses in the driver, and general L2 cache 
pollution. 

Recent OpenGL graphics applications tend to change state at roughly these 
frequencies:

for  (...) { // cold
data downloads, render target changes, etc.
for (...) { // warm
bind textures
for (...) { // hot
bind constants
bind vertex buffers
Draw();
}
}
}

The most frequent state changes are binding vertex buffer objects (every draw), 
followed closely by binding constant buffers. Vertex buffer and constant buffer 
binds are significantly more expensive than one might expect. These binds 
require several reads from the driver internal object data structure to 
accomplish what the driver actually needs to do. In an OpenGL driver, it looks 
like this:

name-obj (lookup object by name) 
obj-{refcount, GPU address, state, etc.} (dereference object to reference 
count it, to get its GPU virtual address, and validate its state). 

Each of these dereferences has a high probability of causing a CPU L2 cache 
miss due to the inherently LRU-eviction-unfriendly nature of graphics 
applications (each frame starts over at the beginning). These L2 cache misses 
are a huge bottleneck in modern drivers, and a penalty paid for every frame 
rendered.

End nVidia states.

I think these extensions address new bottlenecks created by the switch to gl3 
style vertex and constant buffers, shaders for everything, etc. It seems to be 
a graphic driver bottleneck, not a scenegraph problem. But what nVidia is doing 
is admitting the problem and is trying to provide OpenGL users a way to take 
advantage of an optimization technique.
The OpenGL extensions are GL_NV_shader_buffer_load and 
GL_NV_vertex_buffer_unified_memory.

I am not competent enough with gl3 yet to begin to implement these in code, but 
it seems it may be worth doing that at some point. I like to add quality in 
things I pursue. As I progress, I will keep in touch. For now I am a toddler.

Thank you!

Cheers,
John

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





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


[osg-users] [build] problem building OSGOCean in fedora 11

2009-11-26 Thread Aburik Mathnan
Hi,

When i try to make OSG Ocean in my fedora 11, i get the following errors

[r...@coral osgOcean]# cmake .
-- Using FFTSS (LGPL) as FFT library.
CMake Error: The following variables are used in this project, but they are set 
to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake 
files:
OPENTHREADS_LIBRARY_DEBUG
linked by target osgOcean in directory /usr/src/OSG/osgOcean/src/osgOcean

-- Configuring incomplete, errors occurred!

can any one tell me how should i correct this. i have already installed FFTSS 
and open thread in my system. i checked, it exist in my /usr/local/ directory.

Thank you!

Cheers,
Aburik

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





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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Nico Kruithof
Aargh. Yes, -r it was. I'll try this tonight or tomorrow.

Nico

On Thu, Nov 26, 2009 at 7:12 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 HI Nico,

 On Thu, Nov 26, 2009 at 5:16 PM, Nico Kruithof nicokruit...@gmail.com
 wrote:
  Hi Robert,
  Perfect! My application works exits normally again. The glider works as
  well. Only the tetra file didn't. It crashes after the first viewer.

 So you still have a crash with tetra.osg then?  FYI, I've made a
 couple of other fixes this afternoon, but the code isn't ready to
 integrate yet.  I can't say whether it will fix anything more for you
 as the tetra.osg model has been working fine since my fixes I checked
 in this morning and notified you about.

  osgcamerad.exe -j 3 d:\tetra.osg:
  Warning: Could not find plugin to read objects from file 3.

 The -j option is not valid, trying using -r for repeat ;-)


 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] [vpb] lots of failed tasks: Resuming vpbmaster run

2009-11-26 Thread Torben Dannhauer
Hi,

Now an update to my compiling Problem:

I have new hardware ( Nehalem architecture )

I installed a fresh system:
64 Bit Kubuntu 9.10 Karmic Koala with OSG 2.8.2 and the corresponding VPB.

In constrast to my last setup, local rendering with all source data does not 
fail. Last night I canceled the compiling after the first 1000 tasks, nothing 
failed. 
@ my last (32bit) setup, even this was not possible.

It seems that 64 bit solves the handle problem, which caused my old setup to 
crash in arbitrary libraries.

I'll report if my compiling was successful finished.

A detailed howto will be posted at openscenegraph.


Thank you for your help,

Torben

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





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