Re: [osg-users] osganimationhardware example osg 3.0.1

2011-09-29 Thread Robert Osfield
Hi Thomas.

Could it be that you are hitting up against the NVidia driver issue
relating to the handing of uniform arrarys.  The svn/trunk version of
the OSG has a workaround for this issue so would recommend trying
this.

Robert.

On Thu, Sep 29, 2011 at 3:30 AM, Thomas Hogarth
thomas.hoga...@gmail.com wrote:
 Hi Guys
 I've been trying to run the osganimationhardware example for osg 3.0.1 on
 windows7 32bit with Geforce GTX 560 and latest drivers 280.26 . In the past
 I have had this running (not on this machine or osg version), I simply
 downloaded the osgData collection with the nathan.osg and skinning.vert
 shader file.
 However now when I'm running it, anything that is skinned does not render. I
 have altered the shader to just use the gl_Vertex position rather then the
 weighted position and then the object renders (so verts are fine). I have
 also used the boneWeight0 uniforms to colour the mesh and they seem to have
 decent values.
 The only thing that doesn't seem to have good values is
 uniform mat4 matrixPalette[MAX_MATRIX];
 When I checked the converted shader the value of MAX_MATRIX seems to be set
 correctly, but if I used the first line of the first matrix as the colour
 value, like
 gl_FrontColor = matrixPalette[0][0];
 It is always black,
 Looking at the uniform attached to the geoms stateset I can see roughly the
 following in the debugger
 _uniformList = [2]((matrixPalette, ({_ptr=0x0d0bfb58 },
 0)),(nbBonesPerVertex, ({_ptr=0x0d0bf3b8 }, 0)))
 _ptr = 0x0d0bfb58 {_parents=[1](0x0d0bfed8 {_parents=[1](0x00df9bf8
 {_name= _dataVariance=DYNAMIC _userDataContainer=0x })
 _modeList=[0]() _attributeList=[1](((PROGRAM, 0), ({_ptr=0x0d0bc9c0 }, 0)))
 ...}) _type=FLOAT_MAT4 _numElements=3 ...}
 osg::MixinVectorfloat =
 {_impl=[48](1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.8939,0.0046100151,0.,0.,-0.0046100151,0.8939,0

 So if the colour is the first vec4 of the matrixPalette uniform it should
 be 1.000,0.,0.,0., but it's just black.
 Can anyone confirm the osganimationhardware example is currently working
 with these assets
 http://www.openscenegraph.org/projects/osg/wiki/Downloads/SampleDatasets

 Any help would be awesome
 Tom
 PS
 My config looks like this
 #ifndef OSG_CONFIG
 #define OSG_CONFIG 1
 /* #undef OSG_NOTIFY_DISABLED */
 /*#define OSG_USE_FLOAT_MATRIX
 #define OSG_USE_FLOAT_PLANE
 #define OSG_USE_FLOAT_BOUNDINGSPHERE
 #define OSG_USE_FLOAT_BOUNDINGBOX*/
 #define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
 /* #undef OSG_USE_UTF8_FILENAME */
 #define OSG_DISABLE_MSVC_WARNINGS
 #define OSG_GL1_AVAILABLE
 #define OSG_GL2_AVAILABLE
 /* #undef OSG_GL3_AVAILABLE */
 /* #undef OSG_GLES1_AVAILABLE */
 /* #undef OSG_GLES2_AVAILABLE */
 /* #undef OSG_GL_LIBRARY_STATIC */
  #define OSG_GL_DISPLAYLISTS_AVAILABLE
  #define OSG_GL_MATRICES_AVAILABLE
  #define OSG_GL_VERTEX_FUNCS_AVAILABLE
  #define OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
  #define OSG_GL_FIXED_FUNCTION_AVAILABLE
 #endif
 I mention it as originally I dived straight into trying it without any fixed
 functionality essentially emulating gles2, but had this same issue. I've
 then gone for the more standard build above, but the result is the same
 (although now I see objects that aren't skinned) If I can get this working
 again on desktop then I don't think getting it working on gles2 will be too
 much hassle (unless I hit some shader variable length limit).
 Also standard osgAnimationViewer works fine
 ___
 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] osganimationhardware example osg 3.0.1

2011-09-29 Thread Thomas Hogarth
Hi Robert,

Yup, that seems to have done the trick. Now onward to no fixed
functionality, yippee (i.e. use osg_vertex etc in shader)

Thanks Again
Tom



On 29 September 2011 09:40, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi Thomas.

 Could it be that you are hitting up against the NVidia driver issue
 relating to the handing of uniform arrarys.  The svn/trunk version of
 the OSG has a workaround for this issue so would recommend trying
 this.

 Robert.

 On Thu, Sep 29, 2011 at 3:30 AM, Thomas Hogarth
 thomas.hoga...@gmail.com wrote:
  Hi Guys
  I've been trying to run the osganimationhardware example for osg 3.0.1 on
  windows7 32bit with Geforce GTX 560 and latest drivers 280.26 . In the
 past
  I have had this running (not on this machine or osg version), I simply
  downloaded the osgData collection with the nathan.osg and skinning.vert
  shader file.
  However now when I'm running it, anything that is skinned does not
 render. I
  have altered the shader to just use the gl_Vertex position rather then
 the
  weighted position and then the object renders (so verts are fine). I have
  also used the boneWeight0 uniforms to colour the mesh and they seem to
 have
  decent values.
  The only thing that doesn't seem to have good values is
  uniform mat4 matrixPalette[MAX_MATRIX];
  When I checked the converted shader the value of MAX_MATRIX seems to be
 set
  correctly, but if I used the first line of the first matrix as the colour
  value, like
  gl_FrontColor = matrixPalette[0][0];
  It is always black,
  Looking at the uniform attached to the geoms stateset I can see roughly
 the
  following in the debugger
  _uniformList = [2]((matrixPalette, ({_ptr=0x0d0bfb58 },
  0)),(nbBonesPerVertex, ({_ptr=0x0d0bf3b8 }, 0)))
  _ptr = 0x0d0bfb58 {_parents=[1](0x0d0bfed8 {_parents=[1](0x00df9bf8
  {_name= _dataVariance=DYNAMIC _userDataContainer=0x })
  _modeList=[0]() _attributeList=[1](((PROGRAM, 0), ({_ptr=0x0d0bc9c0 },
 0)))
  ...}) _type=FLOAT_MAT4 _numElements=3 ...}
  osg::MixinVectorfloat =
 
 {_impl=[48](1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.8939,0.0046100151,0.,0.,-0.0046100151,0.8939,0
 
  So if the colour is the first vec4 of the matrixPalette uniform it should
  be 1.000,0.,0.,0., but it's just black.
  Can anyone confirm the osganimationhardware example is currently working
  with these assets
  http://www.openscenegraph.org/projects/osg/wiki/Downloads/SampleDatasets
 
  Any help would be awesome
  Tom
  PS
  My config looks like this
  #ifndef OSG_CONFIG
  #define OSG_CONFIG 1
  /* #undef OSG_NOTIFY_DISABLED */
  /*#define OSG_USE_FLOAT_MATRIX
  #define OSG_USE_FLOAT_PLANE
  #define OSG_USE_FLOAT_BOUNDINGSPHERE
  #define OSG_USE_FLOAT_BOUNDINGBOX*/
  #define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
  /* #undef OSG_USE_UTF8_FILENAME */
  #define OSG_DISABLE_MSVC_WARNINGS
  #define OSG_GL1_AVAILABLE
  #define OSG_GL2_AVAILABLE
  /* #undef OSG_GL3_AVAILABLE */
  /* #undef OSG_GLES1_AVAILABLE */
  /* #undef OSG_GLES2_AVAILABLE */
  /* #undef OSG_GL_LIBRARY_STATIC */
   #define OSG_GL_DISPLAYLISTS_AVAILABLE
   #define OSG_GL_MATRICES_AVAILABLE
   #define OSG_GL_VERTEX_FUNCS_AVAILABLE
   #define OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
   #define OSG_GL_FIXED_FUNCTION_AVAILABLE
  #endif
  I mention it as originally I dived straight into trying it without any
 fixed
  functionality essentially emulating gles2, but had this same issue. I've
  then gone for the more standard build above, but the result is the same
  (although now I see objects that aren't skinned) If I can get this
 working
  again on desktop then I don't think getting it working on gles2 will be
 too
  much hassle (unless I hit some shader variable length limit).
  Also standard osgAnimationViewer works fine
  ___
  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] osganimationhardware example osg 3.0.1

2011-09-29 Thread Thomas Hogarth
Hi Again

I've now moved over to IOS and am having the same issue (with the same
version 3.0.1). I'm just now building the latest svn, but you mentioned the
issue was Nvidia related. Do you think the fix might help my IOS build?

Many thanks
Tom

On 29 September 2011 13:32, Thomas Hogarth thomas.hoga...@gmail.com wrote:

 Hi Robert,

 Yup, that seems to have done the trick. Now onward to no fixed
 functionality, yippee (i.e. use osg_vertex etc in shader)

 Thanks Again
 Tom



 On 29 September 2011 09:40, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Thomas.

 Could it be that you are hitting up against the NVidia driver issue
 relating to the handing of uniform arrarys.  The svn/trunk version of
 the OSG has a workaround for this issue so would recommend trying
 this.

 Robert.

 On Thu, Sep 29, 2011 at 3:30 AM, Thomas Hogarth
 thomas.hoga...@gmail.com wrote:
  Hi Guys
  I've been trying to run the osganimationhardware example for osg 3.0.1
 on
  windows7 32bit with Geforce GTX 560 and latest drivers 280.26 . In the
 past
  I have had this running (not on this machine or osg version), I simply
  downloaded the osgData collection with the nathan.osg and skinning.vert
  shader file.
  However now when I'm running it, anything that is skinned does not
 render. I
  have altered the shader to just use the gl_Vertex position rather then
 the
  weighted position and then the object renders (so verts are fine). I
 have
  also used the boneWeight0 uniforms to colour the mesh and they seem to
 have
  decent values.
  The only thing that doesn't seem to have good values is
  uniform mat4 matrixPalette[MAX_MATRIX];
  When I checked the converted shader the value of MAX_MATRIX seems to be
 set
  correctly, but if I used the first line of the first matrix as the
 colour
  value, like
  gl_FrontColor = matrixPalette[0][0];
  It is always black,
  Looking at the uniform attached to the geoms stateset I can see roughly
 the
  following in the debugger
  _uniformList = [2]((matrixPalette, ({_ptr=0x0d0bfb58 },
  0)),(nbBonesPerVertex, ({_ptr=0x0d0bf3b8 }, 0)))
  _ptr = 0x0d0bfb58 {_parents=[1](0x0d0bfed8 {_parents=[1](0x00df9bf8
  {_name= _dataVariance=DYNAMIC _userDataContainer=0x })
  _modeList=[0]() _attributeList=[1](((PROGRAM, 0), ({_ptr=0x0d0bc9c0 },
 0)))
  ...}) _type=FLOAT_MAT4 _numElements=3 ...}
  osg::MixinVectorfloat =
 
 {_impl=[48](1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.8939,0.0046100151,0.,0.,-0.0046100151,0.8939,0
 
  So if the colour is the first vec4 of the matrixPalette uniform it
 should
  be 1.000,0.,0.,0., but it's just black.
  Can anyone confirm the osganimationhardware example is currently working
  with these assets
 
 http://www.openscenegraph.org/projects/osg/wiki/Downloads/SampleDatasets
 
  Any help would be awesome
  Tom
  PS
  My config looks like this
  #ifndef OSG_CONFIG
  #define OSG_CONFIG 1
  /* #undef OSG_NOTIFY_DISABLED */
  /*#define OSG_USE_FLOAT_MATRIX
  #define OSG_USE_FLOAT_PLANE
  #define OSG_USE_FLOAT_BOUNDINGSPHERE
  #define OSG_USE_FLOAT_BOUNDINGBOX*/
  #define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
  /* #undef OSG_USE_UTF8_FILENAME */
  #define OSG_DISABLE_MSVC_WARNINGS
  #define OSG_GL1_AVAILABLE
  #define OSG_GL2_AVAILABLE
  /* #undef OSG_GL3_AVAILABLE */
  /* #undef OSG_GLES1_AVAILABLE */
  /* #undef OSG_GLES2_AVAILABLE */
  /* #undef OSG_GL_LIBRARY_STATIC */
   #define OSG_GL_DISPLAYLISTS_AVAILABLE
   #define OSG_GL_MATRICES_AVAILABLE
   #define OSG_GL_VERTEX_FUNCS_AVAILABLE
   #define OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
   #define OSG_GL_FIXED_FUNCTION_AVAILABLE
  #endif
  I mention it as originally I dived straight into trying it without any
 fixed
  functionality essentially emulating gles2, but had this same issue. I've
  then gone for the more standard build above, but the result is the same
  (although now I see objects that aren't skinned) If I can get this
 working
  again on desktop then I don't think getting it working on gles2 will be
 too
  much hassle (unless I hit some shader variable length limit).
  Also standard osgAnimationViewer works fine
  ___
  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] osganimationhardware example osg 3.0.1

2011-09-29 Thread Thomas Hogarth
Hi Robert

Not sure how relevant to you this is, but as I reported I had the same
uniform mat4 array issue on IOS gles2. I've downloaded and linked to the
latest trunk just now and that has fixed the problem. Was the issue you
mentioned Nvidia specific or OpenGL in general.

I guess it doesn't matter either way, I now have the osganimationhardware
example running on my iPod Touch 4th gen.

Now to try and make it look pretty :)

Cheers
Tom

PS

Only change needed was to attach a fragment shader and change a few variable
names, shaders are attached.


skinning.frag
Description: Binary data


skinning.vert
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osganimationhardware example osg 3.0.1

2011-09-28 Thread Thomas Hogarth
Hi Guys

I've been trying to run the osganimationhardware example for osg 3.0.1 on
windows7 32bit with Geforce GTX 560 and latest drivers 280.26 . In the past
I have had this running (not on this machine or osg version), I simply
downloaded the osgData collection with the nathan.osg and skinning.vert
shader file.

However now when I'm running it, anything that is skinned does not render. I
have altered the shader to just use the gl_Vertex position rather then the
weighted position and then the object renders (so verts are fine). I have
also used the boneWeight0 uniforms to colour the mesh and they seem to have
decent values.

The only thing that doesn't seem to have good values is

uniform mat4 matrixPalette[MAX_MATRIX];

When I checked the converted shader the value of MAX_MATRIX seems to be set
correctly, but if I used the first line of the first matrix as the colour
value, like

gl_FrontColor = matrixPalette[0][0];

It is always black,

Looking at the uniform attached to the geoms stateset I can see roughly the
following in the debugger

_uniformList = [2]((matrixPalette, ({_ptr=0x0d0bfb58 },
0)),(nbBonesPerVertex, ({_ptr=0x0d0bf3b8 }, 0)))

_ptr = 0x0d0bfb58 {_parents=[1](0x0d0bfed8 {_parents=[1](0x00df9bf8
{_name= _dataVariance=DYNAMIC _userDataContainer=0x })
_modeList=[0]() _attributeList=[1](((PROGRAM, 0), ({_ptr=0x0d0bc9c0 }, 0)))
...}) _type=FLOAT_MAT4 _numElements=3 ...}

osg::MixinVectorfloat =
{_impl=[48](1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.,0.,0.,0.,1.000,0.8939,0.0046100151,0.,0.,-0.0046100151,0.8939,0


So if the colour is the first vec4 of the matrixPalette uniform it should
be 1.000,0.,0.,0., but it's just black.

Can anyone confirm the osganimationhardware example is currently working
with these assets

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


Any help would be awesome
Tom

PS
My config looks like this
#ifndef OSG_CONFIG
#define OSG_CONFIG 1

/* #undef OSG_NOTIFY_DISABLED */
/*#define OSG_USE_FLOAT_MATRIX
#define OSG_USE_FLOAT_PLANE
#define OSG_USE_FLOAT_BOUNDINGSPHERE
#define OSG_USE_FLOAT_BOUNDINGBOX*/
#define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
/* #undef OSG_USE_UTF8_FILENAME */
#define OSG_DISABLE_MSVC_WARNINGS

#define OSG_GL1_AVAILABLE
#define OSG_GL2_AVAILABLE
/* #undef OSG_GL3_AVAILABLE */
/* #undef OSG_GLES1_AVAILABLE */
/* #undef OSG_GLES2_AVAILABLE */
/* #undef OSG_GL_LIBRARY_STATIC */
 #define OSG_GL_DISPLAYLISTS_AVAILABLE
 #define OSG_GL_MATRICES_AVAILABLE
 #define OSG_GL_VERTEX_FUNCS_AVAILABLE
 #define OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
 #define OSG_GL_FIXED_FUNCTION_AVAILABLE

#endif

I mention it as originally I dived straight into trying it without any fixed
functionality essentially emulating gles2, but had this same issue. I've
then gone for the more standard build above, but the result is the same
(although now I see objects that aren't skinned) If I can get this working
again on desktop then I don't think getting it working on gles2 will be too
much hassle (unless I hit some shader variable length limit).

Also standard osgAnimationViewer works fine
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org