Re: [osg-users] Fwd: Ambient Occlusion Implementation 2 review

2012-02-23 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

I hope you understand the major idea behind this implementation. May
you are able to boost it massivly or you are able to better integrate
this algorithm.

regards
adrian

Am 11. Februar 2012 12:49 schrieb Frederic Bouvier fredlis...@free.fr:
 Hi Robert,

 Le 10/02/2012 16:45, Robert Osfield a écrit :
 Hi Adrian,

 I've not got most of the way through my submissions backlog - can
 finally see the light at the end of the tunnel :-)  So I'm now in much
 better place to start looking at your Ambient Occlusion work.  Do you
 have any updates to the source since the your code drop on the 21st of
 December?  If you have any papers or webpages that explain the
 approach I'd welcome pointers to these as well.

 Adrian posted this link :
 http://webaddon3d.assoftware.ch/AE/SSAO/GPUPro2_Proposal_Adrian_Egli_CUBIC_SPLINE_BASED_AMBIENT_OCCLUSION.rar
 (tested today)
 there is a pdf file in it that describes his algorithm.

 Regards,
 -Fred

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



-- 

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


Re: [osg-users] Fwd: Ambient Occlusion Implementation 2 review

2011-12-21 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

The pdf can be publish on OSG web page if you like. I really like to
contribute such nice implementations, but unfortunately i don't have
enough spare time to work on. I hope the community can help me making
the stuff robust and fast :-) The biggest idea is the math in the
implementation, solving a linear equation. Any comments makes me
happier :-)

adrian

2011/12/21 Wang Rui wangra...@gmail.com:
 Hi Adrian,

 I'd like to help if you think it possible. I'm going to finish my
 second OSG book in a few days and then I'll have time to contribute to
 the community again. I myself implements a TUIO binding and consider
 to submit a new manipulator with it later, but I believe your work
 will really shock others a lot and will be the best Xmax gift for
 everyone. :-)

 Wang Rui


 2011/12/20 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com:
 Hello all,

 Chrismas and i present this code.  Who can support me preparing this
 algorithm to integrate into the osg core lib.

 /adrian


 -- Forwarded message --
 From: Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com
 Date: 2011/10/16
 Subject: Ambient Occlusion Implementation 2 review
 To: rob...@openscenegraph.com, urs.kuenz...@bfh.ch


 Hi Robert,

 I am working hard on different projects as well as you do. A long time
 ago i wrote an ambient occlusion algorithm working with
 openscenegraph. May you can review it and may we can once this
 algorithm integrate into OSG core library. I though i could public the
 source and document in GPU PRO but they doesnt like this fast approach
 do of politics i guess, or may this stuff is really as slow as the
 told me. As i dont get the time to rewrite it for a 2nd conference,
 book, etc. may we could improve the idea and integrate it deeply into
 the core library of openscenegraph and we can but a reference on the
 osg webpage (open source publication) , what do you think?

 Please download an have a look into the windows bin32 files and exe.

 http://webaddon3d.assoftware.ch/AE/SSAO/GPUPro2_Proposal_Adrian_Egli_CUBIC_SPLINE_BASED_AMBIENT_OCCLUSION.rar


 regards
 adrian

 --
 
 Adrian Egli


 --
 
 Adrian Egli

 ___
 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



-- 

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


Re: [osg-users] Fwd: Ambient Occlusion Implementation 2 review

2011-12-21 Thread Adrian Egli OpenSceneGraph (3D)
Hello Glenn,

The attached code is working, you can build it or just test on win32
with the build attached code. The only problem is, that the working
code is only tested with NVidia GPUs and i am not sure that the way i
implement the idea is OSG standard. What i am looking for is:
- review with respect to correctness ( coding standard )
- review with respect to performance
- and so on

The whole project can be used as OSG (LGPL) licence , i am the author
of the the whole stuff. My we should append the PDF close to the
project, otherwise further users, authors dont really understand why
and how the SSAO stuff is working. The whole project should deeply be
intergrate into osg core with max performance and so on.

I hope the request gets more clear now. if you have any questions
please re-contact me

/adrian


2011/12/21 Glenn Waldron gwald...@gmail.com:
 Adrian,

 Can you clarify the situation here? You have working code but you can't
 release it? You want to re-implement the algorithm under a different
 license?

 Glenn Waldron / @glennwaldron


 On Tue, Dec 20, 2011 at 5:10 AM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:

 Hello all,

 Chrismas and i present this code.  Who can support me preparing this
 algorithm to integrate into the osg core lib.

 /adrian


 -- Forwarded message --
 From: Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com
 Date: 2011/10/16
 Subject: Ambient Occlusion Implementation 2 review
 To: rob...@openscenegraph.com, urs.kuenz...@bfh.ch


 Hi Robert,

 I am working hard on different projects as well as you do. A long time
 ago i wrote an ambient occlusion algorithm working with
 openscenegraph. May you can review it and may we can once this
 algorithm integrate into OSG core library. I though i could public the
 source and document in GPU PRO but they doesnt like this fast approach
 do of politics i guess, or may this stuff is really as slow as the
 told me. As i dont get the time to rewrite it for a 2nd conference,
 book, etc. may we could improve the idea and integrate it deeply into
 the core library of openscenegraph and we can but a reference on the
 osg webpage (open source publication) , what do you think?

 Please download an have a look into the windows bin32 files and exe.


 http://webaddon3d.assoftware.ch/AE/SSAO/GPUPro2_Proposal_Adrian_Egli_CUBIC_SPLINE_BASED_AMBIENT_OCCLUSION.rar


 regards
 adrian

 --
 
 Adrian Egli


 --
 
 Adrian Egli

 ___
 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




-- 

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


Re: [osg-users] Fwd: Ambient Occlusion Implementation 2 review

2011-12-21 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

The posted code is LGPL released. Well once the whole stuff gets
integrated into OSG core, then all of the ssao stuff gets LGPL. May we
have to rewrite the code for best fitting into osg core, but dont
worry about licence. As i am the author of the SSAO idea and stuff, i
can release it without any restriction.

Only one wish i have: Lets mention me as the author of this spline
based ssao :-)

adrian

2011/12/21 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com:
 Hi Glenn,

 Oh thank you to mention that, it was my fault. Well i attach here the
 whole source code i have, the current one.
 I hope this will help you and the others.

 /adrian


 2011/12/21 Glenn Waldron gwald...@gmail.com:
 Adrian,

 Sorry -- I was asking because ffssao.cpp is empty; it just says source code
 of the cubic spline-based AO not released

 Glenn Waldron / @glennwaldron



 On Wed, Dec 21, 2011 at 10:18 AM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:

 Hello Glenn,

 The attached code is working, you can build it or just test on win32
 with the build attached code. The only problem is, that the working
 code is only tested with NVidia GPUs and i am not sure that the way i
 implement the idea is OSG standard. What i am looking for is:
 - review with respect to correctness ( coding standard )
 - review with respect to performance
 - and so on

 The whole project can be used as OSG (LGPL) licence , i am the author
 of the the whole stuff. My we should append the PDF close to the
 project, otherwise further users, authors dont really understand why
 and how the SSAO stuff is working. The whole project should deeply be
 intergrate into osg core with max performance and so on.

 I hope the request gets more clear now. if you have any questions
 please re-contact me

 /adrian


 2011/12/21 Glenn Waldron gwald...@gmail.com:
  Adrian,
 
  Can you clarify the situation here? You have working code but you can't
  release it? You want to re-implement the algorithm under a different
  license?
 
  Glenn Waldron / @glennwaldron
 
 
  On Tue, Dec 20, 2011 at 5:10 AM, Adrian Egli OpenSceneGraph (3D)
  3dh...@gmail.com wrote:
 
  Hello all,
 
  Chrismas and i present this code.  Who can support me preparing this
  algorithm to integrate into the osg core lib.
 
  /adrian
 
 
  -- Forwarded message --
  From: Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com
  Date: 2011/10/16
  Subject: Ambient Occlusion Implementation 2 review
  To: rob...@openscenegraph.com, urs.kuenz...@bfh.ch
 
 
  Hi Robert,
 
  I am working hard on different projects as well as you do. A long time
  ago i wrote an ambient occlusion algorithm working with
  openscenegraph. May you can review it and may we can once this
  algorithm integrate into OSG core library. I though i could public the
  source and document in GPU PRO but they doesnt like this fast approach
  do of politics i guess, or may this stuff is really as slow as the
  told me. As i dont get the time to rewrite it for a 2nd conference,
  book, etc. may we could improve the idea and integrate it deeply into
  the core library of openscenegraph and we can but a reference on the
  osg webpage (open source publication) , what do you think?
 
  Please download an have a look into the windows bin32 files and exe.
 
 
 
  http://webaddon3d.assoftware.ch/AE/SSAO/GPUPro2_Proposal_Adrian_Egli_CUBIC_SPLINE_BASED_AMBIENT_OCCLUSION.rar
 
 
  regards
  adrian
 
  --
  
  Adrian Egli
 
 
  --
  
  Adrian Egli
 
  ___
  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
 



 --
 
 Adrian Egli
 ___
 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




 --
 
 Adrian Egli



-- 

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


Re: [osg-users] help running examples

2011-10-22 Thread Adrian Egli OpenSceneGraph (3D)
Hello James,

What help does you need? Running the samples, if this is the only
thing you need, lets have a look into the documentation on
www.openscenegraph.org and you can also have a further look into the
runexamples.bat file

regards
adrian

2011/10/22 James Morgan r...@therabbitshome.com:
 Thank you!

 Cheers,
 James

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





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




-- 

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


Re: [osg-users] Shadows in large Urban area

2010-12-28 Thread Adrian Egli OpenSceneGraph (3D)
Hi Linda,

For such cases we have 2 reasonable shadow tecs:
- Light Space Shadow Maps
- Parallel Splited Shadow Maps

did you tried out this both with osgShadow.exe -pssm  or with
osgShadow -lispsm ...

Adrian

2010/12/28 Linda Lee zenith...@hotmail.com:
 Dear all,

 I am new to OSG and is thinking of implementing shadows in a large urban area 
 with lots of buildings.  Could anyone tell me if this is feasible and what 
 shadow tecnique should I used?  Or should I try to implement a customized 
 shadow algorithm?  Would computation performance be an issue?

 Any suggestions and advices would be most welcome.

 Thank you!

 Cheers,
 Linda

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





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




-- 

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


[osg-users] [osgCompute] : Sample CuFFT

2010-08-23 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

did some one still implemented a filter for osgCompute taking an rgba
image (ex. osgTexDemo texture - fft - do some work in frequency
space - inverse fft - render target image on the textured quad)

regards
adrian

-- 

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


Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert, hi others,

I am currently working on image processing pipelines based on GLSL
shaders. Currently we have many different special effects (shaders)
but all of them work encapsulated. May we should also think on other
topic while overwork the shader composite idea. i review the
osgvirtualprogram example, and i am not sure, but believe - in this
example the whole idea is presented of the new shaders with
virtualprogram. what i am wondering is there also a concept how we can
use different shaders in a pipeline. for example (i am hard working on
Screen Space Ambient Occlusion) and it's all working based on osgFX.
But the pipeline needs different FBO (RTT steps) in a pipeline.
(1) Render the whole scene with depth/normal rendering (RTT 1)
(2) Process the RTT 1 with Ambient Occlusion Filter
(3) Render Shadow into RTT 2 (for example Parallel Split Shadow Map
with 4 Maps == 4 Renderings)
(4) 
(x) Bring all together and so on

In some case we have the same scene (object 2 render) then we can use
virtual program, right? but how can we get the pipeline controled, it
would be nice getting a rendering pipeline functionality in the shader
- render into gpu memory and store it (array) and bring it in last
shader back and blend it. We will have final rendering. Would this be
possible or is this to complex to get osg support in controling it?

/adrian


2010/6/30 Robert Osfield robert.osfi...@gmail.com:
 Hi Roland,

 On Tue, Jun 29, 2010 at 10:22 PM, Roland Smeenk roland.sme...@tno.nl wrote:
 1) Provide a way of encapsulating all the details required to
 contribute a single chunk of functionality that will be combined with other 
 active ShaderSet to provide final composed osg::Program.

 Isn't this what I solved with the ShaderMode class?

 I believe ShaderMode and ShaderSet are pretty close in concept, the
 fit a similar role and functionality granularity.  Implementation and
 usage wise they differ, but they have lots of similarity, i.e. they
 are both big cats, but ones a tiger and ones a lion.


 Or is it that you are trying to separate the shader mode associated with a 
 StateAttribute from the part that is responsible for adding of the piece of 
 shader functionality.

 My currently thought is that the various StateAttribute subclasses
 would provide a standard ShaderSet instance that implements their
 functionality, but also make it possible to override this standard
 ShaderSet with custom ones.  For instance we might have a standard
 implementation of osg::Light, but we also want to enable users to have
 their own implementation, by just providing their own
 MyCustomPerPixelLightShaderSet.

 There might also be cases where a osg::StateAttribute subclass might
 dynamically decide which ShaderSet to use depending upon how it's
 configured - this would be if we wanted to reduce the number of
 uniforms by having more pre-configured shaders.

 In my contribution I implemented a single ShaderMode that implements all 
 fixed function lighting possibilities. For new types of lighting it seems 
 more logical to indeed make a more fine grained breakup of ShaderModes.

 However there's a (minor) advantage to this one size fits all lighting 
 code currently.  To enable or disable lighting you simply can override a 
 single mode. In the case where there are multiple lighting modes 
 (directional, spot etc.) overall disabling of lighting needs to be done per 
 lighting type. It might be needed that multiple ShaderSets implementing the 
 same aspect/feature can be switched on or off all together with a single 
 override. This will also be needed for instance in shadow map creation where 
 in the first pass you would like to render geometry into a shadowmap as 
 cheaply as possible and therefore without lighting.
 Perhaps multiple ShaderSets implement a the same aspect/feature in the final 
 program that need to be disabled or enabled collectively. Again in the case 
 of shadowmap creation you would like to only render geometry, no texturing, 
 no lighting, no fog, but you do want to take into account skinned mesh 
 deformation, wind deflection etc.

 I don't yet have any concrete plan on how to manage the case where
 multiple GL enums control particular features.  It might be that it'll
 be best to map some of the controls to uniforms that enable one to
 toggle features on/off such as lighting, but it might also be that we
 it could be best to just pass the all modes on the StateAttribute when
 asking for the appropriate ShaderSet to use and let it decide what to
 use.

 This type of issue I expect to fall out of experience with
 implementing various fixed function functionality such as Lighting.


 3) The ShaderSet would contain list osg::Shader objects, these osg::Shader 
 objects would target which ever part of the overall program that the 
 ShaderSet effects - be in multiple osg::Shader for vertex programs, one of 
 vertex program one for fragment, or any combination.


 I guess you are more targeting shader 

[osg-users] Fwd: [osg-submissions] Missing file ShaderComposer.cpp

2010-06-25 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

As Mourad still reported, there is an issue in the build

CMake Error in src/osg/CMakeLists.txt:
  Cannot find source file ShaderComposer.cpp.  Tried extensions .c .C .c++
  .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

regards.
adrian


-- Forwarded message --
From: Mourad Boufarguine mourad.boufargu...@gmail.com
Date: 2010/6/25
Subject: [osg-submissions] Missing file ShaderComposer.cpp
To: OpenSceneGraph Submissions osg-submissi...@lists.openscenegraph.org


Hi Robert,
The build of svn/trunk is broken because of missing file ShaderComposer.cpp
Cheers,
Mourad
___
osg-submissions mailing list
osg-submissi...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org




-- 

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


Re: [osg-users] [3rdparty] osgShadow issues

2010-05-13 Thread Adrian Egli OpenSceneGraph (3D)
Hi Garrett,

Which shadow algorithm did you used (Softshadow?) Did you still tested the
scene with osgShadow.exe ? there are different algorithm to work with. i am
using parallel split shadow maps and it works fine for most of my
applications.

/adrian

2010/5/6 Garrett Cope garrett.cope@simcen.usuhs.edu

 Hi,

 I'm trying out osgShadow and have encountered various problems that I can't
 seem to find mentioned in the forum. The biggest one is shown in the
 attached jpg. The shadow is rendered below the object (using SoftShadow),
 but it has a bunch of light un-shadowed pixels appearing in the middle. They
 also appear in the self-shadowing on the side of the object.

 The only way I've been able to improve it is by *decreasing* the size of
 the shadow map which leads to other obvious quality issues.

 Has anyone else experienced this problem or could you tell me what the
 proper name is for this issue? I saw a mention of 'shadow acne' in the
 source which sounds like it could be the same thing, but the solution (using
 setBias function) did not change the problem.

 Any insights are appreciated.

 Thank you!

 Cheers,
 Garrett

 [img][/img]

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




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


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




-- 

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


[osg-users] GLEW needed or does OSG support it nativly

2010-05-01 Thread Adrian Egli OpenSceneGraph (3D)
Hi all ,

i have on one machine only the problem ...

Error: glCreateShader not supported by OpenGL driver

Error: glShaderSource not supported by OpenGL driver
Error: glCompileShader not supported by OpenGL driver
Error: glGetShaderiv not supported by OpenGL driver
FRAGMENT glCompileShader  FAILED
Error: glGetShaderiv not supported by OpenGL driver
Error: glCreateProgram not supported by OpenGL driver
Linking osg::Program  id=0 contextID=0
Error: glAttachShader not supported by OpenGL driver
Error: glLinkProgram not supported by OpenGL driver
Error: glGetProgramiv not supported by OpenGL driver
glLinkProgram  FAILED

what can i do ?

/adrian

-- 

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


Re: [osg-users] GLEW needed or does OSG support it nativly

2010-05-01 Thread Adrian Egli OpenSceneGraph (3D)
Hi Roberts,

I thanks you for the short and brief answer.

/regards adrian

2010/5/1 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 The OSG automatically queries for extensions so GLEW is not needed. If
 the OSG is saying that glCreateShader is not supported this is very
 likely that it simply isn't supported by the OpenGL driver/hardware.

 Robert.

 On Sat, May 1, 2010 at 12:06 PM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi all ,
 
  i have on one machine only the problem ...
 
  Error: glCreateShader not supported by OpenGL driver
 
  Error: glShaderSource not supported by OpenGL driver
  Error: glCompileShader not supported by OpenGL driver
  Error: glGetShaderiv not supported by OpenGL driver
  FRAGMENT glCompileShader  FAILED
  Error: glGetShaderiv not supported by OpenGL driver
  Error: glCreateProgram not supported by OpenGL driver
  Linking osg::Program  id=0 contextID=0
  Error: glAttachShader not supported by OpenGL driver
  Error: glLinkProgram not supported by OpenGL driver
  Error: glGetProgramiv not supported by OpenGL driver
  glLinkProgram  FAILED
 
  what can i do ?
 
  /adrian
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


Re: [osg-users] osgmovie http streaming over wireless on Windows

2010-03-02 Thread Adrian Egli OpenSceneGraph (3D)
Hi Mike,

I don't know how u generate the stream. But osg use also support ffmpeg, may
ffmpeg solve the problem you have - i use it under windows without problem.

/adrian

2010/3/2 Mike Greene mgre...@hiwaay.net

 I've seen some answers for using ffmpeg on Linux systems. I would like to
 use my mobile Nokia N900's camera to stream (http or rtsp) over wireless to
 a Windows XP machine and then use the stream as an input to osgmovie,
 something like osgmovie --interactive http://10.1.1.1:8080;. Is this
 possible? As of now, the plugin gives me the message saying it doesn't know
 how to handle that type of file. I can transcode the stream into an mpeg 2
 or 4 format. Could I somehow just mod the QT plugin so that is will accept a
 url as a file name with no extension?

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




-- 

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


[osg-users] osgWidget

2010-02-22 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

I build latest SVN (osg) , VC 2008 and get crash due of osgWidget. The issue
came in within 1 week. But i am not sure. But i did a short review of the
code, there are some checks,
in the widget iteration, based on window object/class. I wonder why the
iteration can get invalid object back from the list. in some part of the
code, the author checks the pointer,
if ( it-valid() ) , is this ok or is this a good idea?

/adrian



-- 

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


[osg-users] osgPPU needs to be updated for OpenSceneGraphSVN : getDeprecatedDotOsgObjectWrapperManager()

2010-02-09 Thread Adrian Egli OpenSceneGraph (3D)
Hi art,

The osgPPU IO_Unit.cpp doesn't build against latest osg svn version due of
the redesign of osgDB:registry
we need to update the whole thing:

osgDB::Registry::instance()-getDeprecatedDotOsgObjectWrapperManager()
-writeObject(...)

solves building problem, but this should be fixed.

/adrian

-- 

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


[osg-users] Collada: Coordinate System

2010-02-09 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

I build the collada 1.4 from SVN trunk and also osg svn. It seems to work
greate, but unfort. the collada up vector (y-axis) and openscenegraphs is
(z-axis). it is this right, would it be not more correct to rotate the
collada?
Similar problem with wavefront obj. I guess it would be more correct to
fix this in the internal plugin ?


/adrian

-- 

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


[osg-users] Collada 1.5 or 1.4.1 ?

2010-02-08 Thread Adrian Egli OpenSceneGraph (3D)
Hello all,

What version of collada is supported in the osg svn core?

/adrian

-- 

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


[osg-users] Visual Studio 9 2008 3rd Party

2010-02-06 Thread Adrian Egli OpenSceneGraph (3D)
Hello all,

does someone have for all existing openscenegraph plugin build the 3rd party
library and is willing to share them. i thinks i would be greate having a
full working OSG environments to test and play with. i am aware of having
some plugins with non LGPL dependencies, but no problem, we can nevertheless
share
them as long as we don't use them for commercial projects.

/regards
adrian

-- 

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


Re: [osg-users] Rendering 2 video stream

2010-02-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

thanks for the short answer. i am looking for a small test.cpp (osgviewer -
render2video - stream) has someone still implemented such a demo?

/adrian

2010/2/2 Cedric Pinson cedric.pin...@plopbyte.net

 Hi,
 I render a video game based on osg into a video stream, you can have an
 idea here http://plopbyte.net/?page_id=6/ you need a firefox plugin to
 watch it.

 The basic idea works on linux with gstreamer. Dont tested on windows but
 because there is gstreamer, maybe it works too.

 In the game code i added a thread that write image at a given rate. This
 file is written into a file descriptor created with mkfifo.
 Then i use a command line when the game is running:
 gst-launch-0.10 filesrc location=myfifo ! videoparse width=800
 height=600 format=15 framerate=20/1 ! ffmpegcolorspace ! videoscale !
 video/x-raw-yuv, width=800, height=600 ! videoflip method=5  ! theoraenc
 quality=40  ! oggmux ! gdppay ! tcpserversink port=12000 21 log

 The advantage using gstreamer is that you can use the codec you want to
 encode the video and stream it over the web.

 The code is inside this project http://hg.plopbyte.net/pokme/

 Cheers,
 Cedric

 --
 Provide OpenGL services around OpenSceneGraph and more
 +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net


 On Mon, 2010-02-01 at 17:39 -0500, r...@sensorstar.com wrote:
  Adrian -
A way that I've used for that type of functionality is through a
  Camera::DrawCallback subclass.  You can get the rendered scene through
  an (osg::Image) readPixels() call and pass it out through whatever
  stream you
  like frame by frame.  It isn't extremely fast since it depends on the
  readPixels() call, but on a Quadro or the like it has always been 'fast
  enough' for my purposes.
 
For the video stream output, I can't offer too much advice because I
  have usually been happy to work with the raw frames, but you can pretty
  much tie whatever you like at that point.
 
  Rudy
 
  On Mon, Feb 01, 2010 at 03:51:27PM +0100, Adrian Egli OpenSceneGraph (3D)
 wrote:
   Hello all,
  
   i am looking for a library or idea how we could render osg into a video
   stream?
  
   /adrian
  
   --
   
   Adrian Egli
 
   ___
   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




-- 

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


[osg-users] Rendering 2 video stream

2010-02-01 Thread Adrian Egli OpenSceneGraph (3D)
Hello all,

i am looking for a library or idea how we could render osg into a video
stream?

/adrian

-- 

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


Re: [osg-users] Build error : CMake

2010-01-28 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

Thanks. CMake works fine.

/Adrian

2010/1/28 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 Unfortuantely I missed a svn add on the new osgParticle serialization
 directory, I've now fixed this and checked it in.

 Robert.

 On Wed, Jan 27, 2010 at 9:25 PM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hello Robert,
 
  i got a issue with:
 
  CMake Error at src/osgWrappers/serializers/CMakeLists.txt:36
  (ADD_SUBDIRECTORY):
 
  add_subdirectory given source osgParticle which is not an existing
 
  directory.
 
  /adrian
 
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


[osg-users] Build error : CMake

2010-01-27 Thread Adrian Egli OpenSceneGraph (3D)
Hello Robert,

i got a issue with:

CMake Error at src/osgWrappers/serializers/CMakeLists.txt:36
(ADD_SUBDIRECTORY):

add_subdirectory given source osgParticle which is not an existing

directory.


/adrian


-- 

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


[osg-users] osgOcean : GameDev have nice screenshot of ocean rendering.

2010-01-13 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

Just FYI
http://www.gamedev.net/community/forums/topic.asp?topic_id=558794

/adrian
-- 

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


Re: [osg-users] osgShadows

2009-12-09 Thread Adrian Egli OpenSceneGraph (3D)
Hi all , hi nick

i wrote the PSSM shadow. There is some problem in the implementation, may
you can solve the problem in the OSG core, i didn't have enough time, nor
the idea how we can remove the problem.
but try with osgshadow --pssm --SingleThreaded --debug-color your_model.osg
, it works only good with single threaded osg :-( this is the biggest
problem

if you use with shader, reimplement the GLSL shader for pssm. see
at the header:
/**
 * you can overwrite the fragment shader if you like to modify it
yourself, own fragment shader can be used
 */
class OSGSHADOW_EXPORT FragmentShaderGenerator : public
osg::Referenced {
public:
/**
 * generate the GLSL fragement shader
 */
virtual std::string generateGLSL_FragmentShader_BaseTex(bool
debug, unsigned int splitCount,double textureRes, bool filtered, unsigned
int nbrSplits,unsigned int textureOffset);
};

replace the shader with this class. but all together within this code. have
a look into the implementation. for further idea, please contact me at
adrian.egli (*...@***) gmail.com

/adrian


2009/12/9 Trajce Nikolov nikolov.tra...@gmail.com

 I tried both.

 PSSM gives some artifacts (see the attached image) - the white in the
 background, also, some flickering of the shadow on the models.

 Nick

 http://www.linkedin.com/in/tnikolov
 Sent from Gümüşsuyu, İstanbul, Turkey

 On Wed, Dec 9, 2009 at 12:27 PM, Wojciech Lewandowski 
 lewandow...@ai.com.pl wrote:

  Hi,

 Cascaded Shadow Maps is the same as Parallel Split Shadow Map. PSSM is
 implemented in osgShadow. Also LispSM could work for you scenario.

 Cheers,
 Wojtek Lewandowski





  *From:* Trajce Nikolov nikolov.tra...@gmail.com
 *Sent:* Wednesday, December 09, 2009 10:19 AM
 *To:* OpenSceneGraph Users osg-users@lists.openscenegraph.org
 *Subject:* Re: [osg-users] osgShadows

 Hi Harold,

 yes, my light source is the sun. No other lights in the scene yet. And
 the results are not good. I will do research on the cascade shadowmaps and
 will try to implement it. Thanks for the hint

 Nick

 http://www.linkedin.com/in/tnikolov
 Sent from Gümüşsuyu, İstanbul, Turkey

 On Wed, Dec 9, 2009 at 11:13 AM, Harold Comere 
 harold.com...@gmail.comwrote:

 Hi Nike,


 There is many way to get shadows and the shadowing technique choice shall
 depend of your scene data.

 The two basic shadowing techniques are :
 - shadow maps ( image based )
 - shadow volumes ( geometry based )

 Shadow maps are very cheap and easy to implement but will works good only
 if your light is not far from what you are shadowing due to the image
 approach. So if you have a large terrain with an unique directional light (
 as sun ), simple shadowmaps should do an ugly result.
 You could try cascade shadowmaps which is a technique used a lot in
 video games. It uses a kind of shadowmap LOD to avoid image based algorithms
 issues and stay cheap.

 Shadow volumes generate very accurate shadows but as it is based on
 geometry, if your scene geometry is complex you will experience some perf
 issues.

 Again, the shadowing technique choice depends of how many lights you
 have, where they are, what you are shadowing etc.
 Give a bit more details of your goal and i'm sure some osg pro will bring
 to you the ideal solution using osg :)

 Regards,
 Harold

 ___
 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




-- 

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


[osg-users] GPU GLSL phong tesselation

2009-12-04 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

i am looking for a GPU GLSL geometry shader (triangle,..) phong tesselation
implementation, did someone still the work? would be greate, i would like to
test a new algorithm for screen space ambient occlusion.

/regards
adrian

-- 

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


Re: [osg-users] ReaderWriterDICOM : build error

2009-11-28 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

Your fix builds fine. I hope it also works, but i don't check against DICOM
yet.

/adrian

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

 Hi Adrian,

 The code looks it's been copy and pasted from elsewhere where the
 result variable is defined.  I've attempted a fix and checked this in.
  I don't have ITK installed right now so can't test it.  Could you do
 an svn update and then test it?

 FYI, the DCMTK pathway is much more sophisticated and feature rich so
 is the best route for importing dicoms.

 Robert.

 On Fri, Nov 27, 2009 at 5:20 PM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi Robert,
 
  I tried to fix the ReaderWriterDicom.cpp , if USE_ITK is set
  the the virtual ReadResult readImage(const std::string file, const
  osgDB::ReaderWriter::Options* options) const cause a build error \
 
  Error1error C2065: 'result' : undeclared identifier
 
 f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
  316
  Error2error C2228: left of '.getImage' must have
  class/struct/union
 
 f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
  316
  Error3error C2227: left of '-getUserData' must point to
  class/struct/union/generic type
 
 f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
  316
  Error4error C2228: left of '.getImage' must have
  class/struct/union
 
 f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
  365
  Error5error C2227: left of '-getUserData' must point to
  class/struct/union/generic type
 
 f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
  365
 
  The problem is that i don't correct understand what you would like to get
  throught user data. But we need to define result . it's defined within a
 for
  loop. but how can we fix it?
 
  /adrian
 
  MSVC 2005
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


[osg-users] ReaderWriterDICOM : build error

2009-11-27 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

I tried to fix the ReaderWriterDicom.cpp , if USE_ITK is set
the the virtual ReadResult readImage(const std::string file, const
osgDB::ReaderWriter::Options* options) const cause a build error \

Error1error C2065: 'result' : undeclared identifier
f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
316
Error2error C2228: left of '.getImage' must have
class/struct/union
f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
316
Error3error C2227: left of '-getUserData' must point to
class/struct/union/generic type
f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
316
Error4error C2228: left of '.getImage' must have
class/struct/union
f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
365
Error5error C2227: left of '-getUserData' must point to
class/struct/union/generic type
f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp
365

The problem is that i don't correct understand what you would like to get
throught user data. But we need to define result . it's defined within a for
loop. but how can we fix it?

/adrian

MSVC 2005
-- 

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


Re: [osg-users] [osgOcean] Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB?

2009-10-31 Thread Adrian Egli OpenSceneGraph (3D)
Hi J-S,

Ok thanks,i was wondering whether it would be possible to include rivers,
lakes, etc. into osgOcean. But as the name says it's a ocean rendering
toolkit not a river, lake etc. one.

/adrian

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

 Hi Adrian,


  is there any example around the world, how we could integrate osgOcean
 into Terrains ?


 The oceanExample that ships with osgOcean loads a terrain... So yes, there
 is an example. I'm not sure what else you want.

 There was a discussion before and we stated that osgOcean does not support
 doing lakes and rivers... I guess unless you design your terrain so that the
 water level of all your lakes, rivers and oceans is exactly the same.

 What exactly do you want to achieve?


 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




-- 

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


[osg-users] osgEarth: Missing include in osgEarth::config

2009-10-31 Thread Adrian Egli OpenSceneGraph (3D)
Hi

i build latest osgEarth against latest osg svn, and i got a building issue
with VC 2005

missing include in config.h
#include osgDB/Options

f:\dev\OpenSceneGraph\osgEarth\src\osgEarth\Config

/**
...
 */
#ifndef OSGEARTH_CONFIG_H
#define OSGEARTH_CONFIG_H 1

#include osgEarth/Common
#include osgDB/ReaderWriter
#include osgDB/Options

#include list

...

now it builds fine.

/adrian

-- 

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


Re: [osg-users] [osgOcean] Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB?

2009-10-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi all

is there any example around the world, how we could integrate osgOcean into
Terrains ?

/adrian

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

 Hi Lv,


  I have build some terrain model by VPB(VirtualPlanetBuilder) which
 including some area of ocean.Is it possible to combine the effect of
 osgOcean to the terrain model which is build by VPB?


 VPB terrain, as long as it's not built in geocentric mode (i.e. as long as
 it's flat terrain), can be added as a child of the OceanScene just like any
 other terrain. VPB's LOD will work independently of osgOcean's LOD, but that
 shouldn't be a problem.

 If your terrain is round-earth, then as Kim said osgOcean will not work
 with it in its current form. I don't know precisely what's needed to adapt
 it. I guess we'd need to get some kind of curvature information from the
 terrain model, and make the ocean follow this curvature?

 If your terrain is flat, see the oceanExample in the osgOcean sources, it
 adds a terrain loaded from an .osg or .ive file (islands.ive I think) and
 adds it to the scene. You can do the same thing with your terrain.

 Hope this helps,


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




-- 

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


Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-20 Thread Adrian Egli OpenSceneGraph (3D)
Hi Torben,

Well if you don't attach the texture object (32BIT) just the image (32BIT)
the RTT works with 8BIT. I guess OSG generates a own texture object and
attach the image. but this isn't a 32Bit texture (internal format). So you
would be attach the texture object, this is the correct way.

/regards
adrian

2009/8/19 Torben Dannhauer z...@saguaro-fight-club.de

 Hi,

 hmmm, whats the difference between both lines?

 Greetings,
 Torben

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





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




-- 

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


[osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

How can i test the GL_RGBA32F_ARB render to texture quality. i don't know
whether i did a mistake in programming or my Nivida quadra fx 570m with
windows vista driver doesn't support it.
Or do i have to generate an own graphic context for enabling this feature?

/regards
adrian


// texture
_RTTInfoPreprocessingBackFront._texture = new osg::Texture2D;

_RTTInfoPreprocessingBackFront._texture-setTextureSize(_RTTInfoPreprocessingBackFront._resolution_x,
_RTTInfoPreprocessingBackFront._resolution_y);
#ifndef USE_FOR_RTT_FLOAT_IMAGE
_RTTInfoPreprocessingBackFront._texture-setInternalFormat(GL_RGBA);
#else

_RTTInfoPreprocessingBackFront._texture-setInternalFormat(GL_RGBA32F_ARB);
_RTTInfoPreprocessingBackFront._texture-setSourceFormat(GL_RGBA);
_RTTInfoPreprocessingBackFront._texture-setSourceType(GL_FLOAT);
#endif

_RTTInfoPreprocessingBackFront._texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);

_RTTInfoPreprocessingBackFront._texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);

_RTTInfoPreprocessingBackFront._texture-setResizeNonPowerOfTwoHint(false);

// camera
_RTTInfoPreprocessingBackFront._camera = new osg::Camera;

_RTTInfoPreprocessingBackFront._camera-setClearColor(osg::Vec4(0.0f,0.0f,0.0f,1.0f));
_RTTInfoPreprocessingBackFront._camera-setClearMask(GL_COLOR_BUFFER_BIT
| GL_DEPTH_BUFFER_BIT);

_RTTInfoPreprocessingBackFront._camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
// set viewport

_RTTInfoPreprocessingBackFront._camera-setViewport(0,0,_RTTInfoPreprocessingBackFront._resolution_x,_RTTInfoPreprocessingBackFront._resolution_y);
// set the camera to render before the main camera.

_RTTInfoPreprocessingBackFront._camera-setRenderOrder(osg::Camera::PRE_RENDER);
// tell the camera to use OpenGL frame buffer object where supported.

_RTTInfoPreprocessingBackFront._camera-setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER_RTT);
// image
_RTTInfoPreprocessingBackFront._image=new osg::Image;
#ifndef USE_FOR_RTT_FLOAT_IMAGE

_RTTInfoPreprocessingBackFront._image-allocateImage(_RTTInfoPreprocessingBackFront._resolution_x,
_RTTInfoPreprocessingBackFront._resolution_y,  1, GL_RGBA,
GL_UNSIGNED_BYTE);
#else

_RTTInfoPreprocessingBackFront._image-allocateImage(_RTTInfoPreprocessingBackFront._resolution_x,
_RTTInfoPreprocessingBackFront._resolution_y,  1, GL_RGBA, GL_FLOAT);
#endif

_RTTInfoPreprocessingBackFront._camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),
_RTTInfoPreprocessingBackFront._image.get(),0,0);
_RTTInfoPreprocessingBackFront._camera-setPostDrawCallback(new
WriteCameraPostDrawCallback(_RTTInfoPreprocessingBackFront._image.get(),RTTInfoPreprocessingBackFront.png,false));

_RTTInfoPreprocessingBackFront._texture-setImage(0,_RTTInfoPreprocessingBackFront._image.get());


-- 

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


Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi JP,


2009/8/19 J.P. Delport jpdelp...@csir.co.za

 Hi Adrian,

 mmm, I'm not sure about the

 setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER_RTT)

 Do you need to use this?


FBO is also ok.



 I've only used float render targets with FBOs and I know they work without
 special contexts.

 ITO quality I suppose you mean you want to find out if actual float values
 end up in the texture? If so, you can read back an image and print values
 out. Select values that cannot be represented in bytes, e.g. 1e-12 or
 negative values and see if they come out OK.

 There is a path in osgmultiplerendertargets that does this. Look at the
 code for the options --image and --hdr.

 You could also experiment with other formats specific to NVidia, on my
 laptop e.g. 32F_ARB does not work, but the others do. From the example:

 // Default HDR format
textureRect[i]-setInternalFormat(GL_RGBA32F_ARB);

// GL_FLOAT_RGBA32_NV might be supported on pre 8-series GPUs
//textureRect[i]-setInternalFormat(GL_FLOAT_RGBA32_NV);

// GL_RGBA16F_ARB can be used with this example,
// but modify e-12 and e12 in the shaders accordingly
//textureRect[i]-setInternalFormat(GL_RGBA16F_ARB);


i have to play with the different parameters

/thanks
adrian



 rgds
 jp




 Adrian Egli OpenSceneGraph (3D) wrote:

 Hi all,

 How can i test the GL_RGBA32F_ARB render to texture quality. i don't know
 whether i did a mistake in programming or my Nivida quadra fx 570m with
 windows vista driver doesn't support it.
 Or do i have to generate an own graphic context for enabling this feature?

 /regards
 adrian


 // texture
_RTTInfoPreprocessingBackFront._texture = new osg::Texture2D;

  
 _RTTInfoPreprocessingBackFront._texture-setTextureSize(_RTTInfoPreprocessingBackFront._resolution_x,
 _RTTInfoPreprocessingBackFront._resolution_y);
#ifndef USE_FOR_RTT_FLOAT_IMAGE

  _RTTInfoPreprocessingBackFront._texture-setInternalFormat(GL_RGBA);
#else

  _RTTInfoPreprocessingBackFront._texture-setInternalFormat(GL_RGBA32F_ARB);
_RTTInfoPreprocessingBackFront._texture-setSourceFormat(GL_RGBA);
_RTTInfoPreprocessingBackFront._texture-setSourceType(GL_FLOAT);
#endif

  
 _RTTInfoPreprocessingBackFront._texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);

  
 _RTTInfoPreprocessingBackFront._texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);

  _RTTInfoPreprocessingBackFront._texture-setResizeNonPowerOfTwoHint(false);

// camera
_RTTInfoPreprocessingBackFront._camera = new osg::Camera;

  
 _RTTInfoPreprocessingBackFront._camera-setClearColor(osg::Vec4(0.0f,0.0f,0.0f,1.0f));

  _RTTInfoPreprocessingBackFront._camera-setClearMask(GL_COLOR_BUFFER_BIT |
 GL_DEPTH_BUFFER_BIT);

  
 _RTTInfoPreprocessingBackFront._camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
// set viewport

  
 _RTTInfoPreprocessingBackFront._camera-setViewport(0,0,_RTTInfoPreprocessingBackFront._resolution_x,_RTTInfoPreprocessingBackFront._resolution_y);
// set the camera to render before the main camera.

  
 _RTTInfoPreprocessingBackFront._camera-setRenderOrder(osg::Camera::PRE_RENDER);
// tell the camera to use OpenGL frame buffer object where supported.

  
 _RTTInfoPreprocessingBackFront._camera-setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER_RTT);
// image
_RTTInfoPreprocessingBackFront._image=new osg::Image;
#ifndef USE_FOR_RTT_FLOAT_IMAGE

  
 _RTTInfoPreprocessingBackFront._image-allocateImage(_RTTInfoPreprocessingBackFront._resolution_x,
 _RTTInfoPreprocessingBackFront._resolution_y,  1, GL_RGBA,
 GL_UNSIGNED_BYTE);
#else

  
 _RTTInfoPreprocessingBackFront._image-allocateImage(_RTTInfoPreprocessingBackFront._resolution_x,
 _RTTInfoPreprocessingBackFront._resolution_y,  1, GL_RGBA, GL_FLOAT);
#endif

  
 _RTTInfoPreprocessingBackFront._camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),
 _RTTInfoPreprocessingBackFront._image.get(),0,0);
_RTTInfoPreprocessingBackFront._camera-setPostDrawCallback(new
 WriteCameraPostDrawCallback(_RTTInfoPreprocessingBackFront._image.get(),RTTInfoPreprocessingBackFront.png,false));

  
 _RTTInfoPreprocessingBackFront._texture-setImage(0,_RTTInfoPreprocessingBackFront._image.get());


 --
 
 Adrian Egli


 

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


 --
 This message is subject to the CSIR's copyright terms and conditions,
 e-mail legal notice, and implemented Open Document Format (ODF) standard.
 The full disclaimer details can be found at
 http://www.csir.co.za/disclaimer.html.

 This message has been scanned for viruses and dangerous content by
 MailScanner, and is believed

Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

for others, it works perfectly

   we need just to replace
RTTInfoPreprocessingBackFront._camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),
_RTTInfoPreprocessingBackFront._image.get(),0,0);

with
RTTInfoPreprocessingBackFront._camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),
_RTTInfoPreprocessingBackFront._texture.get(),0,0);

regards
adrian

2009/8/19 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Hi JP,


 2009/8/19 J.P. Delport jpdelp...@csir.co.za

 Hi Adrian,

 mmm, I'm not sure about the

 setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER_RTT)

 Do you need to use this?


 FBO is also ok.



 I've only used float render targets with FBOs and I know they work without
 special contexts.

 ITO quality I suppose you mean you want to find out if actual float values
 end up in the texture? If so, you can read back an image and print values
 out. Select values that cannot be represented in bytes, e.g. 1e-12 or
 negative values and see if they come out OK.

 There is a path in osgmultiplerendertargets that does this. Look at the
 code for the options --image and --hdr.

 You could also experiment with other formats specific to NVidia, on my
 laptop e.g. 32F_ARB does not work, but the others do. From the example:

 // Default HDR format
textureRect[i]-setInternalFormat(GL_RGBA32F_ARB);

// GL_FLOAT_RGBA32_NV might be supported on pre 8-series GPUs
//textureRect[i]-setInternalFormat(GL_FLOAT_RGBA32_NV);

// GL_RGBA16F_ARB can be used with this example,
// but modify e-12 and e12 in the shaders accordingly
//textureRect[i]-setInternalFormat(GL_RGBA16F_ARB);


 i have to play with the different parameters

 /thanks
 adrian



 rgds
 jp




 Adrian Egli OpenSceneGraph (3D) wrote:

 Hi all,

 How can i test the GL_RGBA32F_ARB render to texture quality. i don't know
 whether i did a mistake in programming or my Nivida quadra fx 570m with
 windows vista driver doesn't support it.
 Or do i have to generate an own graphic context for enabling this
 feature?

 /regards
 adrian


 // texture
_RTTInfoPreprocessingBackFront._texture = new osg::Texture2D;

  
 _RTTInfoPreprocessingBackFront._texture-setTextureSize(_RTTInfoPreprocessingBackFront._resolution_x,
 _RTTInfoPreprocessingBackFront._resolution_y);
#ifndef USE_FOR_RTT_FLOAT_IMAGE

  _RTTInfoPreprocessingBackFront._texture-setInternalFormat(GL_RGBA);
#else

  _RTTInfoPreprocessingBackFront._texture-setInternalFormat(GL_RGBA32F_ARB);
_RTTInfoPreprocessingBackFront._texture-setSourceFormat(GL_RGBA);
_RTTInfoPreprocessingBackFront._texture-setSourceType(GL_FLOAT);
#endif

  
 _RTTInfoPreprocessingBackFront._texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);

  
 _RTTInfoPreprocessingBackFront._texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);

  _RTTInfoPreprocessingBackFront._texture-setResizeNonPowerOfTwoHint(false);

// camera
_RTTInfoPreprocessingBackFront._camera = new osg::Camera;

  
 _RTTInfoPreprocessingBackFront._camera-setClearColor(osg::Vec4(0.0f,0.0f,0.0f,1.0f));

  _RTTInfoPreprocessingBackFront._camera-setClearMask(GL_COLOR_BUFFER_BIT |
 GL_DEPTH_BUFFER_BIT);

  
 _RTTInfoPreprocessingBackFront._camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
// set viewport

  
 _RTTInfoPreprocessingBackFront._camera-setViewport(0,0,_RTTInfoPreprocessingBackFront._resolution_x,_RTTInfoPreprocessingBackFront._resolution_y);
// set the camera to render before the main camera.

  
 _RTTInfoPreprocessingBackFront._camera-setRenderOrder(osg::Camera::PRE_RENDER);
// tell the camera to use OpenGL frame buffer object where supported.

  
 _RTTInfoPreprocessingBackFront._camera-setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER_RTT);
// image
_RTTInfoPreprocessingBackFront._image=new osg::Image;
#ifndef USE_FOR_RTT_FLOAT_IMAGE

  
 _RTTInfoPreprocessingBackFront._image-allocateImage(_RTTInfoPreprocessingBackFront._resolution_x,
 _RTTInfoPreprocessingBackFront._resolution_y,  1, GL_RGBA,
 GL_UNSIGNED_BYTE);
#else

  
 _RTTInfoPreprocessingBackFront._image-allocateImage(_RTTInfoPreprocessingBackFront._resolution_x,
 _RTTInfoPreprocessingBackFront._resolution_y,  1, GL_RGBA, GL_FLOAT);
#endif

  
 _RTTInfoPreprocessingBackFront._camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),
 _RTTInfoPreprocessingBackFront._image.get(),0,0);
_RTTInfoPreprocessingBackFront._camera-setPostDrawCallback(new
 WriteCameraPostDrawCallback(_RTTInfoPreprocessingBackFront._image.get(),RTTInfoPreprocessingBackFront.png,false));

  
 _RTTInfoPreprocessingBackFront._texture-setImage(0,_RTTInfoPreprocessingBackFront._image.get());


 --
 
 Adrian Egli


 

 ___
 osg

Re: [osg-users] Visualizing Terrain DB on web page

2009-08-18 Thread Adrian Egli OpenSceneGraph (3D)
www.3d.assoftware.ch

2009/8/9 Akilan akilan.thangam...@gmail.com

 Hi,

  I would like to visualize my terrain DB constructed using osgdem on
 web page? Could it be possible? Is there any plug-in to do so?



 Thank you!

 Cheers,
 Akilan

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





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




-- 

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


Re: [osg-users] Visualizing Terrain DB on web page

2009-08-18 Thread Adrian Egli OpenSceneGraph (3D)
Hi Akilan,

Our Solution works under Firefox / IExplorer (Windows) and Safari (OSX),
please contact me at
adrian.egli (AT) gmail.com

if you need further information about
   www.3d.assoftware.ch
plugin.

/Adrian

2009/8/18 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 www.3d.assoftware.ch

 2009/8/9 Akilan akilan.thangam...@gmail.com

 Hi,

  I would like to visualize my terrain DB constructed using osgdem on
 web page? Could it be possible? Is there any plug-in to do so?



 Thank you!

 Cheers,
 Akilan

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





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




 --
 
 Adrian Egli




-- 

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


Re: [osg-users] Accumulation buffer for RTT camera

2009-08-15 Thread Adrian Egli OpenSceneGraph (3D)
Thanks Robert,

Yes, finally i did this exactly, much more easy to implement. anyway thanks

/adrian

2009/8/14 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 On Thu, Aug 13, 2009 at 11:05 AM, Adrian Egli OpenSceneGraph
 (3D)3dh...@gmail.com wrote:
  I need a accumulation buffer for a RTT camera, is there a way doing this.
 or
  how should i am using it similary with the osg motion blur demo. my rtt
  camera doesn't have a graphic context (yet) where i can add
  my own operation
 
  what should i do, or is there an new object in the osg core for acc
 buffer
  support ?


 Wouldn't you just use two RTT Camera/textures?

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




-- 

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


[osg-users] Accumulation buffer for RTT camera

2009-08-13 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

I need a accumulation buffer for a RTT camera, is there a way doing this. or
how should i am using it similary with the osg motion blur demo. my rtt
camera doesn't have a graphic context (yet) where i can add
my own operation

what should i do, or is there an new object in the osg core for acc buffer
support ?

thanks

/adrian

-- 

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


Re: [osg-users] osg on iPhone / iPod touch with OpenGL ES 1.1

2009-08-05 Thread Adrian Egli OpenSceneGraph (3D)
Hi All,

Just for your information :

http://www.computamaps.com/assets/press/iphone.htm

regards
adrian

2009/7/17 Robert Osfield robert.osfi...@gmail.com

 Hi Marco,

 No OpenGL ES 1.x code has been checked in yet, but there have been
 successful trail ports to OpenGL ES 1.x.  Next week I'll just so
 happen to be with a client interested in this side of work, although
 not related to the iFamilyOfProducts, so hopefully we'll be able to
 come up with clearer strategy for getting OpenGL ES 1.x support
 integrated into the core OSG.

 The likely approach will be to initially start with a branch in our
 svn repository for the port to OpenGL ES, and then have me refactor
 svn/trunk to step by step pull in the changes till we have svn/trunk
 compatible with OpenGL ES 1.x and then later with openGL ES 2.x.

 The time frame is difficult to pinpoint right now as it depends on
 various different groups coordinating work as well just how quickly
 the technical challenges are surmounted.  I would hope that we could
 see a OpenSceneGraph-2.12 release (the next stable release after the
 imminent OSG-2.10 release) with OpenGL ES 1.x support this autumn.

 Cheers,
 Robert.

 On Thu, Jul 16, 2009 at 5:28 PM, Marco Lohsemlo...@motama.com wrote:
  Since this is my first post: First of all, thank you for osg!
 
  We would be interested in a OpenGL ES 1.1 version for running our osg
 based applications on iPhone / iPod touch using Open GL ES 1.1
 
  I found some references saying that there will be support for this
 platform. Now, I would like to know what the current status is, what still
 needs to be done, etc. I would also be interested in knowing the current
 status and plans for Open GL ES 2.0 (for the latest iPhone versions).
 
  We are willing to help with beta-testing, and - depending on the current
 status - also to do some coding.
 
  I would appreciate your comments
 
  Thank you! Marco
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=15037#15037
 
 
 
 
 
  ___
  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




-- 

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


Re: [osg-users] osgFX render issue

2009-07-07 Thread Adrian Egli OpenSceneGraph (3D)
Ok, i c.

It looks good, but i don't understand why it doesn't work for case (2). Do
you attach shaders? I don't believe that the stateset would change any
thing. you can may try to attach a similar stateset.
But as far as i understand the osgFX concept, and OSG it should not change.
Well the scenegraphs look good. could you store case 1 and case 2 into osg
files. ?

adrian

2009/7/7 Vincent Bourdier vincent.bourd...@gmail.com

 Hi Adrian,

 My original scene graph is

 Group
   ___|
   | ||  |
 Group1Group2Group3Group4


 And then I modify it :

 *case 1 (working good) *

   osgFX::Scribe/Cartoon
  |
 Group
   ___|
   | ||  |
 Group1Group2Group3Group4

 *case2 (working bad)*

 Group
   ___|_
   |  |
 |  |
 osgFX::Scribe/Cartoon  Group2Group3Group4
   |
 Group1


 Sorry for the misunderstanding

 Do that graph looks bad ?
 Are there any special case when the render do not looks good ?
 (for example my Group have a stateset, my Group1 doesn't )

 Thanks.

 Regards,
 Vincent.

 2009/7/7 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Hi Vincent

 Well, i haven't understood your scene graph right. Let's me draw your
 scene graphs

 (1)
 Group == type of osgFX::xxx
   ___|
   | ||  |
 Group1Group2Group3Group4


 (2)
   Group
   __|
   |  |
 |  |
 Group1== type of osgFX::xxx  Group2Group3Group4

 But if i am right understood your email you appended the osgFX effect not
 as group, instead you appended it
 as parent node, right?


 (x)Group
   ___|__
   | ||  |   |
 Group1Group2Group3Group4   osgFX ???


 if i am wrong please stop reading and explain again the exacly outlook of
 the scene graph you have. otherwise have a look into the osgFXbrowser
 example. if you are using
 (x) this would enable the osgFX for all object under osgFX ??? (childrens)
 not for Group, GroupX

 regard adrian


 2009/7/6 Vincent Bourdier vincent.bourd...@gmail.com

 Hi all,

 I've got a understandable problem with osgFX::Cartoon and osgFX::Scribe.

 I got a graph like that :

 Group
   ___|
   | ||  |
 Group1Group2Group3Group4

 If I put the effect on Group, no problem all is good.
 The same effect on Group1 do not set the good color.

 I use :

 osg::ref_ptrosgFX::Cartoon s = new osgFX::Cartoon;
 s-setOutlineColor(osg::Vec4(color.x(), color.y(), color.z(), 0.0f));
 s-setOutlineLineWidth(edge_width);

 and I put it as a new parent for the concerned group.

 See attached file for details.

 Any idea would be very appreciated, this is an important thing I have to
 solved as soon as possible.

 Thanks for your help.

 Regards,
Vincent.


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




 --
 
 Adrian Egli

 ___
 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




-- 

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


Re: [osg-users] osgFX render issue

2009-07-07 Thread Adrian Egli OpenSceneGraph (3D)
 Hi Vincent

Well i worked out a solution to the problem:


  Group
  __|___
  |  ||
|
osgFX::Scribe/Cartoon  Group2Group3Group4
  |
Group1


  Group
  __|___
  |  ||
|
osgFX::Scribe/Cartoon  Group2Group3Group4
  |
Group (empty)
  |
Group1

then it works.

Well this is a bug in the OSG osgFX effect (Scribe/Cartoon). May you could
work out the bug in the source (trunk) and propose a fix. But we have to
wait as long as robert is off.
Or shall i support you in fixing this issue?

adrian


2009/7/7 Vincent Bourdier vincent.bourd...@gmail.com

 These are the two osg files.

 I'm not sure of what I need to look at...

 The color of the FX is set to red when I set the effect.

 (sorry if you get double answer, the .osg files needs admin approbation, so
 I post compressing them)


 Thanks.

 Regards,
 Vincent.

 2009/7/7 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Ok, i c.

 It looks good, but i don't understand why it doesn't work for case (2). Do
 you attach shaders? I don't believe that the stateset would change any
 thing. you can may try to attach a similar stateset.
 But as far as i understand the osgFX concept, and OSG it should not
 change. Well the scenegraphs look good. could you store case 1 and case 2
 into osg files. ?

 adrian

 2009/7/7 Vincent Bourdier vincent.bourd...@gmail.com

 Hi Adrian,

 My original scene graph is

 Group
   ___|
   | ||  |
 Group1Group2Group3Group4


 And then I modify it :

 *case 1 (working good) *

   osgFX::Scribe/Cartoon
  |
 Group
   ___|
   | ||  |
 Group1Group2Group3Group4

 *case2 (working bad)*

 Group
   ___|_
   |  |
 |  |
 osgFX::Scribe/Cartoon  Group2Group3Group4
   |
 Group1


 Sorry for the misunderstanding

 Do that graph looks bad ?
 Are there any special case when the render do not looks good ?
 (for example my Group have a stateset, my Group1 doesn't )

 Thanks.

 Regards,
 Vincent.

 2009/7/7 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Hi Vincent

 Well, i haven't understood your scene graph right. Let's me draw your
 scene graphs

 (1)
 Group == type of osgFX::xxx
   ___|
   | ||  |
 Group1Group2Group3Group4


 (2)
   Group
   __|
   |  |
 |  |
 Group1== type of osgFX::xxx  Group2Group3Group4

 But if i am right understood your email you appended the osgFX effect
 not as group, instead you appended it
 as parent node, right?


 (x)Group
   ___|__
   | ||  |   |

 Group1Group2Group3Group4   osgFX ???


 if i am wrong please stop reading and explain again the exacly outlook
 of the scene graph you have. otherwise have a look into the osgFXbrowser
 example. if you are using
 (x) this would enable the osgFX for all object under osgFX ???
 (childrens) not for Group, GroupX

 regard adrian


 2009/7/6 Vincent Bourdier vincent.bourd...@gmail.com

 Hi all,

 I've got a understandable problem with osgFX::Cartoon and
 osgFX::Scribe.

 I got a graph like that :

 Group
   ___|
   | ||  |
 Group1Group2Group3Group4

 If I put the effect on Group, no problem all is good.
 The same effect on Group1 do not set the good color.

 I use :

 osg::ref_ptrosgFX::Cartoon s = new osgFX::Cartoon;
 s-setOutlineColor(osg::Vec4(color.x(), color.y(), color.z(), 0.0f));
 s-setOutlineLineWidth(edge_width);

 and I put it as a new parent for the concerned group.

 See attached file for details.

 Any idea would be very appreciated, this is an important thing I have
 to solved as soon as possible.

 Thanks for your help.

 Regards,
Vincent.


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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




 --
 
 Adrian Egli

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

 http

[osg-users] Build Error Windows : Application osgViewer

2009-07-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert, Hi all

there is a build error in the osgviewer.cpp because of the ifdef win stuff

missing includes, i guess there is a experimental stuff in the SVN or ?

adrian

-- 

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


Re: [osg-users] Build Error Windows : Application osgViewer

2009-07-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi Jean-Sebastien,

Thanks for the answer, there is no problem for us using the SVN code while
robert is on vacation. i disable the osgviewer in my build :-)

regards adrian

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

 Hi Adrian,

  there is a build error in the osgviewer.cpp because of the ifdef win stuff

 missing includes, i guess there is a experimental stuff in the SVN or ?


 I'm guessing that you're right, this was probably experimental code checked
 in by mistake. It doesn't seem appropriate in the general osgviewer
 application. Unfortunately Robert is off on vacation so he can't revert the
 changes right now... You could revert back to the previous version of
 osgviewer.cpp in your local copy to make things compile.

 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




-- 

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


Re: [osg-users] osgFX render issue

2009-07-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi Vincent

Well, i haven't understood your scene graph right. Let's me draw your scene
graphs

(1)
Group == type of osgFX::xxx
  ___|
  | ||  |
Group1Group2Group3Group4


(2)
  Group
  __|
  |  |
|  |
Group1== type of osgFX::xxx  Group2Group3Group4

But if i am right understood your email you appended the osgFX effect not as
group, instead you appended it
as parent node, right?


(x)Group
  ___|__
  | ||  |   |
Group1Group2Group3Group4   osgFX ???


if i am wrong please stop reading and explain again the exacly outlook of
the scene graph you have. otherwise have a look into the osgFXbrowser
example. if you are using
(x) this would enable the osgFX for all object under osgFX ??? (childrens)
not for Group, GroupX

regard adrian


2009/7/6 Vincent Bourdier vincent.bourd...@gmail.com

 Hi all,

 I've got a understandable problem with osgFX::Cartoon and osgFX::Scribe.

 I got a graph like that :

 Group
   ___|
   | ||  |
 Group1Group2Group3Group4

 If I put the effect on Group, no problem all is good.
 The same effect on Group1 do not set the good color.

 I use :

 osg::ref_ptrosgFX::Cartoon s = new osgFX::Cartoon;
 s-setOutlineColor(osg::Vec4(color.x(), color.y(), color.z(), 0.0f));
 s-setOutlineLineWidth(edge_width);

 and I put it as a new parent for the concerned group.

 See attached file for details.

 Any idea would be very appreciated, this is an important thing I have to
 solved as soon as possible.

 Thanks for your help.

 Regards,
Vincent.


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




-- 

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


[osg-users] CMAKE / shared library version in name

2009-06-26 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,
is there in cmake an option to disable adding to the shared osg*.dylib the
version information?

adrian

-- 

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


Re: [osg-users] CMAKE / shared library version in name

2009-06-26 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,
Yes, i am working under OS/X actually :-) .
I know all the problem we getting in when we remove the versioning
string, but in some really special cases there is it
not as bad as it seems to be
using unversionied libraries. but if i can not remove the version
string, then i have to look for other solution. I
had still a look into cmake adavance settings, i will redo it again, may
under osx i can not remove it.

thanks for the answers.

adrian

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

 Hi Robert,

  is there in cmake an option to disable adding to the shared osg*.dylib the
 version information?


 I don't recall, but then I don't use Windows and I didn't write this
 part of the CMake scripts so I not the one to answer this question.


 The fact that Adrian mentions the .dylib extension is a hint that he's
 talking about MacOS X and not Windows...

 I don't know if there's such an option either, have a look at the CMake GUI
 and show the advanced options to see for yourself... But like Robert I'd
 advise against disabling that as it's there for a reason: to help you
 prevent mixing different versions of dynamic libraries.

 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




-- 

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


Re: [osg-users] CMAKE / shared library version in name

2009-06-26 Thread Adrian Egli OpenSceneGraph (3D)
Hi Seb, the problem i am working on it's to set up safari plugin bundle with
all dep files inside. i need to fix the library location to get propery
working the extension. this is a really complex task, my i get it soon
working, but not shure. may i have to fix it with a better option. i will
see, may stephan huber can support me.

regards adrian

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

 Hi Adrian,

  I know all the problem we getting in when we remove the versioning string,
 but in some really special cases there is it not as bad as it seems to be
 using unversionied libraries. but if i can not remove the version string,
 then i have to look for other solution.


 Is there a problem you're trying to solve by removing the versioning? In my
 experience, it only solves problems, it doesn't cause any (at least nothing
 that can't be solved by slightly changing your workflow) which is why I
 don't advise removing it, rather look for the actual cause of the problem
 and fix that at the source.


 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




-- 

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


Re: [osg-users] osgOcean 1.0 (LGPL) Released

2009-06-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi

I have no longer moving waves in latest SVN .

adrian

2009/6/19 Ümit Uzun umituzu...@gmail.com

 Hi Kim,

 There is strange view as you can see from osgOcean_Artifact.jpg Is this
 artifact or what?

 And when creating VisualStudio solution, Cmake doesn't create osgOcean's
 Header Files folder which is created for oceanExample as you can see from
 osgOcean_Classes.jpg This make the solution panel look messy.


 Regards.

 2009/6/18 Kim C Bale k.b...@hull.ac.uk

 Hi Umit,

 Yes, apparently samplerRect has been depreciated. Ulrich flagged this one
 on OSX and corrected it.

 I guess some glsl compilers are more fussy than others.

 Glad you got it working.

 Kim.

 

 From: osg-users-boun...@lists.openscenegraph.org on behalf of Ümit Uzun
 Sent: Thu 18/06/2009 12:36
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released


 Hi Kim,

 Actually I am sorry for not thinking it can be the svn adress :)
 You make the really good magic. It works perfect without any error as you
 can see from the attached screenshot:) Thanks so much :) But there is some
 dots flickering as JS and Martins's said about. And it's not problem I think
 :) This is really really good application.

 What did you do? You have only changed samplerRect to sampler2D?

 Regards and Congratulations :)


 2009/6/18 Kim C Bale k.b...@hull.ac.uk


Hi Umit,



Sorry use



 svn checkout
 http://osgocean.googlecode.com/svn/tags/osgOcean-1.0/ osgocean-read-only
 
 http://osgocean.googlecode.com/svn/tags/osgOcean-1.0/%0Aosgocean-read-only
 



or grab a copy of the tortoise client to download it.



Regards,



Kim.



From: osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ümit Uzun
Sent: 18 June 2009 11:45

To: OpenSceneGraph Users
Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released





Hi Kim,

Thanks you so much. But prompted screen wants username and password
 from me?

Regards.

2009/6/18 Kim C Bale k.b...@hull.ac.uk

Hi Umit,



I've just applied a patch that should solve the samplerRect issue
 for you, I think I was being too hasty to blame your graphics drivers.



Update your code from:



 https://osgocean.googlecode.com/svn/tags/osgOcean-1.0/ 
 https://osgocean.googlecode.com/svn/tags/osgOcean-1.0/







Regards,



Kim.



From: osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ümit Uzun
Sent: 18 June 2009 07:35


To: OpenSceneGraph Users
Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released



Hi Kim and JS;

Thanks for suggestion. I have tried again and as you said I really
 need new version GPU. This is only solution which will resolve kind of these
 problems.

Regards.

2009/6/17 Kim C Bale k.b...@hull.ac.uk

Martins, J-S,


Here you go.  If you zoom in to 400% or so you can see 3 pixels
near the horizon that are really dark.  They flicker during the
simulation, sometimes individual pixels, other times it looks like
larger groups.

Yep it's a bug in the library. Looks like a polygon break to me,
 possibly a corner piece. I must have been trying to ignore it as it's a
 nightmare to debug that bit of code. I'll log it, but it could take a while
 to find that blighter.


If you disable godrays, silt and dof (basically disable all
 underwater
effects) then go underwater, you'll see a black like at the
 horizon. it
looks like fog is not being applied for a line of pixels at the
 horizon.

I think this is a fogging issue, the wave tops are probably going
 over the fog line and exposing unfogged geometry. Shouldn't be too bad that
 one.

Cheers all.


Kim.





From: osg-users-boun...@lists.openscenegraph.org on behalf of
 Martins Innus

Sent: Wed 17/06/2009 19:35

To: OpenSceneGraph Users
Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released



Kim,

 Here you go.  If you zoom in to 400% or so you can see 3
 pixels
near the horizon that are really dark.  They flicker during the
simulation, sometimes individual pixels, other times it looks like
larger groups.

   Sorry if this comes through twice, looks like the first one
 was too big
for the list.

Martins


Kim C Bale wrote:
 Hi Martins,

 It now works at any resolution in 32 bit color, but with some
 shimmering black pixels where the sky meets the ocean.  Kind of
 like
 you get if you had a bad DVI cable going to your monitor.

 Could you post a screen shot of that? Does sound a like it 

Re: [osg-users] OGR plugin : Build failed, under VS 2005

2009-06-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

VS 2003 - build error with ogr plugin
VS 2005 - build ok

-- Build started: Project: Plugins ogr, Configuration: Release Win32
--

Compiling...
ReaderWriterOGR.cpp
ReaderWriterOGR.cpp(41) : error C2146: syntax error : missing ';' before
identifier 'CPLOSGErrorHandler'
C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see
reference to class template instantiation 'osg::BoundingBoxImplVT' being
compiled
with
[
VT=osg::Vec3f
]
C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see
reference to class template instantiation 'osg::BoundingBoxImplVT' being
compiled
with
[
VT=osg::Vec3f
]
C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see
reference to class template instantiation 'osg::BoundingBoxImplVT' being
compiled
with
[
VT=osg::Vec3f
]
C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see
reference to class template instantiation 'osg::BoundingBoxImplVT' being
compiled
with
[
VT=osg::Vec3f
]
C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see
reference to class template instantiation 'osg::BoundingBoxImplVT' being
compiled
with
[
VT=osg::Vec3f
]
C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see
reference to class template instantiation 'osg::BoundingBoxImplVT' being
compiled
with
[
VT=osg::Vec3f
]
ReaderWriterOGR.cpp(41) : error C2182: 'CPL_STDCALL' : illegal use of type
'void'
ReaderWriterOGR.cpp(50) : warning C4508: 'CPLOSGErrorHandler' : function
should return a value; 'void' return type assumed

Build log was saved at
file://c:\dev\OpenSceneGraphSVN\OpenSceneGraph\src\osgPlugins\ogr\osgdb_ogr.dir\Release\BuildLog.htm
Plugins ogr - 2 error(s), 1 warning(s)

regards
adrian

2009/5/12 Robert Osfield robert.osfi...@gmail.com

 On Tue, May 12, 2009 at 1:02 PM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi Robert,
 
  Which OGR Version does the plugin use? Or does it need the OGR Frame work
  installed.

 I've alway got OGR as part of GDAL, the current version of GDAL I have
 is 1.5.2.  I haven't heared of OGR Frame work before so can't comment
 on this.

 You haven't specified either the version or the error you are getting.
  There really isn't much we can do on your behalf without more info
 about how/where you got OGR from.

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




-- 

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


Re: [osg-users] OGR plugin : Build failed, under VS 2005

2009-06-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

Thank you very much.

regards
adrian

2009/6/19 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 I'm afraid there is nothing I personally can to about this build issue
 - Windows developers who can reproduce the problem will need to look
 at it and solve it.  The thing I'd look into first would be the roll
 of the CPL_STDCALL macro.  I didn't write this plugin so I can't
 comment on why the macro is there, whether it's needed etc.  As I said
 it'll need to be Windows developers that will have to tackle this.

 Good luck,
 Robert.

 On Fri, Jun 19, 2009 at 8:35 AM, Adrian Egli OpenSceneGraph
 (3D)3dh...@gmail.com wrote:
  Hi Robert,
 
  VS 2003 - build error with ogr plugin
  VS 2005 - build ok
 
  -- Build started: Project: Plugins ogr, Configuration: Release Win32
  --
 
  Compiling...
  ReaderWriterOGR.cpp
  ReaderWriterOGR.cpp(41) : error C2146: syntax error : missing ';' before
  identifier 'CPLOSGErrorHandler'
  C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) :
 see
  reference to class template instantiation 'osg::BoundingBoxImplVT'
 being
  compiled
  with
  [
  VT=osg::Vec3f
  ]
  C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) :
 see
  reference to class template instantiation 'osg::BoundingBoxImplVT'
 being
  compiled
  with
  [
  VT=osg::Vec3f
  ]
  C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) :
 see
  reference to class template instantiation 'osg::BoundingBoxImplVT'
 being
  compiled
  with
  [
  VT=osg::Vec3f
  ]
  C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) :
 see
  reference to class template instantiation 'osg::BoundingBoxImplVT'
 being
  compiled
  with
  [
  VT=osg::Vec3f
  ]
  C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) :
 see
  reference to class template instantiation 'osg::BoundingBoxImplVT'
 being
  compiled
  with
  [
  VT=osg::Vec3f
  ]
  C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) :
 see
  reference to class template instantiation 'osg::BoundingBoxImplVT'
 being
  compiled
  with
  [
  VT=osg::Vec3f
  ]
  ReaderWriterOGR.cpp(41) : error C2182: 'CPL_STDCALL' : illegal use of
 type
  'void'
  ReaderWriterOGR.cpp(50) : warning C4508: 'CPLOSGErrorHandler' : function
  should return a value; 'void' return type assumed
 
  Build log was saved at
 
 file://c:\dev\OpenSceneGraphSVN\OpenSceneGraph\src\osgPlugins\ogr\osgdb_ogr.dir\Release\BuildLog.htm
  Plugins ogr - 2 error(s), 1 warning(s)
 
  regards
  adrian
 
  2009/5/12 Robert Osfield robert.osfi...@gmail.com
 
  On Tue, May 12, 2009 at 1:02 PM, Adrian Egli OpenSceneGraph (3D)
  3dh...@gmail.com wrote:
   Hi Robert,
  
   Which OGR Version does the plugin use? Or does it need the OGR Frame
   work
   installed.
 
  I've alway got OGR as part of GDAL, the current version of GDAL I have
  is 1.5.2.  I haven't heared of OGR Frame work before so can't comment
  on this.
 
  You haven't specified either the version or the error you are getting.
   There really isn't much we can do on your behalf without more info
  about how/where you got OGR from.
 
  Robert.
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


Re: [osg-users] osgOcean : Integration into existing Database /Application

2009-06-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi Kim,
Thanks for the short explainations. Well first the openscenegraph
motionmodel or manipluators, manager aren't working. it would be good to get
similar behaviour like in application-viewer example. this would be
important for integration into existing applications.

I do now better understand that we need to implement own geometries for
water effetc. would it be not much easier that we can append a geometry (osg
file, ive file ,... ) which should be used to attach the water shaders. Say
for limit we attache a xy plane with shaped borders, this would be very
usefull for many terrain visualisation applications, even for osgEarth this
could be once an option for the ocean. of course we have fast unlimited
ocean effects but once we have a lake this would not help, right? or could
it be an option to cut the lake from the terrain, then we can define the
height of the ocean. i will read the papers again, and i hope i can work out
some strategy and new ideas which way we should - can go for further osg
integration improvments.

regards
adrian

2009/6/19 Kim C Bale k.b...@hull.ac.uk

 Hi Adrien,

 I'm having a slight problem understanding your questions, so I'll do my
 best and ask some back...

 Would it be possible to add a ocean geometry and attach the ocean effect,
 shader. if yes how should it be look like, just a plane? more complex
 geometry? My idea would be to add a lake surface, and two rivers with
 different waves, and so on.

 Do you mean you would like to add you own method of generating the water
 geometry for lakes and rivers?

 If so, I've tried to accommodate for additional type of geometry by
 providing the OceanTechnique base class.

 Basically osgOcean is comprised of two main parts.

 OceanTechnique: Which generates and animates the ocean geometry and manages
 any level of detail algorithms that are required. It  uses osg::Geode as a
 base class and therefore drawables for the geometry. A class derived from
 this should provide a water shader. Animation is provided by adding a
 cull/update callback.

 OceanScene: Which manages the various pre and post render passes required
 for the effects. This also includes controlling the different types of
 fogging and lighting that are applied based on whether the main camera view
 is above or below the water surface.

 If you want to create your own water geometry class you'll have to inherit
 from OceanTechnique and then add this class to OceanScene as done with
 FFTOceanSurface in the example application. OceanScene will only work with
 one OceanTechnique so you'll have to create a new instance of OceanScene if
 you wish to use multiple OceanTechniques. The geometry can be as complicated
 or as simple as you like. If you apply the current water shader to a quad it
 still looks alright and maybe be suitable for some applications.

 These two papers provide very good explanations of generating water
 geometry (the first is used in FFTOceanSurface):

 http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf

 http://citeseer.ist.psu.edu/cache/papers/cs/26265/http:zSzzSzwww.cs.sunysb.eduzSz~ash
 zSzwaterCGF.pdf/

 The tricky part is the shaders. osgOcean provides a very long list of
 uniforms which you can make use of if you wish in custom shaders. Some must
 be applied locally to the OceanTechnique (see:
 FFTOceanSurface::initStateSet() ), and those related to the multipass
 rendering are inherited from the statesets within OceanScene (see: void
 OceanScene::init()).

 The shader implementation used in FFTOceanSurface can be found in the
 resources directory (water.frag/water.vert).

 If you want to use this shader for your own technique you'll have to apply
 it within your OceanTechnique and add the uniforms found in:
 FFTOceanSurface::initStateSet().

 Your best bet is to look at the FFTOceanSurface class and see how it's
 implemented. It's not as complicated as it looks, 80% of it is to do with
 generating the vertex array and primitives for the geomipmapping routine
 which you may not need.

 we don't need only an unfinite ocean

 You can disable infinite ocean effect using:
 FFTOceanSurface::enableEndlessOcean(false,true);

 Next problem i got is that the default motion models are not working

 Do you mean the ocean waves aren't moving?


 I hope that answers your questions, otherwise I've just gone off on a very
 lengthy tangent :)


 Kim.



 From: osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] On Behalf Of Adrian Egli
 OpenSceneGraph (3D)
 Sent: 19 June 2009 06:22
 To: OpenSceneGraph Users
 Subject: [osg-users] osgOcean : Integration into existing Database
 /Application

 Hi all

 i am wondering how i can integrate the osgOcean effect into existing
 application, database. Would it be possible to add a ocean geometry and
 attach the ocean effect, shader. if yes how should it be look like, just a
 plane? more complex geometry? My idea would be to add a lake surface, and
 two

Re: [osg-users] osgOcean : Integration into existing Database/Application

2009-06-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi Kim and John
Manipulator developing is a hard task, i will say good and robust and easy
to use manipulator are not quite easy to write or to work out. So it would
be important having default or common manipulator working with the
osgOcean.

I am wondering why you having problem with terrain mainpulators if the
deformation gets done in vertex shader. so what i would like to mention is
the fact that if the gpu support shader 3 (since 2007) you could pass a
texture with deformation field information to the GPU and then the geometry
stay allways similar.

regards adrian

2009/6/19 John Vidar Larring larr...@weatherone.tv

 Hi Kim and Adrian,

  As far as I can tell only two of the osgGA manipulators are compatible
  - Trackball and FlightManipulator. Although you're right the trackball
  implementation doesn't seem to work correctly, I suspect this is to do
  with the fact that it doesn't have a node to focus on.
  TerrainManipulator and DriveManipulators aren't compatible because the
  ocean surface is animated and they try to position themselves by
  intersecting with the surface below them, which in the case of the
  ocean surface, is moving up and down all the time so it creates a
  nasty camera juddering. I had a go at adding them but I simply
  couldn't get them to play nicely.
 
  If you manage to get them working I'd be interested to see how.

 Just one idea I'd like to throw out there before I forget. One could
 possibly make an EllipsoidManipulator quite easily. It would essentially
 behave like a TerrainManipulator except that it would not take elevation
 into account; just doing simple ray-ellipoid intersection testing instead.

 Even better, if there is a way to tell whether intersecting geometry is
 static or dynamic, one could theoretically implement a manipulator which
 behaves like the TerrainManipulator over land, and like an Ellipsoid
 manipulator over the ocean.

 Best regards,
 John

 Kim C Bale wrote:

 Hi Adrien,

  Well first the openscenegraph motionmodel or manipluators, manager aren't
 working. it would be good to get similar behaviour like in
 application-viewer example. this would be important for integration into
 existing applications.


 As far as I can tell only two of the osgGA manipulators are compatible -
 Trackball and FlightManipulator. Although you're right the trackball
 implementation doesn't seem to work correctly, I suspect this is to do with
 the fact that it doesn't have a node to focus on. TerrainManipulator and
 DriveManipulators aren't compatible because the ocean surface is animated
 and they try to position themselves by intersecting with the surface below
 them, which in the case of the ocean surface, is moving up and down all the
 time so it creates a nasty camera juddering. I had a go at adding them but I
 simply couldn't get them to play nicely.
 If you manage to get them working I'd be interested to see how.

  it be not much easier that we can append a geometry (osg file, ive file
 ,... ) which should be used to attach the water shaders.


 I haven't thought a lot about how to implement non-uniform shapes of
 animated water yet, the goal of osgOcean 1.0 was to get open sea rendering
 working.
 However, one of the nice things about the FFT approach is that it tiles.
 So it would be possible to modify the algorithm so that it places tiles in a
 non-uniform configuration rather than in a square shape.
 The current implementation of osgOcean uses a large vertex array that
 stores the vertices for all the tiles on screen. But a future enhancement
 will be to store only 1 tiles worth of vertices and then instance it
 positioning the tiles using a vertex shader. This will be a far more
 flexible and efficient approach and more suitable for deployment in large
 terrain datasets.

 Regards,

 Kim.


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




-- 

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


Re: [osg-users] Vector field visualization

2009-06-18 Thread Adrian Egli OpenSceneGraph (3D)
Hi

May u can use ParaView to see what you could do with VTK, but if you need a
good visualisation scene graph it would be better to implement the features
into OSG than using VTK, because VTK is a really bad scene graph :-) if we
could say it's also a scene graph

adrian

2009/6/18 Kenneth Porter
scratchmonkey+...@sewingwitch.comscratchmonkey%2b...@sewingwitch.com


 I have an application where I need to display a collection of 3D points
 representing error from ideal position on a plane. The points may be in a
 rectangular or polar coordinate system.

 I'm looking for a library to allow me to visualize my data, and I'm
 wondering if OSG is good for this, or if it's overkill and I should be
 looking at some other system. Are there examples in OSG that are similar to
 this kind of application?

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





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




-- 

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


Re: [osg-users] osgAnimation compile errors in SVN

2009-06-18 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

Thanks. Twice worked out similar stuff.

adrian

2009/6/18 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 I checked in the addition of exports not long ago, I presume it'll be
 the same as the additions you've made.

 Robert.

 On Thu, Jun 18, 2009 at 9:36 AM, Adrian Egli OpenSceneGraph
 (3D)3dh...@gmail.com wrote:
  Hi Robert,
 
  Build error because of missing OSGANIMATION_EXPORT in
  ..\OpenSceneGraphSVN\include\osgAnimation osgAnimation::Action
 
  see attached file solves build issue under vs 2005
 
  regards
 
  adrian
 
  2009/6/17 Cedric Pinson cedric.pin...@plopbyte.net
 
  Hi Robert,
 
  Thank you for the fix, i use by default ref_ptr and after only i think
  if it's a performance problem :)
  It better to keep your version.
 
  Thank you
  Cedric
 
  On Wed, 2009-06-17 at 19:49 +0100, Robert Osfield wrote:
   Hi Cedric,
  
   On Wed, Jun 17, 2009 at 7:06 PM, Cedric
   Pinsoncedric.pin...@plopbyte.net wrote:
I compiled the trunk on the last vc express on win32 virtual
 machine.
I thought it was resolved.
   
I will take time to check it
  
   Could you check out my changes.  The only contenious one was changing
   an std::vectorref_ptrTimeline to a std::vectorTimeline* in
   ActionVisitor.For performance using a Timeline* would be
   preferable any way.
  
   Robert/
  --
  +33 (0) 6 63 20 03 56  Cedric Pinson mailto:cedric.pin...@plopbyte.net
  http://www.plopbyte.net
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


[osg-users] osgOcean : Integration into existing Database / Application

2009-06-18 Thread Adrian Egli OpenSceneGraph (3D)
Hi all
i am wondering how i can integrate the osgOcean effect into existing
application, database. Would it be possible to add a ocean geometry and
attach the ocean effect, shader. if yes how should it be look like, just a
plane? more complex geometry? My idea would be to add a lake surface, and
two rivers with different waves, and so on. finally we don't need only an
unfinite ocean. Next problem i got is that the default motion models are not
working, i played arround with osgviewer example, and osgOcean example. Well
how should we use both ideas together in a terrain database (currently
existing, but without the nice water effect)

/regards adrian

-- 

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


Re: [osg-users] FFmpeg on Windows

2009-05-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi Serge,

I am using FFmpeg with windows, (prebuild lib) and it rocks without any
problem:

VS 2005 c++ : i download FFmpeg SDK


/adrian

2009/5/19 Serge Lages serge.la...@gmail.com

 Hi all,

 Just a quick question about FFmpeg and your usage on Windows. Is there any
 precompiled package somewhere that everybody use or do you compile yourself
 the library with mingw ?

 And wich version is the best suited, the 0.5 release or the svn ?

 Thanks !

 --
 Serge Lages
 http://www.tharsis-software.com

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




-- 

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


Re: [osg-users] OGR plugin : Build failed, under VS 2005

2009-05-12 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

Which OGR Version does the plugin use? Or does it need the OGR Frame work
installed.

/adrian

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

 Hi Adrian,

 I haven't head of build errors with the ogr plugin before.  Could you
 be specific about which version of the OSG and OGR you are using and
 the error you see.

 Perhaps other Windows users who've built the OGR can suggest what
 might be wrong.

 Robert.

 On Mon, May 11, 2009 at 8:14 PM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi Robert,
 
  There are some build bugs under VS 2005, OGR plugin. How can i fix it, or
  what should i install to build correctly?
 
  missing CPL_STDCALL
 
  #ifndef CPL_STDCALL
  #if defined(_MSC_VER)  !defined(CPL_DISABLE_STDCALL)
  #  define CPL_STDCALL __stdcall
  #else
  #  define CPL_STDCALL
  #endif
  #endif
 
 
  MISSING CPL ...
 
  class ReaderWriterOGR : public osgDB::ReaderWriter
  {
 
  public:
  ReaderWriterOGR()
  {
  supportsExtension(ogr,OGR file reader);
  supportsOption(useRandomColorByFeature, Assign a random color
 to
  each feature.);
  supportsOption(addGroupPerFeature, Places each feature in a
  seperate group.);
  --   oldHandler = CPLSetErrorHandler(CPLOSGErrorHandler);
  }
 
  virtual ~ReaderWriterOGR()
  {
  --CPLSetErrorHandler(oldHandler);
  }
 
 
  /regards
  Adrian
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


[osg-users] OGR plugin : Build failed, under VS 2005

2009-05-11 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

There are some build bugs under VS 2005, OGR plugin. How can i fix it, or
what should i install to build correctly?

missing CPL_STDCALL

#ifndef CPL_STDCALL
#if defined(_MSC_VER)  !defined(CPL_DISABLE_STDCALL)
#  define CPL_STDCALL __stdcall
#else
#  define CPL_STDCALL
#endif
#endif


MISSING CPL ...

class ReaderWriterOGR : public osgDB::ReaderWriter
{

public:
ReaderWriterOGR()
{
supportsExtension(ogr,OGR file reader);
supportsOption(useRandomColorByFeature, Assign a random color to
each feature.);
supportsOption(addGroupPerFeature, Places each feature in a
seperate group.);
--   oldHandler = CPLSetErrorHandler(CPLOSGErrorHandler);
}

virtual ~ReaderWriterOGR()
{
--CPLSetErrorHandler(oldHandler);
}


/regards
Adrian

-- 

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


Re: [osg-users] Crash : Models avatar.osg / natan.osg

2009-05-08 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert, Jean-Seb,

May these topic can be closed now. I had a complete CPU/GPU crash on my
developing system. May the hardware / software driver was still broken. so i
will retest once i have the new motherboard installed :-(

thanks
adrian

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

 Hi Adrian, Robert,

 I tested out what Adrian was reporting, perhaps it can give a bit more
 info.

  osgviewer avatar.osg


 I get these messages printed constantly on the console:

 TransformVertexFunctor Bone arm_r not found, skip the influence group arm_r
 TransformVertexFunctor Bone Back.004_R.002 not found, skip the influence
 group Back.004_R.002

 repeated on and on... But I see the character.

  osganimationviewer avatar.osg


 I get the same messages, but it works (I can press the Play button and see
 the character animating).

 So no crashes here.

 Windows Vista SP1, VC++ 2005.

 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




-- 

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


[osg-users] Crash : Models avatar.osg / natan.osg

2009-05-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

did you change some basics in the openscenegraph, because avatar.osg /
natan.osg does not work anymore (osgviewer ,... )
crash with null pointer

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


Re: [osg-users] Crash : Models avatar.osg / natan.osg

2009-05-06 Thread Adrian Egli OpenSceneGraph (3D)
hi robert,

i will rebuild the whole OSG stuff over lunch (debug)

regards adrian

2009/5/6 Robert Osfield robert.osfi...@gmail.com

 On Wed, May 6, 2009 at 9:13 AM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi Robert,
 
  did you change some basics in the openscenegraph, because avatar.osg /
  natan.osg does not work anymore (osgviewer ,... )
  crash with null pointer

 osgviewer avatar.osg

 osganimationviewer avatar.osg

 Both work perfectly for me.   I haven't changed anything personally in
 osgAnimation.  Could you give a bit more info about what version of
 the OSG your are using and what version you were using previously?  A
 stack trace would useful too.

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




-- 

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


Re: [osg-users] osgOcean release

2009-05-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi

(1) Shader FIX

(2) Use Trackball or Terrain Mainpulation, more easy to use for NOT gamers,
or use the osgViewer like motion model switch




2009/5/6 David Spilling david.spill...@gmail.com

 Umit,

 ...Error : When I open up the osgOceanExample there is some error in
 vertex shader as you can see from the attached screenshot.

 I had something similar - I think this is just coz the shader constructor
 can't find the underlying shaders; AFAIK the resource folder has to be
 located in the same directory as the executable. Moving things around might
 work for you.

 David


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




-- 

Adrian Egli

#include osgViewer/Viewer
#include osgViewer/ViewerEventHandlers
#include osgGA/FlightManipulator
#include osgGA/TerrainManipulator
#include osgGA/StateSetManipulator
#include osgGA/GUIEventHandler
#include osg/Notify
#include osg/TextureCubeMap
#include osgDB/ReadFile
#include osg/Shape
#include osg/ShapeDrawable
#include osg/PositionAttitudeTransform
#include osg/Program
#include osgText/Text
#include osg/Fog

#include string
#include vector

#include osgOcean/OceanScene
#include osgOcean/FFTOceanSurface

#include SkyDome.h

class TextHUD : public osg::Referenced
{
private:
osg::ref_ptr osg::Camera  _camera;
osg::ref_ptr osgText::Text  _modeText;
osg::ref_ptr osgText::Text  _cameraModeText;  

public:
TextHUD( void ){
_camera = createCamera();
_camera-addChild( createText() );
}

osg::Camera* createCamera( void )
{
osg::Camera* camera=new osg::Camera;

camera-setViewport(0,0,1024,768);
camera-setReferenceFrame( osg::Transform::ABSOLUTE_RF );
camera-setProjectionMatrixAsOrtho2D(0,1024,0,768);
camera-setRenderOrder(osg::Camera::POST_RENDER);
camera-getOrCreateStateSet()-setMode( GL_LIGHTING, 
osg::StateAttribute::OFF );
camera-setClearMask(GL_DEPTH_BUFFER_BIT);

return camera;
}

osg::Node* createText( void )
{
osg::Geode* textGeode = new osg::Geode;

osgText::Text* title = new osgText::Text;
title-setLineSpacing(-0.35f);
title-setText(osgOcean\nPress 1-3 to change presets\nPress 
'C' to change camera);
textGeode-addDrawable( title );

_modeText = new osgText::Text;
_modeText-setPosition( osg::Vec3f(0.f, -60.f, 0.f ) );
_modeText-setDataVariance(osg::Object::DYNAMIC);
textGeode-addDrawable( _modeText );

_cameraModeText = new osgText::Text;
_cameraModeText-setPosition( osg::Vec3f(0.f, -80.f, 0.f ) );
_cameraModeText-setDataVariance(osg::Object::DYNAMIC);
textGeode-addDrawable( _cameraModeText );

osg::PositionAttitudeTransform* titlePAT = new 
osg::PositionAttitudeTransform;
titlePAT-setPosition( osg::Vec3f( 10, 90, 0.f ) );
titlePAT-addChild(textGeode);

return titlePAT;
}

void setSceneText( const std::string preset )
{
_modeText-setText( Preset:  + preset );
}

void setCameraText(const std::string mode )
{
_cameraModeText-setText( Camera:  + mode );
}

osg::Camera* getHudCamera(void){
return _camera.get();
}
};

class SceneModel : public osg::Referenced
{
public:
enum SCENE_TYPE{ CLEAR, DUSK, CLOUDY };

private:
SCENE_TYPE _sceneType;

osg::ref_ptrosgText::Text _modeText;
osg::ref_ptrosg::Group _scene;

osg::ref_ptrosgOcean::OceanScene _oceanScene;
osg::ref_ptrosgOcean::FFTOceanSurface _oceanSurface;
osg::ref_ptrosg::Fog _fog;
osg::ref_ptrosg::TextureCubeMap _cubemap;
osg::ref_ptrSkyDome _skyDome;
osg::ref_ptrosg::Vec4Array _oceanBoxColor;

std::vectorstd::string _cubemapDirs;
std::vectorosg::Vec4f  _lightColors;
std::vectorosg::Vec4f  _fogColors;

osg::ref_ptrosg::Light _light;

std::vectorosg::Vec3f  _sunPositions;
std::vectorosg::Vec4f  _sunDiffuse;
std::vectorosg::Vec4f  _waterfogColors;


public:
SceneModel( void ):
_sceneType(CLEAR)
{
_cubemapDirs.push_back( sky_clear );
_cubemapDirs.push_back( sky_dusk );
_cubemapDirs.push_back( sky_fair_cloudy );

_fogColors.push_back( intColor( 195,221,254 ) );
_fogColors.push_back( intColor( 248,241,189 ) );

[osg-users] Artefacts in first version of SSAO ...

2009-04-21 Thread Adrian Egli OpenSceneGraph (3D)
Hi all

May some one can suppport me in working out the artefacts in this
implementation (GLSL)

/regards
adrian

-- 

Adrian Egli

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

#include osgDB/ReadFile
#include osgUtil/Optimizer
#include osg/CoordinateSystemNode

#include osg/Switch
#include osg/Uniform

#include osgText/Text
#include osg/ShapeDrawable
#include osg/Geometry
#include osgViewer/Viewer
#include osgViewer/ViewerEventHandlers
#include osg/BlendFunc

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

#include iostream

#include osgFX/Effect
#include osgFX/Technique
#include osgFX/Registry

#include osg/TexGen
#include osg/Texture2D

#include osg/PolygonOffset
#include osgDB/WriteFile



bool global_debug_on = false;

struct WriteCameraPostDrawCallback : public osg::Camera::DrawCallback
{
WriteCameraPostDrawCallback(osg::Image* image,std::string filename, 
bool write):
_image(image),
_filename(filename) 
{
char* write_file = getenv(DEBUG);
global_debug_on = (write_file!=NULL) || write;
}

virtual void operator () (const osg::Camera /*camera*/) const
{

_image-dirty();

if ( global_debug_on ) {
std::cout  write   _filename  std::endl;
osgDB::writeImageFile(*(_image.get()),_filename);
}

}

osg::ref_ptrosg::Image _image;
std::string _filename;
};


namespace osgFX {
class SSAO : public Effect {
public:
SSAO() {};
SSAO(osg::Group*);
SSAO(const SSAO copy, const osg::CopyOp copyop = 
osg::CopyOp::SHALLOW_COPY);

META_Effect(osgFX, SSAO, 

Screen Space Ambient Occlusion, 

SSAO : test implementation, 

Adrian Egli);
protected:
virtual ~SSAO() {}
SSAO operator=(const SSAO) { return *this; }

bool define_techniques();

osg::ref_ptrosg::Group _root;
};

}



using namespace osgFX;


namespace
{


osg::Node* createBase(osg::Texture2D* texture ,osg::Texture2D* 
texture2=NULL )
{

osg::ref_ptrosg::Geode geode = new osg::Geode;

// set up the texture of the base.
osg::ref_ptrosg::StateSet stateset = new osg::StateSet();

stateset-setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON);
if 
(texture2)stateset-setTextureAttributeAndModes(1,texture2,osg::StateAttribute::ON);
geode-setStateSet( stateset.get() );


osg::ref_ptrosg::HeightField grid = new osg::HeightField;
grid-allocate(2,2);
grid-setOrigin(osg::Vec3(0.0,0.0,0.0));
grid-setXInterval(1.0);
grid-setYInterval(1.0);

grid-setHeight(0,0,-1.0);
grid-setHeight(0,1,-1.0);
grid-setHeight(1,1,-1.0);
grid-setHeight(1,0,-1.0);

geode-addDrawable(new osg::ShapeDrawable(grid.get()));

osg::Group* group = new osg::Group;
group-addChild(geode.get());

return group;

}

Registry::Proxy proxy(new SSAO);

class DefaultTechnique: public Technique {
public:

DefaultTechnique(osg::Group* scene,osg::Group* ssaoFX) :
  Technique(),
  _scene(scene)
  {

  
// depth
  // texture resolution 
  _RTTInfoTangentDepth._resolution_x = 512;
  _RTTInfoTangentDepth._resolution_y = 512;


  // texture
  _RTTInfoTangentDepth._texture = new osg::Texture2D;
  
_RTTInfoTangentDepth._texture-setTextureSize(_RTTInfoTangentDepth._resolution_x,
 _RTTInfoTangentDepth._resolution_y);
  
_RTTInfoTangentDepth._texture-setInternalFormat(GL_RGBA);
  
_RTTInfoTangentDepth._texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::NEAREST);
  

Re: [osg-users] osgShadow and model alpha textures

2009-04-11 Thread Adrian Egli OpenSceneGraph (3D)
Hi Bob,
Once you have finished implementing fog, and other features into the PSSM
frag shader, may you could submitt it a s config file.

regards adrian


2009/4/10 Bob Holcomb bob_holc...@hotmail.com

 Wojtek and Adrian,

 Hey guys, you were right on the money.  I changed the PSSM frag shader to
 take the alpha channel from the current texture and it seemed to work well.
  I still need to wiggle my fog calculations into the shader and I think I'll
 be set.  Thanks!

 Cheers,

 Bob

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





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




-- 

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


Re: [osg-users] ray tracing using OSG

2009-04-11 Thread Adrian Egli OpenSceneGraph (3D)
:-) Once you have some questions,  i could answer them, the code is fast but
not very fast :-) have also a look at ompf.org
and search for arauna / bikker

/adrian

2009/4/11 Charles Cossé cco...@gmail.com

 Hi Sajjad,

 Attached I have tgz'd-up a file posted earlier (by Adrian Egli?) with
 his first cut at raytracing using a kd tree.   I saved all the links
 to the various posts/threads on this subject, also, which can share
 with you if interested.

 Charles

 On Fri, Apr 10, 2009 at 10:16 PM, ami guru dosto.wa...@gmail.com wrote:
  Hello Forum,
 
 
  I was wondering if there is anyone have done ray tracing using OSG.
 
 
  So far i have got from the forum Jean-Sébastien Guay did his Masters
 thesis
  on that domain and it would be really nice
  if he provide the link to the report, at least it would be a starting
 point
  for me.
 
  What do you think Jean?
 
 
  Regards
  Sajjad
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 



 --
 AsymptopiaSoftware|softw...@thelimit
  http://www.asymptopia.org

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




-- 

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


[osg-users] osgShadow

2009-04-11 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

i am working close to the author of the shaderX and gpu gems cascade , resp.
parallel split shadow map. we are looking for next step of shadow technique,
what idea do you have we should do for next. or what open problem do you
have with all of the current shadow map technics, may we can help to get
soon  new and better shadow implementation than the PSSM. what are the most
important bug, problem, ... we have to solve for you. may we can work out a
nice shadowing technics more robust, faster and better.

we are open for new ideas, even for caching (history buffer), pixel correct
shadow maps. and so on.

regards
adrian

-- 

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


Re: [osg-users] ray tracing using OSG

2009-04-11 Thread Adrian Egli OpenSceneGraph (3D)
Well i don't know,  i just build my raytracer this morning on mac os/x with
osg trunk. (svn )

i will send the code and cmake file

/adrian


2009/4/11 ami guru dosto.wa...@gmail.com

 Thanks


 For the code skeleton, that will pave a way to get started i believe. Now i
 am going through  the following issues:

 Just updated the installation from the trunk to 2.9.3.

  i executed the make file to compile the code that you have sent and the
 following error showed up:


 **
 g++  -c kdTree.cpp
 g++  -c main.cpp
 g++  -c plymeshreader.cpp
 g++  -c sphereunitvecpool.cpp
 g++  -c TriangleNodeVisitor.cpp
 TriangleNodeVisitor.cpp: In member function ‘void
 TriangleNodeVisitor::processGeometry(osg::Geometry*)’:
 TriangleNodeVisitor.cpp:294: error: cannot declare variable ‘pif’ to be of
 abstract type ‘PrimitiveIndexWriter’
 TriangleNodeVisitor.cpp:79: note:   because the following virtual functions
 are pure within ‘PrimitiveIndexWriter’:
 /usr/local/include/osg/PrimitiveSet:134: note: virtual void
 osg::PrimitiveIndexFunctor::setVertexArray(unsigned int, const osg::Vec2d*)
 /usr/local/include/osg/PrimitiveSet:135: note: virtual void
 osg::PrimitiveIndexFunctor::setVertexArray(unsigned int, const osg::Vec3d*)
 /usr/local/include/osg/PrimitiveSet:136: note: virtual void
 osg::PrimitiveIndexFunctor::setVertexArray(unsigned int, const osg::Vec4d*)
 make: *** [TriangleNodeVisitor.o] Error 1



 **


 I checked the code but i have not found any function with pure virtual as
 the message above said.

 Any hint to get around that issue?


 Regards
 Sajjad

 On Sat, Apr 11, 2009 at 7:54 PM, Adrian Egli OpenSceneGraph (3D) 
 3dh...@gmail.com wrote:

 :-) Once you have some questions,  i could answer them, the code is fast
 but not very fast :-) have also a look at ompf.org
 and search for arauna / bikker

 /adrian

 2009/4/11 Charles Cossé cco...@gmail.com

 Hi Sajjad,

 Attached I have tgz'd-up a file posted earlier (by Adrian Egli?) with
 his first cut at raytracing using a kd tree.   I saved all the links
 to the various posts/threads on this subject, also, which can share
 with you if interested.

 Charles

 On Fri, Apr 10, 2009 at 10:16 PM, ami guru dosto.wa...@gmail.com
 wrote:
  Hello Forum,
 
 
  I was wondering if there is anyone have done ray tracing using OSG.
 
 
  So far i have got from the forum Jean-Sébastien Guay did his Masters
 thesis
  on that domain and it would be really nice
  if he provide the link to the report, at least it would be a starting
 point
  for me.
 
  What do you think Jean?
 
 
  Regards
  Sajjad
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 



 --
 AsymptopiaSoftware|softw...@thelimit
  http://www.asymptopia.org

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




 --
 
 Adrian Egli

 ___
 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




-- 

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


Re: [osg-users] osgShadow and model alpha textures

2009-04-09 Thread Adrian Egli OpenSceneGraph (3D)
Hi all
The PSSM has a GLSL shader inside the implementation. And this makes the
lighting stuff different from default one. Even coloring, .. , transparancy
isn't a easy  task. So to solve such unwished behaviour you can replace the
pssm glsl shader our self. i would copy the org pssm shader from the current
pssm implementation and rewrite those part you need to fix. then you can
pass the new glsl shader thourgh the pssm's shader exchange interface.


/**
 * you can overwrite the fragment shader if you like to modify it
yourself, own fragment shader can be used
 */
class OSGSHADOW_EXPORT FragmentShaderGenerator : public
osg::Referenced {
public:
/**
 * generate the GLSL fragement shader
 */
virtual std::string generateGLSL_FragmentShader_BaseTex(bool
debug, unsigned int splitCount,double textureRes, bool filtered, unsigned
int nbrSplits,unsigned int textureOffset);
};

/** set fragment shader generator */
inline void setFragmentShaderGenerator(FragmentShaderGenerator* fsw)
{ _FragmentShaderGenerator = fsw;}



i hope this solve your problems.

important to know : (SingleThreaded is a must)
osgshadow --pssm --SingleThreaded




/adrian

2009/4/8 Wojciech Lewandowski lewandow...@ai.com.pl

 Bob,

 Its hard for me to imagine how one could get the effect of lightening
 instead of dimming. But maybe color material set in vertices
 (GL_COLOR_MATERIAL)  may be involved somehow. This attribute is not handled
 by vertex shaders. But its handled by fixed pipeline.You may look at the
 shaders code ( stored inside osgShadow\src\StandardShadowMap.cpp ). All
 classed derived from StandardShadowMap (Lispsm included) may work bit
 differenet than other techniques because they define Vertex Shader. If your
 fixed pipeline lighting setup is different than what is assumed in SSM
 vertex shader we may see some issues not observable with other techniques
 (which only use Fragment Shaders). SSM vertex shader assumes that we have
 one light and separately compute and pass diffuse and ambient components to
 fragment shader. If ambient is passed separately, fragment shader may
 properly remove only diffuse component  in shadowed areas keeping ambient
 untouched.

 Cheers,
 Wojtek

 Cheers,
 Wojtek
 - Original Message - From: Bob Holcomb bob_holc...@hotmail.com
 To: osg-users@lists.openscenegraph.org
 Sent: Wednesday, April 08, 2009 2:34 AM
 Subject: [osg-users] osgShadow and model alpha textures



  Hello,

 I'm adding osgShadow to an existing osg project and I'm getting some weird
 results with PSSM (Parallel Split Shadow Maps).  They don't seem to be
 respecting the alpha channel of my model's texture.  For example, I have
 helicopter model who's rotor system is represented by a quad and a texture
 of the blades which is mostly transparent. When rendering before adding
 osgShadow it looked fine.  After adding osgShadow the translucent part is
 white (but the shadows projected on the ground look pretty good!).  This
 only affects the items under the shadowedScene node, any geometry not under
 that node is rendered correctly.

 I've also tried the Light Space Perspective Map technique and found that
 the self shadowing looks great, but the projected texture on the ground
 actually makes the ground lighter instead of darker.  If anybody has any
 info on either of these issues I would also appreciate the help.  Thanks!

 Cheers,

 Bob

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







 



  ___
 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




-- 

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


Re: [osg-users] FFmpeg plugin

2009-03-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi Carlos
You have to donwload ffmpeg and build the plugin by setting up the right
parameters in cmake. then osg will build the ffmpeg plugin as well as the
other 3rd party plugins will be build.

adrian

2009/3/18 Carlos Sanches ces...@gmail.com

 Hi Robert.
 I m seeing that my /usr/local/lib/osgPlugins-2.9.1  directory dont have the
 plugin for ffmpeg .
 this is correct ?
 I put this in my code ...
 std::string libName =
 osgDB::Registry::instance()-createLibraryNameForExtension(ffmpeg);
 osgDB::Registry::instance()-loadLibrary(libName);

 but how I know if it is using ffmpeg ?

 tks




 2009/3/16 Robert Osfield robert.osfi...@gmail.com

 Hi Carlos,

 Have a look at the osgmovie example for guidance, it'll boil down to
 reading a image, and assing to the a textured quad.  Right now you'll need
 to preload the ffmpeg plugin as osgDB won't yet automatically alias the
 movie extensions to ffmpeg.  On the movie command line you use the option -e
 ffmpeg to pre load the plugin.  Programatically you'd use:

 std::string libName =
 osgDB::Registry::instance()-createLibraryNameForExtension(ffmpeg);
 osgDB::Registry::instance()-loadLibrary(libName);

 Robert.

 2009/3/16 Carlos Sanches ces...@gmail.com


 Hi all !
 I downloaded osg 2.9.1 . I m using  pImageStream =
 dynamic_castosg::ImageStream*(hudImage);
 to open a movie.
 What have I to do to use ffmpeg to read my movies ?

 tks




 ___
 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




-- 

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


Re: [osg-users] FFmpeg plugin

2009-03-19 Thread Adrian Egli OpenSceneGraph (3D)
I am working with windows, no problem there, but here my settings.
Variable Name: FFMPEG_LIBAVCODEC_INCLUDE_DIRS
Description: Path to a file.
Current Value: F:/dev/ffmpeg/SDK/include/LIBAVCODEC
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBAVCODEC_LIBRARIES
Description: Path to a library.
Current Value: F:/dev/ffmpeg/SDK/lib/avcodec-52.lib
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBAVDEVICE_INCLUDE_DIRS
Description: Path to a file.
Current Value: F:/dev/ffmpeg/SDK/include/LIBAVDEVICE
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBAVDEVICE_LIBRARIES
Description: Path to a library.
Current Value: F:/dev/ffmpeg/SDK/lib/avdevice-52.lib
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBAVFORMAT_INCLUDE_DIRS
Description: Path to a file.
Current Value: F:/dev/ffmpeg/SDK/include/LIBAVFORMAT
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBAVFORMAT_LIBRARIES
Description: Path to a library.
Current Value: F:/dev/ffmpeg/SDK/lib/avformat-52.lib
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBAVUTIL_INCLUDE_DIRS
Description: Path to a file.
Current Value: F:/dev/ffmpeg/SDK/include/LIBAVUTIL
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBAVUTIL_LIBRARIES
Description: Path to a library.
Current Value: F:/dev/ffmpeg/SDK/lib/avutil-49.lib
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBSWSCALE_INCLUDE_DIRS
Description: Path to a file.
Current Value: F:/dev/ffmpeg/SDK/include/libswscale
New Value (Enter to keep current value):

Variable Name: FFMPEG_LIBSWSCALE_LIBRARIES
Description: Path to a library.
Current Value: F:/dev/ffmpeg/SDK/lib/swscale-0.lib
New Value (Enter to keep current value):

Variable Name: FFMPEG_ROOT
Description: Location of FFMPEG
Current Value: F:/dev/ffmpeg/SDK/include
New Value (Enter to keep current value):


2009/3/19 Carlos Sanches ces...@gmail.com

 Hi Adrian !
 ok, I have the ffmpeg installed . I use it to convert my movies.
 Now I m seeing in ccmake configure list . but have some options that I dont
 know what I have to put there.
 the options are :

 FFMPEG_LIBAVCODEC_INCLUDE_DIRS
 /usr/include

  FFMPEG_LIBAVCODEC_LIBRARIES
 /usr/lib/libavcodec.so

  FFMPEG_LIBAVDEVICE_INCLUDE_DIR
 FFMPEG_LIBAVDEVICE_INCLUDE_DIRS-NOTFOUND

  FFMPEG_LIBAVDEVICE_LIBRARIES
 FFMPEG_LIBAVDEVICE_LIBRARIES-NOTFOUND

  FFMPEG_LIBAVFORMAT_INCLUDE_DIR
 /usr/include

  FFMPEG_LIBAVFORMAT_LIBRARIES
 /usr/lib/libavformat.so

  FFMPEG_LIBAVUTIL_INCLUDE_DIRS
 /usr/include

  FFMPEG_LIBAVUTIL_LIBRARIES
 /usr/lib/libavutil.so

  FFMPEG_LIBSWSCALE_INCLUDE_DIRS
 /usr/include

  FFMPEG_LIBSWSCALE_LIBRARIES
 /usr/lib/libswscale.so

  FFMPEG_ROOT


 The options that I believe that must be wrong are:
 FFMPEG_LIBAVDEVICE_INCLUDE_DIR
  FFMPEG_LIBAVDEVICE_LIBRARIES
  FFMPEG_ROOT

 What I have to do in these options ?
 tks








 2009/3/19 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Hi Carlos
 You have to donwload ffmpeg and build the plugin by setting up the right
 parameters in cmake. then osg will build the ffmpeg plugin as well as the
 other 3rd party plugins will be build.

 adrian

 2009/3/18 Carlos Sanches ces...@gmail.com

 Hi Robert.
 I m seeing that my /usr/local/lib/osgPlugins-2.9.1  directory dont have
 the plugin for ffmpeg .
 this is correct ?
 I put this in my code ...
 std::string libName =
 osgDB::Registry::instance()-createLibraryNameForExtension(ffmpeg);
 osgDB::Registry::instance()-loadLibrary(libName);

 but how I know if it is using ffmpeg ?

 tks




 2009/3/16 Robert Osfield robert.osfi...@gmail.com

 Hi Carlos,

 Have a look at the osgmovie example for guidance, it'll boil down to
 reading a image, and assing to the a textured quad.  Right now you'll need
 to preload the ffmpeg plugin as osgDB won't yet automatically alias the
 movie extensions to ffmpeg.  On the movie command line you use the option 
 -e
 ffmpeg to pre load the plugin.  Programatically you'd use:

 std::string libName =
 osgDB::Registry::instance()-createLibraryNameForExtension(ffmpeg);
 osgDB::Registry::instance()-loadLibrary(libName);

 Robert.

 2009/3/16 Carlos Sanches ces...@gmail.com


 Hi all !
 I downloaded osg 2.9.1 . I m using  pImageStream =
 dynamic_castosg::ImageStream*(hudImage);
 to open a movie.
 What have I to do to use ffmpeg to read my movies ?

 tks




 ___
 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] What about User-Meeting in Europe - osgInEurope?

2009-02-24 Thread Adrian Egli OpenSceneGraph (3D)
Switzerland == 3

2009/2/24 Art Tevs osgfo...@tevs.eu

 Hi David, all,

 here is the current overview about the voting:

 Paris, France  [ 5 ]
 Marseile, France [ 0 ]
 Strassbourg, France [ 1 ]
 Prague, Czech Republic [ 1 ]
 Genova, Italy [ 0 ]
 Brussel, Belgium [ 2 ]
 Zuerich, Switzerland [ 1 ]
 Luxembourg, Luxembourg [ 1 ]
 Munich, Germany [ 0 ]
 Frankfurt Am Main, Germany [ 0 ]
 Stuttgart, Germany [ 0 ]

 Total votes: 11


 So currently Paris is the leader. I think, I'll let the poll open until the
 01.04.2009. Hence, vote for your city where do you want to have next
 osgInEurope - OSG user meeting/conference.


 Best regards,
 Art

 P.S. As to the video conference - I will try to find out, which hardware we
 will need. If somebody do know something interesting, then let us know ;)

 P.P.S This is a reminder mail, to push this thread up ;)

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





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




-- 

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


Re: [osg-users] What about User-Meeting in Europe - osgInEurope?

2009-02-18 Thread Adrian Egli OpenSceneGraph (3D)
Switzerland :-)

/adrian

2009/2/18 Cedric Pinson morni...@plopbyte.net

 Hi all,

 I vote for Paris :) or near france :)

 Cheers,
 Cedric


 Art Tevs wrote:

 Hi all,

 there is currently only 7 votes now and they are all spread out over the
 europe. Hence, don't be shy and vote for the next osg meeting in europe
 ;)!!!

 Best regards,
 art

 P.S. From now on, I will post frequently (once a week) about the polling
 of the next user meeting. So that nobody overlook it ;)

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





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



 --
 +33 (0) 6 63 20 03 56  Cedric Pinson mailto:morni...@plopbyte.net
 http://www.plopbyte.net


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




-- 

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


[osg-users] Nice blender (Real Time)

2009-02-10 Thread Adrian Egli OpenSceneGraph (3D)
http://www.bulletphysics.com/Bullet/wordpress/uncategorized/blender-248-to-receive-real-time-bullet-soft-bodies-in-game-engine

-- 

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


[osg-users] Memory Leak ... Windows

2009-02-10 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

Since i am member of the osg-user mailing list, we get each month a least
one guy asking the community about the problem of memory leak in OSG core.
The problem is simply to say, that the most of them are working
with 3rd party tools like bound checkers and they trust them. Of course the
bound checkers and alos others are greate. but not right working with our
library. So i would propose a own written C++ memory leak detector.
I still posted the memory leak detector two weeks ago, but if we would like
to integrate it in the next release it would be possible. Unfortunately it's
only working under windows and _MSV_VER  1399 (MSVS C++ 2005). Or we could
at least post the code in some way. I don't right know where and how, but it
would be possible.

what are you thinking about? Do you still check osg against some memory leak
detector?

/adrian

-- 

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


Re: [osg-users] 3.0 or 2.10?

2009-02-05 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

i don't understand why we should rewrite the whole openscenegraph core? Is
the good old openGL and openscenegraph that faraway from openGL CL/openGL
ES/.. How long does it take to port the whole greate functionality from osg2
to osg3? And how would it be possible to port the application form osg2 to
osg3 or should we restart our development once we get osg3 because the
osg2's API so different
from osg3? I don't understand all of the problem. is the openGL close to
death and we have to restart the greate osg2 lib. rewrite the core means,
what will happen with osg2 applications, new features will no longer be
added to the API (in long term view) and than the osg based application have
to die, and the new application has to become new written. or what will the
graphic industry do in near and long term future. i am not as close as some
of the community are in the graphic community, i am closer to computer
vision :-( :-)

I undestand that we may have to overthink some part of the core to support
new ideas in the graphic world. RealTimeRayTracer, ... ,... ,.. ,.. But
openscenegraph is one of the best graphic engine currently in the world of
computer graphics render engine.

/sorry that i don't really understand the question and the problem we will
get with osg2

adrian


2009/2/5 Cedric Pinson morni...@plopbyte.net

 Anyway i will help to host if it helps

 Cheers,
 Cedric


 Sukender wrote:

 Hi JS and Cédric,

 I'm a bit more in favor of what JS says. I agree that when the Forge is
 down it's really annoying, but centralizing all OSG related projects seem
 worth using a kind of forge (or something else). We really should avoid them
 dying by helping people maintaining them.

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


 Le Thu, 05 Feb 2009 17:49:57 +0100, Jean-Sébastien Guay 
 jean-sebastien.g...@cm-labs.com a écrit:



 Hi Cedric,



 In theory the idea is cool but if people dont fill the current wiki why
 they will take energy to fill a forge ?


 I think it requires no more energy than hosting your project on your own
 site, or a site like SourceForge or Google Code. The difference is that
 it would be centralized, with an easy way to add maintainers, to
 generate interest in projects, to search, etc.

 A list of nodekits on the wiki, where links become broken and there is
 no way of knowing if a project is actually any good, doesn't help at all.



 And personnally if there is no support
 for git/mercurial i prefer to host the project where i can use those
 tools.


 You could always host your own version control repository, and use the
 forge's version control as a mirror. Plus I think some of the software
 supports Mercurial at least (mozdev does, why not others?)



 I think the main problem is to reference project, not to host them Maybe
 we just need to improve the reference of project on osg trac or a better
 categories...


 No, I think the main problem is generating interest and ensuring a
 project stays alive. A dumb project list does not help there.

 As it is now, a project is one person's pet and if that person stops
 maintaining it, it dies. Handing over project ownership does not happen
 when a project is one person's pet. Unless the project is on SourceForge
 or Google Code, but then we have the problem of having lots of projects
 on different systems using different tools to maintain them.

 I think we need a better balance between consolidation and distribution.
 Being too decentralized is not good either.

 Anyways, we'll see.

 J-S



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



 --
 +33 (0) 6 63 20 03 56  Cedric Pinson mailto:morni...@plopbyte.net
 http://www.plopbyte.net


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




-- 

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


Re: [osg-users] 3.0 or 2.10?

2009-02-05 Thread Adrian Egli OpenSceneGraph (3D)
Ok, i see. The OpenGL 3 API will completly change. And for this, we will
have to rewrite the OpenSceneGraph core. But the scene graph it selfs could
(may) be the same or very similar. that would be greate. i thought the we
will to rewrite the whole code, this would be much much much work, and even
for debugging ...

/thanks for the short answer

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

 Hi Adrian,

  i don't understand why we should rewrite the whole openscenegraph core? Is
 the good old openGL and openscenegraph that faraway from openGL CL/openGL
 ES/..


 OpenGL ES and OpenGL 3.0 will drop the fixed pipeline. So OSG's core
 functionality (state attributes for each fixed pipeline state) will have to
 be replaced with a shader-based architecture.

 I guess most of the API could be the same (nodes, groups, geodes, parents,
 children, etc.) but the rendering back-end will have to be almost totally
 different.

 Anyways, it's still a ways off.

 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




-- 

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


Re: [osg-users] Multiple GPU

2009-02-04 Thread Adrian Egli OpenSceneGraph (3D)
Hi UFUK ?

it would be greate to get see working osg with such high-end technology. may
you should use equalizer and openscenegraph doing this.

adrian

2009/2/4 ufuk gun ufuk@gmail.com

 Hi,
 I have to do a simulation project which needs 8 screens. This system likes
 a dome.

 so i want to ask few questions about this:

 1) i want to use multiple gpu's. So is there a limit on number of gpu's on
 a pc? i saw 4 gpu's on a pc and every gpu has 2 outputs. can i render 8
 screen with viewer?

 2) how can i set which gpu render which screen. is there an auto management
 system in viewer? if i have screens which have resolutions like 8x1280x1024
 or 4x2560x1024 or any other combination of this, should i do an extra thing
 for this?

 3) do you think i will have a critical frame rate problem if i render 8
 screens.


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




-- 

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


Re: [osg-users] CPU usage

2009-02-02 Thread Adrian Egli OpenSceneGraph (3D)
Greate news (or bad news) that means we have not a windows issue. what
happens when you switch to singelthreaded ?

/adrian

2009/2/1 Simon Loic simon1l...@gmail.com

 Hi,
 in my case when I am runing osgviewer on a ubuntu distribution with 4 cores
 I get 25% of cpu, which means that one of my cores is over used. One of my
 colleagues have exactly the same behavior. Thus I don't think this is
 windows related only.


 On Sun, Feb 1, 2009 at 2:55 PM, Glenn Waldron gwald...@gmail.com wrote:

 Adrian,

 I have observed an intermittent problem on Windows in which osgviewer
 starts up using a high CPU %, but then cycling through the threading
 modes with 'm' makes the problem go away - even when you return to the
 mode in which you started. I never did figure out why.

 Just a data point...


 Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
 +1.703.652.4791



 On Sun, Feb 1, 2009 at 7:45 AM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi Cory,
 
  I am working with Windows Vista dual core system. I get 50% CPU usage
 when i
  am running osgviewer cow.osg if i start
  osgviewer cow.osg --SingleThreaded i have no longer 50% CPU usage , now
 i
  have about 0.5-3% CPU usage !
 
  i am very busy at the moment, but may tomorrow i will debug the OSG
 core,
  may there is a bug inside or a thread running at max.
  or robert has some idea,where i can start with debugging. may it's a
 windows
  vista bug
 
  adrian
 
 
  2009/2/1 Robert Osfield robert.osfi...@gmail.com
 
  Hi Cory,
 
  I'll have to defer to others on the situation under Windows when doing
  remote desktop.  My guess is that it's likely to be a driver issue.
 
  Robert.
 
  On Sat, Jan 31, 2009 at 3:27 PM, Cory Riddell c...@codeware.com
 wrote:
   I'm not sure about vysync. I'll look that up and check it.
  
   I thought about the possibility of it being a debug build and I don't
   think
   that's it. In my bin directory I have osgviewer.exe at 25,600 bytes
 and
   osgviewerd.exe at 81,920 bytes. Both executables give me the same CPU
   pegging behavior (as observed by SysInternals Process Explorer).
  
   My command line is osgviewer.exe --window 100 100 200 200
 cessna.osg.
   My
   video card is an ATI FireGL V7700 and the drivers are up to date.
  
   Ah- I just noticed something-- an error message:
   Windows Error #127: [Screen #0] ChooseMatchingPixelFormat() -
   wglChoosePixelFormatARB extension not found, trying GDI. Reason: The
   specified procedure could not be found.
  
   I'm running over remote desktop right now, so perhaps that's related.
 I
   don't recall seeing this error message before.
  
   Cory
  
   On Sat, Jan 31, 2009 at 3:54 AM, Robert Osfield
   robert.osfi...@gmail.com
   wrote:
  
   Hi Cory,
  
   It's not normal to have this high level of CPU usage for this model,
   the expceptions to this would be:
  
  You have vysync switched off, so the app is racing as fast it can
   to dispatch frames
  You've compiled the OSG with debug build.
  
   Robert.
  
   On Fri, Jan 30, 2009 at 8:36 PM, Cory Riddell c...@codeware.com
   wrote:
When I run the osg viewer app and load just about any osg file
 (like
cesna.osg), my CPU usage is a constant 23% - 30%. This is with no
interaction, it is basically using an entire CPU core.
 Fortunatelly I
have a
4 core machine, so it hasn't been a problem so far, but I'm
 wondering
what
this means for single core machines (which most of our customers
have).
   
Is this typical?
   
Cory
   
___
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
 
 
 
  --
  
  Adrian Egli
 
  ___
  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




 --
 Loïc Simon

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

Re: [osg-users] Histroy Buffer Implementation / Suggestion

2009-02-02 Thread Adrian Egli OpenSceneGraph (3D)
Hello all

You should use lispsm or pssm shadow : even for terrain this gives nice
looking shadows (with pssm you can limit the max far distance, use this say
250m, and you will get nice shadows) but once we have the latest idea
implemented, the shadow quality gets much better, this would be of sure
true, but may the performance will
be very bad. so i am looking for high performance and robust technic.

I don't really like to implement this with osgPPU, because of the problem
robert told (see submission discussion) not tha osgPPU is bad, but it would
better be nicely integrated into osg and osgShadow, not only for osgShadow
and its quality the histroy buffer could have high impact, also for others
shaders.

Then for the default shader in openscenegraph may we should think to
redesign them, because actually we have shaders in shadow, ... , but each of
the re-writes the very basics, may we could think about of GLSL shader
modules, code modules then we can put them together, this would be greate. i
have some idea how this could be solved. but i have to think about more of
this idea.

/adrian

2009/2/1 Simon Loic simon1l...@gmail.com

 It would be very interested to see the resulting shadows of this method in
 osg. I'am currently using the basic shadow technic and the rendering is so
 aliased! Maybe I'am not using it in the right way.


 On Fri, Jan 30, 2009 at 4:44 PM, Art Tevs stud_in...@yahoo.de wrote:

 Hi Adrian,

 for all 2D effects there exists already a pipeline with couple of examples
 (gauss blurr, depth of field, hdr and so on), however you maybe have heard
 about it already. Take a look into osgPPU.

 I took a small look into the paper and saw that the main method is just to
 combine N previous images in some sense together to achieve nice results. As
 you said, using the history buffer. Using pure osg components, one could for
 example setup N cameras with corresponding textures and switch them
 framewise. Then current rendering camera use the input of other N-1 cameras
 to produce its new output. Using osgPPU, I would suggest to implement new
 class UnitHistoryBuffer, which will do this trick, by collecting the inputs
 in some buffer, e.g. 3D texture or 2D texture array. Output of this unit can
 then be combined with current rendering camera in the way as described in
 the paper. This shouldn't be a big trick, yeah, maybe I can do this for the
 upcoming v0.4 release ;)

 I am wonder if one could use this technique for some sreen space effects,
 not only for motionblur, but also for optical flow detection or something
 similar ??? Maybe for something like hybrid ray tracing approach, where some
 kind of heuristic function could use this information to retrace only
 neccessary rays.

 cheers,
 art

 --
 Read this topic online here:
 http://osgforum.tevs.eu/viewtopic.php?p=5545#5545





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




 --
 Loïc Simon

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




-- 

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


Re: [osg-users] shutting down OSG

2009-02-02 Thread Adrian Egli OpenSceneGraph (3D)
Did the code help ?

/adrian

2009/1/30 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Hi Robert, Cory,

 I implement some weeks before a memory leak detector for VS 2005 and
 cleaned up the code that all of my objects get right removed from memory
 now, espacially i had some bad behaviour before
 cleaning up my webbased rendering plugin, after removing all memory leak
 even quicktime get closed without any crashes. so it's really important that
 all allocated memory gets
 fine removed. the plugin don't have some leaks coming through the OSG core,
 and believe me: our application is much more complex than just use some
 geometry nodes.
 and i can say that the osg core should be free of any memory leak, i
 suggest using in all user application the ref_ptr concept which robert is
 using in the core of osglib then you don't get some leaks.
 I also believe that there is also many false positives...

 Here is the code you should use :
 // memory leak check ...


 ---
 MEM_LEAK_BASE.h

 ---


 ---
 Just include this in each CPP file


 #ifdef MEM_LEAK_CHK
 #include DbgMemoryImpl.h
 #endif



 ---


 i hope this works also 

 /adrian


 2009/1/30 Robert Osfield robert.osfi...@gmail.com

 Hi Cory,

 I believe the are bugs in the memory tracking support in VS,
 especially when using MFC, that produce many false positives.  You'll
 need to get more info about this from VS experts though, the last time
 I used VS was in the last Century!

 Robert.

 On Fri, Jan 30, 2009 at 3:32 PM, Cory Riddell c...@codeware.com wrote:
  After my (MFC) app ends, the output window in Visual Studio fills with a
  bunch of this:
 
  Detected memory leaks!
  Dumping objects -{164} normal block at 0x02A54248, 128 bytes long.
   Data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00
  {163} normal block at 0x02A541A8, 96 bytes long.
   Data:   c  F8 87 63 01 00 00 00 00 01 00 00 00 00 00 00
 00
  {161} normal block at 0x02A54068, 64 bytes long.
   Data: OpenThread v1.2p 4F 70 65 6E 54 68 72 65 61 64 20 76 31 2E 32
 70
 
  I'm just getting started with OSG. I'm using it to render geometry from
  Granite (the geometry kernel from the Pro/ENGINEER people, just getting
  started with this too). Both libraries have their own reference counted
  pointer types and they function a bit differently so I'm probably just
  abusing one or the other.
 
  Normally I can just pick one of the allocation numbers from the dump
 (161,
  163, and 164 above) and tell the debugger to stop there, but for some
 reason
  that isn't working. If I have time later today, I'm going to instrument
  everything with BoundsChecker and run it again.
 
  Cory
 
 
  On Fri, Jan 30, 2009 at 9:08 AM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi Cory,
 
  The OSG users ref counting, so if all external references to the scene
  and viewer are removed then all the associated resources should be
  deleted automatically.  If you app keeps any references to this data
  then it'll stay around until these references are removed.
 
  If you've enabled caching in the osgDB::Registry then it can keep
  around a reference for loaded objects in its cache, so clearing this
  would be required.   Also if you app loads OSG plugins as part of
  loading your data then one could see this as items you might want to
  unload.
 
  BTW, what makes you think that things aren't being released?
 
  Robert.
 
  On Fri, Jan 30, 2009 at 2:57 PM, Cory Riddell c...@codeware.com
 wrote:
   Is there a correct way to stop OSG and free all the resources that
 have
   been
   acquired by without stopping the application? I thought that when my
   osgViewer::Viewer instance went out of scope, everything would be
   released,
   but that doesn't seem to be the case.
  
   cory
  
   ___
   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] CPU usage

2009-02-02 Thread Adrian Egli OpenSceneGraph (3D)
Hi J-S

i am working with NVidia GPU, and i have same behaviour. So there should be
another problem than the busy wait. Of course can VSync give some problem in
performance or at least we get a smaller FPS displayed. But here we have
some strang behavior of our osgViewer (renderer). My there is a bug inside
the synchronisation.

But what i guess is:
When we are running under --SingleThreaded :

bool GraphicsWindowWin32::realizeImplementation()
wglMakeCurrent
SwapBuffers

all are called in the same thread.

if we are working without singlethreaded option, then the realize get call
in the master thread and in the others wgl based method call get called in
a second thread. may the operating system (driver) understand, that there
must be more than one thread in the world and starts an extra
synchronisation which cause the CPU overload.

/adrian


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

 Hi Cory,

  I'll have to defer to others on the situation under Windows when doing
 remote desktop.  My guess is that it's likely to be a driver issue.


 Well, using Remote Desktop adds a variable into the mix for sure, so
 eliminating this and running the app locally would eliminate one possible
 thing.

 About one core being pegged, some video drivers implement vsync as a busy
 wait, which means that the CPU is not really pegged, it just looks like
 that. If you were to actually run real code on that core, along with OSG,
 you would see that that code would run at a normal speed because the vsync
 busy wait would relinquish the CPU while it's waiting for the next frame to
 start.

 So my guess is that your ATI drivers are doing this, and what you're seeing
 is just the idle time between frames being counted as active time by Process
 Explorer because it's implemented as a busy wait. Of course, I'm speculating
 here, you'll have to run a real app (not just osgviewer) to see for
 yourself.

 Note also that ATI's OpenGL drivers have never been the best... Though they
 say they're getting better, they have a long way to go. So there might be
 some of that here.

 Hope this helps,

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

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




-- 

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


Re: [osg-users] CPU usage

2009-02-01 Thread Adrian Egli OpenSceneGraph (3D)
Hi Cory,

I am working with Windows Vista dual core system. I get 50% CPU usage when i
am running osgviewer cow.osg if i start
osgviewer cow.osg --SingleThreaded i have no longer 50% CPU usage , now i
have about 0.5-3% CPU usage !

i am very busy at the moment, but may tomorrow i will debug the OSG core,
may there is a bug inside or a thread running at max.
or robert has some idea,where i can start with debugging. may it's a windows
vista bug

adrian


2009/2/1 Robert Osfield robert.osfi...@gmail.com

 Hi Cory,

 I'll have to defer to others on the situation under Windows when doing
 remote desktop.  My guess is that it's likely to be a driver issue.

 Robert.

 On Sat, Jan 31, 2009 at 3:27 PM, Cory Riddell c...@codeware.com wrote:
  I'm not sure about vysync. I'll look that up and check it.
 
  I thought about the possibility of it being a debug build and I don't
 think
  that's it. In my bin directory I have osgviewer.exe at 25,600 bytes and
  osgviewerd.exe at 81,920 bytes. Both executables give me the same CPU
  pegging behavior (as observed by SysInternals Process Explorer).
 
  My command line is osgviewer.exe --window 100 100 200 200 cessna.osg.
 My
  video card is an ATI FireGL V7700 and the drivers are up to date.
 
  Ah- I just noticed something-- an error message:
  Windows Error #127: [Screen #0] ChooseMatchingPixelFormat() -
  wglChoosePixelFormatARB extension not found, trying GDI. Reason: The
  specified procedure could not be found.
 
  I'm running over remote desktop right now, so perhaps that's related. I
  don't recall seeing this error message before.
 
  Cory
 
  On Sat, Jan 31, 2009 at 3:54 AM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi Cory,
 
  It's not normal to have this high level of CPU usage for this model,
  the expceptions to this would be:
 
 You have vysync switched off, so the app is racing as fast it can
  to dispatch frames
 You've compiled the OSG with debug build.
 
  Robert.
 
  On Fri, Jan 30, 2009 at 8:36 PM, Cory Riddell c...@codeware.com
 wrote:
   When I run the osg viewer app and load just about any osg file (like
   cesna.osg), my CPU usage is a constant 23% - 30%. This is with no
   interaction, it is basically using an entire CPU core. Fortunatelly I
   have a
   4 core machine, so it hasn't been a problem so far, but I'm wondering
   what
   this means for single core machines (which most of our customers
 have).
  
   Is this typical?
  
   Cory
  
   ___
   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




-- 

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


Re: [osg-users] What about User-Meeting in Europe - osgInEurope?

2009-02-01 Thread Adrian Egli OpenSceneGraph (3D)
Hi all

i am also interested in EuropOSG meeting, switzerland can be a nice option
(luzern my home country (canton) :-)  )

but we have no osgEarth to get the country and cities ,,, brussel / holland
:-) ?

adrian

2009/2/1 Art Tevs stud_in...@yahoo.de

 Hi Robbert,

 oh, true Brussel is not in the Netherlands ;) Sorry, my fault!

 Aha, a military conference?! Of course we could do that, however it is
 already in around 3 months, hence I am not sure if this time is enough to
 organize a small osg-meeting/conference.

 Cheers,
 art



 Robbert wrote:
  osgHi,
 
  I did not know Brussels was located in the Netherlands  [Shocked]
 
  Now i mention Brussels How about a user meeting at the ITEC conference (
 http://www.itec.co.uk/) in Brussels 12-14 may?
  There will be alot of OSG user around at that event.
 
  Robbert


 --
 Read this topic online here:
 http://osgforum.tevs.eu/viewtopic.php?p=5603#5603





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




-- 

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


[osg-users] Histroy Buffer Implementation / Suggestion

2009-01-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

i would like to start with a very new technology for anti-aliasing / shadow
quality increase based on history buffer technique,
http://www.cg.tuwien.ac.at/research/publications/2007/Scherzer-2007-PCS/
How should i implement this with pure openscenegraph concepts, and what is
important for the future with such a base technology. Just start with an new
example, and once we have it - porting? Or is
there still a concept how we can implement such features, event gauss blur
filter could be implement as a 2D engine pipeline (ITK Filters like :-) )
may this would be greate for special effects, aa and so on

/adrian

-- 

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


Re: [osg-users] shutting down OSG

2009-01-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert, Cory,

I implement some weeks before a memory leak detector for VS 2005 and cleaned
up the code that all of my objects get right removed from memory now,
espacially i had some bad behaviour before
cleaning up my webbased rendering plugin, after removing all memory leak
even quicktime get closed without any crashes. so it's really important that
all allocated memory gets
fine removed. the plugin don't have some leaks coming through the OSG core,
and believe me: our application is much more complex than just use some
geometry nodes.
and i can say that the osg core should be free of any memory leak, i suggest
using in all user application the ref_ptr concept which robert is using in
the core of osglib then you don't get some leaks.
I also believe that there is also many false positives...

Here is the code you should use :
// memory leak check ...

---
MEM_LEAK_BASE.h
---

---
Just include this in each CPP file


#ifdef MEM_LEAK_CHK
#include DbgMemoryImpl.h
#endif


---


i hope this works also 

/adrian


2009/1/30 Robert Osfield robert.osfi...@gmail.com

 Hi Cory,

 I believe the are bugs in the memory tracking support in VS,
 especially when using MFC, that produce many false positives.  You'll
 need to get more info about this from VS experts though, the last time
 I used VS was in the last Century!

 Robert.

 On Fri, Jan 30, 2009 at 3:32 PM, Cory Riddell c...@codeware.com wrote:
  After my (MFC) app ends, the output window in Visual Studio fills with a
  bunch of this:
 
  Detected memory leaks!
  Dumping objects -{164} normal block at 0x02A54248, 128 bytes long.
   Data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00
  {163} normal block at 0x02A541A8, 96 bytes long.
   Data:   c  F8 87 63 01 00 00 00 00 01 00 00 00 00 00 00
 00
  {161} normal block at 0x02A54068, 64 bytes long.
   Data: OpenThread v1.2p 4F 70 65 6E 54 68 72 65 61 64 20 76 31 2E 32
 70
 
  I'm just getting started with OSG. I'm using it to render geometry from
  Granite (the geometry kernel from the Pro/ENGINEER people, just getting
  started with this too). Both libraries have their own reference counted
  pointer types and they function a bit differently so I'm probably just
  abusing one or the other.
 
  Normally I can just pick one of the allocation numbers from the dump
 (161,
  163, and 164 above) and tell the debugger to stop there, but for some
 reason
  that isn't working. If I have time later today, I'm going to instrument
  everything with BoundsChecker and run it again.
 
  Cory
 
 
  On Fri, Jan 30, 2009 at 9:08 AM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi Cory,
 
  The OSG users ref counting, so if all external references to the scene
  and viewer are removed then all the associated resources should be
  deleted automatically.  If you app keeps any references to this data
  then it'll stay around until these references are removed.
 
  If you've enabled caching in the osgDB::Registry then it can keep
  around a reference for loaded objects in its cache, so clearing this
  would be required.   Also if you app loads OSG plugins as part of
  loading your data then one could see this as items you might want to
  unload.
 
  BTW, what makes you think that things aren't being released?
 
  Robert.
 
  On Fri, Jan 30, 2009 at 2:57 PM, Cory Riddell c...@codeware.com
 wrote:
   Is there a correct way to stop OSG and free all the resources that
 have
   been
   acquired by without stopping the application? I thought that when my
   osgViewer::Viewer instance went out of scope, everything would be
   released,
   but that doesn't seem to be the case.
  
   cory
  
   ___
   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
 

[osg-users] Slaves with different window size

2009-01-26 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

for each slave camera, osg overwrites the projection matrix (each frame).
what happends when i have a slave with w=1,h=1 and a second w=2,h=1 -the
aspection ratio should be different, but i get wrong output. i believe that
the aspect ratio
gets overwritten with the master cams, this is for example similart to the
first slave w=1,h=1. do i right understand the osg? if yes, how should if
fix this issue in our appliction

adrian

-- 

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


Re: [osg-users] Slaves with different window size

2009-01-26 Thread Adrian Egli OpenSceneGraph (3D)
Sorry Robert,

I should precise in detail my problem. Each slave gets updated each frame.

osg54-osgd.dll!osg::View::updateSlave(unsigned int i=0)  Line 154C++
osg54-osgd.dll!osg::View::updateSlaves()  Line 144 + 0xc bytesC++
osg54-osgViewerd.dll!osgViewer::Viewer::updateTraversal()  Line 927 + 0xe
bytesC++
osg54-osgViewerd.dll!osgViewer::ViewerBase::frame(double
simulationTime=1.7976931348623157e+308)  Line 607 + 0xf bytesC++


And the slave gets the master camera's projection matrix * offset. so what
happends when we resize the master camera, the aspect ration gets changed,
and then it has also
an impact to the slave camera. so should we apply an slave inverse master
projection * slave projection = slave._projectionOffset, make not much
sense w.r.t. performance
or should be change to Reference Frame : Absolute, and update each time the
view matrix externally. or should be fix this in the code.


void View::updateSlave(unsigned int i)
{
if (i = _slaves.size() || !_camera) return;

Slave slave = _slaves[i];

if (slave._camera-getReferenceFrame()==osg::Transform::RELATIVE_RF)
{
slave._camera-setProjectionMatrix(_camera-getProjectionMatrix() *
slave._projectionOffset);
slave._camera-setViewMatrix(_camera-getViewMatrix() *
slave._viewOffset);
}

slave._camera-inheritCullSettings(*_camera,
slave._camera-getInheritanceMask());
}



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

 Hi Adrian,

 You can control the management of the projection matrix w.r.t resizing
 via osg::Camera methods.  I can't recall them off the top of my head,
 go have a browse.

 Robert.

 On Mon, Jan 26, 2009 at 10:20 AM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi Robert,
 
  for each slave camera, osg overwrites the projection matrix (each frame).
  what happends when i have a slave with w=1,h=1 and a second w=2,h=1 -the
  aspection ratio should be different, but i get wrong output. i believe
 that
  the aspect ratio
  gets overwritten with the master cams, this is for example similart to
 the
  first slave w=1,h=1. do i right understand the osg? if yes, how should if
  fix this issue in our appliction
 
  adrian
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


Re: [osg-users] Ideas for OSG v3.0 or how to make it younger :)

2009-01-24 Thread Adrian Egli OpenSceneGraph (3D)
Hi all

It's really great to see how the community or the numbers of users
grows each day, and it's also great to know that the openscenegraph is
used many times in academic, commercial ,.. tools. And we all know
that the work load for robert gets each day bigger and we have to
discuss the near future of the project. Of course there are different
nodekits, hundert of features and finally do we really want just a
scenegraph? The problem is where starts a scene graph and where ends
the scene graph. My opinion is that we should follow the current
concept to include as many nodekits as possible in the osg scene
graph, and the concept of the osgLIB isn't as bas as it sounds. Of
course we should think about splitting the review and responsabiliy of
the whole code into parts, and we should think to decide who can
support robert, i don't like to start splitting the whole project into
physical/ hard parts. once i like to get OpenSceneGraph then i like
to get the core (scenegraph), close core (threading  osgViewer (was
once producer, we all remember) ) , ... then basic features like
osgShadow, osgText, osgGA , ... ,... , ... and so on. You understand
me, what is a nodekit what not. I am sure out there are some guys
saying, only osg.lib is a scene graph, so we need only osg.lib the
others lib we should better call nodekit. i think we should NOT decide
to re-create the current concept, we should better to re-write some
code (translate to shaders, ... , ... ) and we should think how we can
support robert, and we should think how we can avoid a worst case
community crash. I don't really like to mention that, but since i
got an accident, i get how fast the world can change, and how fast we
can get off of work. So what happends, when robert has the unhappy
case and gets froced for a longer break, who would be able to do the
SO IMPORTANT review of the sub-mitted code. We should start as soon as
possible to discuss how we can insure that the OpenSceneGraph project
would continue in all possible cases the life play.

In my opinion we have to think about a core group of people who have
the understanding of maintaining the project and can support robert
without losing the open mind/concept of robert and this would be the
biggest challange in the near future. The OpenSceneGraph's coding
standard, quality , ... is really good and the only raison is that
robert has decidie to check in or not, and had thought often a long
time about the concept. i would split the osg core, event not in osg
10.0, i would let grow the lib as much as it make sense, but i would
work with more people involved in mainting the code. reviews, and so on.

/adrian


On 24/01/2009, Mario Valle mva...@cscs.ch wrote:
 For my job currently I'm using the statistics package R and writing
 things using LaTeX.
 Both have a very structured method to manage and document addons.
 Look at http://stat.ethz.ch/CRAN/ (very good) and at:
 http://www.ctan.org/tex-archive/ (less clear).
 These could be an inspiration  for the future NodeKits structure and
 management, I think.
 Just my 0.05 CHF
 mario

 Robert Osfield wrote:
 Hi Art,

 I understand the issues you talk about.  External NodeKit can be
 neglected by potential users because they aren't visible enough, and
 there are also issue of compatibility and maintenance of these
 external NodeKits.  It's not just an issue of NodeKits, it applies to
 plugins or applications that live around the core OSG project.  I
 don't think the solution need be a pure software management issue,
 it's strongly related to management of website resources.

 We've had various different initiatives over the years to try and
 address this issue - the wiki is one avenue, another was the formation
 of osgforge.org and hosting of several ancilery projects like VPB,
 Present3D, osgLua and osgPython.  My hope was osgforge would become a
 incubator for projects that could make it into the core, or become
 part of the close nit family of NodeKits.  Such initiatives haven't
 thrived as perhaps they could have, partly because the various
 contributors haven't pushed things forward, and partly that
 wiki/website management takes time and dedicated manpower. I'm open to
 suggestions on how better to streamline and manage this side of
 things.  The bottom line is a key missing ingredient has been
 engineers who put the time into keep websites up to date.

 As for re-factoring handling of NodeKits in 3.0, I'm open to this.  It
 might even make the most sense to build 3.0 incrementally, starting
 with a re-factored core scene graph and then bit by bit re-introduce
 the NodeKits as they get ported across.  Quite a few of the older
 NodeKits would be best rewritten using shaders, or to be incorporated
 into other NodeKits.  Having some scheme where 3rd party NodeKits can
 be pulled in by end users may well help facilitate a move over to a
 3.0.

 One thing I have thought about in the past of have an Open Graphics
 

Re: [osg-users] Please test svn/trunk in prep for 2.7.9 dev release

2009-01-24 Thread Adrian Egli OpenSceneGraph (3D)
VS 2005 c++ : OK

Adrian

2009/1/24 Paul Melis osg-us...@assumetheposition.nl

 Robert Osfield wrote:
  Hi All,
 
  I would like to finish this week with a 2.7.9 dev release, could users
  do a check out of svn/trunk and let know if your build succeeds/or
  where it fails.
 
 With xine-lib-1.1.15 I get:


 [ 83%] Building C object
 src/osgPlugins/xine/CMakeFiles/osgdb_xine.dir/video_out_rgb.o
 /home/melis/c/osg/svn/trunk/src/osgPlugins/xine/video_out_rgb.c: In
 function 'rgbout_update_frame_format':
 /home/melis/c/osg/svn/trunk/src/osgPlugins/xine/video_out_rgb.c:2385:
 warning: 'xine_xmalloc' is deprecated (declared at
 /usr/include/xine/xineutils.h:624)
 /home/melis/c/osg/svn/trunk/src/osgPlugins/xine/video_out_rgb.c:2388:
 warning: 'xine_xmalloc' is deprecated (declared at
 /usr/include/xine/xineutils.h:624)
 /home/melis/c/osg/svn/trunk/src/osgPlugins/xine/video_out_rgb.c:2391:
 warning: 'xine_xmalloc' is deprecated (declared at
 /usr/include/xine/xineutils.h:624)
 /home/melis/c/osg/svn/trunk/src/osgPlugins/xine/video_out_rgb.c:2397:
 warning: 'xine_xmalloc' is deprecated (declared at
 /usr/include/xine/xineutils.h:624)

 xine_xmalloc() seems to have been deprecated since 1.1.13 with the
 following message:

  * The behaviour of this function differs from standard malloc() as
  * xine_xmalloc(0) will not return a NULL pointer, but rather a
  * pointer to a memory area of size 1 byte.
  *
  * The NULL value is only ever returned in case of an error in
  * malloc(), and is reported to stderr stream.
  *
  * @deprecated This function has been deprecated, as the behaviour of
  * allocating a 1 byte memory area on zero size is almost
  * never desired, and the function is thus mostly misused.

 Are you relying on the 1-byte-allocate-for-size-0 feature in the xine
 plugin?

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




-- 

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


[osg-users] Bug Report: Windows GraphicContext Size, latest SVN Version

2009-01-24 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

There is a bug in the osgViewer behaviour.

set OSG_WINDOW=100 100 512 512
osgviewer model

press 'F' Toggle fullscreen - just 512x512 are rendered

once we start without the OSG_WINDOW env var.
it works without any problem

/adrian


-- 

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


Re: [osg-users] Bug Report: Windows GraphicContext Size, latest SVN Version

2009-01-24 Thread Adrian Egli OpenSceneGraph (3D)
i am working with windows vista,may this cause the problem

/adrian

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

 Hi Adrian,

  There is a bug in the osgViewer behaviour.

 set OSG_WINDOW=100 100 512 512
 osgviewer model

 press 'F' Toggle fullscreen - just 512x512 are rendered


 Can't repro here. Both

 set OSG_WINDOW=100 100 512 512
 osgviewer cow.osg
 (then press 'f')

 and

 osgviewer --window 100 100 512 512 cow.osg
 (then press 'f')

 work as expected. The graphics take up the whole screen.

 Can you trace in the osgViewer::WindowSizeHandler, in the handle() method
 where the 'f' key is pressed, what happens and why it doesn't work on your
 side? Perhaps it's driver related?

 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




-- 

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


Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
Thanks a lot

/adrian

2009/1/21 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 If you want to add and remove slaves from a view at runtime you will
 need to stop the threading of the viewer via viewer.stopThreading(),
 then add/removeSlave() call realize on any new graphics contexts then
 call startThreading();

 Robert.

 On Wed, Jan 21, 2009 at 7:27 AM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi
 
  i am wondering who i can add / remove slave cameras at runtime. with
  different rendering context, embeded full screen, on different screens. I
  get opengl state bugs, do i need to share opengl from master camera ? can
 i
  not remove the very master camera? or what is the correct concept.
 
  adrian
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
osg::ref_ptrosg::GraphicsContext::Traits traits = new
osg::GraphicsContext::Traits;
traits-hostName = si.hostName;
traits-displayNum = si.displayNum;
traits-screenNum = si.screenNum;
traits-x = 0;
traits-y = 0;
traits-width = width;
traits-height = height;
traits-windowDecoration = false;
traits-doubleBuffer = true;
traits-sharedContext =
m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-getCamera()-getGraphicsContext();

i share the context, when i remove the slave, i will loose all textures
(:-))


2009/1/21 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Thanks a lot

 /adrian

 2009/1/21 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 If you want to add and remove slaves from a view at runtime you will
 need to stop the threading of the viewer via viewer.stopThreading(),
 then add/removeSlave() call realize on any new graphics contexts then
 call startThreading();

 Robert.

 On Wed, Jan 21, 2009 at 7:27 AM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Hi
 
  i am wondering who i can add / remove slave cameras at runtime. with
  different rendering context, embeded full screen, on different screens.
 I
  get opengl state bugs, do i need to share opengl from master camera ?
 can i
  not remove the very master camera? or what is the correct concept.
 
  adrian
 
  --
  
  Adrian Egli
 
  ___
  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




 --
 
 Adrian Egli




-- 

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


Re: [osg-users] moving a vehicle at constant velocity

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
There is a simulation time in the osg core. i would use this time as base of
a simulation. and my you should have a look at simulation libaray


2009/1/21 Alfonso Callejo Goena alcall...@gmail.com

 Hello:

 I am trying to move a vehicle on scene by means of an update callback. It
 should be a realistic simulation, and I want the vehicle to move, for
 instance, at a constant velocity of 5 m/s.
 The callback function I have written has the following aspect:

 osg::Matrix mT, dmT;  // global variables containing the current and
 differential translations of the vehicle

 class myUpdateCallback : public osg::NodeCallback {
 public:
 myUpdateCallback() {
 vehSpeed=5/3.6;  // 5 km/h in m/s
 tLast=0.;
 }
 virtual void operator()( osg::Node* node, osg::NodeVisitor* nv ) {
 osg::MatrixTransform* mTransf =
 dynamic_castosg::MatrixTransform*( node );

 double t = osg::Timer::instance()-time_m()/1000;
 double dt=t-tLast;
 dmT.makeTranslate( vehSpeed*dt, 0., 0. );
 mT=mT*dmT;
 tLast=t;

 mTransf-setMatrix( mT );
 traverse( node, nv );
 }
 protected:
 double tLast;
 double vehSpeed;
 };

 The thing is that the resulting movement is not smooth, it has
 discontinuities like little jumps. I think this can be related with the
 frequency the program performs the callback (around 62 Hz), but I don't know
 how to solve it.
 Thank you in advance for your help.
 Fusu

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




-- 

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


Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
Thanks for the replay, but i can not find any topic corresponding this
contex. I don't know what's going wrong, but
if i share an openGL context, say from my master camera and then i suddenly
like to close a slave cam, i shouldn't
close the shared context. because i still have the current context in use,
right? It doesn't delete the master's context, but
i loose the textures, may this is what your like to give as hint. but i am
not sure whether it removes the textures only.

/adrian

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

 Hi Adrian,

  i share the context, when i remove the slave, i will loose all textures
 (:-))


 This has been discussed a lot in the past, search the archives. Hint:
 disable unref textures on apply.

 Hope this helps,

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

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




-- 

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


Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
100% right Robert, removing the scene data before closing the context solves
the problem

The code above should help others having similar issue in the future...

/adrian
***


m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-stopThreading();
if ( ! m_isFullScreen) {
setupSlaves();

for (FullScreenSlaves::iterator it =
m_FullScreenSlaves.begin();it!=m_FullScreenSlaves.end();it++){
osg::View::Slave slave =
m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-getSlave(*it);

slave._camera-removeChildren(0,slave._camera-getNumChildren());

slave._camera-addChild(m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-getSceneData());
}
} else {
for (FullScreenSlaves::iterator it =
m_FullScreenSlaves.begin();it!=m_FullScreenSlaves.end();it++){
osg::View::Slave slave =
m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-getSlave(*it);

slave._camera-removeChildren(0,slave._camera-getNumChildren());

m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-removeSlave(*it);
}
 m_FullScreenSlaves.clear();
SAFE_FREE_REF(m_GraphicsContext_FullScreen);
 }
m_isFullScreen = ! m_isFullScreen;
 m_doToogleFullScreen = false;

m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-updateSlaves();

m_IWebaddon3D-getWebaddonRenderer()-getOSGViewer()-startThreading();


2009/1/21 Robert Osfield robert.osfi...@gmail.com

 Hi Adrian,

 The problem might well be that the outgoing context is cleaning up
 it's scene graph and associated OpenGL without know that they are
 shared.  You could remove the scene graph from the associated camera
 before closing it to prevent the graphics window automatically cleanly
 up all associate OpenGL objects.

 Robert.

 On Wed, Jan 21, 2009 at 4:14 PM, Adrian Egli OpenSceneGraph (3D)
 3dh...@gmail.com wrote:
  Thanks for the replay, but i can not find any topic corresponding this
  contex. I don't know what's going wrong, but
  if i share an openGL context, say from my master camera and then i
 suddenly
  like to close a slave cam, i shouldn't
  close the shared context. because i still have the current context in
 use,
  right? It doesn't delete the master's context, but
  i loose the textures, may this is what your like to give as hint. but i
 am
  not sure whether it removes the textures only.
 
  /adrian
 
  2009/1/21 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com
 
  Hi Adrian,
 
  i share the context, when i remove the slave, i will loose all textures
  (:-))
 
  This has been discussed a lot in the past, search the archives. Hint:
  disable unref textures on apply.
 
  Hope this helps,
 
  J-S
  --
  __
  Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


[osg-users] Database Pager Question : What happens when we have missing files...

2009-01-08 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

What happends when we have missing files on the file system? if the database
(file system, http server) don't have all tiles correctly storred or there
is a file corruption. In my application the database pager ask hunderds time
for the tile, so it will get plenty of request, is there a way to remove
such bad tiles, to avoid over load the pager?

/adrian

-- 

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


Re: [osg-users] ScreenSpaceAmbientOcclusion

2008-12-19 Thread Adrian Egli OpenSceneGraph (3D)
Starting point of this first version is this very simple algorithm:
http://mikepan.homeip.net/ssaowcn

once this will perfectly work, then we can implementing a more complex one.

there are many diferent papers describing how we can implementing high
quality SSAO

/adrian

2008/12/18 Raymond de Vries ree...@xs4all.nl

 Hi Adrian,

 This looks very nice! Could you give a little more background info? Did you
 use the nvidia paper as starting point? E.g. I am curious if this technique
 is applicable for large outdoor environments.

 Thanks a lot
 Raymond



 Adrian Egli OpenSceneGraph (3D) wrote:

 Hi Robert,

 i implement a first version of SSAO effect and i have only one issue left
 in the implementation. the whole thing works nicely with GLSL shader,
 mutlipass-rendering when we don't resize the window, actually 512x512. so
 what sould i do, to replace this issue. ?

 Another thing is to remove the last pass GLSL shader, is there a way to
 solve it under common openGL textureing? Mutlitextureing? Or any other idea.

 This version supports:

 (Transparant faces: just disable for transparent faces like window, glass
 the detph writing, the depth buffer will hold only un-transparent z-values
 (alpha  0.9) )

 toggle ssao on/off with key 'a'

 have a look and i will be happy to get any ideas to improve the stuff.
 FPS is about 30.

 /adrian
 --
 
 Adrian Egli
 

 ___
 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




-- 

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


Re: [osg-users] ScreenSpaceAmbientOcclusion

2008-12-19 Thread Adrian Egli OpenSceneGraph (3D)
Next step will be to implement latest NVidia stuff...
http://www.nvidia.com/object/siggraph-2008-HBAO.html

2008/12/19 Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com

 Starting point of this first version is this very simple algorithm:
 http://mikepan.homeip.net/ssaowcn

 once this will perfectly work, then we can implementing a more complex one.


 there are many diferent papers describing how we can implementing high
 quality SSAO

 /adrian

 2008/12/18 Raymond de Vries ree...@xs4all.nl

 Hi Adrian,


 This looks very nice! Could you give a little more background info? Did
 you use the nvidia paper as starting point? E.g. I am curious if this
 technique is applicable for large outdoor environments.

 Thanks a lot
 Raymond



 Adrian Egli OpenSceneGraph (3D) wrote:

 Hi Robert,

 i implement a first version of SSAO effect and i have only one issue left
 in the implementation. the whole thing works nicely with GLSL shader,
 mutlipass-rendering when we don't resize the window, actually 512x512. so
 what sould i do, to replace this issue. ?

 Another thing is to remove the last pass GLSL shader, is there a way to
 solve it under common openGL textureing? Mutlitextureing? Or any other idea.

 This version supports:

 (Transparant faces: just disable for transparent faces like window, glass
 the detph writing, the depth buffer will hold only un-transparent z-values
 (alpha  0.9) )

 toggle ssao on/off with key 'a'

 have a look and i will be happy to get any ideas to improve the stuff.
 FPS is about 30.

 /adrian
 --
 
 Adrian Egli
 

 ___
 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




 --
 
 Adrian Egli




-- 

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


Re: [osg-users] ScreenSpaceAmbientOcclusion

2008-12-19 Thread Adrian Egli OpenSceneGraph (3D)
Nivdia stuff.

:-) tangent and depth maps are no in first texture

missing
(1) fovy / ratio (x,y) one step == meters
(2) radian insteat of box (squre)

but this will become nie

2008/12/19 yann le paih lepaih.y...@gmail.com

 Third step could be to implement this new paper : SSDO (Approximating
 Dynamic Global Illumination in Image Space)

 http://www.uni-koblenz.de/~ritschel/http://www.uni-koblenz.de/%7Eritschel/





 On Fri, Dec 19, 2008 at 11:45 AM, Raymond de Vries ree...@xs4all.nlwrote:

 Hi Adrian,

 Thnx for the info, cool that it's already implemented in Blender :-)

 Cheers, have fun.

 Raymond


 Adrian Egli OpenSceneGraph (3D) wrote:

 Starting point of this first version is this very simple algorithm:
 http://mikepan.homeip.net/ssaowcn

 once this will perfectly work, then we can implementing a more complex
 one.

 there are many diferent papers describing how we can implementing high
 quality SSAO

 /adrian

 2008/12/18 Raymond de Vries ree...@xs4all.nl mailto:ree...@xs4all.nl


Hi Adrian,

This looks very nice! Could you give a little more background
info? Did you use the nvidia paper as starting point? E.g. I am
curious if this technique is applicable for large outdoor
environments.

Thanks a lot
Raymond



Adrian Egli OpenSceneGraph (3D) wrote:

Hi Robert,

i implement a first version of SSAO effect and i have only one
issue left in the implementation. the whole thing works nicely
with GLSL shader, mutlipass-rendering when we don't resize the
window, actually 512x512. so
what sould i do, to replace this issue. ?

Another thing is to remove the last pass GLSL shader, is there
a way to solve it under common openGL textureing?
Mutlitextureing? Or any other idea.

This version supports:

(Transparant faces: just disable for transparent faces like
window, glass the detph writing, the depth buffer will hold
only un-transparent z-values (alpha  0.9) )

toggle ssao on/off with key 'a'

have a look and i will be happy to get any ideas to improve
the stuff.
FPS is about 30.

/adrian
--
Adrian Egli

  

___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org

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


___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org

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




 --
 
 Adrian Egli
 

 ___
 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




 --
 Yann Le Paih
 Keraudrono
 56150 BAUD
 Portable: +33(0)610524356
 lepaih.y...@gmail.com

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




-- 

Adrian Egli

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

#include osgDB/ReadFile
#include osgUtil/Optimizer
#include osg/CoordinateSystemNode

#include osg/Switch
#include osg/Uniform

#include osgText/Text
#include osg/ShapeDrawable
#include osg/Geometry
#include osgViewer/Viewer
#include osgViewer/ViewerEventHandlers
#include osg/BlendFunc

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

#include iostream

#include osgFX/Effect
#include osgFX/Technique
#include osgFX/Registry

#include osg/TexGen
#include osg/Texture2D

#include osg/PolygonOffset
#include osgDB/WriteFile





struct WriteCameraPostDrawCallback : public osg::Camera

  1   2   3   >