Re: [osg-users] Shadow Map and threading mode

2008-03-11 Thread Raymond de Vries
Hi J-S,

Do you have an example which I can try. Then I can give it a try here, 
on a couple of machines.

Bye
Raymond




Jean-Sébastien Guay wrote:
> Hi all,
>
> So since no one has replied, I gather no one else has had any problems 
> changing the threading mode when shadows are enabled (for example, in 
> the osgshadow example)?
>
> J-S
>
>
>   
>> Hello,
>>
>> I was wondering if there were any known problems related to using 
>> osgShadow::ShadowMap and changing the threading mode.
>>
>> In the osgshadow example (SVN), if I change the threading mode (I added 
>> a threading handler to it) my graphics driver crashes.
>>
>> In our own software based on OSG 2.2 and using a CompositeViewer, on 
>> some machines the problem is more interesting (after a fashion): when 
>> the threading mode is changed, the shadow stops moving with the mobile 
>> object which causes it (i.e. it stays where it was when the threading 
>> mode changed, apparently not updating anymore).
>>
>> On my own machine it just crashes as well, like the SVN version, but on 
>> others that's what happens. I haven't double-checked on those machines 
>> what happens with the osgshadow example though.
>>
>> So, I just want to know if I should expect it to work or if that's 
>> something that's expected not to work for now.
>>
>> This is on Windows (XP / Vista), nVidia 7900 and 8800 cards.
>>
>> Thanks,
>>
>> J-S
>> 
>
>
>   

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


Re: [osg-users] Shadow Map and threading mode

2008-03-12 Thread Raymond de Vries
btw I seem to see a rendering artifact: the effect is that a large poly 
seems to be above the scene, resulting in a rotating shadow. As far as I 
remember this was not here in version 2.2.0... see the attached image.


best regards
Raymond


Jean-Sébastien Guay wrote:

Hello Alberto,

  
Works fine in Linux, nVidia 7600 GS [169.07] (Linux 2.6.22-3-amd64 #1 SMP 
x86_64):


Threading model 'CullThreadPerCameraDrawThreadPerContext' selected.
Threading model 'SingleThreaded' selected.
Threading model 'CullDrawThreadPerContext' selected.
Threading model 'DrawThreadPerContext' selected.
Threading model 'CullThreadPerCameraDrawThreadPerContext' selected.
Threading model 'SingleThreaded' selected.
Threading model 'CullDrawThreadPerContext' selected.
Threading model 'DrawThreadPerContext' selected.
Threading model 'CullThreadPerCameraDrawThreadPerContext' selected.
Threading model 'SingleThreaded' selected.
Threading model 'CullDrawThreadPerContext' selected.



Interesting. I'll wait to see if someone can test on Windows too.

Thanks for testing,

J-S
  


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


Re: [osg-users] Shadow Map and threading mode

2008-03-12 Thread Raymond de Vries
Hi,

I've tested as you suggested and there is a difference between my single 
core laptop and dual core desktop. This is what I did:

* explicitly specified ShadowMap via -sm
* I used yesterdays svn (had to add 2 dummy implementations in
  SceneGraphBuilder.cpp) version on Windows XP, debug mode MS Visual
  Studio 2005
* Desktop Windows XP, driver version 6.14.11.6921 (12/5/2007),
  GeForce 7950 GX2, working fine
* Laptop Dell Inspiron 8600 (= single core), driver version
  6.14.11.6218 (6/29/2007), osgshadow stops when "Threading model
  'CullThreadPerCameraDrawThreadPerContext' selected.". It does not
  crash or so, breaking in VS reports that "The process appears to
  be deadlocked (or is not running any user-mode code). All threads
  have been stopped"

Do you want me to test anything else? Or want any other info?

best regards
Raymond

btw my laptop did reveal another issue some time ago with the 
multi-texturing btw (ie single threaded issue), also reported on the list

Jean-Sébastien Guay wrote:
> Hello Alberto,
>
>   
>> Works fine in Linux, nVidia 7600 GS [169.07] (Linux 2.6.22-3-amd64 #1 SMP 
>> x86_64):
>>
>> Threading model 'CullThreadPerCameraDrawThreadPerContext' selected.
>> Threading model 'SingleThreaded' selected.
>> Threading model 'CullDrawThreadPerContext' selected.
>> Threading model 'DrawThreadPerContext' selected.
>> Threading model 'CullThreadPerCameraDrawThreadPerContext' selected.
>> Threading model 'SingleThreaded' selected.
>> Threading model 'CullDrawThreadPerContext' selected.
>> Threading model 'DrawThreadPerContext' selected.
>> Threading model 'CullThreadPerCameraDrawThreadPerContext' selected.
>> Threading model 'SingleThreaded' selected.
>> Threading model 'CullDrawThreadPerContext' selected.
>> 
>
> Interesting. I'll wait to see if someone can test on Windows too.
>
> Thanks for testing,
>
> J-S
>   

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


Re: [osg-users] osgShadow example and gerneral question

2008-03-13 Thread Raymond de Vries
Hi,

All I know that the PSSM implementation was not changed, the last I 
looked at the svn version (some weeks ago), compared to 2.2.0. I will 
test the svn version example also asap, and let you know.

Now that you mention PSSM, I've send a (small) patch some months ago and 
suggested to change the interface a little so that parameters can be 
changed at runtime (where it is currently only possible at startup).

Also I've send a bug report to the list in which I showed an artifact, 
incl source code.

Within some weeks I would like to dive into PSSM again, so hopefully we 
can join forces.

Cheers
Raymond


Jean-Sébastien Guay wrote:
> Hi Adrian,
>
>   
>> i have retested osgShadow and get some really strange behaviour. event 
>> PSSM doesn't work on my ATI x1600 based pc. was there changes and did we 
>> really test all options of osgshadow / implementation, or do
>> i only have such a problem
>> 
>
> I remarked a while ago that osgshadow --pssm did not work for me on my 
> nVidia card (even with the --NVidea (sic) switch, I see no shadows). No 
> idea what's wrong, as I have no time to go into the details...
>
> I know I'm not much help, but at least you know you're not alone.
>
> J-S
>   

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


Re: [osg-users] Is there any relationship between Multitexturing of OSG1.2 and "Thread Optimization" of the NVIDIA control panel

2008-03-13 Thread Raymond de Vries
Hi,

As a small note (I cannot verify the specifics w.r.t. the "Thread 
Optimization"), I once sent a bug report, including example source code, 
where the threading mode did matter w.r.t. multi-texturing. Maybe it's 
related? Please see this thread: 
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-October/003949.html

best regards
Raymond


Robert Osfield wrote:
> Hi,
>
> Multitexturing has absolutely nothing to do with threading on the OSG
> side, so if the enabling "Thread Optimization" on the NVidia control
> panel is almost 100% percent certain to be a bug in the NVidia driver.
>
> Robert.
>
> On Thu, Mar 13, 2008 at 2:41 PM, zhangguilian <[EMAIL PROTECTED]> wrote:
>   
>> Hi,
>> I use Multitexturing in my application, when I use NVIDIA graphics driver
>> version 169.21 and turn on the "Thread Optimization" on the NVIDIA control
>> panel, using the second texture unit seems to make the scene destroyed-the
>> scene has lots of debris(The strange phenomenon is in Attachment), I have
>> only one GPU and its model is NVIDIA GeForce 8800 GTS, every thing will be
>> OK if I turn off the "Thread Optimizaiton" and using other driver versions,
>> I don't know whether there is any relationship between Multitexturing of
>> OSG1.2 and "Thread Optimization" of the NVIDIA control panel, and I also
>> wonder how to solve this problem.
>>
>> Thanks very much!
>>  
>>
>> zhangguilian
>> 2008-03-10
>> ___
>>  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] osgShadow example and gerneral question

2008-03-19 Thread Raymond de Vries
Hi,

A quick test report: I just did a test on WinXP, using rev 7975 changing 
the threading model as J-S suggested. Results are different for 
different shadow techniques:
--sv: crash
--ssm: artifact
--sm: artifact
--pssm: artifact
--pssm -NVidia: artifact

Artifact:  initially the rendering is ok but the artifacts still occur 
when the threading model is changed, see the images in this message:
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-March/008294.html

This is tested on a multi core machine.

Best regards
Raymond


Wojciech Lewandowski wrote:
> Robert,
>
> I understand. As I earlier said,  I did not mean to push it. In fact I have 
> sent my post in just the same time I received your post that you already 
> implented option #4. I would not do this if the timing was different ;-) I 
> am OK with your current solution.
>
> Cheers,
> Wojtek
>
> - Original Message - 
> From: "Robert Osfield" <[EMAIL PROTECTED]>
> To: "OpenSceneGraph Users" 
> Sent: Wednesday, March 19, 2008 2:20 PM
> Subject: Re: [osg-users] osgShadow example and gerneral question
>
>
>   
>> Hi Wojteck,
>>
>> On Wed, Mar 19, 2008 at 11:20 AM, Wojciech Lewandowski
>> <[EMAIL PROTECTED]> wrote:
>> 
>>>  So in practice there are 3 cases of usage and I think that they can be
>>>  served with option #5:
>>>
>>>  setAttribute( ) would always clear inheritance flag.
>>>
>>>  but also add a method:
>>>
>>>  inheritAttribute( ) which would set the inheritance flag and reset 
>>> attribute
>>>  to default.
>>>   
>> Adding an inherit*() method would require us to add a number of extra
>> methods that most/perhaps all would never be called.  Also having
>> multiple places that set the default value would be a maintenance
>> problem.
>>
>> If there was a need for enabling inheritance then it'd be better done
>> via a general inerihitance setting method, but then we already have a
>> setInheritinceMask() method.
>>
>> Robert.
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
>> 
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>   

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


Re: [osg-users] osgShadow example and gerneral question

2008-03-19 Thread Raymond de Vries
btw ShadowTexture (command line arg --st) is not producing any shadows 
at all, for each threading model.

Raymond


Raymond de Vries wrote:
> Hi,
>
> A quick test report: I just did a test on WinXP, using rev 7975 changing 
> the threading model as J-S suggested. Results are different for 
> different shadow techniques:
> --sv: crash
> --ssm: artifact
> --sm: artifact
> --pssm: artifact
> --pssm -NVidia: artifact
>
> Artifact:  initially the rendering is ok but the artifacts still occur 
> when the threading model is changed, see the images in this message:
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-March/008294.html
>
> This is tested on a multi core machine.
>
> Best regards
> Raymond
>
>
> Wojciech Lewandowski wrote:
>   
>> Robert,
>>
>> I understand. As I earlier said,  I did not mean to push it. In fact I have 
>> sent my post in just the same time I received your post that you already 
>> implented option #4. I would not do this if the timing was different ;-) I 
>> am OK with your current solution.
>>
>> Cheers,
>> Wojtek
>>
>> - Original Message - 
>> From: "Robert Osfield" <[EMAIL PROTECTED]>
>> To: "OpenSceneGraph Users" 
>> Sent: Wednesday, March 19, 2008 2:20 PM
>> Subject: Re: [osg-users] osgShadow example and gerneral question
>>
>>
>>   
>> 
>>> Hi Wojteck,
>>>
>>> On Wed, Mar 19, 2008 at 11:20 AM, Wojciech Lewandowski
>>> <[EMAIL PROTECTED]> wrote:
>>> 
>>>   
>>>>  So in practice there are 3 cases of usage and I think that they can be
>>>>  served with option #5:
>>>>
>>>>  setAttribute( ) would always clear inheritance flag.
>>>>
>>>>  but also add a method:
>>>>
>>>>  inheritAttribute( ) which would set the inheritance flag and reset 
>>>> attribute
>>>>  to default.
>>>>   
>>>> 
>>> Adding an inherit*() method would require us to add a number of extra
>>> methods that most/perhaps all would never be called.  Also having
>>> multiple places that set the default value would be a maintenance
>>> problem.
>>>
>>> If there was a need for enabling inheritance then it'd be better done
>>> via a general inerihitance setting method, but then we already have a
>>> setInheritinceMask() method.
>>>
>>> Robert.
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
>>> 
>>>   
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>>   
>> 
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>   

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


[osg-users] Shadows and osg::Fog?

2008-03-19 Thread Raymond de Vries

Hi,

I'm wondering if anyone tried the combination of SoftShadowMap shadows 
and osg::Fog. With 2.2.0 and svn I've tried to use it with SoftShadowMap 
but that's not working. I suspect that it's not working because of the 
shader that's being used, but that's just a guess. ShadowTexture and 
ShadowVolume (both fixed OpenGL) are both working ok with fog and the 
other shadow techniques are not, and these are all using shaders.


Is osg::Fog supposed to work with shadows based on shaders? Or more 
general, is osg::Fog supposed to work in combination with shaders?


thanks a lot
Raymond

Please find attached the adapted osgshadow.cpp example

/* OpenSceneGraph example, osgshadow.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the "Software"), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

#include 

// for the grid data..
#include "../osghangglide/terrain_coords.h"

const int ReceivesShadowTraversalMask = 0x1;
const int CastsShadowTraversalMask = 0x2;

namespace ModelOne
{

enum Faces
{
FRONT_FACE = 1,
BACK_FACE = 2,
LEFT_FACE = 4,
RIGHT_FACE = 8,
TOP_FACE = 16,
BOTTOM_FACE = 32
};

osg::Node* createCube(unsigned int mask)
{
osg::Geode* geode = new osg::Geode;

osg::Geometry* geometry = new osg::Geometry;
geode->addDrawable(geometry);

osg::Vec3Array* vertices = new osg::Vec3Array;
geometry->setVertexArray(vertices);

osg::Vec3Array* normals = new osg::Vec3Array;
geometry->setNormalArray(normals);
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);

osg::Vec4Array* colours = new osg::Vec4Array;
geometry->setColorArray(colours);
geometry->setColorBinding(osg::Geometry::BIND_OVERALL);
colours->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f));


osg::Vec3 origin(0.0f,0.0f,0.0f);
osg::Vec3 dx(2.0f,0.0f,0.0f);
osg::Vec3 dy(0.0f,1.0f,0.0f);
osg::Vec3 dz(0.0f,0.0f,1.0f);

osg::Vec3 px(1.0f,0.0,0.0f);
osg::Vec3 nx(-1.0f,0.0,0.0f);
osg::Vec3 py(0.0f,1.0f,0.0f);
osg::Vec3 ny(0.0f,-1.0f,0.0f);
osg::Vec3 pz(0.0f,0.0f,1.0f);
osg::Vec3 nz(0.0f,0.0f,-1.0f);

if (mask & FRONT_FACE)
{
// front face
vertices->push_back(origin);
vertices->push_back(origin+dx);
vertices->push_back(origin+dx+dz);
vertices->push_back(origin+dz);
normals->push_back(ny);
normals->push_back(ny);
normals->push_back(ny);
normals->push_back(ny);
}

if (mask & BACK_FACE)
{
// back face
vertices->push_back(origin+dy);
vertices->push_back(origin+dy+dz);
vertices->push_back(origin+dy+dx+dz);
vertices->push_back(origin+dy+dx);
normals->push_back(py);
normals->push_back(py);
normals->push_back(py);
normals->push_back(py);
}

if (mask & LEFT_FACE)
{
// left face
vertices->push_back(origin+dy);
vertices->push_back(origin);
vertices->push_back(origin+dz);
vertices->push_back(origin+dy+dz);
normals->push_back(nx);
normals->push_back(nx);
normals->push_back(nx);
normals->push_back(nx);
}

if (mask & RIGHT_FACE)
{
// right face
vertices->push_back(origin+dx+dy);
vertices->push_back(origin+dx+dy+dz);
vertices->push_back(origin+dx+dz);
vertices->push_back(origin+dx);
normals->push_back(px);
normals->push_back(px);
normals->push_back(px);
normals->push_back(px);
}

if (mask & TOP_FACE)
{
// top face
vertic

Re: [osg-users] Shadows and osg::Fog?

2008-03-19 Thread Raymond de Vries
Aha, I guessed that, thanks for the confirmation.

So you say that fog should be part of the shadow shader, and not a 
separate, extra one. I did not do that much with shaders yet, except for 
using the osg-included ones. I cannot have a hierarchy of nodes with 
shaders, I guess?

If I cannot have a hierarchy, should I be able to setup a RTT and apply 
the fog shader to the RTTs stateset? I'd rather not put it in the shader 
since it's not reusable then.

Thanks again
Raymond


Robert Osfield wrote:
> HI Raynond,
>
> osg::Fog wraps up glFog, which is part of OpenGL's fixed function
> pipeline.  As soon as you enable shaders you loose fog support unless
> you shaders directly include a fog shader in them.
>
> Robert.
>
> On Wed, Mar 19, 2008 at 2:26 PM, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>   
>> Hi,
>>
>>  I'm wondering if anyone tried the combination of SoftShadowMap shadows
>>  and osg::Fog. With 2.2.0 and svn I've tried to use it with SoftShadowMap
>>  but that's not working. I suspect that it's not working because of the
>>  shader that's being used, but that's just a guess. ShadowTexture and
>>  ShadowVolume (both fixed OpenGL) are both working ok with fog and the
>>  other shadow techniques are not, and these are all using shaders.
>>
>>  Is osg::Fog supposed to work with shadows based on shaders? Or more
>>  general, is osg::Fog supposed to work in combination with shaders?
>>
>>  thanks a lot
>>  Raymond
>>
>>  Please find attached the adapted osgshadow.cpp example
>>
>>
>> /* OpenSceneGraph example, osgshadow.
>>  *
>>  *  Permission is hereby granted, free of charge, to any person obtaining a 
>> copy
>>  *  of this software and associated documentation files (the "Software"), to 
>> deal
>>  *  in the Software without restriction, including without limitation the 
>> rights
>>  *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>>  *  copies of the Software, and to permit persons to whom the Software is
>>  *  furnished to do so, subject to the following conditions:
>>  *
>>  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
>> OR
>>  *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>>  *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
>> THE
>>  *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>>  *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
>> FROM,
>>  *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>>  *  THE SOFTWARE.
>>  */
>>
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>
>>  #include 
>>  #include 
>>
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>  #include 
>>
>>  #include 
>>  #include 
>>
>>  #include 
>>
>>  // for the grid data..
>>  #include "../osghangglide/terrain_coords.h"
>>
>>  const int ReceivesShadowTraversalMask = 0x1;
>>  const int CastsShadowTraversalMask = 0x2;
>>
>>  namespace ModelOne
>>  {
>>
>> enum Faces
>> {
>> FRONT_FACE = 1,
>> BACK_FACE = 2,
>> LEFT_FACE = 4,
>> RIGHT_FACE = 8,
>> TOP_FACE = 16,
>> BOTTOM_FACE = 32
>> };
>>
>> osg::Node* createCube(unsigned int mask)
>> {
>> osg::Geode* geode = new osg::Geode;
>>
>> osg::Geometry* geometry = new osg::Geometry;
>> geode->addDrawable(geometry);
>>
>> osg::Vec3Array* vertices = new osg::Vec3Array;
>> geometry->setVertexArray(vertices);
>>
>> osg::Vec3Array* normals = new osg::Vec3Array;
>> geometry->setNormalArray(normals);
>> geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
>>
>> osg::Vec4Array* colours = new osg::Vec4Array;
>> geometry->setColorArray(colours);
>> geometry->setColorBinding(osg::Geometry::BIND_OVERALL);
>> colours->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f));
>>
>>
>> osg::Vec3 origin(0.0f,0.0f,0.0f);
>> osg::Vec3 

Re: [osg-users] Shadows and osg::Fog?

2008-03-19 Thread Raymond de Vries
Hi,

> Composing shaders is next to impossible in a general pupose way, each
> GLSL Program needs to know all the shaders that contribute to it and
> have a main shader that glues them all together.
Ok, I understand, this would be tricky indeed. And again hard-coded in 
some (other) way ;-)
> I am aware of trying to mix shaders with self contained technique
> likes osgShadow has, so in a future rev I believe we'll need to make
> the osg::Program and the shaders that it uses publically accessible so
> users can write their own but leveraging the uniforms and shaders that
> the osgShadow routines use.
Hmm, that would be cool indeed. Another issue on the long list...

I actually meant another way of building a hierarchy of nodes with 
shaders. Would something like:
scenedata
  |
  |-- osg::Node with fog osg::Program
  |
  |-- osgShadow::ShadowedScene
 |
 |-- models with proper shadow mask...

be possible? Or is this (also) not possible.

thanks
Raymond


>
> Robert.
>
> On Wed, Mar 19, 2008 at 2:42 PM, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>> Aha, I guessed that, thanks for the confirmation.
>>
>>  So you say that fog should be part of the shadow shader, and not a
>>  separate, extra one. I did not do that much with shaders yet, except for
>>  using the osg-included ones. I cannot have a hierarchy of nodes with
>>  shaders, I guess?
>>
>>  If I cannot have a hierarchy, should I be able to setup a RTT and apply
>>  the fog shader to the RTTs stateset? I'd rather not put it in the shader
>>  since it's not reusable then.
>>
>>  Thanks again
>>  Raymond
>>
>>
>>
>>
>>  Robert Osfield wrote:
>>  > HI Raynond,
>>  >
>>  > osg::Fog wraps up glFog, which is part of OpenGL's fixed function
>>  > pipeline.  As soon as you enable shaders you loose fog support unless
>>  > you shaders directly include a fog shader in them.
>>  >
>>  > Robert.
>>  >
>>  > On Wed, Mar 19, 2008 at 2:26 PM, Raymond de Vries <[EMAIL PROTECTED]> 
>> wrote:
>>  >
>>  >> Hi,
>>  >>
>>  >>  I'm wondering if anyone tried the combination of SoftShadowMap shadows
>>  >>  and osg::Fog. With 2.2.0 and svn I've tried to use it with SoftShadowMap
>>  >>  but that's not working. I suspect that it's not working because of the
>>  >>  shader that's being used, but that's just a guess. ShadowTexture and
>>  >>  ShadowVolume (both fixed OpenGL) are both working ok with fog and the
>>  >>  other shadow techniques are not, and these are all using shaders.
>>  >>
>>  >>  Is osg::Fog supposed to work with shadows based on shaders? Or more
>>  >>  general, is osg::Fog supposed to work in combination with shaders?
>>  >>
>>  >>  thanks a lot
>>  >>  Raymond
>>  >>
>>  >>  Please find attached the adapted osgshadow.cpp example
>>  >>
>>  >>
>>  >> /* OpenSceneGraph example, osgshadow.
>>  >>  *
>>  >>  *  Permission is hereby granted, free of charge, to any person 
>> obtaining a copy
>>  >>  *  of this software and associated documentation files (the 
>> "Software"), to deal
>>  >>  *  in the Software without restriction, including without limitation 
>> the rights
>>  >>  *  to use, copy, modify, merge, publish, distribute, sublicense, and/or 
>> sell
>>  >>  *  copies of the Software, and to permit persons to whom the Software is
>>  >>  *  furnished to do so, subject to the following conditions:
>>  >>  *
>>  >>  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
>> EXPRESS OR
>>  >>  *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
>> MERCHANTABILITY,
>>  >>  *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 
>> SHALL THE
>>  >>  *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 
>> OTHER
>>  >>  *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
>> ARISING FROM,
>>  >>  *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
>> DEALINGS IN
>>  >>  *  THE SOFTWARE.
>>  >>  */
>>  >>
>>  >>  #include 
>>  >>  #include 
>>  >>  #include 
>>  >>  #include 
>>  >>  #include 
>>  >>  #include 
>>  >>  #include 
>>  >>
&

Re: [osg-users] osgShadow example and gerneral question

2008-03-19 Thread Raymond de Vries

Hi,


 I have tested latest changes (rev 7975). Inheritance problem that looked
 like invisible polygon casting shadow for half of the scene vanished. So
 far, so good ;-).



Good to hear.

  

 IMHO, the problem J-S noticed with ThreadingModeHandler is different. Its
 not related to inheritance mask changes and does not affect only Shadow
 example. It can be also seen with Prerender example with RTT camera using
 FBOs and PixelBuffers. And due to lack of other supects I agree with J-S: we
 should put the blame on NVidia drivers ;-(.



The threading issue is clearly a different problem entirely.

I haven't had the chance to go look into this topic so can't comment
on whether its an OSG problem or a driver one.  With threading I'd
generally be inclined towards looking at the OSG side first, then once
everything is confirmed to be clean look towards the driver.
  
Ok, I did not mean to test the recent changes explicitly, I just did the 
test that I did recently, since the issue is hot now. Please look at the 
attached modified osgshadow.cpp. It is good to notice that the svn 
osgshadow.cpp explicitly sets the threading model to SingleThreaded.


Raymond


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


  


/* OpenSceneGraph example, osgshadow.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the "Software"), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

#include 

// for the grid data..
#include "../osghangglide/terrain_coords.h"

const int ReceivesShadowTraversalMask = 0x1;
const int CastsShadowTraversalMask = 0x2;

namespace ModelOne
{

enum Faces
{
FRONT_FACE = 1,
BACK_FACE = 2,
LEFT_FACE = 4,
RIGHT_FACE = 8,
TOP_FACE = 16,
BOTTOM_FACE = 32
};

osg::Node* createCube(unsigned int mask)
{
osg::Geode* geode = new osg::Geode;

osg::Geometry* geometry = new osg::Geometry;
geode->addDrawable(geometry);

osg::Vec3Array* vertices = new osg::Vec3Array;
geometry->setVertexArray(vertices);

osg::Vec3Array* normals = new osg::Vec3Array;
geometry->setNormalArray(normals);
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);

osg::Vec4Array* colours = new osg::Vec4Array;
geometry->setColorArray(colours);
geometry->setColorBinding(osg::Geometry::BIND_OVERALL);
colours->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f));


osg::Vec3 origin(0.0f,0.0f,0.0f);
osg::Vec3 dx(2.0f,0.0f,0.0f);
osg::Vec3 dy(0.0f,1.0f,0.0f);
osg::Vec3 dz(0.0f,0.0f,1.0f);

osg::Vec3 px(1.0f,0.0,0.0f);
osg::Vec3 nx(-1.0f,0.0,0.0f);
osg::Vec3 py(0.0f,1.0f,0.0f);
osg::Vec3 ny(0.0f,-1.0f,0.0f);
osg::Vec3 pz(0.0f,0.0f,1.0f);
osg::Vec3 nz(0.0f,0.0f,-1.0f);

if (mask & FRONT_FACE)
{
// front face
vertices->push_back(origin);
vertices->push_back(origin+dx);
vertices->push_back(origin+dx+dz);
vertices->push_back(origin+dz);
normals->push_back(ny);
normals->push_back(ny);
normals->push_back(ny);
normals->push_back(ny);
}

if (mask & BACK_FACE)
{
// back face
vertices->push_back(origin+dy);
vertices->push_back(origin+dy+dz);
vertices->push_back(origin+dy+dx+dz);
vertices->push_back(origin+dy+dx);
normals->push_back(py);
normals->push_back(py);
normals->push_back(py);
normals->push_back(py);
}

if (mask & LEFT_FACE)
{
// left face
vertices->push_back(origin+dy);
vertices->push_back(origin);
vertic

Re: [osg-users] How to debug my own plugin library?

2008-04-07 Thread Raymond de Vries
Hi,

In visual studio you can
1) Set your plugin project as startup project
2) Specify the osgviewerd.exe as Command (in the Debugging section)
3) Specify the model that triggers your plugin as command line argument
(in the Debugging section)
4) Set a breakpoint in your plugin

Running should now break in your breakpoint.

good luck
Raymond


> Hi,
>
> you could hardcode a breakpoint into your plugin during its
> initialization, see
> http://msdn2.microsoft.com/en-us/library/k4wx2tde(VS.80).aspx
> then set additional breakpoints as needed
>
> cheers
> -- mew
>
>
>
>
> On Mon, Apr 7, 2008 at 12:05 AM, Bo Jiang <[EMAIL PROTECTED]> wrote:
>>
>>
>> Dear all,
>>   Recently, I need to write my own plugin to parse some kind of model
>> file
>> and add it to some "Node". I write one just like "Plug 3d obj" but it
>> does
>> not work. However, as a new comer to OSG, I even don't know how to debug
>> these plugin library, so, would someone give me some ideas?:)
>> BTW, I use VS.NET 2005
>>
>> Bo Jiang
>> ___
>>  osg-users mailing list
>>  osg-users@lists.openscenegraph.org
>>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
>
> --
> Mike Weiblen -- Austin Texas USA -- http://mew.cx/
> ___
> 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] How to retrieve a U, V texture coordinate from a picking action ?

2008-04-11 Thread Raymond de Vries
Hi Jerome,

Afaik you can also specify a single image as argument. That way you can at
least run the program.

good luck
Raymond


> Hi Robert,
>
> Thx for your help! I'm having trouble running the example. It seems I need
> some extra plugin to read a avi or mpg file. I'm running OSG on windows.
> I've built all the available plugin that comes with osg. Am I missing
> something ?
>
> Thanks again!
>
>
>
> Jerome
>
>
>
> Date: Thu, 10 Apr 2008 17:36:49 +0100
>
> From: "Robert Osfield" <[EMAIL PROTECTED]>
>
> Subject: Re: [osg-users] How to retrieve a U,  V texture coordinate
>
>   from a picking action ?
>
> To: "OpenSceneGraph Users" 
>
> Message-ID:
>
>   <[EMAIL PROTECTED]>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
>
> Hi Jerome,
>
>
>
> Have a look at the event handling in the osgmovie example as this does
> exactly what you are looking for.
>
>
>
> Robert.
>
>
>
> On Thu, Apr 10, 2008 at 2:13 PM, Jerome Hummel <
>  [EMAIL PROTECTED]>
> wrote:
>
>
>
>>  Hi,
>
>>
>
>>
>
>>
>
>> I guess this is a beginner question here but I was wondering if there
>
>> was an easy way to retrieve a u,v coordinate from a ray with osg?
>
>>
>
>>
>
>>
>
>> The use case is the following:
>
>>
>
>> -a 3D Object  is loaded (let's say a cube)
>
>>
>
>> -it is textured with a glsl shader
>
>>
>
>> -The user picks a point on the cube (using the mouse)
>
>>
>
>>
>
>>
>
>> From the 3D point in world coordinate, how can I retrieve the uv point
>
>> in the texture ?
>
>>
>
>> Thanks for your help,
>
>>
>
>>
>
>>
>
>> Regards,
>
>>
>
>> Jerome
>
>>
>
>
>
> ___
> 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] Fix for error in PrecipitationEffect.cpp

2008-05-07 Thread Raymond de Vries

Hi Robert,

I believe I found a (copy-n-paste) error in the file 
PrecipitationEffect.cpp (at least in 2.4.0): I think that line 353 should be

if (!_particleColorUniform)

Best regards,
Raymond

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


Re: [osg-users] Fix for error in PrecipitationEffect.cpp

2008-05-07 Thread Raymond de Vries

Hehe, it sure is complex ;-)

I've attached the file with the very complex fix ;)

regards
Raymond

btw I thought to send it via osg-submissions first, but since it's such 
a tiny fix I thought this channel would be fine too.


Robert Osfield wrote:

On Wed, May 7, 2008 at 1:54 PM, Robert Osfield <[EMAIL PROTECTED]> wrote:
  

 Could you send me the complex modified file,



Oppss... I meant to write "complete modified file" ;-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  


/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 *
 * This library is open source and may be redistributed and/or modified under  
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 * 
 * This library 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.  See the 
 * OpenSceneGraph Public License for more details.
*/


#include

#include
#include
#include
#include
#include

#include 

#include 
#include 
#include 

using namespace osgParticle;

#define USE_LOCAL_SHADERS

static float random(float min,float max) { return min + 
(max-min)*(float)rand()/(float)RAND_MAX; }

static void fillSpotLightImage(unsigned char* ptr, const osg::Vec4& 
centerColour, const osg::Vec4& backgroudColour, unsigned int size, float power)
{
if (size==1)
{
float r = 0.5f;
osg::Vec4 color = centerColour*r+backgroudColour*(1.0f-r);
*ptr++ = (unsigned char)((color[0])*255.0f);
*ptr++ = (unsigned char)((color[1])*255.0f);
*ptr++ = (unsigned char)((color[2])*255.0f);
*ptr++ = (unsigned char)((color[3])*255.0f);
return;
}

float mid = (float(size)-1.0f)*0.5f;
float div = 2.0f/float(size);
for(unsigned int r=0;rdata(0,r,0);
for(unsigned int c=0;cdata(0,0,0);
fillSpotLightImage(ptr, centerColour, backgroudColour, size, power);

return image;
#else
osg::Image* image = new osg::Image;
osg::Image::MipmapDataType mipmapData;
unsigned int s = size;
unsigned int totalSize = 0;
unsigned i;
for(i=0; s>0; s>>=1, ++i)
{
if (i>0) mipmapData.push_back(totalSize);
totalSize += s*s*4;
}

unsigned char* ptr = new unsigned char[totalSize];
image->setImage(size, size, size, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, ptr, 
osg::Image::USE_NEW_DELETE,1);

image->setMipmapLevels(mipmapData);

s = size;
for(i=0; s>0; s>>=1, ++i)
{
fillSpotLightImage(ptr, centerColour, backgroudColour, s, power);
ptr += s*s*4;
}

return image;
#endif
}


PrecipitationEffect::PrecipitationEffect()
{
setNumChildrenRequiringUpdateTraversal(1);

setUpGeometries(1024);

rain(0.5);
}

void PrecipitationEffect::rain(float intensity)
{
_wind.set(0.0f,0.0f,0.0f);
_particleSpeed = -2.0f + -5.0f*intensity;
_particleSize = 0.01 + 0.02*intensity;
_particleColor = osg::Vec4(0.6, 0.6, 0.6, 1.0) -  osg::Vec4(0.1, 0.1, 0.1, 
1.0)* intensity;
_maximumParticleDensity = intensity * 8.5f;
_cellSize.set(5.0f / (0.25f+intensity), 5.0f / (0.25f+intensity), 5.0f);
_nearTransition = 25.f;
_farTransition = 100.0f - 60.0f*sqrtf(intensity);

if (!_fog) _fog = new osg::Fog;

_fog->setMode(osg::Fog::EXP);
_fog->setDensity(0.005f*intensity);
_fog->setColor(osg::Vec4(0.5, 0.5, 0.5, 1.0));

_useFarLineSegments = false;

_dirty = true;

update();
}

void PrecipitationEffect::snow(float intensity)
{
_wind.set(0.0f,0.0f,0.0f);
_particleSpeed = -0.75f - 0.25f*intensity;
_particleSize = 0.02f + 0.03f*intensity;
_particleColor = osg::Vec4(0.85f, 0.85f, 0.85f, 1.0f) -  osg::Vec4(0.1f, 
0.1f, 0.1f, 1.0f)* intensity;
_maximumParticleDensity = intensity * 8.2f;
_cellSize.set(5.0f / (0.25f+intensity), 5.0f / (0.25f+intensity), 5.0f);
_nearTransition = 25.f;
_farTransition = 100.0f - 60.0f*sqrtf(intensity);

if (!_fog) _fog = new osg::Fog;

_fog->setMode(osg::Fog::EXP);
_fog->setDensity(0.01f*intensity);
_fog->setColor(osg::Vec4(0.6, 0.6, 0.6, 1.0));

_useFarLineSegments = false;

_dirty = true;

update();
}

PrecipitationEffect::PrecipitationEffect(const PrecipitationEffect& copy, const 
osg::CopyOp& copyop):
osg::Node(copy,copyop)
{

setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()+1);

_dirty = true;
update();
}

void PrecipitationEffect::compileGLObjects(osg::RenderInfo& renderInfo) const
{
if (_quadGeometry.valid()) 
{
_quadGeometry->compileGLObjects(renderInfo);
if (_quadGeome

Re: [osg-users] How to document osgShadow?

2008-05-13 Thread Raymond de Vries

Hi Ben,

Very nice of you to start this documentation. As you already found out 
this are not working out of the box wrt shadows, all the different 
techniques have different characteristics. I am swamped with work but I 
will try to fill in some of my experiences. So far I have spent most of 
my (shadow-related) time on SSM and PSSM. To start with, you could add 
references where the original ideas are published. E.g. SSM comes from 
GPU Gems 2.


best regards
Raymond


Ben Discoe wrote:

Alright.  I have created a wiki page here, with my best attempt at documenting 
what i've learned so far:

http://www.openscenegraph.org/projects/osg/wiki/Support/ProgrammingGuide/osgShadow 


It would be really great if someone who actually /knows/ the code could fill in 
things like:

* How do the various ShadowTechniques differ?
* What specific card capabilities (geometry shaders, ?) does each 
ShadowTechnique require?
* Which ShadowTechniques respect which CastsShadow/ReceivesShadow bits?
* What do those PSSM options do?

J-S, Wojtek, Adrian, Robert, Mihai, Raymond, Paul, others... can you take a 
minute to help?  Or if you prefer, you could answer any of the blanks from the 
wiki page here on the list, and i'll be happy to paste them into the wiki for 
you.

Thanks,
Ben

  

-Original Message-
From: Jean-Sébastien Guay

Hi Ben,

First of all, thanks for your willingness to contribute to documenting
parts of the OSG which are still pretty bleeding-edge! It's great to see
this kind of involvement.

About where to put documentation:



1. The wiki has a page:

http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/osgSha
dow

but that is an old page from before osgshadow joined the OSG source, it
  

seems like not the place for documentation.

The page is under the "tasks" section, so it's not the right place for
documentation on how to use the nodekit.



2. We could make a new Wiki page, perhaps linked from:


  

http://www.openscenegraph.org/projects/osg/wiki/Support/ProgrammingGuides


under 'Programming the NodeKit libraries'

3. The source-doxygen docs, which end up here:

http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDoc
s/a02211.html

I could submit modifications to the osgshadow source code with
  

appropriate comment paragraphs explaining how to use each class.  But,
that appears to not be OSG's design, source docs seem to be deliberately
minimal, so perhaps extensive documentation with text formatting, charts
etc. belongs outside the source.

I think a combination of these two will give good documentation. In the
past, most of the documentation for OSG was in the doxycomments, but I
think a balanced approach will yield better overall documentation from a
"user-developer" point of view (users of the API, as opposed to developers
of OSG or contributors).

Of course, this is just my opinion, others might have other comments.

Thanks again for wanting to contribute, I look forward to reading your
work!

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/



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



  


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


Re: [osg-users] Should I be able to save the precipitation node to an osg or ive file?

2008-05-28 Thread Raymond de Vries

Hi Robert and Paul,

Thanks, it's clear now.

Raymond


Robert Osfield wrote:

Hi Raymond,

At present there is no osgParticle support in .ive, and no
PrecipitationEffect support in .osg either, but this should be more
straight forward to add.

Robert.

On Wed, May 28, 2008 at 11:31 AM, Raymond de Vries <[EMAIL PROTECTED]> wrote:
  

Hi,

While I was writing the previous message about the precipitation bug or
feature, I tried to save the scene graph to an osg or ive file (to report
the issue in an easier way) but the precipitation was not written. Can
anyone explain how does this works? In the end the precipitation is 'just'
build from standard osg so I would expect it to be written to file.

Thanks for the clarification.

Best regards
Raymond

(win xp, osg 2.4.0, ms visual studio 2005 sp1)
___
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] bug or feature: should I always be able to disable using vbo? (when I do so in the precipitation, rendering artifacts appear)

2008-05-28 Thread Raymond de Vries

Hi Robert,


Both:

  osgprecipitation textured_box.osg
  osgprecipitation non_textured_box.osg

Work just fine for me, with SVN version of the OSG.  Note, there has
been a shader related bug fix to GLObjectVistor that may well have a
baring on this issue.
  

Did you change the vbo lines in the PrecipitationEffect.cpp?

As for VBO/non VBO on objects in the scene, this should have
absolutely no effect on the precipitation, suggesting either a bug on
the OSG side or a driver bug.  Could you try out the SVN version of
the OSG to see if this fixes things.
  

Sure, will do it right away.

Talk to you later,
Raymond


Robert.

  

Hi,

I am diving deep into the precipitation and trying out things (osg 2.4.0,
win xp, MS Visual Studio 2005 SP1). One of the things I did is to disable
the usage of vbos, in lines 480, 487 and 494:
  _quadGeometry->setUseVertexBufferObjects(false);
  _lineGeometry->setUseVertexBufferObjects(false);
  _pointGeometry->setUseVertexBufferObjects(false);

When I do so, the precip is not drawn properly at all anymore, and it
depends if a load a textured or non-textured object (see the attached models
+ image):
- non-textured: box rendered ok, no precip at all although it seems to be
rendered judging from the performance
- textured: box rendered ok, precip is rendered not right at all (seems like
large polygons or so)

So the general question is: should I be able to disable vbo at all times? I
expected this would be possible (resulting in a performance penalty of
course). If so, there is an issue somewhere... I don't know where, although
I spent many hours on this.

Thanks a lot
Raymond


MatrixTransform {
 DataVariance STATIC
 name "Scene Root"
 nodeMask 0xff
 cullingActive TRUE
 StateSet {
   UniqueID StateSet_0
   DataVariance STATIC
   rendering_hint DEFAULT_BIN
   renderBinMode INHERIT
   GL_LIGHTING ON
 }
 referenceFrame RELATIVE
 Matrix {
   1 0 0 0
   0 1 0 0
   0 0 1 0
   0 0 0 1
 }
 num_children 1
 MatrixTransform {
   DataVariance STATIC
   name "Box01"
   nodeMask 0xff
   cullingActive TRUE
   referenceFrame RELATIVE
   Matrix {
 1 0 0 0
 0 1 0 0
 0 0 1 0
 0 0 0 1
   }
   num_children 1
   Geode {
 UniqueID Geode_1
 DataVariance STATIC
 name "Box01-GEODE"
 nodeMask 0xff
 cullingActive TRUE
 num_drawables 1
 Geometry {
   DataVariance DYNAMIC
   StateSet {
 DataVariance STATIC
 rendering_hint DEFAULT_BIN
 renderBinMode INHERIT
   }
   useDisplayList TRUE
   useVertexBufferObjects FALSE
   PrimitiveSets 1
   {
 DrawArrays TRIANGLES 0 36
   }
   VertexArray Vec3Array 36
   {
 -14.7209 -13.6026 0
 -14.7209 13.6026 0
 14.7209 13.6026 0
 14.7209 13.6026 0
 14.7209 -13.6026 0
 -14.7209 -13.6026 0
 -14.7209 -13.6026 15.8052
 14.7209 -13.6026 15.8052
 14.7209 13.6026 15.8052
 14.7209 13.6026 15.8052
 -14.7209 13.6026 15.8052
 -14.7209 -13.6026 15.8052
 -14.7209 -13.6026 0
 14.7209 -13.6026 0
 14.7209 -13.6026 15.8052
 14.7209 -13.6026 15.8052
 -14.7209 -13.6026 15.8052
 -14.7209 -13.6026 0
 14.7209 -13.6026 0
 14.7209 13.6026 0
 14.7209 13.6026 15.8052
 14.7209 13.6026 15.8052
 14.7209 -13.6026 15.8052
 14.7209 -13.6026 0
 14.7209 13.6026 0
 -14.7209 13.6026 0
 -14.7209 13.6026 15.8052
 -14.7209 13.6026 15.8052
 14.7209 13.6026 15.8052
 14.7209 13.6026 0
 -14.7209 13.6026 0
 -14.7209 -13.6026 0
 -14.7209 -13.6026 15.8052
 -14.7209 -13.6026 15.8052
 -14.7209 13.6026 15.8052
 -14.7209 13.6026 0
   }
   NormalBinding PER_VERTEX
   NormalArray Vec3Array 36
   {
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 1
 0 0 1
 0 0 1
 0 0 1
 0 0 1
 0 0 1
 0 -1 0
 0 -1 0
 0 -1 0
 0 -1 0
 0 -1 0
 0 -1 0
 1 0 0
 1 0 0
 1 0 0
 1 0 0
 1 0 0
 1 0 0
 0 1 0
 0 1 0
 0 1 0
 0 1 0
 0 1 0
 0 1 0
 -1 0 0
 -1 0 0
 -1 0 0
 -1 0 0
 -1 0 0
 -1 0 0
   }
   ColorBinding OVERALL
   ColorArray Vec4Array 1
   {
 0.109804 0.584314 0.694118 1
   }
 }
   }
 }
}

MatrixTransform {
 DataVariance STATIC
 name "Scene Root"
 nodeMask 0xff
 cullingActive TRUE
 StateSet {
   UniqueID StateSet_0
   DataVariance STATIC
   rendering_hint DEFAULT_BIN
   renderBinMode INHERIT
   GL_LIGHTING ON
 }
 referenceFrame RELATIVE
 Matrix {
   1 0 0 0
   0 1 0 0
   0 0 1 0
   0 0 0 1
 }
 num_children 1
 MatrixTransform {
   DataVariance STATIC
   name "Box01"
   nodeMask 0xff
   cullingActive TRUE
   re

[osg-users] Should I be able to save the precipitation node to an osg or ive file?

2008-05-28 Thread Raymond de Vries

Hi,

While I was writing the previous message about the precipitation bug or 
feature, I tried to save the scene graph to an osg or ive file (to 
report the issue in an easier way) but the precipitation was not 
written. Can anyone explain how does this works? In the end the 
precipitation is 'just' build from standard osg so I would expect it to 
be written to file.


Thanks for the clarification.

Best regards
Raymond

(win xp, osg 2.4.0, ms visual studio 2005 sp1)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] bug or feature: should I always be able to disable using vbo? (when I do so in the precipitation, rendering artifacts appear)

2008-05-28 Thread Raymond de Vries

Hi Robert,

I just tried it with the svn version and the effect is the same as with 
2.4.0, so still wrong. In order to do this I changed the lines 481, 488 
and into:

   _quadGeometry->setUseVertexBufferObjects(false);
   _lineGeometry->setUseVertexBufferObjects(false);
   _pointGeometry->setUseVertexBufferObjects(false);

Can you please test with these changed lines?

Thanks
Raymond

btw fyi: I still used the older 3rd party libs, not the most recent 
ones, but that shouldn't harm I guess
btw I could not find a way to grab the fullscreen viewer, windows won't 
let me, and the --viewer option does not work


Raymond de Vries wrote:

Hi Robert,


Both:

  osgprecipitation textured_box.osg
  osgprecipitation non_textured_box.osg

Work just fine for me, with SVN version of the OSG.  Note, there has
been a shader related bug fix to GLObjectVistor that may well have a
baring on this issue.
  

Did you change the vbo lines in the PrecipitationEffect.cpp?

As for VBO/non VBO on objects in the scene, this should have
absolutely no effect on the precipitation, suggesting either a bug on
the OSG side or a driver bug.  Could you try out the SVN version of
the OSG to see if this fixes things.
  

Sure, will do it right away.

Talk to you later,
Raymond


Robert.

 

Hi,

I am diving deep into the precipitation and trying out things (osg 
2.4.0,
win xp, MS Visual Studio 2005 SP1). One of the things I did is to 
disable

the usage of vbos, in lines 480, 487 and 494:
  _quadGeometry->setUseVertexBufferObjects(false);
  _lineGeometry->setUseVertexBufferObjects(false);
  _pointGeometry->setUseVertexBufferObjects(false);

When I do so, the precip is not drawn properly at all anymore, and it
depends if a load a textured or non-textured object (see the 
attached models

+ image):
- non-textured: box rendered ok, no precip at all although it seems 
to be

rendered judging from the performance
- textured: box rendered ok, precip is rendered not right at all 
(seems like

large polygons or so)

So the general question is: should I be able to disable vbo at all 
times? I

expected this would be possible (resulting in a performance penalty of
course). If so, there is an issue somewhere... I don't know where, 
although

I spent many hours on this.

Thanks a lot
Raymond


MatrixTransform {
 DataVariance STATIC
 name "Scene Root"
 nodeMask 0xff
 cullingActive TRUE
 StateSet {
   UniqueID StateSet_0
   DataVariance STATIC
   rendering_hint DEFAULT_BIN
   renderBinMode INHERIT
   GL_LIGHTING ON
 }
 referenceFrame RELATIVE
 Matrix {
   1 0 0 0
   0 1 0 0
   0 0 1 0
   0 0 0 1
 }
 num_children 1
 MatrixTransform {
   DataVariance STATIC
   name "Box01"
   nodeMask 0xff
   cullingActive TRUE
   referenceFrame RELATIVE
   Matrix {
 1 0 0 0
 0 1 0 0
 0 0 1 0
 0 0 0 1
   }
   num_children 1
   Geode {
 UniqueID Geode_1
 DataVariance STATIC
 name "Box01-GEODE"
 nodeMask 0xff
 cullingActive TRUE
 num_drawables 1
 Geometry {
   DataVariance DYNAMIC
   StateSet {
 DataVariance STATIC
 rendering_hint DEFAULT_BIN
 renderBinMode INHERIT
   }
   useDisplayList TRUE
   useVertexBufferObjects FALSE
   PrimitiveSets 1
   {
 DrawArrays TRIANGLES 0 36
   }
   VertexArray Vec3Array 36
   {
 -14.7209 -13.6026 0
 -14.7209 13.6026 0
 14.7209 13.6026 0
 14.7209 13.6026 0
 14.7209 -13.6026 0
 -14.7209 -13.6026 0
 -14.7209 -13.6026 15.8052
 14.7209 -13.6026 15.8052
 14.7209 13.6026 15.8052
 14.7209 13.6026 15.8052
 -14.7209 13.6026 15.8052
 -14.7209 -13.6026 15.8052
 -14.7209 -13.6026 0
 14.7209 -13.6026 0
 14.7209 -13.6026 15.8052
 14.7209 -13.6026 15.8052
 -14.7209 -13.6026 15.8052
 -14.7209 -13.6026 0
 14.7209 -13.6026 0
 14.7209 13.6026 0
 14.7209 13.6026 15.8052
 14.7209 13.6026 15.8052
 14.7209 -13.6026 15.8052
 14.7209 -13.6026 0
 14.7209 13.6026 0
 -14.7209 13.6026 0
 -14.7209 13.6026 15.8052
 -14.7209 13.6026 15.8052
 14.7209 13.6026 15.8052
 14.7209 13.6026 0
 -14.7209 13.6026 0
 -14.7209 -13.6026 0
 -14.7209 -13.6026 15.8052
 -14.7209 -13.6026 15.8052
 -14.7209 13.6026 15.8052
 -14.7209 13.6026 0
   }
   NormalBinding PER_VERTEX
   NormalArray Vec3Array 36
   {
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 -1
 0 0 1
 0 0 1
 0 0 1
 0 0 1
 0 0 1
 0 0 1
 0 -1 0
 0 -1 0
 0 -1 0
 0 -1 0
 0 -1 0
 0 -1 0
 1 0 0
 1 0 0
 1 0 0
 1 0 0
 1 0 0
 1 0 0
 0 1 0
   

Re: [osg-users] bug or feature: should I always be able to disable using vbo? (when I do so in the precipitation, rendering artifacts appear)

2008-05-28 Thread Raymond de Vries

Hi Robert,

I totally understand what you are saying. In fact, I do not want to turn 
this off, I was trying out a lot of things since I've got a bug here in 
a class which is a simplified precip. In this class I did not enable 
vbos and worked fine until I enabled vbo. So that's why I came up with 
my generic question whether or not I can disable the usage of vbo.


I will dig further, thanks for now.

best regards
Raymond




Robert Osfield wrote:

Hi Raymond,

I've just made your suggestion change, and it does break things on my
machine as well.

But... reviewing the code, we'll the code dynamically adjusts the
number of particles so it not meant ever to use display lists, rather
it only works with VBO's or vertex arrays.   Note the custom
PrecipitationDrawable that manages the actual rendering.

It's not at all a conventional bit of scene graph, and I'm kinda
perplexed why you'd want to go around changing the insides of such an
implementation.  The code is designed to use VBO's for a reason -
performance and flexibility, with was never meant to be used with
display lists as this breaks the whole way the implementation
functions.

Robert.

On Wed, May 28, 2008 at 1:05 PM, Raymond de Vries <[EMAIL PROTECTED]> wrote:
  

Hi Robert,

I just tried it with the svn version and the effect is the same as with
2.4.0, so still wrong. In order to do this I changed the lines 481, 488 and
into:
  _quadGeometry->setUseVertexBufferObjects(false);
  _lineGeometry->setUseVertexBufferObjects(false);
  _pointGeometry->setUseVertexBufferObjects(false);

Can you please test with these changed lines?

Thanks
Raymond

btw fyi: I still used the older 3rd party libs, not the most recent ones,
but that shouldn't harm I guess
btw I could not find a way to grab the fullscreen viewer, windows won't let
me, and the --viewer option does not work

Raymond de Vries wrote:


Hi Robert,

  

Both:

 osgprecipitation textured_box.osg
 osgprecipitation non_textured_box.osg

Work just fine for me, with SVN version of the OSG.  Note, there has
been a shader related bug fix to GLObjectVistor that may well have a
baring on this issue.



Did you change the vbo lines in the PrecipitationEffect.cpp?
  

As for VBO/non VBO on objects in the scene, this should have
absolutely no effect on the precipitation, suggesting either a bug on
the OSG side or a driver bug.  Could you try out the SVN version of
the OSG to see if this fixes things.



Sure, will do it right away.

Talk to you later,
Raymond

  

Robert.




Hi,

I am diving deep into the precipitation and trying out things (osg
2.4.0,
win xp, MS Visual Studio 2005 SP1). One of the things I did is to
disable
the usage of vbos, in lines 480, 487 and 494:
 _quadGeometry->setUseVertexBufferObjects(false);
 _lineGeometry->setUseVertexBufferObjects(false);
 _pointGeometry->setUseVertexBufferObjects(false);

When I do so, the precip is not drawn properly at all anymore, and it
depends if a load a textured or non-textured object (see the attached
models
+ image):
- non-textured: box rendered ok, no precip at all although it seems to
be
rendered judging from the performance
- textured: box rendered ok, precip is rendered not right at all (seems
like
large polygons or so)

So the general question is: should I be able to disable vbo at all
times? I
expected this would be possible (resulting in a performance penalty of
course). If so, there is an issue somewhere... I don't know where,
although
I spent many hours on this.

Thanks a lot
Raymond


MatrixTransform {
 DataVariance STATIC
 name "Scene Root"
 nodeMask 0xff
 cullingActive TRUE
 StateSet {
  UniqueID StateSet_0
  DataVariance STATIC
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  GL_LIGHTING ON
 }
 referenceFrame RELATIVE
 Matrix {
  1 0 0 0
  0 1 0 0
  0 0 1 0
  0 0 0 1
 }
 num_children 1
 MatrixTransform {
  DataVariance STATIC
  name "Box01"
  nodeMask 0xff
  cullingActive TRUE
  referenceFrame RELATIVE
  Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
  }
  num_children 1
  Geode {
UniqueID Geode_1
DataVariance STATIC
name "Box01-GEODE"
nodeMask 0xff
cullingActive TRUE
num_drawables 1
Geometry {
  DataVariance DYNAMIC
  StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
  }
  useDisplayList TRUE
  useVertexBufferObjects FALSE
  PrimitiveSets 1
  {
DrawArrays TRIANGLES 0 36
  }
  VertexArray Vec3Array 36
  {
-14.7209 -13.6026 0
-14.7209 13.6026 0
14.7209 13.6026 0
14.7209 13.6026 0
14.7209 -13.6026 0
-14.7209 -13.6026 0
-14.7209 -13.6026 15.8052
14.7209 -13.6026 15.8052
14.7209 13.6026 15.8052
14.7209 13.6026 15.8052
-14.7209 13.602

[osg-users] Vertex attributes: how does implementation of osg::State::disableVertexAttribPointersAboveAndIncluding() work, it is almost never called

2008-05-30 Thread Raymond de Vries

Hi,

I am trying to add vertex attributes to my shader program and I am 
having a crash when I reload the geometry with vertex attributes.


Now I am looking into the source and came across the func 
osg::State::disableVertexAttribPointersAboveAndIncluding(). Looking at 
the func name I would expect that the vertex attribute units would be 
disabled, but it doesn't count up. I am really new in this area and 
would like to learn. Is there someone who can explain this piece?


Mike Weiblen, could you take a look maybe, you're a shader expert!

A related question: I see that 'some' vertex attribute units are used in 
examples like the glsl_confetti.osg. Can any unit be used arbitrarily, 
without 0 which seems to be used for the vertex coordinates?


thanks a lot for explaining, best regards
Raymond


this is in the svn btw
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Vertex attributes: how does implementation of osg::State::disableVertexAttribPointersAboveAndIncluding() work, it is almost never called

2008-05-30 Thread Raymond de Vries

Hi,

I just wanted to let you know that I fixed my crash with a straight 
forward implementation of the function that I mentioned earlier today. 
This is of course by no means a real fix in the osg way but for that I 
simply don't know all the tiny details of the optimizations.


The problem occured when I reloaded my scene with (a changed version, 
with vertex attributes, of) precipitation. What I suspect what happened 
is that a vertex attribute unit was still activated from the previously 
loaded scene, while it should have been disabled after loading the scene 
again.


Of course it should be fixed elsewhere, but this is how I fixed it, in a 
straightforward way, unconditionally:
void State::disableVertexAttribPointersAboveAndIncluding( unsigned int 
index )

{
   if (_glDisableVertexAttribArray)
   {
// Fix by RdV, to avoid a crash when a non-existing vertex array is 
still bound, 20080530

#if 0
   while (index< _vertexAttribArrayList.size())
   {
   EnabledArrayPair& eap = _vertexAttribArrayList[index];
   if (eap._enabled || eap._dirty)
   {
   eap._enabled = false;
   eap._dirty = false;
   _glDisableVertexAttribArray( index );
   }
   ++index;
   }
#else
 int maximumNoOfVertexAttributes;
 glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maximumNoOfVertexAttributes);
 while (index < maximumNoOfVertexAttributes) {
   _glDisableVertexAttribArray( index );
   index++;
 }
#endif
   }
}

and I needed an unconditional enabling of the vertex attribute unit as well:
void State::setVertexAttribPointer( unsigned int index,
 GLint size, GLenum type, GLboolean 
normalized,

   GLsizei stride, const GLvoid *ptr )
{
   if (_glVertexAttribPointer)
   {
   if ( index >= _vertexAttribArrayList.size()) 
_vertexAttribArrayList.resize(index+1);

   EnabledArrayPair& eap = _vertexAttribArrayList[index];

   // Fix by RdV, to avoid a crash when a non-existing vertex array 
is still bound, 20080530

#if 0
   if (!eap._enabled || eap._dirty)
   {
   eap._enabled = true;
   _glEnableVertexAttribArray( index );
   }
#else
   _glEnableVertexAttribArray( index );
#endif
   //if (eap._pointer != ptr || eap._normalized!=normalized || 
eap._dirty)

   {
   _glVertexAttribPointer( index, size, type, normalized, 
stride, ptr );

   eap._pointer = ptr;
   eap._normalized = normalized;
   }
   eap._dirty = false;
   }
} 

I did this fix in osg-2.2.0 but the func still exists as-is in svn. 
Hopefully this triggers a fix in the osg way by you.


Cheers
Raymond




Raymond de Vries wrote:

Hi,

I am trying to add vertex attributes to my shader program and I am 
having a crash when I reload the geometry with vertex attributes.


Now I am looking into the source and came across the func 
osg::State::disableVertexAttribPointersAboveAndIncluding(). Looking at 
the func name I would expect that the vertex attribute units would be 
disabled, but it doesn't count up. I am really new in this area and 
would like to learn. Is there someone who can explain this piece?


Mike Weiblen, could you take a look maybe, you're a shader expert!

A related question: I see that 'some' vertex attribute units are used 
in examples like the glsl_confetti.osg. Can any unit be used 
arbitrarily, without 0 which seems to be used for the vertex coordinates?


thanks a lot for explaining, best regards
Raymond


this is in the svn btw
___
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] Vertex attributes: how does implementation of osg::State::disableVertexAttribPointersAboveAndIncluding() work, it is almost never called

2008-05-31 Thread Raymond de Vries

Hi Robert, good morning,

No, I am not writing custom OpenGL code, I am 'just' adding vertex 
attributes to the precipitation geometry and use them in the shader 
program. I am perfectly aware that this was not a fix for osg, and 
indeed I know that the glGet funcs are round-trip funcs that hurt the 
performance a lot. But at least it is not crashing anymore for me, it's 
one way or the other (first make it work, then optimize).


It certainly has to do with enabling and disabling the vertex attribute 
units because when I disable my vertex attributes the crash doesn't 
happen (and I tested other possibilities a lot). And with vertex 
attributes I get an OpenGL error.


These are snippets from the code (unfortunately I cannot send everything)
#define VERTEX_ATTRIBUTES_ARRAY_INDEX 6
osg::ref_ptr vertexAttributes = new 
osg::Vec3Array(numParticles * 4);
quad_geometry->setVertexAttribArray(VERTEX_ATTRIBUTES_ARRAY_INDEX, 
vertexAttributes.get());
quad_geometry->setVertexAttribBinding(VERTEX_ATTRIBUTES_ARRAY_INDEX, 
osg::Geometry::BIND_PER_VERTEX);

program->addBindAttribLocation("delta", VERTEX_ATTRIBUTES_ARRAY_INDEX);

Another test that I did is that I use the built-in variable 
gl_MultiTexCoord6 instead of the vertex attribute. This crashes as 
well... Hmm, I don't know what to think of this, the multi texturing 
exists sooo long already.


But apart from this, the implementation of the func 
disableVertexAttribPointersAboveAndIncluding() doesn't seem to match the 
func name, imho. But again, I am not aware of all the details.


Best regards, thanks for your time
Raymond

btw this is on win xp, osg 2.2.0 / svn, nvidia (multiple cards)
btw I won't respond in a week or so, I will be away from the computer


Robert Osfield wrote:

Hi Raymond,

Are you writing your own custom OpenGL code?  If so then it's likely
that you aren't telling the OSG about the state changes you are
making, or you are assuming OpenGL state is in a certain configuration
in your own code, but this state isn't actually current.  For instance
if a vertex array is enabled by you don't provide a valid pointer then
you'll like get a crash.

The "fix" you've made effectively discards lazy state updating and
even using a glGet, glGet being the worst offender as it can stall the
graphics pipeline so is only something you'll want to call on start
up, not during rendering.

As for giving you guidance on what you are doing wrong, this is hard
given I don't really know what you are doing.  In general you'll need
to make sure the OpenGL state is the one you want before you doing you
own OpenGL code, and any state changes you make you need to tell the
OSG about afterwards so its lazy state updating can work correctly.
The haveApplied methods help with this, as do the vertex pointer
methods provided in osg::State.   Review how osg:::Geometry does
things for inspiration.

Robert.

On Fri, May 30, 2008 at 3:59 PM, Raymond de Vries <[EMAIL PROTECTED]> wrote:
  

Hi,

I just wanted to let you know that I fixed my crash with a straight forward
implementation of the function that I mentioned earlier today. This is of
course by no means a real fix in the osg way but for that I simply don't
know all the tiny details of the optimizations.

The problem occured when I reloaded my scene with (a changed version, with
vertex attributes, of) precipitation. What I suspect what happened is that a
vertex attribute unit was still activated from the previously loaded scene,
while it should have been disabled after loading the scene again.

Of course it should be fixed elsewhere, but this is how I fixed it, in a
straightforward way, unconditionally:
void State::disableVertexAttribPointersAboveAndIncluding( unsigned int index
)
{
  if (_glDisableVertexAttribArray)
  {
// Fix by RdV, to avoid a crash when a non-existing vertex array is still
bound, 20080530
#if 0
  while (index< _vertexAttribArrayList.size())
  {
  EnabledArrayPair& eap = _vertexAttribArrayList[index];
  if (eap._enabled || eap._dirty)
  {
  eap._enabled = false;
  eap._dirty = false;
  _glDisableVertexAttribArray( index );
  }
  ++index;
  }
#else
int maximumNoOfVertexAttributes;
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maximumNoOfVertexAttributes);
while (index < maximumNoOfVertexAttributes) {
  _glDisableVertexAttribArray( index );
  index++;
}
#endif
  }
}

and I needed an unconditional enabling of the vertex attribute unit as well:
void State::setVertexAttribPointer( unsigned int index,
GLint size, GLenum type, GLboolean
normalized,
  GLsizei stride, const GLvoid *ptr )
{
  if (_glVertexAttribPointer)
  {
  if ( index >= _vertexAttribArrayList.size())
_vertexAttribArrayList.resize(index+1)

Re: [osg-users] Vertex attributes: how does implementation of osg::State::disableVertexAttribPointersAboveAndIncluding() work, it is almost never called

2008-05-31 Thread Raymond de Vries

Hi Gordon,

My program is working ok when I load the scene the first time, including 
my shader program with vertex attributes. However, when I clear the 
SceneView (yes, I know, this should be osgViewer based once, if there's 
time) and load another scene, or the same, I got a crash which makes me 
think that the vertex attribute unit that was used before, is still 
activated.


When I use (abuse?) the built-in variable gl_MultiTexCoord6 it's also 
working fine. Actually, I am following the same approach as in the 
example file in osg toy: osgtoy-data/trunk/compactdisc-texcoord.osg 
Using this built-in variable was just a test.


Thanks, best regards
Raymond



Gordon Tomlinson wrote:

Are you sure you have 8 texture units many cards still also only support 4
, see GL_MAX_TEXTURE_UNITS_ARB for the number on your card..

Also just to confuse the issue in the Pipeline there is also
GL_MAX_TEXTURE_IMAGE_UNITS_ARB which >= GL_MAX_TEXTURE_UNITS_ARB

Also I assume you have called glActiveTexture() and glBindTexture() or
set the OSG texture state up.

Do your arrays have the correct number of verts /indices in them?, 


Have you check your indices to see that they contain correct numbers.


__
Gordon Tomlinson 


Email   : [EMAIL PROTECTED]
Website : www.vis-sim.com www.gordontomlinson.com 


__

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
-Master Tambo Tetsura 



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Raymond de
Vries
Sent: 31 May 2008 08:55
To: OpenSceneGraph Users
Subject: Re: [osg-users] Vertex attributes: how does implementation of
osg::State::disableVertexAttribPointersAboveAndIncluding() work, it is
almost never called

Hi Robert, good morning,

No, I am not writing custom OpenGL code, I am 'just' adding vertex
attributes to the precipitation geometry and use them in the shader program.
I am perfectly aware that this was not a fix for osg, and indeed I know that
the glGet funcs are round-trip funcs that hurt the performance a lot. But at
least it is not crashing anymore for me, it's one way or the other (first
make it work, then optimize).

It certainly has to do with enabling and disabling the vertex attribute
units because when I disable my vertex attributes the crash doesn't happen
(and I tested other possibilities a lot). And with vertex attributes I get
an OpenGL error.

These are snippets from the code (unfortunately I cannot send everything)
#define VERTEX_ATTRIBUTES_ARRAY_INDEX 6 osg::ref_ptr
vertexAttributes = new osg::Vec3Array(numParticles * 4);
quad_geometry->setVertexAttribArray(VERTEX_ATTRIBUTES_ARRAY_INDEX,
vertexAttributes.get());
quad_geometry->setVertexAttribBinding(VERTEX_ATTRIBUTES_ARRAY_INDEX,
osg::Geometry::BIND_PER_VERTEX);
program->addBindAttribLocation("delta", VERTEX_ATTRIBUTES_ARRAY_INDEX);

Another test that I did is that I use the built-in variable
gl_MultiTexCoord6 instead of the vertex attribute. This crashes as well...
Hmm, I don't know what to think of this, the multi texturing exists sooo
long already.

But apart from this, the implementation of the func
disableVertexAttribPointersAboveAndIncluding() doesn't seem to match the
func name, imho. But again, I am not aware of all the details.

Best regards, thanks for your time
Raymond

btw this is on win xp, osg 2.2.0 / svn, nvidia (multiple cards) btw I won't
respond in a week or so, I will be away from the computer


Robert Osfield wrote:
  

Hi Raymond,

Are you writing your own custom OpenGL code?  If so then it's likely 
that you aren't telling the OSG about the state changes you are 
making, or you are assuming OpenGL state is in a certain configuration 
in your own code, but this state isn't actually current.  For instance 
if a vertex array is enabled by you don't provide a valid pointer then 
you'll like get a crash.


The "fix" you've made effectively discards lazy state updating and 
even using a glGet, glGet being the worst offender as it can stall the 
graphics pipeline so is only something you'll want to call on start 
up, not during rendering.


As for giving you guidance on what you are doing wrong, this is hard 
given I don't really know what you are doing.  In general you'll need 
to make sure the OpenGL state is the one you want before you doing you 
own OpenGL code, and any state changes you make you need to tell the 
OSG about afterwards so its lazy state updating can work correctly.

The haveApplied methods help with this, as do the vertex pointer
methods provided in osg::State.   Review how osg:::Geometry does
things for inspiration.

Robert.

On Fri, May 30, 2008 at 3:59 PM, Raymond de Vries <[EM

Re: [osg-users] question about osg::image

2008-06-18 Thread Raymond de Vries

Hi David,

You could take a look at an OpenGL manual page/examples since the same 
parameters need to be used for osg.


regards
Raymond


David _ wrote:

Hi

i´ve created an osg::image and i want to call the method allocateImage 
to allocate memory for the image data


void allocateImage 
 
(int s, int t, int r, GLenum pixelFormat, GLenum type, int packing=1)


my problem is that i can´t find a list of valid GLenum pixelFormat 
values and the same for GLenum type


in the osg::image header file i can see this macros declared at the 
beginning


#define GL_BGR  0x80E0
#define GL_BGRA 0x80E1
#define GL_UNSIGNED_BYTE_3_3_2  0x8032
#define GL_UNSIGNED_BYTE_2_3_3_REV  0x8362
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
#define GL_UNSIGNED_SHORT_4_4_4_4   0x8033
#define GL_UNSIGNED_SHORT_4_4_4_4_REV   0x8365
#define GL_UNSIGNED_SHORT_5_5_5_1   0x8034
#define GL_UNSIGNED_SHORT_1_5_5_5_REV   0x8366
#define GL_UNSIGNED_INT_8_8_8_8 0x8035
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
#define GL_UNSIGNED_INT_10_10_10_2  0x8036
#define GL_UNSIGNED_INT_2_10_10_10_REV  0x8368

i want to create RGBA, RGB and Alpha (1byte per pixel) images and 
don´t know which parameters to use


i guess that the pixel format is GL_BGR and GL_BGRA for the first two 
ones, but no idea of how to declare a just alpha image


what is the GLenum type parameter???

thanks


Tecnología, moda, motor, viajes,.suscríbete a nuestros boletines para 
estar siempre a la última MSN Newsletters 
 




___
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] How can I change the projection's fovy, without changing fovx via setProjectionMatrixAsPerspective()? (example included)

2008-06-20 Thread Raymond de Vries

Hi everyone,

I have a situation which I don't understand: I am trying to control the 
projection's fovx and fovy myself. But I see a difference in behaviour 
when I change fovx and fovy when applying them to 
camera->setProjectionMatrixAsPerspective(). Could someone try the 
attached example with animated fovx and fovy, look at the effect, and 
give me a solution?


Thanks a lot!

Regards
Raymond

#include 
#include 
#include 
#include 
#include 

// I use single threaded in my main app so force here
#define USE_SINGLE_THREADED_MODEL

osg::ref_ptr CreateScene(void);


class CameraUpdateCallback : public osg::NodeCallback {
  bool _animateFovx;

public:
  CameraUpdateCallback(void) : _animateFovx(true) {
  }
  virtual void operator()(osg::Node *node, osg::NodeVisitor *nv) {
osg::Camera *camera = dynamic_cast(node);
if(camera) {
  double currFovy, currAspectRatio, currZNear, currZFar;
  camera->getProjectionMatrixAsPerspective(currFovy, currAspectRatio, 
currZNear, currZFar);

  double currFovx = currAspectRatio * currFovy;

  double newFovx;
  double newFovy;
  if(_animateFovx) {
newFovx = currFovx + 0.5;
// use range 30.0 - 100.0
if(newFovx > 100.0) {
  newFovx = 30.0;
  _animateFovx = false;
}

newFovy = currFovy;
  }
  else {  // animate fovy
newFovx = currFovx;

newFovy = currFovy + 0.5;
if(newFovy > 100.0) {
  newFovy = 30.0;
  _animateFovx = true;
}
  }
  double newAspectRatio = newFovx / newFovy;
  camera->setProjectionMatrixAsPerspective(newFovy, newAspectRatio, 
currZNear, currZFar);
}

traverse(node, nv);
  }
};


int main(int argc, char **argv) {
  osg::ref_ptr scene = CreateScene();

  osgViewer::Viewer viewer;
#ifdef USE_SINGLE_THREADED_MODEL
  viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded);
#endif

  viewer.getCamera()->setUpdateCallback(new CameraUpdateCallback());

  viewer.setSceneData(scene.get());

  return viewer.run();
}


osg::ref_ptr CreateSphere(const osg::Vec3 &translation) {
  osg::ref_ptr transform;
  osg::Matrix *matrix;
  osg::ref_ptr geode;
  const float radius = 0.8f;
  osg::ref_ptr hints = new osg::TessellationHints;
  hints->setDetailRatio(2.0f);
  osg::ref_ptr shape;

  transform = new osg::MatrixTransform;
  matrix = new osg::Matrix;
  matrix->makeIdentity();
  matrix->setTrans(osg::Vec3f(translation));
  transform->setMatrix(*matrix);
  geode = new osg::Geode;
  transform->addChild(geode.get());
  shape = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), 
radius * 2), hints.get());
  geode->addDrawable(shape.get());
  shape->setColor(osg::Vec4(0.8f, 0.8f, 0.8f, 1.0f));

  return transform.get();
}


osg::ref_ptr CreateScene(void) {
  osg::ref_ptr scene = new osg::Group;

  scene = new osg::Group;

  // upper left sphere
  scene->addChild(CreateSphere(osg::Vec3(-10.0, 10.0,  10.0)).get());

  // upper right sphere
  scene->addChild(CreateSphere(osg::Vec3( 10.0, 10.0,  10.0)).get());

  // lower left sphere
  scene->addChild(CreateSphere(osg::Vec3(-10.0, 10.0, -10.0)).get());

  // lower right sphere
  scene->addChild(CreateSphere(osg::Vec3( 10.0, 10.0, -10.0)).get());

  // material
  osg::ref_ptr material = new osg::Material;
  material->setColorMode(osg::Material::DIFFUSE);
  material->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
  material->setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 1, 1, 1));
  material->setShininess(osg::Material::FRONT_AND_BACK, 64.0f);
  scene->getOrCreateStateSet()->setAttributeAndModes(material.get(), 
osg::StateAttribute::ON);

  return scene.get();
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] fog

2008-06-22 Thread Raymond de Vries

Hi Peter,

As the osg fog is a wrapper for the (fixed functionality) OpenGL fog, 
you can use the OpenGL docs for this. There you will see that the start 
and end values only make sense for the linear mode, not for exp or exp2. 
However, density does make sense for exp and exp2.


Regards, good luck
Raymond


Peter Wraae Marino wrote:

hi users,
 
i have tried to create a simple example using fog. As I understand it 
the start and end values define where the fog starts and ends relative 
to the camera?
 
but
 
not matter what values I use it doesn't effect my rendering. I seem to 
always get the same fog rendering.
 
can someone explain/clarifiy what I'm not understanding?
 
Here is the code if you need to test:
 
 #include 

#include 
 
osg::Node* CreateScene()

{
osg::Geode* pGeode = new osg::Geode();
 for ( int x=0; x<10; x++ )
 {
  for ( int y=0; y<10; y++ )
  {
   pGeode->addDrawable( new osg::ShapeDrawable( new 
osg::Sphere(osg::Vec3(x,y,0.0f),0.3f) ) );

  }
 }
 osg::Fog* pFog = new osg::Fog();
 pFog->setMode( osg::Fog::EXP2 );
 pFog->setColor( osg::Vec4( 1, 1, 1, 1) );
 pFog->setStart( 5 );
 pFog->setEnd( 20 );
 pFog->setDensity( 0.08f );
 pGeode->getOrCreateStateSet()->setAttribute( pFog, 
osg::StateAttribute::ON );
 pGeode->getOrCreateStateSet()->setMode( GL_FOG, 
osg::StateAttribute::ON );

return pGeode;
}
 
regards,

Peter Wraae Marino
 
http://osghelp.com 
 



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


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


Re: [osg-users] Transparency during runtime

2008-06-24 Thread Raymond de Vries

Hi Hagen,

I think you need to enable blending as well, with
stateset->setMode(GL_BLEND, osg::StateAttribute::ON)

Regards
Raymond


Kaiser, Hagen (CT) wrote:


Hello everyone,

Im dont come any further, trying to change transparency of on object 
at runtime.


I have something like this:

The stateset in a method:

this->material = new osg::Material();
this->material->setDataVariance(osg::Object::DYNAMIC);
osg::ref_ptr stateset = new osg::StateSet();
stateset->setDataVariance(osg::Object::DYNAMIC);
// set up the texture.
osg::Texture2D* texture = new osg::Texture2D;
texture->setImage(image);
stateset->setTextureAttributeAndModes(0, 
texture,osg::StateAttribute::ON);

stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF);

stateset->setAttributeAndModes(this->material.get(),osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);



stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);


The stateset is then applied to a geode once.

And in another mehtod after viewer is running and object is shown:

this->material->setTransparency(osg::Material::Face::FRONT_AND_BACK,value); 




This method is called continuesly with different float values between 
0 and 1 depending an GUI Slider.


But I cant see any changes.

Do you have some hints maybe?

Greetings Hagen



___
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] OSG & FOX-toolkit

2008-07-31 Thread Raymond de Vries

Hi Hans,

I am using the fox toolkit a lot so it would be interesting to see how 
you use it. I still have a problem where I cannot use a ref pointer for 
the osgViewer::Viewer, then I get a crash.


Greetings from warm Netherlands :-)
Raymond


Elbers, H.P. wrote:

Hi All,
 
I implemented a widget to use OSG in combination with the FOX-toolkit.

It is like /examples/osgviewerFOX/ (that is where I picked some parts),
but a bit simpler to use (simple widget, no MDI (multiple document
interface)...
 
It is two small classes (tested with FOX-1.6 and OSG-2.6rc1)
 
FXOSGCanvas: public FXGLCanvas, public osgViewer::GraphicsWindow

FXOSGView : public FXWindow, public osgViewer::Viewer
 
If anybody is interested, I can post or submit the code (no cmakefile

yet)
 
Hans Elbers

___
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] maxTime( OpenGL, OSG )

2008-11-28 Thread Raymond de Vries

Hi Umit,

Take your time to get addicted to graphics :-) Me too, I have started in 
1992 or so with OpenGL on the oh so nice Silicon Graphics Indigo 
(http://www.sgizone.net/indigo/) with which they worked when they were 
creating Jurassic Park... Some years later I worked with CAVEs with 
Performer and OpenGL. Currently, I am also still using OpenGL and 
OpenSceneGraph.


I realized that it is very useful to understand the issues of 
videocards, and how they perform and thus influence performance. Also, I 
think it is always good to know pure OpenGL to work with OpenSceneGraph.


Have fun!

Regards
Raymond


Gordon Tomlinson wrote:


Started with  good old IrisGL back in the very early nineties on SGI 
hardware, used SGI Performer 1.x and moved up to Opengl as it was 
rolled out


and used most scene graph technologies thru the years and of course 
worked on Vega and Vega Prime when I was at MPI, now working solely


with OpenSceneGraph these days

 


__

*/Capture the magic of Christmas this year see/* 
*http://www.capturethemagic.com *

__

/Gordon Tomlinson /

/[EMAIL PROTECTED] /
IM: /[EMAIL PROTECTED] /
/www.vis-sim.com  www.gordontomlinson.com 
/


__

 

*From:* [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] *On Behalf Of 
*Ümit Uzun

*Sent:* Friday, November 28, 2008 3:03 AM
*To:* OpenSceneGraph Users
*Subject:* [osg-users] maxTime( OpenGL, OSG )

 


Hi OSG Users,

I have been playing OSG for a year. And so far I have started to learn 
OpenGL formally. I mean I only stepped to Graphics World based on 
OpenGL maxTime( OpenGL, OSG ) ~= 1 year.


So I wonder to know peoples OpenGL story on this site to guess how 
long do I need time to learn Graphics Terminology based on OpenGL.


So what is your maxTime() function returned results to your main 
function ? :)


Best Regards.

--
Ümit Uzun



___
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] Set projection matrix, opengl style?

2008-12-01 Thread Raymond De Vries

Hi all,

I think I have a simple issue but I cannot find the right  
documentation... Hopefully one of you has the answer. Iwould like to  
fill in the scene view's projection matrix and view matrix directly  
from opengl matrices. Can I put the opengl matrices directly in  
setProjectionMatrix() and setViewMatrix()? Or do I need to convert  
these first or so?


Thanks a lot already!
Regards
Raymond


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


Re: [osg-users] Set projection matrix, opengl style?

2008-12-02 Thread Raymond de Vries

Hi Robert,

Wow, thanks for you *very* quick respons. It works indeed, thanks.

Cheers
Raymond


Robert Osfield wrote:

Hi Raymond,

You'll be able to pass them in unchanged.

Robert.

On Mon, Dec 1, 2008 at 4:17 PM, Raymond De Vries <[EMAIL PROTECTED]> wrote:
  

Hi all,

I think I have a simple issue but I cannot find the right documentation...
Hopefully one of you has the answer. Iwould like to fill in the scene view's
projection matrix and view matrix directly from opengl matrices. Can I put
the opengl matrices directly in setProjectionMatrix() and setViewMatrix()?
Or do I need to convert these first or so?

Thanks a lot already!
Regards
Raymond


___
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] 'loosing' textures?

2007-09-19 Thread Raymond de Vries
Hi everyone,

Since I have upgraded to OSG 2.0 (a few months ago) I seem to 'loose' 
textures on loaded models. It is not very clear to me what happens, and 
it is not easy to describe. At the moment I was wondering if someone has 
a hint or so.

Thanks a lot,
Raymond

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


[osg-users] How to completely clear OSG/OpenGL? Looking for OSG/OpenGL monitor

2007-09-19 Thread Raymond de Vries
Hi everyone,

I am triggered by the discussion about releasing and flushing GL 
Objects. In my application I am frequently loading and removing osg 
nodes in the assumption that the associated OpenGL objects are deleted 
too. Reading the discussion, and setting breakpoints in 
releaseGLObjects, it seems indeed that these objects are not deleted.

I guess I need to clear the OpenGL objects myself. Isn't there an option 
or so to do this automatically?

In the same context, I have another question. Is there functionality in 
OSG to check the OpenGL resources? Before loading a model, e.g. from 
file, I would like to have an indication whether or not this is possible 
or not. Or else, when a model is loaded, how do I see if all the OpenGL 
objects can be created without OpenGL going to swap previous resources?

thanks a lot!
Raymond

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


Re: [osg-users] 'loosing' textures?

2007-09-19 Thread Raymond de Vries
Hi Robert,

Sure, I did not provide information for the complete solution. At this 
moment I was hoping that someone else was triggered by this and he or 
she did some extensive research on this. Appearantly I did trigger ;-)

I will describe my situation here in detail:

* osg 2.0.0 on Windows XP SP2, 1 monitor
* 1 main freeglut window = 1 rendering context. Shared contexts is
  enabled in freeglut since I intend to use only 1 rendering context
  in order to preserve resources. This window exists during the
  existence of the program and I hide it just after creation. I
  don't draw this window.
* Multiple other windows, mixed glut and .net controls. In the .net
  control I create a so-called NativeWindow and get the current
  context. This way I get the context from my main window. These
  other windows and .net controls are created and deleted at runtime
* Each 'other' window (ie not the main window) has its own sceneview
* 1 scenegraph, assigned to each sceneview (setSceneData(node))
* Each 'other' window has its own camera transformation

Models are then loaded from file and added to the scenegraph. The effect 
that I see right now is that it seems that I am using multiple rendering 
contexts and that the texture of some parts of the models don't get 
uploaded to a particular rendering context. This is not the case 
however, I checked the contexts being made active and they are all the 
same. It looks like the models are only smooth shaded. Any clue?

Is it possible that I need to set a specific rendering context to a 
sceneview?

Thanks a lot (again)
Raymond




Robert Osfield wrote:
> Hi Raymond,
>
> If its not clear to you then with this small amount of information is
> going to be absolutely beyond comprehension for others...
>
> First up what type of application/viewer code do you have?  Single
> window, multiple cameras?  What platform?  Does it just happen with
> certain types of hardware?
>
> Does osgviewer exhibit the same problems your data?  Have you tried
> disabling the optimizer?
>
> Robert.
>
> On 9/19/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>   
>> Hi everyone,
>>
>> Since I have upgraded to OSG 2.0 (a few months ago) I seem to 'loose'
>> textures on loaded models. It is not very clear to me what happens, and
>> it is not easy to describe. At the moment I was wondering if someone has
>> a hint or so.
>>
>> Thanks a lot,
>> Raymond
>>
>> ___
>> 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] 'loosing' textures?

2007-09-19 Thread Raymond de Vries
Hi Robert,

Glut is effectively only used for creating the rendering context at the 
moment. From there on I use this rendering context in the .net controls. 
Apart from that the usage is for historical reasons. I understand it 
sounds strange but the glut functionality that I use right now is very 
limited. And when I do use it, it is used as a kind of debugging window 
instead of het .net control.

Rewriting the whole thing is not an option right now, and I don't need 
the full osgviewer functionality. I will try to use osg::GraphicsContext 
so that I can take a step in the right direction.

best regards
Raymond


Robert Osfield wrote:
> Hi Raymond,
>
> I am perplexed why you'd want to use GLUT for any multiple window
> work.  Why not just try the native windowing support.
>
> Robert.
>
> On 9/19/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>   
>> Hi Robert,
>>
>> Sure, I did not provide information for the complete solution. At this
>> moment I was hoping that someone else was triggered by this and he or
>> she did some extensive research on this. Appearantly I did trigger ;-)
>>
>> I will describe my situation here in detail:
>>
>> * osg 2.0.0 on Windows XP SP2, 1 monitor
>> * 1 main freeglut window = 1 rendering context. Shared contexts is
>>   enabled in freeglut since I intend to use only 1 rendering context
>>   in order to preserve resources. This window exists during the
>>   existence of the program and I hide it just after creation. I
>>   don't draw this window.
>> * Multiple other windows, mixed glut and .net controls. In the .net
>>   control I create a so-called NativeWindow and get the current
>>   context. This way I get the context from my main window. These
>>   other windows and .net controls are created and deleted at runtime
>> * Each 'other' window (ie not the main window) has its own sceneview
>> * 1 scenegraph, assigned to each sceneview (setSceneData(node))
>> * Each 'other' window has its own camera transformation
>>
>> Models are then loaded from file and added to the scenegraph. The effect
>> that I see right now is that it seems that I am using multiple rendering
>> contexts and that the texture of some parts of the models don't get
>> uploaded to a particular rendering context. This is not the case
>> however, I checked the contexts being made active and they are all the
>> same. It looks like the models are only smooth shaded. Any clue?
>>
>> Is it possible that I need to set a specific rendering context to a
>> sceneview?
>>
>> Thanks a lot (again)
>> Raymond
>>
>>
>>
>>
>> Robert Osfield wrote:
>> 
>>> Hi Raymond,
>>>
>>> If its not clear to you then with this small amount of information is
>>> going to be absolutely beyond comprehension for others...
>>>
>>> First up what type of application/viewer code do you have?  Single
>>> window, multiple cameras?  What platform?  Does it just happen with
>>> certain types of hardware?
>>>
>>> Does osgviewer exhibit the same problems your data?  Have you tried
>>> disabling the optimizer?
>>>
>>> Robert.
>>>
>>> On 9/19/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>>>
>>>   
>>>> Hi everyone,
>>>>
>>>> Since I have upgraded to OSG 2.0 (a few months ago) I seem to 'loose'
>>>> textures on loaded models. It is not very clear to me what happens, and
>>>> it is not easy to describe. At the moment I was wondering if someone has
>>>> a hint or so.
>>>>
>>>> Thanks a lot,
>>>> Raymond
>>>>
>>>> ___
>>>> 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
>
>
>   

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


Re: [osg-users] 'loosing' textures?

2007-09-19 Thread Raymond de Vries
Hi,

> Glut is effectively only used for creating the rendering context at the 
> moment. From there on I use this rendering context in the .net controls. 
> Apart from that the usage is for historical reasons. I understand it 
> sounds strange but the glut functionality that I use right now is very 
> limited. And when I do use it, it is used as a kind of debugging window 
> instead of het .net control.
>
> Rewriting the whole thing is not an option right now, and I don't need 
> the full osgviewer functionality. I will try to use osg::GraphicsContext 
> so that I can take a step in the right direction.
>   
Ok, I guess this GraphicsContext is only to be used as part of the 
osgviewer, so this is not an option for me right now.

More info, maybe this rings a bell: the textures only disappear after a 
few frames, when I use multiple windows (.net controls). Conceptually, I 
don't have a clue what's going on, all the windows have a view on the 
same scenegraph, using their own sceneview.

thanks a lot for your time!
Raymond

> best regards
> Raymond
>
>
> Robert Osfield wrote:
>   
>> Hi Raymond,
>>
>> I am perplexed why you'd want to use GLUT for any multiple window
>> work.  Why not just try the native windowing support.
>>
>> Robert.
>>
>> On 9/19/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>>   
>> 
>>> Hi Robert,
>>>
>>> Sure, I did not provide information for the complete solution. At this
>>> moment I was hoping that someone else was triggered by this and he or
>>> she did some extensive research on this. Appearantly I did trigger ;-)
>>>
>>> I will describe my situation here in detail:
>>>
>>> * osg 2.0.0 on Windows XP SP2, 1 monitor
>>> * 1 main freeglut window = 1 rendering context. Shared contexts is
>>>   enabled in freeglut since I intend to use only 1 rendering context
>>>   in order to preserve resources. This window exists during the
>>>   existence of the program and I hide it just after creation. I
>>>   don't draw this window.
>>> * Multiple other windows, mixed glut and .net controls. In the .net
>>>   control I create a so-called NativeWindow and get the current
>>>   context. This way I get the context from my main window. These
>>>   other windows and .net controls are created and deleted at runtime
>>> * Each 'other' window (ie not the main window) has its own sceneview
>>> * 1 scenegraph, assigned to each sceneview (setSceneData(node))
>>> * Each 'other' window has its own camera transformation
>>>
>>> Models are then loaded from file and added to the scenegraph. The effect
>>> that I see right now is that it seems that I am using multiple rendering
>>> contexts and that the texture of some parts of the models don't get
>>> uploaded to a particular rendering context. This is not the case
>>> however, I checked the contexts being made active and they are all the
>>> same. It looks like the models are only smooth shaded. Any clue?
>>>
>>> Is it possible that I need to set a specific rendering context to a
>>> sceneview?
>>>
>>> Thanks a lot (again)
>>> Raymond
>>>
>>>
>>>
>>>
>>> Robert Osfield wrote:
>>> 
>>>   
>>>> Hi Raymond,
>>>>
>>>> If its not clear to you then with this small amount of information is
>>>> going to be absolutely beyond comprehension for others...
>>>>
>>>> First up what type of application/viewer code do you have?  Single
>>>> window, multiple cameras?  What platform?  Does it just happen with
>>>> certain types of hardware?
>>>>
>>>> Does osgviewer exhibit the same problems your data?  Have you tried
>>>> disabling the optimizer?
>>>>
>>>> Robert.
>>>>
>>>> On 9/19/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>>>>
>>>>   
>>>> 
>>>>> Hi everyone,
>>>>>
>>>>> Since I have upgraded to OSG 2.0 (a few months ago) I seem to 'loose'
>>>>> textures on loaded models. It is not very clear to me what happens, and
>>>>> it is not easy to describe. At the moment I was wondering if someone has
>>>>> a hint or so.
>>>>>
>>>>> Thanks a lot,
>>>>> Raymond
>

Re: [osg-users] 'loosing' textures?

2007-09-19 Thread Raymond de Vries
Hi Zach,

> It sounds like your state sets are not being managed properly.  Are you
> doing any opengl state changes outside of OSG?  If so, try removing them and
> see what happens.
>   
You mean that I do direct OpenGL calls, mixed with OSG, right? Nope, I 
am not doing that. Yes, I can imagine that that's tricky to do. 
Everything is single threaded, single rendering context.

thnx
Raymond

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Raymond de
> Vries
> Sent: Wednesday, September 19, 2007 9:34 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] 'loosing' textures?
>
> Hi,
>
>   
>> Glut is effectively only used for creating the rendering context at the 
>> moment. From there on I use this rendering context in the .net controls. 
>> Apart from that the usage is for historical reasons. I understand it 
>> sounds strange but the glut functionality that I use right now is very 
>> limited. And when I do use it, it is used as a kind of debugging window 
>> instead of het .net control.
>>
>> Rewriting the whole thing is not an option right now, and I don't need 
>> the full osgviewer functionality. I will try to use osg::GraphicsContext 
>> so that I can take a step in the right direction.
>>   
>> 
> Ok, I guess this GraphicsContext is only to be used as part of the 
> osgviewer, so this is not an option for me right now.
>
> More info, maybe this rings a bell: the textures only disappear after a 
> few frames, when I use multiple windows (.net controls). Conceptually, I 
> don't have a clue what's going on, all the windows have a view on the 
> same scenegraph, using their own sceneview.
>
> thanks a lot for your time!
> Raymond
>
>   
>> best regards
>> Raymond
>>
>>
>> Robert Osfield wrote:
>>   
>> 
>>> Hi Raymond,
>>>
>>> I am perplexed why you'd want to use GLUT for any multiple window
>>> work.  Why not just try the native windowing support.
>>>
>>> Robert.
>>>
>>> On 9/19/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>>>   
>>> 
>>>   
>>>> Hi Robert,
>>>>
>>>> Sure, I did not provide information for the complete solution. At this
>>>> moment I was hoping that someone else was triggered by this and he or
>>>> she did some extensive research on this. Appearantly I did trigger ;-)
>>>>
>>>> I will describe my situation here in detail:
>>>>
>>>> * osg 2.0.0 on Windows XP SP2, 1 monitor
>>>> * 1 main freeglut window = 1 rendering context. Shared contexts is
>>>>   enabled in freeglut since I intend to use only 1 rendering context
>>>>   in order to preserve resources. This window exists during the
>>>>   existence of the program and I hide it just after creation. I
>>>>   don't draw this window.
>>>> * Multiple other windows, mixed glut and .net controls. In the .net
>>>>   control I create a so-called NativeWindow and get the current
>>>>   context. This way I get the context from my main window. These
>>>>   other windows and .net controls are created and deleted at runtime
>>>> * Each 'other' window (ie not the main window) has its own sceneview
>>>> * 1 scenegraph, assigned to each sceneview (setSceneData(node))
>>>> * Each 'other' window has its own camera transformation
>>>>
>>>> Models are then loaded from file and added to the scenegraph. The effect
>>>> that I see right now is that it seems that I am using multiple rendering
>>>> contexts and that the texture of some parts of the models don't get
>>>> uploaded to a particular rendering context. This is not the case
>>>> however, I checked the contexts being made active and they are all the
>>>> same. It looks like the models are only smooth shaded. Any clue?
>>>>
>>>> Is it possible that I need to set a specific rendering context to a
>>>> sceneview?
>>>>
>>>> Thanks a lot (again)
>>>> Raymond
>>>>
>>>>
>>>>
>>>>
>>>> Robert Osfield wrote:
>>>> 
>>>>   
>>>> 
>>>>> Hi Raymond,
>>>>>
>>>>> If its not clear to you then with this small amount of information is
>>>>> going to be absolutely b

Re: [osg-users] 'loosing' textures?

2007-09-19 Thread Raymond de Vries
Hi,

I know, it sounds that I'm doing strange things. But the opposite is 
true. Well, I am stripping everything and see where it is. Eventually it 
will be something small & stupid, as always ;-)

Thanks for your time!
Raymond


Zach Deedler wrote:
> Well it does sound like you are doing some pretty crazy things, but I don't
> know why they'd cause textures to disappear.  Are there any other odd things
> that you are doing?
>
> I had similar texture problems when using ReplicantBody models in my scenes.
> Are you loading any crazy file formats?
>
> Has anything else changed since you have upgraded to OSG 2.0?
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Raymond de
> Vries
> Sent: Wednesday, September 19, 2007 10:09 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] 'loosing' textures?
>
> Hi Zach,
>
>   
>> It sounds like your state sets are not being managed properly.  Are you
>> doing any opengl state changes outside of OSG?  If so, try removing them
>> 
> and
>   
>> see what happens.
>>   
>> 
> You mean that I do direct OpenGL calls, mixed with OSG, right? Nope, I 
> am not doing that. Yes, I can imagine that that's tricky to do. 
> Everything is single threaded, single rendering context.
>
> thnx
> Raymond
>
>   
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Raymond
>> 
> de
>   
>> Vries
>> Sent: Wednesday, September 19, 2007 9:34 AM
>> To: OpenSceneGraph Users
>> Subject: Re: [osg-users] 'loosing' textures?
>>
>> Hi,
>>
>>   
>> 
>>> Glut is effectively only used for creating the rendering context at the 
>>> moment. From there on I use this rendering context in the .net controls. 
>>> Apart from that the usage is for historical reasons. I understand it 
>>> sounds strange but the glut functionality that I use right now is very 
>>> limited. And when I do use it, it is used as a kind of debugging window 
>>> instead of het .net control.
>>>
>>> Rewriting the whole thing is not an option right now, and I don't need 
>>> the full osgviewer functionality. I will try to use osg::GraphicsContext 
>>> so that I can take a step in the right direction.
>>>   
>>> 
>>>   
>> Ok, I guess this GraphicsContext is only to be used as part of the 
>> osgviewer, so this is not an option for me right now.
>>
>> More info, maybe this rings a bell: the textures only disappear after a 
>> few frames, when I use multiple windows (.net controls). Conceptually, I 
>> don't have a clue what's going on, all the windows have a view on the 
>> same scenegraph, using their own sceneview.
>>
>> thanks a lot for your time!
>> Raymond
>>
>>   
>> 
>>> best regards
>>> Raymond
>>>
>>>
>>> Robert Osfield wrote:
>>>   
>>> 
>>>   
>>>> Hi Raymond,
>>>>
>>>> I am perplexed why you'd want to use GLUT for any multiple window
>>>> work.  Why not just try the native windowing support.
>>>>
>>>> Robert.
>>>>
>>>> On 9/19/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>>>>   
>>>> 
>>>>   
>>>> 
>>>>> Hi Robert,
>>>>>
>>>>> Sure, I did not provide information for the complete solution. At this
>>>>> moment I was hoping that someone else was triggered by this and he or
>>>>> she did some extensive research on this. Appearantly I did trigger ;-)
>>>>>
>>>>> I will describe my situation here in detail:
>>>>>
>>>>> * osg 2.0.0 on Windows XP SP2, 1 monitor
>>>>> * 1 main freeglut window = 1 rendering context. Shared contexts is
>>>>>   enabled in freeglut since I intend to use only 1 rendering
>>>>>   
> context
>   
>>>>>   in order to preserve resources. This window exists during the
>>>>>   existence of the program and I hide it just after creation. I
>>>>>   don't draw this window.
>>>>> * Multiple other windows, mixed glut and .net controls. In the .net
>>>>>   control I create a so-called NativeWindow and get the current
>>>>>   context. This way I get the context f

Re: [osg-users] 'loosing' textures? = How to create a proper .osg file with multi-texturing?

2007-09-21 Thread Raymond de Vries

Hi Robert, good morning,

I fully understand your point of view about the osgViewer, and I support 
that. Actually, I've set up a test project to give it a try.


It seems that my problem has to do with my (hand-made) multi-textured 
models! So it seems that I am not handling the statesets properly... I 
created a multi-textured .osg file by hand, and I suspect that I forgot 
to set/change something. It looks ok when I load it in osgviewer and I 
don't see any errors reported by osgviewer (env var set to DEBUG_FP). 
Other models then this multi-textured plane loose their texture in this 
situation:

- 2 windows, each has its own sceneview
- sceneview's frustums are set so that the multi-textured plane is only 
visible in 1 sceneview
- it doesn't matter if the other models are in the viewing frustum of 
each window


This is how I created the multi-textured plane in .osg file format:
1) export a textured plane from 3dsmax
2) added the "textureUnit 1" section by copying from the "textureUnit 0" 
section
3) added the "TexCoordArray 1" section by copying from the 
"TexCoordArray 0" section

3) added "TexEnv" section
I tried to change the renderbin but it does not change anything.

Can someone please take a look at the attached model? Or point me to a 
properly multi-textured model in .osg format?


pfew, it's driving me nuts.

Thanks a lot for your time!
Raymond

Btw I'm now using osg 2.1.11 on WindowsXP, Visual Studio 2005 SP1


Robert Osfield wrote:

On 9/20/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
  

I know, it sounds that I'm doing strange things. But the opposite is
true. Well, I am stripping everything and see where it is. Eventually it
will be something small & stupid, as always ;-)



I'm afraid your set up is novel enough that others will only be clutch
at straws at what the issue.  One of the reasons for the new osgViewer
library is to pull a whole range of disparate usage models together
under one family of classes to avoid the issues of users rolling a lot
of functionality on their own as its almost impossible to remotely
support such bespoke configurations.

The OSG does support multiple graphics context just fine, but your
have to be careful about management of threads, contextIDs.  In the
case of 2.x it is more robust than ever in multi-threaded
multi-context role, and with osgViewer the vast majority of the
complexity of supporting these configurations is wrapped for you.

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


  


<><>MatrixTransform {
  DataVariance STATIC
  name "Scene Root"
  nodeMask 0xff
  cullingActive TRUE
  StateSet {
UniqueID StateSet_0
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
GL_LIGHTING ON
  }
  referenceFrame RELATIVE
  Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
  }
  num_children 1
  MatrixTransform {
DataVariance STATIC
name "Front"
nodeMask 0xff
cullingActive TRUE
referenceFrame RELATIVE
Matrix {
  1 0 0 0
  0 1 0 0
  0 0 1 0
  0 0 0 1
}
num_children 1
Geode {
  UniqueID Geode_1
  DataVariance STATIC
  nodeMask 0xff
  cullingActive TRUE
  num_drawables 1
  Geometry {
DataVariance DYNAMIC
StateSet {
  UniqueID StateSet_2
  DataVariance STATIC
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  GL_CULL_FACE ON
  GL_LIGHTING ON
  0xba1 ON
  Material {
DataVariance STATIC
ColorMode OFF
ambientColor 0.588235 0.588235 0.588235 1
diffuseColor 1 1 1 1
specularColor 0 0 0 1
emissionColor 0 0 0 1
shininess 0
  }
  textureUnit 0 {
GL_TEXTURE_2D ON
Texture2D {
  DataVariance STATIC
  file "LIMESTO1.jpg"
  wrap_s CLAMP_TO_EDGE
  wrap_t CLAMP_TO_EDGE
  wrap_r CLAMP_TO_EDGE
  min_filter LINEAR_MIPMAP_LINEAR
  mag_filter LINEAR
  maxAnisotropy 1
  borderColor 0 0 0 0
  borderWidth 0
  useHardwareMipMapGeneration TRUE
  unRefImageDataAfterApply FALSE
  internalFormatMode USE_IMAGE_DATA_FORMAT
  resizeNonPowerOfTwo TRUE
}
  }
textureUnit 1 {
GL_TEXTURE_2D ON
Texture2D {
DataVariance STATIC
file "checkerboard.png"
 

Re: [osg-users] 'loosing' textures? = How to create a proper .osg file with multi-texturing?

2007-09-21 Thread Raymond de Vries
Hi Robert,

> State the leaks out of one subgraph into the next is typically down to
> some geometry not having color or normal arrays attached to them when
> they need it, or in your case it could be that your are enabling the
> second texture unit for all the scene, but only defining tex coords
> for that texture unit for a small proportion of the scene.

Agreed, this makes sense, I had come up with this myself too. In the
scene, it looks as loosing textures, which is not really the case.

I assume that osg disables the texture units when no texture and/or
texture coordinates are set for these units, right? At the moment it seems
that there is a dependancy whether or not models are in the same frustum.

> BTW, if you want other people to try out your models its best to zip
> them all up together as copying and pasting text files is really error
> prone.

Ok.

I will dive into this deeper.

thanks again,
Raymond

>
> Robert.
>
> On 9/21/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>> Hi Robert, good morning,
>>
>> I fully understand your point of view about the osgViewer, and I support
>> that. Actually, I've set up a test project to give it a try.
>>
>> It seems that my problem has to do with my (hand-made) multi-textured
>> models! So it seems that I am not handling the statesets properly... I
>> created a multi-textured .osg file by hand, and I suspect that I forgot
>> to set/change something. It looks ok when I load it in osgviewer and I
>> don't see any errors reported by osgviewer (env var set to DEBUG_FP).
>> Other models then this multi-textured plane loose their texture in this
>> situation:
>> - 2 windows, each has its own sceneview
>> - sceneview's frustums are set so that the multi-textured plane is only
>> visible in 1 sceneview
>> - it doesn't matter if the other models are in the viewing frustum of
>> each window
>>
>> This is how I created the multi-textured plane in .osg file format:
>> 1) export a textured plane from 3dsmax
>> 2) added the "textureUnit 1" section by copying from the "textureUnit 0"
>> section
>> 3) added the "TexCoordArray 1" section by copying from the
>> "TexCoordArray 0" section
>> 3) added "TexEnv" section
>> I tried to change the renderbin but it does not change anything.
>>
>> Can someone please take a look at the attached model? Or point me to a
>> properly multi-textured model in .osg format?
>>
>> pfew, it's driving me nuts.
>>
>> Thanks a lot for your time!
>> Raymond
>>
>> Btw I'm now using osg 2.1.11 on WindowsXP, Visual Studio 2005 SP1
>>
>>
>> Robert Osfield wrote:
>> > On 9/20/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>> >
>> >> I know, it sounds that I'm doing strange things. But the opposite is
>> >> true. Well, I am stripping everything and see where it is. Eventually
>> it
>> >> will be something small & stupid, as always ;-)
>> >>
>> >
>> > I'm afraid your set up is novel enough that others will only be clutch
>> > at straws at what the issue.  One of the reasons for the new osgViewer
>> > library is to pull a whole range of disparate usage models together
>> > under one family of classes to avoid the issues of users rolling a lot
>> > of functionality on their own as its almost impossible to remotely
>> > support such bespoke configurations.
>> >
>> > The OSG does support multiple graphics context just fine, but your
>> > have to be careful about management of threads, contextIDs.  In the
>> > case of 2.x it is more robust than ever in multi-threaded
>> > multi-context role, and with osgViewer the vast majority of the
>> > complexity of supporting these configurations is wrapped for you.
>> >
>> > Robert.
>> > ___
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >
>> >
>> >
>>
>>
>> MatrixTransform {
>>   DataVariance STATIC
>>   name "Scene Root"
>>   nodeMask 0xff
>>   cullingActive TRUE
>>   StateSet {
>> UniqueID StateSet_0
>> DataVariance STATIC
>> rendering_hint DEFAULT_BIN
>> renderBinMode INHERIT
>> GL_LIGHTING ON
>>   }
>>   referenceFrame RELATIVE
>>   Matrix {
>> 1 0 0 0
>> 0 1 0 0
>> 0 0 

Re: [osg-users] glActiveTexture / glClientActiveTexture state changes

2007-10-27 Thread Raymond de Vries
Hi,

Recently I've discovered this as well, that in some circumstances (see 
the thread about 'loosing textures') texture unit 1 can be left active 
when 1 viewer is drawn, just prior to drawing a second viewer. And this 
can cause effects like I described. I don't know why this is done so.

What exactly did you change?

Best regards,
Raymond


DC Fennell wrote:
> Hello,
>  
> I am curious as to why OSG never resets glActiveTexture or 
> glClientActiveTexture back to GL_TEXTURE0 after usage. In my opinion, 
> this should always be done. Specifically since glClientActiveTexture 
> is set quite often in display lists.
>  
> As a test, I modified osg and osgUtil to reset these states back to 
> GL_TEXTURE0 after any usage of glActiveTexture and glClientActiveTexture.
>  
> With this change, all my known issues went away.
>  
> Was there a specific reason why these states are not reset? Or am I 
> just doing it wrong?
>  
> Thanks.
> 
>
> ___
> 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] Fixed (Threading mode causes texture mode trouble?) ( 'loosing' textures? = How to create a proper .osg file with multi-texturing?)

2007-10-27 Thread Raymond de Vries
Hi again,

The texture state 'leaking' was indeed the problem, I verified in my 
application (and various test applications). It is ok in single and 
multi threaded versions.

Ok, I've simplified State.cpp into:
bool State::setClientActiveTextureUnit( unsigned int unit )
{
  _glClientActiveTexture(GL_TEXTURE0+unit);
  _currentClientActiveTextureUnit = unit;
  return true;
}


/** set the current texture unit, return true if selected, false if 
selection failed such as when multitexturing is not supported.
  * note, only updates values that change.*/
bool State::setActiveTextureUnit( unsigned int unit )
{
  _glActiveTexture(GL_TEXTURE0+unit);
  _currentActiveTextureUnit = unit;
  return true;
}

and my problem is solved (of course both single and multi threaded). 
Verified with gDEBugger, for the multitextured geometry:
glGenLists(1)
glNewList(14, GL_COMPILE)
glVertexPointer(3, GL_FLOAT, 0, 0x19B2320)
glNormalPointer(GL_FLOAT, 0, 0x19B23A8)
glClientActiveTexture(GL_TEXTURE0)
glEnableClientState(GL_TEXTURE_COORD_ARRAY)
glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2BD8)
glClientActiveTexture(GL_TEXTURE1)
glEnableClientState(GL_TEXTURE_COORD_ARRAY)
glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2D38)
glDrawArrays(GL_TRIANGLES, 0, 6)
glEndList()

Robert, after all my application works fine in my (free)glut based, 
multi-window, program :-) So it had nothing to do with shared contexts 
issues in (free)glut.

Cheers
Raymond


Raymond de Vries wrote:
> Hi again,
>
> I think I've tracked down the problem with texturing a little further, 
> and put a demonstration of the error in an osgwindows-based example. 
> By setting the threading model to singlethreaded to the viewers in 
> this application one can see the difference as shown in the attached 
> screenshots.
>
> Could someone please give this small program a try and verify/confirm 
> the error that I am seeing?
>
> I think it has to do with the fact that glClientActiveTexture is not 
> explicitly set for unit 0 when a display list is created for geometry. 
> (see also the message from DC Fennel yesterday) E.g. this is typically 
> done for a multitextured geometry (log from gDEBugger):
> glGenLists(1)
> glNewList(14, GL_COMPILE)
> glVertexPointer(3, GL_FLOAT, 0, 0x19B2320)
> glNormalPointer(GL_FLOAT, 0, 0x19B23A8)
> glEnableClientState(GL_TEXTURE_COORD_ARRAY)
> glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2BD8)
> glClientActiveTexture(GL_TEXTURE1)
> glEnableClientState(GL_TEXTURE_COORD_ARRAY)
> glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2D38)
> glDrawArrays(GL_TRIANGLES, 0, 6)
> glEndList()
>
> Shouldn't glClientActiveTexture(GL_TEXTURE0) here be as well?
>
> I think this is typically not noticed since most applications are 
> multi-threaded by default, and geometry is properly sorted. In a 
> single threaded application texture states can be left in a wrong state.
>
> Thanks for your time, I would appreciate it when someone tries to 
> confirm this.
>
> best regards
> Raymond
>
>
>
> Raymond de Vries wrote:
>> Hi Robert,
>>
>>  
>>> State the leaks out of one subgraph into the next is typically down to
>>> some geometry not having color or normal arrays attached to them when
>>> they need it, or in your case it could be that your are enabling the
>>> second texture unit for all the scene, but only defining tex coords
>>> for that texture unit for a small proportion of the scene.
>>> 
>>
>> Agreed, this makes sense, I had come up with this myself too. In the
>> scene, it looks as loosing textures, which is not really the case.
>>
>> I assume that osg disables the texture units when no texture and/or
>> texture coordinates are set for these units, right? At the moment it 
>> seems
>> that there is a dependancy whether or not models are in the same 
>> frustum.
>>
>>  
>>> BTW, if you want other people to try out your models its best to zip
>>> them all up together as copying and pasting text files is really error
>>> prone.
>>> 
>>
>> Ok.
>>
>> I will dive into this deeper.
>>
>> thanks again,
>> Raymond
>>
>>  
>>> Robert.
>>>
>>> On 9/21/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>>>
>>>> Hi Robert, good morning,
>>>>
>>>> I fully understand your point of view about the osgViewer, and I 
>>>> support
>>>> that. Actually, I've set up a test project to give it a try.
>>>>
>>>> It seems that my problem has to do with my (hand-made) multi-textured
>>>> models! So it seems that I am not handling the statesets properly... I
>>>> created a mul

Re: [osg-users] Fixed (Threading mode causes texture mode trouble?) ( 'loosing' textures? = How to create a proper .osg file with multi-texturing?)

2007-10-27 Thread Raymond de Vries
Hi Robert,

Thanks for your answer. Of course my remark was not a bug fix, only a way
of showing how the rendering can be fixed, in a quick n dirty way.

I look forward to the moment that you have time to try the sample
yourself. I've seen other issues as well so it might indeed be a more
fundamental issue.

best regards
Raymond


> HI Raymond,
>
> Disabling lazy state updating isn't really a bug fix, rather its
> hiding a problem elsewhere - why the osg::State object is getting out
> of sync.  I can't answer this as I've not see the problem you are
> seeing first hand let alone tried to debug it.
>
> As osg::State is getting of sync then it could be more things that
> might come unstuck than just the client texture state.  It would be
> worth investigating why osg::State is getting out of sync.
>
> Robert.
>
> On 10/27/07, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>> Hi again,
>>
>> The texture state 'leaking' was indeed the problem, I verified in my
>> application (and various test applications). It is ok in single and
>> multi threaded versions.
>>
>> Ok, I've simplified State.cpp into:
>> bool State::setClientActiveTextureUnit( unsigned int unit )
>> {
>>   _glClientActiveTexture(GL_TEXTURE0+unit);
>>   _currentClientActiveTextureUnit = unit;
>>   return true;
>> }
>>
>>
>> /** set the current texture unit, return true if selected, false if
>> selection failed such as when multitexturing is not supported.
>>   * note, only updates values that change.*/
>> bool State::setActiveTextureUnit( unsigned int unit )
>> {
>>   _glActiveTexture(GL_TEXTURE0+unit);
>>   _currentActiveTextureUnit = unit;
>>   return true;
>> }
>>
>> and my problem is solved (of course both single and multi threaded).
>> Verified with gDEBugger, for the multitextured geometry:
>> glGenLists(1)
>> glNewList(14, GL_COMPILE)
>> glVertexPointer(3, GL_FLOAT, 0, 0x19B2320)
>> glNormalPointer(GL_FLOAT, 0, 0x19B23A8)
>> glClientActiveTexture(GL_TEXTURE0)
>> glEnableClientState(GL_TEXTURE_COORD_ARRAY)
>> glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2BD8)
>> glClientActiveTexture(GL_TEXTURE1)
>> glEnableClientState(GL_TEXTURE_COORD_ARRAY)
>> glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2D38)
>> glDrawArrays(GL_TRIANGLES, 0, 6)
>> glEndList()
>>
>> Robert, after all my application works fine in my (free)glut based,
>> multi-window, program :-) So it had nothing to do with shared contexts
>> issues in (free)glut.
>>
>> Cheers
>> Raymond
>>
>>
>> Raymond de Vries wrote:
>> > Hi again,
>> >
>> > I think I've tracked down the problem with texturing a little further,
>> > and put a demonstration of the error in an osgwindows-based example.
>> > By setting the threading model to singlethreaded to the viewers in
>> > this application one can see the difference as shown in the attached
>> > screenshots.
>> >
>> > Could someone please give this small program a try and verify/confirm
>> > the error that I am seeing?
>> >
>> > I think it has to do with the fact that glClientActiveTexture is not
>> > explicitly set for unit 0 when a display list is created for geometry.
>> > (see also the message from DC Fennel yesterday) E.g. this is typically
>> > done for a multitextured geometry (log from gDEBugger):
>> > glGenLists(1)
>> > glNewList(14, GL_COMPILE)
>> > glVertexPointer(3, GL_FLOAT, 0, 0x19B2320)
>> > glNormalPointer(GL_FLOAT, 0, 0x19B23A8)
>> > glEnableClientState(GL_TEXTURE_COORD_ARRAY)
>> > glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2BD8)
>> > glClientActiveTexture(GL_TEXTURE1)
>> > glEnableClientState(GL_TEXTURE_COORD_ARRAY)
>> > glTexCoordPointer(2, GL_FLOAT, 0, 0x19B2D38)
>> > glDrawArrays(GL_TRIANGLES, 0, 6)
>> > glEndList()
>> >
>> > Shouldn't glClientActiveTexture(GL_TEXTURE0) here be as well?
>> >
>> > I think this is typically not noticed since most applications are
>> > multi-threaded by default, and geometry is properly sorted. In a
>> > single threaded application texture states can be left in a wrong
>> state.
>> >
>> > Thanks for your time, I would appreciate it when someone tries to
>> > confirm this.
>> >
>> > best regards
>> > Raymond
>> >
>> >
>> >
>> > Raymond de Vries wrote:
>> >> Hi Robert,
>> >>
>> >>
>> >>> State the leaks out of

Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Raymond de Vries
Hi,

I have been reading (most of) your messages with great interest. Your work
might be interesting for a project in which I am involved so I would be
glad to help you. Unfortunately I am a newbie in raytracing
implementations so you need to guide me a little here and there.

Feel free to contact me offline too.

bye
Raymond


> So what's going on for the next month,
>
> Line Intersecting behaviour:
> (a) integrating the code into OSG
> (b) testing
> (c) optimising and so on
>
> is there some one how can support me? (not Robert, he is still really
> busy,
> isn't he?)
>
> Only for testing the kd-Tree implementation and it's speed:
> http://www.openscenegraph.org/projects/osg/wiki/RayTraced
>
> /adegli
>
> 2007/10/24, Jean-Sébastien Guay <[EMAIL PROTECTED]>:
>>
>> Hello Adrian,
>>
>> > i am working on a really general and fast implementation for reduce
>> the
>> > number of triangles checked against a line in LineSegement
>> Intersection
>> > Test.
>> > May question coming up while reviewing the OSG core implementation, i
>> am
>> not
>> > yet sure how and where i should implement this new feature. The
>> current
>> > implementation of KD-Tree is quite fast and could be included into the
>> osg
>> > core. are there some experience in line segement boosting?
>>
>> I would very much like to use your contribution, however it does not
>> seem Robert has time to guide you in integrating it for now. It would
>> therefore be very kind if you could help make it usable without
>> integrating it into the Core OSG.
>>
>> The code as it stands does not currently support transforms. Can you
>> help with that? I have never personally implemented a kd-tree
>> algorithm, so I do not know where this support of transforms needs to
>> be put in.
>>
>> I would really appreciate your help with this since in an example use
>> case, my current implementation with LineSegmentIntersector takes
>> about 2 minutes and with your kd-tree it takes about 11 seconds (with
>> bad results, but still promising).
>>
>> Thanks in advance,
>>
>> J-S
>> --
>> __
>> Jean-Sebastien Guay [EMAIL PROTECTED]
>>  http://whitestar02.webhop.org/
>>
>> 
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>> ___
>> 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


[osg-users] Documentation osgParticle::PrecipitationEffect?

2007-11-18 Thread Raymond de Vries
Hi everyone,

I am looking for documentation about the PrecipitationEffect but could 
not find it in the books nor on the website. Does anyone have background 
information that is used for the implementation?

Thanks a lot.

cheers,
Raymond

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


Re: [osg-users] Documentation osgParticle::PrecipitationEffect?

2007-11-19 Thread Raymond de Vries
Thanks for the info. That's too bad...

Bye
Raymond


Robert Osfield wrote:
> On Nov 19, 2007 7:56 AM, Raymond de Vries <[EMAIL PROTECTED]> wrote:
>   
>> Hi everyone,
>>
>> I am looking for documentation about the PrecipitationEffect but could
>> not find it in the books nor on the website. Does anyone have background
>> information that is used for the implementation?
>> 
>
> I'm afraid there is no background information beyond the osgpreciption 
> example.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>   

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


Re: [osg-users] PSSM fix, suggestion and questions

2008-01-02 Thread Raymond de Vries

Hi Adrian,

In a follow-up to my PSSM experience, I have adapted the osgshadow.cpp 
example so that the effect can be seen with simple shapes as well. I 
suspect that it is a math issue since the light direction and view 
direction are +/- orthogonal. But I don't know how to fix this (yet). 
Also, I think it's not the shadow texture generation itself since 
texture boundaries are not shown.


Please find my patches to the ParallelSplitShadowMap files and the 
stripped osgshadow example (there is no need for command line options or 
so, and I hardcoded it for nvidia) attached to this e-mail. Hopefully 
you know the solution to this issue.


btw this issue is present in 2.2.0 and svn.

bye
Raymond



Raymond de Vries wrote:

Hi,

I am using PSSM and are trying to find proper values. I am using osg 
2.2.0 on Windows XP (the PSSM svn version does not show any relevant 
changes), on an nvidia card.


First of all, I have fixed a small issue which prevented the use of 
dirty(), see the attached ParallelSplitShadowMap.cpp.diff. 
Furthermore, I would to suggest some small changes so that flags can 
be toggled, instead of only be set. See ParallelSplitShadowMap.diff


Also, I see an error. I am not sure what is causing this so I would 
like to ask your advice. It seems to me that the split frustums are 
not always calculated properly. As you can see in the attached images 
it seems to me that the split frustums are not always adjacent to 
eachother, when the view is rotated in a certain way.


Some values about the size of the world:
calculateFrustumCorners() zShadow0 0.161428
calculateLightNearFarFormFrustum(), zShadow0 near 2 far 47.147
calculateFrustumCorners() zShadow1 0.510139
calculateLightNearFarFormFrustum(), zShadow1 near 2 far 91.0805
calculateFrustumCorners() zShadow2 1
calculateLightNearFarFormFrustum(), zShadow2 near 2.1 far 152.797

I am new to PSSM so I am might still miss some things...

Thanks a lot already!
Raymond


btw changing the number of splits changes things but does not solve them
btw both linear and non linear mode expose this behaviour








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




PSSM_bug_report-20080101.rar
Description: Binary data
<>___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgShadow::ShadowMap not reacting to changes

2008-01-08 Thread Raymond de Vries
Hi J-S,

Can you try to use a ref pointer instead of the regular pointer for
"osg::Shader* shader". I believe I encountered exactly this issue when
working on the PSSM, please see a patch that I sent +/- a week ago.

The shader was not cleaned up in the case of PSSM, and hence the new one
was not created.

bye bye
Raymond


> Hello,
>
> I am using osgShadow::ShadowMap. Shadows show up fine, but I am trying
> to change shaders on it, and it doesn't react to my changes.
>
> I've even added this code to try some things out, in my frame loop:
>
>  static int f = 0;
>  if (f == 200)// After 200 frames
>  {
>  // sm is the osg::ref_ptr that is used.
>  float size = 4096;
>  sm->setTextureSize(osg::Vec2s(size, size));
>
>  sm->setAmbientBias(osg::Vec2(0.0, 0.0));
>
>  sm->clearShaderList();
>  osg::Shader* shader = new osg::Shader(osg::Shader::FRAGMENT);
>  shader->loadShaderSourceFromFile("shader.frag");//
> outputs red
>  sm->addShader(shader);
>
>  sm->dirty();
>  }
>  f++;
>
> Note that I am calling sm->dirty()... Out of those lines, only the
> change in texture size takes effect. The other two (change ambient
> bias to a value that should be very visible, and change shaders to one
> that outputs all red pixels) do not appear to take effect.
>
> If it makes a difference, we are using osgViewer::CompositeViewer. The
> scene graph is
>
> Group
>  Some osgText::Text objects
>  ShadowedScene
>  Group
>  The rest of the scene
>
> I have done the same thing in the osgShadow example, and the changes
> take effect! So I am wondering what would cause something like that.
>
> Any ideas?
>
> Thanks in advance,
>
> J-S
> --
> __
> Jean-Sebastien Guay [EMAIL PROTECTED]
>  http://whitestar02.webhop.org/
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ___
> 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] ScreenSpaceAmbientOcclusion

2008-12-18 Thread Raymond de Vries

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


Re: [osg-users] ScreenSpaceAmbientOcclusion

2008-12-19 Thread Raymond de Vries

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


[osg-users] Question: stateSet->setMode(GL_LIGHT0 + id, osg::StateAttribute::ON); for fixed functionality OpenGL only?

2008-12-23 Thread Raymond de Vries

Hi everyone,

First of all, merry christmas and a wonderful new year to all of you! 
All the best and health!


I have a small question to make sure that I understand the lighting 
properly. I am using GLSL to do my lighting and I would like to be 100% 
sure that the call

stateSet->setMode(GL_LIGHT0 + id, osg::StateAttribute::ON);
is not necessary for lighting with GLSL. I assume that this call is for 
fixed functionality OpenGL only, is this correct? Or is it used for 
other purposes too?


Thanks, cheers
Raymond

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


Re: [osg-users] Building VPB on Windows

2008-12-24 Thread Raymond de Vries

Hi,

You can also get prebuilt gdal from VTP (Virtual Terrain Project): 
http://www.vterrain.org/Distrib/win.html But when using these you might 
need to use the other dependancies from this page as well.


Best regards
Raymond



Ralf Stokholm wrote:

Hi Michael
 
For gdal on windows take a look at FWtools, it includes gdal and a lot 
of the plugins that you would have to build yourself.
 
Brgs.
 
Ralf Stokholm

www.arenalogic.com 

2008/12/24 christophe loustaunau >


Hi Michael,

Cmake can't fing gdal and osg on your system. /
/For gdal, you can find it here : http://www.gdal.org//
/For osg, you may have made an error with your Environment
variable.You could add your lib path to the Environment variable path.

Regards.


On Wed, Dec 24, 2008 at 6:16 AM, Michael W. Hall mailto:hal...@att.net>> wrote:

Attached you will find reported errors.

Michael


On Wed, 2008-12-24 at 00:58 +, Simon Hammett wrote:
> Well it's hard to give you any pointers if you don't supply
the error
> messages...
>
> 2008/12/23 Michael W. Hall mailto:hal...@att.net>>:
> > I just ran the configure utility.  I am getting errors
with CMake
> > configure.  Reports that a lot of the variables are set to
not found.
> >
> > Windows XP BTW and Visual Studio 2005.
> >
> > Michael
> >
> > On Tue, 2008-12-23 at 15:33 -0600, Michael W. Hall wrote:
> >> I am trying to build VPB on my Windows machine.  I get
about 64 errors.
> >> I got the 2.6 version of OSG and I got the latest VPB
from SVN.  This
> >> could be my problem.
> >>
> >> I created all the Environment variables (i.e. OSG_ROOT,
OSG_BIN_PATH,
> >> etc).  When I tried a rebuild, it failed with the same
errors.  Could
> >> someone put me on track?
> >>
> >> Thanks,
> >> Michael
> >>
> >> ___
> >> 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




-- 
Christophe Loustaunau.


___
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] Question: stateSet->setMode(GL_LIGHT0 + id, osg::StateAttribute::ON); for fixed functionality OpenGL only?

2008-12-28 Thread Raymond de Vries

Hi J-S,

Thanks for your detailed answer. Actually, I have been doing quite a lot 
of shader work and I wanted to be really sure about this. I was hunting 
a bug and therefore I was studying each line of code.


I was pretty sure that the GLSL is not affected by the attribute but I 
was wondering if the osg is using it for other purposes.


Btw I am testing for enabled or disabled lights by looking at the values 
of the light settings ambient, diffuse and specular. When these are 0, I 
skip the light. This way I don't need an extra uniform for 
enabled/disabled and it is easy to fall back to fixed functionality. 
Also, there is the GLSL variable gl_MaxLights in order to determine the 
no of lights. Apparantly, each OpenGL implementation is using 8 as the 
max, I have never seen another value... Have you?


Thanks for suggesting ShaderGen to generate the standard lighting 
shaders! I was not aware of this.


Cheers
Raymond


Jean-Sebastien Guay wrote:

Hello Raymond,

I have a small question to make sure that I understand the
lighting properly. I am using GLSL to do my lighting and I would
like to be 100% sure that the call
stateSet->setMode(GL_LIGHT0 + id, osg::StateAttribute::ON);
is not necessary for lighting with GLSL. I assume that this call
is for fixed functionality OpenGL only, is this correct? Or is it
used for other purposes too?


You're totally right. When using shaders, you'll need to maintain an 
integer count of the number of enabled lights (if you take care to 
always group all your enabled lights together from 0) or a bool array 
of the state of lights (8 booleans, to say if light at index i [0..7] 
is enabled or not).


Then in your shader you need to loop from 0 to 7, check if light i is 
enabled, and do the appropriate calculations depending on light type 
for that light source.


Or you can do it in some other way, that's just the classic way to 
emulate the fixed pipeline.


On this site: http://www.mew.cx/glsl/  you can find a tool called 
"ShaderGen" which lets you play with the different features of the 
fixed pipeline, and then generates shaders that emulate those 
features. You can do some various hand-optimizations afterwards, but 
it's a good starting point if you want to see what it looks like.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com 


   http://whitestar02.webhop.org/


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


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


[osg-users] NewSight display, information anyone?

2009-01-05 Thread Raymond de Vries
Hi everyone,

I was wondering if someone has experience with using OSG or OpenGL with a
NewSight display (http://www.newsight.com/3d-products/displays.html)? Or
else does anyone have any documentation for using these displays? I don't
have such a display in my office yet so I can not yet try the current
stereo modes in osg, that's the reason why I am asking this now.

Thanks a lot already.

Best regards
Raymond

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


Re: [osg-users] Disabling VSYNC

2009-01-13 Thread Raymond de Vries

Hi MS? Xam?

I have some code for you that I used some time ago, but I don't know the 
details anymore. Hopefully it gives you some pointers in the right 
direction.


bool SetVSync(bool enabled) {
 if(!wglewIsSupported("WGL_EXT_swap_control")) {
   std::cout << "VSync is not supported\n";
   return false;
 }

 int swapInterval = wglGetSwapIntervalEXT();
 std::cout << "Current swap interval: " << swapInterval << std::endl;

 if(enabled) {
   // assuming display with 1 frame per swap
   wglSwapIntervalEXT(1);
 }
 else {
   // value of 0 = buffer swaps are not synchronized to a video frame
   wglSwapIntervalEXT(0);
 }

 return true;
}

Hope this helps.

Regards
Raymond


Xam wrote:

Is there any way to disable VSYNC inside OSG?

I need a way to enable and disable vsync on my program with out using the nvidia driver override or environmental variables. The Nvidia Driver settings for Vsync should be set to "Use the 3D application setting" 
I seem to remember that i was able to do that in previous versions of OSG when i was still using producer, I remember getting fps in the hundreds, but now i only get what ever my screen refresh rate is. After the removal of producer, i lost the ability to have vsync control. 


Any help would be appreciated,

MS

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





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


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


Re: [osg-users] ANN: OSG Training in Washington DC

2009-01-21 Thread Raymond de Vries

Hi Paul,

A related question: do you have any plans to come to Europe any time soon?

Best regards
Raymond


Paul Martz wrote:
Hi all -- I'm pleased to announce that registration is now open for 
our next public OSG training course, to be held in Washington DC, 
March 9-12, 2009.
 
To view course information and register online, please visit:

http://www.skew-matrix.com/training.html
 
Register before February 9 for all three courses and receive a $440 
discount!
 
Hope to see you in DC.
 
Paul Martz

*Skew Matrix Software LLC*
http://www.skew-matrix.com 
+1 303 859 9466
 



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


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


Re: [osg-users] OpenSceneGraph-2.8.0 release - adds character animation, volume rendering and much more!

2009-02-12 Thread Raymond de Vries

Hi,

Congrats with this milestone!

Regards
Raymond




Robert Osfield wrote:

Hi All,

I am delighted to announce the long hours of testing and refinement
are over, I have just tagged the 2.8.0 release ;-)

Downloads page:

http://www.openscenegraph.org/projects/osg/wiki/Downloads

News page:

http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG2.8

Many many thanks to all those have put long hours developing new
features,conducting testing and debugging.  I'm confident this is the
highest quality release we've ever done.

Have fun!
Robert.

--  From the News page.

PERTHSHIRE, Scotland - 12th February 2009 - OpenSceneGraph
Professional Services announces the release of OpenSceneGraph 2.8, the
industry's leading open-source scene graph technology, designed to
accelerate application development and improve 3D graphics
performance. OpenSceneGraph 2.8 written entirely in Standard C++ and
built upon OpenGL, offers developers working in the visual simulation,
game development, virtual reality, scientific visualization and
modeling markets - a real-time visualization tool which eclipses
commercial scene graph toolkits in functionality, stability and
performance. OpenSceneGraph 2.8 runs on all Microsoft Windows
platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and
FreeBSD operating systems.
Open-source development delivers industry-leading features and performance ¶

The OpenSceneGraph 2.8 release is the culmination of 10 years of work
by the lead developers and the open-source community that has grown up
around the project. The real-time graphics industry and academia
embraced it from the very beginning, deploying it in real-world
applications, and actively participating in its development, testing
and refinement. The end result is a high-quality library with a
feature set relevant to application developers' needs.
Updates include: ¶

* New osgVolume library for volume rendering, with support for:
  o High quality GPU based Ray tracing
  o Transfer functions
  o Per pixel lighting
  o Iso surface rendering
  o Maximum Intensity Projection rendering
  o Non-power-of-two 3D textures, and 3D texture compression
  o DICOM loading for reading dicom medical data
* New osgAnimation library for character and scene animation.
* New plugin for reading Biovision hierarchical files (.BVH) to
generate character motion animations.
* New osgShadow support for Light Space Perspective Shadow Maps.
* Three new scene graph widgets for placing traditional 2D
capability into fully interactive 3D scenes:
  o PDF widget (based on libPoppler)
  o VNC client widget (based on libVNCServer)
  o Internet browser client widget (based on Gecko/UBrowser)
* New plugins for loading Half-Life 2 maps and models.
* New plugin for loaded EXR, high dynamic range imagery
* Improvements to DatabasePager, tailored for low latency paging.
* Improved run-time stats collection and on screen reporting.
* Performance improvements through optimization of matrix operations.
* Support for the OpenGL "draw instanced" extension.
* Support for zlib compressed native .ive and .gz files
* Improvements to COLLADA support.
* Build reporting using CDash
* New packaging support using CPack
* A wide range of build and bug fixes

Downloads and Licensing ¶

OpenSceneGraph is open-source, so full source code is provided, and
can be copied, modified and used free of charge for commercial and
non-commercial use. Access to the source allows end users greater
flexibility in how they develop, debug and deploy their applications.
They gain productivity and freedom by being able to leverage the tool
chain in accordance with their own release cycles. Downloads of
binaries and source can be found in the Downloads section of the
openscenegraph.org website.

OpenSceneGraph is released under the OpenSceneGraph Public License,
which is based on the Lesser GNU Public License (LGPL), permitting the
software to be used free of charge across the full spectrum of
commercial and open-source applications. Furthermore, it allows both
static and dynamic linking of the OpenSceneGraph libraries without
restricting the licensing of the user's software.
OpenSceneGraph Books now available ¶

The OpenSceneGraph Quick Start Guide is now available in Chinese as
well as English, and alongside the Reference Manual, books can be
found at OsgBooks.
Professional support and services ¶

OpenSceneGraph project is backed up with professional services by
OpenSceneGraph Professional Services, based in Scotland, and
Skew-Matrix and Blue-Newt Software both based in the USA, and a range
of Contractors from around the world. Services available include:

* Confidential Professional Support
* Bespoke development
* Consultancy
* Training

Community support and contributions ¶

The diverse and growing community of over 1900 developer

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

2009-02-24 Thread Raymond de Vries

Hi everyone,

Just wanted to let you know that I am following this thread with 
interest, and that I will certainly consider to join. I did not vote 
because I don't have an explicit favourite, it would not make sense to 
add another city in my country (Netherlands). Could there be another 
option like "Don't care about the city, I want to join", that way we can 
count the number of interested people.


Regards
Raymond



Art Tevs wrote:

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
  


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


Re: [osg-users] terrain database popping...

2009-04-14 Thread Raymond de Vries

Hi,

Chris 'Xenon' Hanson wrote:

Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote:
  

Thanks for the input. I'm somewhat familiar with VTP but not with libmini. I'll 
poke around to get more info...



  Libmini is one of the lower-level APIs VTP uses. VTP is certainly a good base 
to build a
geosimulation app on, depending on your requirements. You can try to stick 
libmini into
plain OSG as well, but VTP already has done the integration for you.
  
I think this is not entirely true. I believe they have integrated it 
into VTP but not with OSG. There was a VTP thread about this some time ago.


good luck
Raymond

  

-Shayne



  


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


Re: [osg-users] render depth buffer to image for one time

2009-05-15 Thread Raymond de Vries

Hi,

I think you should use GL_LUMINANCE instead of GL_RGBA too.

Best regards
Raymond


Johannes Leidheiser wrote:

Hi Max,
I think you should use _depth->allocateImage(vec->x(), vec->y(), 1, GL_RGBA, GL_UNSIGNED_BYTE); instead of GL_INT because the color buffer of your graphics card has 8 bit per color channel. 


Regards,
jojo

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





___
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] render depth buffer to image for one time

2009-05-15 Thread Raymond de Vries

Hi Johannes,

Uhm, it's a little confusing who you are addressing with 'you'. You do 
that twice and I think you mean 2 different people...


Anyway, I was trying to help in another direction. I have indeed used 
GL_LUMINANCE for grabbing depth images. I guess I was mislead somehow by 
the subject of the message, as well as the lack of context because the 
history is not in the messages.


good luck
Raymond


Johannes Leidheiser wrote:

GL_LUMINANCE is for gray scale images. For example if you want to save the 
depth buffer.
Besides you should post a little bit more code. I don't know how much 
experience your have with open scene graph. Maybe you didn't call the frame() 
method of your viewer, the camera is not attached to a node or maybe there is 
just nothing to see in the viewing frustum?
Did you display the camera normaly which means with turned off offscreen 
rendering?

Regards,
Johannes

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





___
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] Q: how do I render an object only to the depth buffer, not to the color buffer?

2009-05-15 Thread Raymond de Vries

Hi everyone,

I've searched the mailing list but could not find an answer or clue for 
the solution to my problem.


In principle, the issue seems simple to me but I find it hard to come up 
with an OSG solution. I would like to start my rendering with an object 
that does write to the depth buffer but does not write to the color 
buffer. I expect that I need to do something about the color mask but 
that is a camera setting.


Can anyone point me in the right direction?

Thanks a lot, best regards
Raymond

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


Re: [osg-users] Q: how do I render an object only to the depth buffer, not to the color buffer?

2009-05-18 Thread Raymond de Vries

Hi Robert,

I thought it would be that simple, couldn't find it in the code though. 
Thanks!


regards
Raymond


Robert Osfield wrote:

HI Raymond,

You simple disable the writes to the colour buffer using the
osg::ColorMask StateAttribute.

Robert.

On Fri, May 15, 2009 at 3:33 PM, Raymond de Vries  wrote:
  

Hi everyone,

I've searched the mailing list but could not find an answer or clue for the
solution to my problem.

In principle, the issue seems simple to me but I find it hard to come up
with an OSG solution. I would like to start my rendering with an object that
does write to the depth buffer but does not write to the color buffer. I
expect that I need to do something about the color mask but that is a camera
setting.

Can anyone point me in the right direction?

Thanks a lot, best regards
Raymond

___
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] Which library to use for good looking HUDs? osgPango? osgWidget?

2010-01-26 Thread Raymond de Vries

Hi everyone,

I am about to start working on HUDs for my application and I wonder 
which library/libraries I should use these days. My HUDs need to display 
text, textures, lines, etc (not completely decided yet). Some time ago, 
I have seen nice results with osgPango. Is that still the best way to go 
w.r.t. good looking HUDs? Or should I use osgWidget?


If possible, I need to stick with osg 2.2.0. So that makes osgWidget a 
bit problematic, I guess. Also, I remember that J-S had osgPango running 
on Windows, but it was problematic?!


So I prefer to use osg 2.2.0 on Windows, using Visual Studio 2008.

Any hints are welcome, thanks a lot,
Raymond

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


Re: [osg-users] how can I query the max number of textures supported by the hardware?

2010-01-28 Thread Raymond de Vries

Hi Nick,

Wouldn't that be via   glGetIntegerv(GL_MAX_TEXTURE_UNITS, &intval) ?

Don't know how that's wrapped in the OSG...

Cheers
Raymond


Trajce Nikolov wrote:

Thanks :)
Nick

http://www.linkedin.com/in/tnick


___
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] osgmovie with ffmpeg plugin on Windows 7: runs fine in debug mode, crashes in release mode?!?

2010-01-28 Thread Raymond de Vries

Hi everyone,

I tried the ffmpeg plugin with osgmovie under windows 7, and I got an 
odd thing: debug mode runs fine but release mode crashes?! I am using 
ffmpeg-r16537-gpl-lshared-win32.tar.bz2 
 
from ffmpeg.arrozcru.org, everything built from scratch with Visual 
Studio 2008 SP1.


Did anyone succeed in this?

Thanks a lot, best regards
Raymond

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


Re: [osg-users] osgmovie with ffmpeg plugin on Windows 7: runs fine in debug mode, crashes in release mode?!?

2010-01-28 Thread Raymond de Vries

Hi J-S,

First of all, what I forgot to say, is that the ffmpeg plugin works 
really nice (when it plays ;) ). Thanks to everyone who put so much 
energy into it!


I've also tried ffmpeg-r15261, that's the version I started with :-P. 
Indeed I've never had problems with the ffmpeg libs.


I'm pretty sure that it crashes somewhere in the SDL Audio part... What 
version of SDL do you use? I use 1.2.13 that I built myself (there is no 
pre-built one for VS2008). And also, how do you make sure that the OSG 
CMake finds SDL. I have trouble to let CMake (2.6 patch 4) find SDL 
automatically (by settings SDLDIR) and therefore I put osgmovie together 
in a fresh project, with hardcoded SDL.


I see that SDL 1.2.14 is also there, I will give that a try too.

Thanks
Raymond





Jean-Sébastien Guay wrote:

Hi Raymond,


Did anyone succeed in this?


I'm using VC2005SP1, and precompiled ffmpeg downloaded as 
"ffmpeg-r15261.zip" from somewhere (I can't remember where) and it 
works fine in both release and debug. There shouldn't be any problems 
about C++ runtime and using debug libs in release libs for the ffmpeg 
libs, because they're C only IIRC.


Not sure what the problem might be in your case. Sorry.

J-S



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


Re: [osg-users] osgmovie with ffmpeg plugin on Windows 7: runs fine in debug mode, crashes in release mode?!?

2010-01-28 Thread Raymond de Vries

Hi,

I'm pretty sure that it crashes somewhere in the SDL Audio part... 
What version of SDL do you use? 


There's a difference between our use of osgmovie/ffmpeg plugin, I've 
never used it with audio. All I can say is try other versions, or 
compile SDL yourself?
Aha, the audio is given me the trouble. Without audio it works like a 
charm. I did compile SDL myself, and indeed I will try other versions.
You might also be able to compile OSG and SDL in Release with Debug 
info, which might help trace the crash.
Hmm, that's interesting, never used that combination. Do you know how I 
enable Debug info for Release mode?

Sorry I can't help more.

But you are, with your tips :-)

Regards
Raymond



J-S


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


Re: [osg-users] osgmovie with ffmpeg plugin on Windows 7: runs fine in debug mode, crashes in release mode?!?

2010-01-28 Thread Raymond de Vries

Hi J-S,

Hmm, that's interesting, never used that combination. Do you know how 
I enable Debug info for Release mode?


When building OSG, after generating the project files with CMake, if 
you open the solution file you'll see "RelWithDebInfo" as one of the 
available configurations.


For other projects, you can do it manually by enabling debug symbols 
in the C/C++ section of the project options, and enabling debugging in 
the Linker section, for a release build.


I should note that you'll probably get weird results from breakpoints 
and checking the values of variables (because of compiler optimization 
in release mode). You can disable optimization but the crash might 
only happen when optimization is at a certain setting... So it's not 
perfect but might help you get closer to the bug.
Ok, thanks for this info. I know about the optimizations... I will look 
into it.


When something crashes in release but not in debug, it's often an 
uninitialized variable or something like that. Since the debug builds 
generally protect you more (initializing variables to known values for 
example) this sometimes hides bugs that only happen in release.
Yup, indeed, a lot of times (always?) the compiler initializes 
parameters to 0 in debug mode.


I've seen, on another machine on which it crashed in both debug and 
release mode, that it has to do with the mutex and such. I don't recall 
the actual location but it seemed to me that the OSG thread 
functionality and the SDL functionality were 'fighting' somehow...


In the mean time I've tried with that latest version SDL 1.2.14 but 
still the same result.


cheers
Raymond



Hope this helps,

J-S


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


[osg-users] website down?

2010-01-29 Thread Raymond de Vries

Hi everyone,

Fyi: I just noticed that www.openscenegraph.org is down...

regards
Raymond

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


[osg-users] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-03 Thread Raymond de Vries

Hi, most likely Cedric and/or Jason (Beverage),

I would like to try out your directshow plugin in svn, and now I am in 
the process of building the BaseClasses of the windows platform sdk. 
Although I've searched the net and the platform sdk docs, I cannot see 
how I can produce a release version of the BaseClasses (the debug 
version is built properly, so it seems). Can anymore please give me some 
advice how to do that? Cedric? Jason?


I am using Microsoft DirectX SDK (August 2007) and Microsoft Platform 
SDK for Windows Server 2003 R2, using Visual Studio 2008. I tried to 
build the strmbase.lib by running nmake in the Visual Studio command 
prompt but then it only builds the debug version. Should I hack the 
makefile or is there another way?


Thanks a lot already, cheers
Raymond

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


Re: [osg-users] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-03 Thread Raymond de Vries

Hi guys,

First of all, thanks a lot for your quick reply! As it turned out, I 
also had a more recent platform sdk on my system (win vista). Out of 
habit I just installed the older one on each system I develop on... And 
I had build the baseclasses once (long time ago) using the makefile...


Thanks for your advice. I just built the BaseClasses and now building 
osg svn, including directshow :-) Finders crossed...


I will try out the windows 7 sdk on my windows 7 machine soon too.

Jason, ok, I understand it. Indeed I found your message from a while 
ago. I only saw Cedric's name in the cmake module, so that's why I 
thought you joined efforts. So thanks Cedric!


One more thing for now: do I have (easy) access to the 'current image' 
via the plugin?


I will let you know how it goes...

Cheers
Raymond



Jason Beverage wrote:

Hi Raymond,

Just wanted to give credit to Cedric for the osg DirectShow plugin, I
had sent out an email quite awhile about about public interest in an
open sourced Direct Show plugin but never got around to releasing one.
 Kudos to Cedric for beating me to the punch :)

Thanks,

Jason

On Wed, Feb 3, 2010 at 11:58 AM, Trajce Nikolov
 wrote:
  

the latest windows sdk has the project files for all the configuration.
build against it
Nick

http://www.linkedin.com/in/tnick


On Wed, Feb 3, 2010 at 6:44 PM, Raymond de Vries  wrote:


Hi, most likely Cedric and/or Jason (Beverage),

I would like to try out your directshow plugin in svn, and now I am in the
process of building the BaseClasses of the windows platform sdk. Although
I've searched the net and the platform sdk docs, I cannot see how I can
produce a release version of the BaseClasses (the debug version is built
properly, so it seems). Can anymore please give me some advice how to do
that? Cedric? Jason?

I am using Microsoft DirectX SDK (August 2007) and Microsoft Platform SDK
for Windows Server 2003 R2, using Visual Studio 2008. I tried to build the
strmbase.lib by running nmake in the Visual Studio command prompt but then
it only builds the debug version. Should I hack the makefile or is there
another way?

Thanks a lot already, cheers
Raymond

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

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




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


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


Re: [osg-users] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-03 Thread Raymond de Vries

Hi,

Ok, nice to hear. Which version of directx are you using? My directshow 
build on Vista, using directx August 2007, resulted in a missing symbol...


Cheers
Raymond


Serge Lages wrote:

I am working on Windows 7 and it works like a charm with the Win7 SDK.

On Wed, Feb 3, 2010 at 6:49 PM, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


Hi guys,

First of all, thanks a lot for your quick reply! As it turned out,
I also had a more recent platform sdk on my system (win vista).
Out of habit I just installed the older one on each system I
develop on... And I had build the baseclasses once (long time ago)
using the makefile...

Thanks for your advice. I just built the BaseClasses and now
building osg svn, including directshow :-) Finders crossed...

I will try out the windows 7 sdk on my windows 7 machine soon too.

Jason, ok, I understand it. Indeed I found your message from a
while ago. I only saw Cedric's name in the cmake module, so that's
why I thought you joined efforts. So thanks Cedric!

One more thing for now: do I have (easy) access to the 'current
image' via the plugin?

I will let you know how it goes...

Cheers
Raymond




Jason Beverage wrote:

Hi Raymond,

Just wanted to give credit to Cedric for the osg DirectShow
plugin, I
had sent out an email quite awhile about about public interest
in an
open sourced Direct Show plugin but never got around to
releasing one.
 Kudos to Cedric for beating me to the punch :)

Thanks,

Jason

On Wed, Feb 3, 2010 at 11:58 AM, Trajce Nikolov
mailto:nikolov.tra...@gmail.com>>
wrote:
 


the latest windows sdk has the project files for all the
configuration.
build against it
Nick

http://www.linkedin.com/in/tnick


    On Wed, Feb 3, 2010 at 6:44 PM, Raymond de Vries
mailto:ree...@xs4all.nl>> wrote:
   


Hi, most likely Cedric and/or Jason (Beverage),

I would like to try out your directshow plugin in svn,
and now I am in the
process of building the BaseClasses of the windows
platform sdk. Although
I've searched the net and the platform sdk docs, I
cannot see how I can
produce a release version of the BaseClasses (the
debug version is built
properly, so it seems). Can anymore please give me
some advice how to do
that? Cedric? Jason?

I am using Microsoft DirectX SDK (August 2007) and
Microsoft Platform SDK
for Windows Server 2003 R2, using Visual Studio 2008.
I tried to build the
strmbase.lib by running nmake in the Visual Studio
command prompt but then
it only builds the debug version. Should I hack the
makefile or is there
another way?

Thanks a lot already, cheers
Raymond

___
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


   


___
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




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


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


Re: [osg-users] Which library to use for good looking HUDs? osgPango? osgWidget?

2010-02-03 Thread Raymond de Vries

Hi Patrick,

Thanks for the confirmation.

Cheers, have fun
Raymond


Patrick Pelletier wrote:

Hi,

I'm currently using osgWidget for OSG 2.6.0. All I can say that I like it since 
I can't speak for osgPango because I haven't used it yet. osgWidget works 
without a hitch on Windows.

... 


Thank you!

Cheers,
Patrick

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





___
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] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-04 Thread Raymond de Vries

Hi guys,

I would like to say a big 'thank you' for this nice plugin. After quite 
some time installing SDKs and building I got the plugin working :-)
For the record: I did this on Windows Vista 32 bit, Visual Studio 2008, 
Microsoft DirectX SDK (August 2009) and Windows SDK v6.0.


Cheers
Raymond



Serge Lages wrote:

I think it's one of the latest :
Microsoft DirectX SDK (August 2009)

On Wed, Feb 3, 2010 at 7:03 PM, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


Hi,

Ok, nice to hear. Which version of directx are you using? My
directshow build on Vista, using directx August 2007, resulted in
a missing symbol...

Cheers
Raymond


Serge Lages wrote:

I am working on Windows 7 and it works like a charm with the
Win7 SDK.

On Wed, Feb 3, 2010 at 6:49 PM, Raymond de Vries
mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>> wrote:

   Hi guys,

   First of all, thanks a lot for your quick reply! As it
turned out,
   I also had a more recent platform sdk on my system (win vista).
   Out of habit I just installed the older one on each system I
   develop on... And I had build the baseclasses once (long
time ago)
   using the makefile...

   Thanks for your advice. I just built the BaseClasses and now
   building osg svn, including directshow :-) Finders crossed...

   I will try out the windows 7 sdk on my windows 7 machine
soon too.

   Jason, ok, I understand it. Indeed I found your message from a
   while ago. I only saw Cedric's name in the cmake module, so
that's
   why I thought you joined efforts. So thanks Cedric!

   One more thing for now: do I have (easy) access to the 'current
   image' via the plugin?

   I will let you know how it goes...

   Cheers
   Raymond




   Jason Beverage wrote:

   Hi Raymond,

   Just wanted to give credit to Cedric for the osg DirectShow
   plugin, I
   had sent out an email quite awhile about about public
interest
   in an
   open sourced Direct Show plugin but never got around to
   releasing one.
Kudos to Cedric for beating me to the punch :)

   Thanks,

   Jason

   On Wed, Feb 3, 2010 at 11:58 AM, Trajce Nikolov
   mailto:nikolov.tra...@gmail.com>
<mailto:nikolov.tra...@gmail.com
<mailto:nikolov.tra...@gmail.com>>>

   wrote:
   
   the latest windows sdk has the project files for

all the
   configuration.
   build against it
   Nick

   http://www.linkedin.com/in/tnick


   On Wed, Feb 3, 2010 at 6:44 PM, Raymond de Vries
   mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>> wrote:
 
   Hi, most likely Cedric and/or Jason (Beverage),


   I would like to try out your directshow plugin
in svn,
   and now I am in the
   process of building the BaseClasses of the windows
   platform sdk. Although
   I've searched the net and the platform sdk docs, I
   cannot see how I can
   produce a release version of the BaseClasses (the
   debug version is built
   properly, so it seems). Can anymore please give me
   some advice how to do
   that? Cedric? Jason?

   I am using Microsoft DirectX SDK (August 2007) and
   Microsoft Platform SDK
   for Windows Server 2003 R2, using Visual Studio
2008.
   I tried to build the
   strmbase.lib by running nmake in the Visual Studio
   command prompt but then
   it only builds the debug version. Should I hack the
   makefile or is there
   another way?

   Thanks a lot already, cheers
   Raymond

   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
<mailto:osg-users@lists.openscenegraph.org>
   <mailto:osg-users@lists.openscenegraph.org
<mailto:osg-users@lists.openscenegr

Re: [osg-users] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-05 Thread Raymond de Vries

Hi,

That's very cool, congrats! Btw are the other presentations also made 
with the osg? Like "Mur de médias"?


cheers
Raymond



Serge Lages wrote:
And you can be sure that this plugin works like a charm, we're using 
it with 4 live streams everyday in a live TV show and we never had any 
problem ! ;)


http://www.tharsis-software.com/1-29972-Realisation.php

On Thu, Feb 4, 2010 at 6:56 PM, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


Hi guys,

I would like to say a big 'thank you' for this nice plugin. After
quite some time installing SDKs and building I got the plugin
working :-)
For the record: I did this on Windows Vista 32 bit, Visual Studio
2008, Microsoft DirectX SDK (August 2009) and Windows SDK v6.0.


Cheers
Raymond



Serge Lages wrote:

I think it's one of the latest :
Microsoft DirectX SDK (August 2009)

        On Wed, Feb 3, 2010 at 7:03 PM, Raymond de Vries
mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>> wrote:

   Hi,

   Ok, nice to hear. Which version of directx are you using? My
   directshow build on Vista, using directx August 2007,
resulted in
   a missing symbol...

   Cheers
   Raymond


   Serge Lages wrote:

   I am working on Windows 7 and it works like a charm
with the
   Win7 SDK.

   On Wed, Feb 3, 2010 at 6:49 PM, Raymond de Vries
   mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>> wrote:

  Hi guys,

  First of all, thanks a lot for your quick reply! As it
   turned out,
  I also had a more recent platform sdk on my system
(win vista).
  Out of habit I just installed the older one on each
system I
  develop on... And I had build the baseclasses once (long
   time ago)
  using the makefile...

  Thanks for your advice. I just built the BaseClasses
and now
  building osg svn, including directshow :-) Finders
crossed...

  I will try out the windows 7 sdk on my windows 7 machine
   soon too.

  Jason, ok, I understand it. Indeed I found your
message from a
  while ago. I only saw Cedric's name in the cmake
module, so
   that's
  why I thought you joined efforts. So thanks Cedric!

  One more thing for now: do I have (easy) access to
the 'current
  image' via the plugin?

  I will let you know how it goes...

  Cheers
  Raymond




  Jason Beverage wrote:

  Hi Raymond,

  Just wanted to give credit to Cedric for the osg
DirectShow
  plugin, I
  had sent out an email quite awhile about about
public
   interest
  in an
  open sourced Direct Show plugin but never got
around to
  releasing one.
   Kudos to Cedric for beating me to the punch :)

  Thanks,

  Jason

  On Wed, Feb 3, 2010 at 11:58 AM, Trajce Nikolov
  mailto:nikolov.tra...@gmail.com>
   <mailto:nikolov.tra...@gmail.com
<mailto:nikolov.tra...@gmail.com>>
   <mailto:nikolov.tra...@gmail.com
<mailto:nikolov.tra...@gmail.com>
   <mailto:nikolov.tra...@gmail.com
<mailto:nikolov.tra...@gmail.com>>>>

  wrote:
the latest windows sdk has the
project files for
   all the
  configuration.
  build against it
  Nick

  http://www.linkedin.com/in/tnick


  On Wed, Feb 3, 2010 at 6:44 PM, Raymond de Vries
  mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>> wrote:
  Hi, most likely
Cedric and/or Jason (Beverage),

  I would like to try out your directshow
   

Re: [osg-users] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-05 Thread Raymond de Vries

hmm, sweet. Incl multitouch :-)

Btw how do you do streaming with directshow? What do you use as server? 
Do you use a standard streaming protocol, or a custom one?
Btw2 how do I get the current image from the directshow? Do I need to 
get it from the texture, or is it possible to get it 'more low-level'? 
'more low-level is most likely better performing..


thnx for your thoughts
Raymond


Serge Lages wrote:

Yes everything you can see on our website is OSG based ! ;)

On Fri, Feb 5, 2010 at 5:39 PM, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


Hi,

That's very cool, congrats! Btw are the other presentations also
made with the osg? Like "Mur de médias"?

cheers
Raymond



Serge Lages wrote:

And you can be sure that this plugin works like a charm, we're
using it with 4 live streams everyday in a live TV show and we
never had any problem ! ;)

http://www.tharsis-software.com/1-29972-Realisation.php

        On Thu, Feb 4, 2010 at 6:56 PM, Raymond de Vries
mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>> wrote:

   Hi guys,

   I would like to say a big 'thank you' for this nice plugin.
After
   quite some time installing SDKs and building I got the plugin
   working :-)
   For the record: I did this on Windows Vista 32 bit, Visual
Studio
   2008, Microsoft DirectX SDK (August 2009) and Windows SDK v6.0.


   Cheers
   Raymond



   Serge Lages wrote:

   I think it's one of the latest :
   Microsoft DirectX SDK (August 2009)

   On Wed, Feb 3, 2010 at 7:03 PM, Raymond de Vries
   mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>> wrote:

  Hi,

  Ok, nice to hear. Which version of directx are you
using? My
  directshow build on Vista, using directx August 2007,
   resulted in
  a missing symbol...

  Cheers
  Raymond


  Serge Lages wrote:

  I am working on Windows 7 and it works like a charm
       with the
  Win7 SDK.

  On Wed, Feb 3, 2010 at 6:49 PM, Raymond de Vries
  mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>
  <mailto:ree...@xs4all.nl
<mailto:ree...@xs4all.nl> <mailto:ree...@xs4all.nl
<mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>>> wrote:

 Hi guys,

 First of all, thanks a lot for your quick
reply! As it
  turned out,
 I also had a more recent platform sdk on my
system
   (win vista).
 Out of habit I just installed the older one
on each
   system I
 develop on... And I had build the baseclasses
once (long
  time ago)
 using the makefile...

 Thanks for your advice. I just built the
BaseClasses
   and now
 building osg svn, including directshow :-)
Finders
   crossed...

 I will try out the windows 7 sdk on my
windows 7 machine
  soon too.

 Jason, ok, I understand it. Indeed I found your
   message from a
 while ago. I only saw Cedric's name in the cmake
   module, so
  that's
 why I thought you joined efforts. So thanks
Cedric!

 One more thing for now: do I have (easy)
access to
   the 'current
 image' via the plugin?

 I will let you know how it goes...

 Cheers
 Raymond




 Jason Beverage wrote:

 Hi Raymond,

 Just wanted to give credit to Cedric for
the osg
   DirectShow
 plugin, I
   

Re: [osg-users] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-05 Thread Raymond de Vries

Trajce Nikolov wrote:
> Btw2 how do I get the current image from the directshow? Do I need 
to get it from the texture, or is it possible to get it 'more 
low-level'? 'more low-level is most likely better performing..


I believe if you do texture->getImage() you will get it. Howevere, you 
might need to do some syncing between the DirectShow Image update and 
your image lookup
But I wonder/doubt whether that is quick enough, I would like to process 
the image in realtime, as close to the source as possible. I know I can 
make a directshow filter and insert it into a directshow graph or so. 
But that would result in some dependancies that I don't want/like.


regards
Raymond



-Nick


On Fri, Feb 5, 2010 at 6:56 PM, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


hmm, sweet. Incl multitouch :-)

Btw how do you do streaming with directshow? What do you use as
server? Do you use a standard streaming protocol, or a custom one?
Btw2 how do I get the current image from the directshow? Do I need
to get it from the texture, or is it possible to get it 'more
low-level'? 'more low-level is most likely better performing..

thnx for your thoughts
Raymond


Serge Lages wrote:

Yes everything you can see on our website is OSG based ! ;)

    On Fri, Feb 5, 2010 at 5:39 PM, Raymond de Vries
mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>> wrote:

   Hi,

   That's very cool, congrats! Btw are the other presentations
also
   made with the osg? Like "Mur de médias"?

   cheers
   Raymond



   Serge Lages wrote:

   And you can be sure that this plugin works like a
charm, we're
   using it with 4 live streams everyday in a live TV show
and we
   never had any problem ! ;)

   http://www.tharsis-software.com/1-29972-Realisation.php

   On Thu, Feb 4, 2010 at 6:56 PM, Raymond de Vries
   mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>> wrote:

  Hi guys,

  I would like to say a big 'thank you' for this nice
plugin.
   After
  quite some time installing SDKs and building I got
the plugin
  working :-)
  For the record: I did this on Windows Vista 32 bit,
Visual
   Studio
  2008, Microsoft DirectX SDK (August 2009) and
Windows SDK v6.0.


  Cheers
  Raymond



  Serge Lages wrote:

  I think it's one of the latest :
  Microsoft DirectX SDK (August 2009)

  On Wed, Feb 3, 2010 at 7:03 PM, Raymond de Vries
  mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>
  <mailto:ree...@xs4all.nl
<mailto:ree...@xs4all.nl> <mailto:ree...@xs4all.nl
<mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>>> wrote:

 Hi,

 Ok, nice to hear. Which version of directx
are you
   using? My
 directshow build on Vista, using directx
August 2007,
  resulted in
 a missing symbol...

 Cheers
 Raymond


 Serge Lages wrote:

         I am working on Windows 7 and it works
like a charm
  with the
 Win7 SDK.

 On Wed, Feb 3, 2010 at 6:49 PM, Raymond
de Vries
 mailto:ree...@xs4all.nl> <mailto:ree...@xs4all.nl
<mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>>
  <mailto:ree...@xs4all.nl
<mailto:ree...@xs4all.nl> <mailto:ree...@xs4all.nl
<mailto:ree...@xs4all.nl>>
   <mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>
<mailto:ree...@xs4all.nl <mailto:ree...@xs4all.nl>>&g

[osg-users] Multi-GPU on Windows 7, second window is black when the first window has focus?

2010-02-23 Thread Raymond de Vries

Hi osg-users,

I would like to report/ask a problem that I encounter when I use 2 
GeForce GTS 250 cards in my Windows 7 Home Premium 32 bit system. With 
all the combinations of enabled/disabled SLI and connected/disconnected 
SLI bridge, I get a black window on my 2nd monitor when I use osgviewer 
without arguments (and other programs that I tried). The second window 
is rendered ok when the first window does not have focus, i.e. when 
another program is on top of it.


I have tested with (this morning's) svn, 2.8.2 and 2.2.0 and they all 
behave the same. Built with VS2008, using the latest nvidia drivers.


Anyone have some tips?

Thanks a lot
Raymond

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


Re: [osg-users] Multi-GPU on Windows 7, second window is black when the first window has focus?

2010-02-23 Thread Raymond de Vries

Hi J-S,

Fyi: I tried to go back in time w.r.t. nvidia drivers but the helpful 
(sigh...) windows update kept installing version 196.21 somehow...


I installed 196.34 (from laptopvideo2go) and the problem is still the same.

I do have the OpenGL knowledge but lack of time to dive into this.

Is it so that 2 windows are created by the osg, instead of 1 window that 
spans accros these 2 screens? It seems to me that that is the case, 
judging from what happens when you focus the window on the 2nd screen: 
the first window does not go to the top.


Is there a way to let the osg open just 1 window that spans accross the 
2 monitors?


Raymond


Jean-Sébastien Guay wrote:

Hi Raymond,


I hadn't noticed this because I always start up osgviewer fullscreen on
my second monitor only, or in a window.


And about this, I think this new problem might be related to the weird 
behavior I and others have noticed with OSG apps before:


- Start fullscreen on screen 0 : the app will show up, then the screen 
will turn black for a few seconds and then it will come back (annoying 
but it's ok after a few seconds).
- Start fullscreen on screen 1 : the app shows up and stays that way 
(that's how we'd like it to behave every time!)
- Start fullscreen on both screens : the app shows up on both screens, 
then the screen turns black for a few seconds, and the image comes 
back on the first screen but the second one stays black (that's the 
new problem, before the image came back on both screens after turning 
black).


So I think I'll submit a bug to nVidia in any case. It would be nice 
to have them look at it and see if there's a problem in their drivers 
that's causing this. I haven't seen this behavior on other apps (games 
for example) but those are generally hard-coded to work on only one 
screen (the first)...


If anyone with OpenGL knowledge would like to code up a quick straight 
OpenGL app that can start a graphics context in fullscreen and we can 
specify which screen or both, it would be interesting to see if this 
is reproducible then.


J-S


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


Re: [osg-users] Multi-GPU on Windows 7, second window is black when the first window has focus?

2010-02-23 Thread Raymond de Vries

Hi,

Good point. Just tried it and the results are even weirder (with 
classic): 2nd window *is* drawn but not correctly: it halts until focus 
is switched. And when going from 2nd window to 1st window (by setting 
focus) the rendering on the first window goes crazy: e.g. a rotating 
model will spin much faster. A little bit difficult to describe in words ;-)


regards
Raymond



Martin Naylor wrote:

Hi,
Aero desktop enabled?
Try it disabled and see if it still does it, set your theme to windows 7
classic or something like that?

Regards

Martin.



-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Raymond de
Vries
Sent: 23 February 2010 15:30
To: OpenSceneGraph Users
Subject: [osg-users] Multi-GPU on Windows 7, second window is black when the
first window has focus?

Hi osg-users,

I would like to report/ask a problem that I encounter when I use 2 
GeForce GTS 250 cards in my Windows 7 Home Premium 32 bit system. With 
all the combinations of enabled/disabled SLI and connected/disconnected 
SLI bridge, I get a black window on my 2nd monitor when I use osgviewer 
without arguments (and other programs that I tried). The second window 
is rendered ok when the first window does not have focus, i.e. when 
another program is on top of it.


I have tested with (this morning's) svn, 2.8.2 and 2.2.0 and they all 
behave the same. Built with VS2008, using the latest nvidia drivers.


Anyone have some tips?

Thanks a lot
Raymond

___
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] de-interleave with directshow plugin?

2010-04-21 Thread Raymond de Vries

Hi,

I am using the directshow plugin with great fun, and now I encounter a 
firewire based camera that gives me interleaved images. I use the plugin 
on Windows 7 and the camera is found properly (drivers installed 
automatically). The image from the camera produce ugly artifacts when I 
use the stream as texture.


Does anyone know how/if I can configure or adapt the directshow plugin 
so that I get non-interleaved images? The code contains 
'MEDIATYPE_Interleaved' but I have no clue how to use that.


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


Re: [osg-users] de-interleave with directshow plugin?

2010-04-22 Thread Raymond de Vries

Hi Sege,

I searched the web a lot as well and I couldn't find a solution either. 
I wonder if this is possible at all, at the directshow level.


Thinking and trying further, I see that vlc has a de-interlace option. 
This would be a good picture to have in the osg. Now I start to wonder 
how I need to setup the streaming so that I can use vlc for the 
de-interlacing.


Have you thought about that? And furthermore, how would you do this? I 
tried to set it up just now and I did get an image from vlc in the osg! 
I did it via the streaming option in vlc and the ffmpeg plugin in the 
osg. However, it crashed soon after starting.


Do you see a way to stream (or otherwise?) from vlc into the directshow 
plugin?


Btw this is on windows 7.

regards
Raymond


On 4/22/2010 10:01 AM, Serge Lages wrote:

Hi Raymond,

We made some research on this subject some time ago but haven't found
any solution. Recently I found this blog entry :
http://www.montivision.com/en/support/blog/
http://www.montivision.com/download/updates/Video_Deinterlacer_Denoiser.zip

Talking about a filter for real-time de-interlacing but I haven't tested
it yet.

Good luck !
Cheers,

On Thu, Apr 22, 2010 at 8:51 AM, Raymond de Vries mailto:ree...@xs4all.nl>> wrote:

Hi,

I am using the directshow plugin with great fun, and now I encounter
a firewire based camera that gives me interleaved images. I use the
plugin on Windows 7 and the camera is found properly (drivers
installed automatically). The image from the camera produce ugly
artifacts when I use the stream as texture.

Does anyone know how/if I can configure or adapt the directshow
plugin so that I get non-interleaved images? The code contains
'MEDIATYPE_Interleaved' but I have no clue how to use that.

Thanks, best regards
Raymond
___
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




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


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


Re: [osg-users] AnimationPathCallback doesn't work for collada file?

2010-04-27 Thread Raymond de Vries

Hi Daniele,

Could you please let us know what it was?

thanks
Raymond



On 4/27/2010 4:02 PM, daniele argiolas wrote:

Solved!

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





___
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] AnimationPathCallback doesn't work for collada file?

2010-04-27 Thread Raymond de Vries

Hi,

Thanks for sharing, although I don't understand why this is working and 
your other approach is not...


cheers
Raymond



On 4/27/2010 4:55 PM, daniele argiolas wrote:

The problem was that applied the updatecallback directly to the node.
Now I make a MatrixTransform object and I add the node as a child.
Then I apply the updatecallback over the MatrixTransform object and now it 
works.

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





___
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] de-interleave with directshow plugin?

2010-04-27 Thread Raymond de Vries

Hi Serge,

Fyi: I could succesfully stream from vlc to the osg, using the ffmpeg 
plugin! My crash occured because I used some codec that is not properly 
supported. I was able to stream using the mpeg2 codec. Vlc can 
de-interlace so it is probably possible to de-interlace while streaming.


best regards
Raymond


On 4/22/2010 10:45 AM, Raymond de Vries wrote:

Hi Sege,

I searched the web a lot as well and I couldn't find a solution 
either. I wonder if this is possible at all, at the directshow level.


Thinking and trying further, I see that vlc has a de-interlace option. 
This would be a good picture to have in the osg. Now I start to wonder 
how I need to setup the streaming so that I can use vlc for the 
de-interlacing.


Have you thought about that? And furthermore, how would you do this? I 
tried to set it up just now and I did get an image from vlc in the 
osg! I did it via the streaming option in vlc and the ffmpeg plugin in 
the osg. However, it crashed soon after starting.


Do you see a way to stream (or otherwise?) from vlc into the 
directshow plugin?


Btw this is on windows 7.

regards
Raymond


On 4/22/2010 10:01 AM, Serge Lages wrote:

Hi Raymond,

We made some research on this subject some time ago but haven't found
any solution. Recently I found this blog entry :
http://www.montivision.com/en/support/blog/
http://www.montivision.com/download/updates/Video_Deinterlacer_Denoiser.zip 



Talking about a filter for real-time de-interlacing but I haven't tested
it yet.

Good luck !
Cheers,

On Thu, Apr 22, 2010 at 8:51 AM, Raymond de Vries mailto:ree...@xs4all.nl>> wrote:

Hi,

I am using the directshow plugin with great fun, and now I encounter
a firewire based camera that gives me interleaved images. I use the
plugin on Windows 7 and the camera is found properly (drivers
installed automatically). The image from the camera produce ugly
artifacts when I use the stream as texture.

Does anyone know how/if I can configure or adapt the directshow
plugin so that I get non-interleaved images? The code contains
'MEDIATYPE_Interleaved' but I have no clue how to use that.

Thanks, best regards
Raymond
___
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 






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



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


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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Raymond de Vries

Hi guys,

With great interest I am reading all the FBX related threads. I picked 
it myself and the first tests are working well. Thanks for your efforts!


Michael, you mention 3D Studio Max... Which version are you using? I 
have 3dsmax8 and 9 so I wonder if I can use these too.


Thanks
Raymond


On 6/9/2010 11:14 AM, Michael Platings wrote:
This was just a bug brought in with the 3D Studio Max texturing 
features. Now fixed :)


On 8 June 2010 09:08, Alessandro Terenzi > wrote:


I'm trying the FBX plugin with some models with more than one
material applied to a single mesh. I created a box and assigned it
a different material to each face: 3 faces have a different
texture (diffuse maps)  and the other 3 faces have a simple
colored material (one red, one green and one blue).

As far as I understood, the plugin currently manages to display
multiple materials assigned to the same mesh, but if using more
than one texture (for example 3 diffuse maps) then it doesn't
work: only not-textured materials are displayed correctly while no
texture is displayed or only one is displayed if assigned to a
particular face).

I'm sending a sample model to Michael only (it's 1MB). Any
suggestion on how to proceed to add support to this kind of models?

Thanks.
Alessandro



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

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



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


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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Raymond de Vries

Hi Michael,

Ok, I understand, thnx. I will try it out.

Cheers
Raymond


On 6/9/2010 12:13 PM, Michael Platings wrote:
Hi Raymond, I'm not using 3D Studio but the plugin should read FBX 
files exported from any version of any application. The test I apply 
is this - if the official Autodesk FBX Quicktime Viewer can view an 
FBX file, OpenSceneGraph should be able to view it just as well or 
better. For the majority of files this is true, but if you find any 
that don't display correctly please let me know and I'll do my best to 
get it fixed.

Cheers!

On 9 June 2010 10:35, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


Hi guys,

With great interest I am reading all the FBX related threads. I
picked it myself and the first tests are working well. Thanks for
your efforts!

Michael, you mention 3D Studio Max... Which version are you using?
I have 3dsmax8 and 9 so I wonder if I can use these too.

Thanks
Raymond


___
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] Using osgAnimation for material animation?

2010-06-09 Thread Raymond de Vries

Hi everyone,

I would like to find a way to animate my material (amb, diff, spec, 
emiss), and more specifically for now: the alpha component. Now that 
osgAnimation is very useful I would like to implement this via 
osgAnimation. In the examples (svn) I don't see an example, or else I am 
overlooking it maybe.


Is there such an example? Or else what's the best way to animate the 
material colors?


Also, does anyone know a way to get an animated opacity from 3dsmax into 
osg?


thanks a lot
Raymond

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


Re: [osg-users] Using osgAnimation for material animation?

2010-06-09 Thread Raymond de Vries

Hi,

Ah, I did take a look at nathan but not close enough, obviously...

Any idea how to get it from 3dsmax?

thnx
Raymond


On 6/9/2010 2:51 PM, Serge Lages wrote:

Hi,

Have a look to the nathan.osg example file, one of the animations 
animates the material.


Cheers,

On Wed, Jun 9, 2010 at 2:48 PM, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


Hi everyone,

I would like to find a way to animate my material (amb, diff,
spec, emiss), and more specifically for now: the alpha component.
Now that osgAnimation is very useful I would like to implement
this via osgAnimation. In the examples (svn) I don't see an
example, or else I am overlooking it maybe.

Is there such an example? Or else what's the best way to animate
the material colors?

Also, does anyone know a way to get an animated opacity from
3dsmax into osg?

thanks a lot
Raymond

___
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




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


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


Re: [osg-users] Using osgAnimation for material animation?

2010-06-10 Thread Raymond de Vries

Hi Serge,

I am looking into nathan.osg and osganimationtimeline and see that the 
head diffuse should be animated. Is that correct? However, I don't see 
that the diffuse value is being animated (checked the values).


Can you please confirm that this demo is supposed to work? I am using 
svn of both osg and osg-data.


Cheers
Raymond



On 6/9/2010 3:02 PM, Raymond de Vries wrote:

Hi,

Ah, I did take a look at nathan but not close enough, obviously...

Any idea how to get it from 3dsmax?

thnx
Raymond


On 6/9/2010 2:51 PM, Serge Lages wrote:

Hi,

Have a look to the nathan.osg example file, one of the animations 
animates the material.


Cheers,

On Wed, Jun 9, 2010 at 2:48 PM, Raymond de Vries <mailto:ree...@xs4all.nl>> wrote:


Hi everyone,

I would like to find a way to animate my material (amb, diff,
spec, emiss), and more specifically for now: the alpha component.
Now that osgAnimation is very useful I would like to implement
this via osgAnimation. In the examples (svn) I don't see an
example, or else I am overlooking it maybe.

Is there such an example? Or else what's the best way to animate
the material colors?

Also, does anyone know a way to get an animated opacity from
3dsmax into osg?

thanks a lot
Raymond

___
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




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



___
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] Strange error only in debug mode

2010-06-11 Thread Raymond de Vries

Hi,

Fyi, you can also remove a callback by using NULL, the ref counting 
would clean it up then. Would that help?


Cheers
Raymond



On 6/11/2010 1:34 PM, Alberto Luaces wrote:

"daniele argiolas" writes:

   

Thank you. I don't understand where is the error because in my program I simply 
call sometimes a removeUpdateCallback(nc) then an addUpdateCallback(nc) over my 
object, where nc is an osgAnimationCallback* object. I never delete my object 
then it's very strange this output.
 

Then it could be possible that you are removing the callback while OSG
is in its update phase. Where are you calling removeUpdateCallback()?

   


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


[osg-users] Best way to get transformation animations from 3dsmax into osgAnimation?

2010-06-17 Thread Raymond de Vries

Hi list,

I've got models which are modeled in 3dsmax and are exported with OSGExp 
to .ive or .osg. I have (transformation) animations in 3dsmax (8 or 9) 
which are then exported to AnimationPathCallbacks. When I load these in 
osg they are animating nicely. However, I would like to have detailed 
control over the animation playback and I have been struggling with the 
AnimationPathCallback, and could not make it work properly. Also, I 
would like to use the more advanced osgAnimation (I like it a lot so far).


Now I would like to use osgAnimation instead of the 
AnimationPathCallback. I have been trying the fbx format but I get very 
different results with the same scene (OSGExp compared to fbx exporter 
in 3dsmax 8/9) so currently I would like to take one step at the time, 
and prefer to use OSGExp and still convert to osgAnimation animations.


Does anyone have a working strategy how to accomplish this? E.g. is 
there a straight forward way to convert AnimationPathCallbacks into 
osgAnimation?


Cheers
Raymond

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


Re: [osg-users] Developer release of OSG and VPB imminent, please test.

2010-06-18 Thread Raymond de Vries

Hi Robert,

I am using osgAnimation more and more and it seems to me that at least 2 
examples are not working 100%:
- osganimationtimeline does not animate the diffuse material for the 
head, as far as I can see (nathan.osg)
- osganimationsolid does not animate the 2nd animation ("euler"), as far 
as I can see


It might still be the case that I don't understand osgAnimation 
correctly but wanted to report this anyway. Actually, I already sent a 
question to the list wrt osganimationtimeline (but no reply). I don't 
have enough experience yet to fix this at this moment.


Btw svn head gives the same results as 2.9.7.

regards
Raymond


On 6/18/2010 10:30 AM, Robert Osfield wrote:

On Thu, Jun 17, 2010 at 5:23 PM, Robert Osfield
  wrote:
   

I would like tag developer releases of the OSG and VPB tomorrow so
testing across compile and runtime platforms would be very useful.
 

Oooo the silence...  Has anyone tested out svn/trunk for OSG and VPB
since my call?

If there no negative feedback I'll have to assume everything is fine
just go ahead and tag this morning.  My plan is start pupping out dev
releases weekly again as we start working towards 3.0.

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


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


Re: [osg-users] Developer release of OSG and VPB imminent, please test.

2010-06-18 Thread Raymond de Vries

Hi Robert,

Sure, good idea. Thnx for the motivation to bug Cedric :-P I'll do that, 
and I can try it out almost immediately.


Have fun.
Raymond



On 6/18/2010 11:52 AM, Robert Osfield wrote:

Hi Raymond,

I'll leave this to Cedric Pinson to pick up on.   If it's easy for him
to fix then I'll let him jump in an address it before I make the dev
release, otherwise I'll just make the release and we can look into
next week.  Please chase Cedric up on this one though ;-)

Robert.

On Fri, Jun 18, 2010 at 10:38 AM, Raymond de Vries  wrote:
   

Hi Robert,

I am using osgAnimation more and more and it seems to me that at least 2
examples are not working 100%:
- osganimationtimeline does not animate the diffuse material for the head,
as far as I can see (nathan.osg)
- osganimationsolid does not animate the 2nd animation ("euler"), as far as
I can see

It might still be the case that I don't understand osgAnimation correctly
but wanted to report this anyway. Actually, I already sent a question to the
list wrt osganimationtimeline (but no reply). I don't have enough experience
yet to fix this at this moment.

Btw svn head gives the same results as 2.9.7.

regards
Raymond


On 6/18/2010 10:30 AM, Robert Osfield wrote:
 

On Thu, Jun 17, 2010 at 5:23 PM, Robert Osfield
wrote:

   

I would like tag developer releases of the OSG and VPB tomorrow so
testing across compile and runtime platforms would be very useful.

 

Oooo the silence...  Has anyone tested out svn/trunk for OSG and VPB
since my call?

If there no negative feedback I'll have to assume everything is fine
just go ahead and tag this morning.  My plan is start pupping out dev
releases weekly again as we start working towards 3.0.

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

   

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

 

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

   


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


Re: [osg-users] osganimationsolid example

2010-07-08 Thread Raymond de Vries

Hi Gianni,

As far as I can see the euler animation is not working at all: no 
rotation. The euler animation is not 'routed', so to say. There are no 
'pre-defined' words or so, the words have to match for correct routing 
(like the 'position').


regards
Raymond



On 7/7/2010 6:31 PM, Gianni Ambrosio wrote:

Hi All,
I tried to look at the osganimationsolid example but I'm not sure to understand 
it correctly. Is seems to me that the way a channel is conected to an animation 
is string diven.

Example (from osganimationsolid):

 osgAnimation::Vec3LinearChannel* channelAnimation2 = new 
osgAnimation::Vec3LinearChannel;
 channelAnimation2->setTargetName("AnimatedCallback");
 channelAnimation2->setName("euler");
 
channelAnimation2->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::Vec3Keyframe(0,
 osg::Vec3(0,0,0)));
 
channelAnimation2->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::Vec3Keyframe(1.5,
 osg::Vec3(2*osg::PI,0,0)));
 osgAnimation::Animation* anim2 = new osgAnimation::Animation;
 anim2->addChannel(channelAnimation2);
 anim2->setPlaymode(osgAnimation::Animation::LOOP);

So the name "euler" is the only way I see that states the channel values are 
related to a rotation. Is it correct? If so, where can I find the list of all strings 
available?

Regards
Gianni

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





___
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] osgmovie with webcam image on OSX?

2011-03-07 Thread Raymond de Vries

Hi,

I am pretty new to MacOSX and I am trying to get a live image from the 
webcam on my MacBook Pro in osgmovie (osg 2.9.11). I have read that this 
should be possible with the quicktime plugin but on the other hand I see 
that the quicktime plugin is deprecated in favor of the imageio plugin. 
I built everything with x86_64 so I cannot use the quicktime plugin, if 
I read it correctly.


I build osg 2.9.11 with x86_64, imageio and Cocoa.

I tried to find info if it would be possible to fetch the webcam image 
with ffmpeg but I could not find such info. Anyone else?


thanks a lot
Raymond

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


Re: [osg-users] Y up to Z up

2011-03-31 Thread Raymond de Vries

Hi Aitor,

I don't have a solution (but I am following your work with great 
interest!) but maybe the Ogre example on openni.org might give you some 
clues. It can be found here:

https://github.com/OpenNI/SampleAppSinbad

cheers, have fun
Raymond




On 3/31/2011 12:02 PM, J.P. Delport wrote:

Hi,

you might also want to check if Kinect (like D3D) uses a left-handed 
coordinate system...


jp

On 31/03/11 11:09, Aitor Ardanza wrote:

Hi,

I need to do it for my proyect... but I can't get good results.
OpenNI (Kinect) gives me the matrix with "Y up":

Code:
XnSkeletonJointPosition jointPos;
g_UserGenerator.GetSkeletonCap().GetSkeletonJointPosition(player, 
eJoint, jointPos);

XnMatrix3X3 orient;
orient = jointOrient.orientation;
tracker->set(orient.elements[0], orient.elements[1], 
orient.elements[2], 0,

orient.elements[3], orient.elements[4], orient.elements[5], 0,
orient.elements[6], orient.elements[7], orient.elements[8], 0,
jointPos.position.X, jointPos.position.Y, jointPos.position.Z, 1);


What I have to do to swap the Z and Y axes? multiply that by the 
matrix C?

C = 1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1

Code:
tracker->postMult(C);



Thank you!

Cheers,
Aitor

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





___
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


  1   2   >