Re: [osg-users] Problems with setInfluenceMap to RigGeometry

2011-11-03 Thread PP CG

Hi Benjamin,

for me it the images look like you have not set each bones Inverse 
Matrix in Skeleton Space,and I can't find it in your code. But I also 
cannot find any bone transform in your code. Could it be the case, that 
the transformation matrix in Skeleton Space is not of the bone is not 
identity, but the Inverse Matrix is ?


Moreover you omitted some bone vertex weights, do the per Vertex Bone 
Weights sum upt to 1 ? They need to sum up to 1.


Btw, when you are exporting from blender, why you don't export the 
skinned cube ?


Cheers, Peter


Hi,

I have two pictures where you can see the difference.

RigGeometry (normal)
[Image: http://s7.directupload.net/images/01/temp/iahp6pb2.png ] 
(http://s7.directupload.net/file/d/2695/iahp6pb2_png.htm)

RigGeometry with InfluenceMap
[Image: http://s1.directupload.net/images/01/temp/rrmcyovi.png ] 
(http://s1.directupload.net/file/d/2695/rrmcyovi_png.htm)

Thank you!

Cheers,
Benjamin

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





___
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] Install Issue with current trunk

2011-10-28 Thread PP CG

Hi,


Hi PP? Do you  have a human name?  It's kinda nice to converse with humans...


Yes I do, it's Peter, and you're right, should use my proper name her.


The jpeg plugin hasn't changed since 3.0.0.

Is there a chance that jpeg plugin failed to build?


Yes, you're right it didn't built, but thought that the cmake script 
would install all the rest.
However, it does not built as the linker can't find a libjpeg.lib in my 
3rd party library, which is right as I do not have it. I have the 
jpeg.lib and jpegD.lib inside the 3rd party package downloaded from the 
osg download site. I have not changed this package when I updated from 
3.0 branch to trunk. Just right now I re-downloaded the 3rd party libs, 
there is no libjpeg.lib present. Is libjpeg.lib required now, or can 
jpeg.lib still be used ?


Cheers,
Peter





Robert.



On Thu, Oct 27, 2011 at 9:36 PM, PP CGp...@cg.uni-saarland.de  wrote:

Hi,

I'm having Issues installing my built of the current trunk, using VS2010,
Win 7 x64.
LIBs and DLLs do get installed, but no applications and examples.

Error Message in VS:
5CMake Error at src/osgPlugins/jpeg/cmake_install.cmake:32 (FILE):
5  file INSTALL cannot find
5
  D:/PP/OSG/OpenSceneGraph-SVN/build/bin/osgPlugins-3.1.0/osgdb_jpegd.dll.
5Call Stack (most recent call first):
5  src/osgPlugins/cmake_install.cmake:53 (INCLUDE)
5  src/cmake_install.cmake:51 (INCLUDE)
5  cmake_install.cmake:108 (INCLUDE)
5
5
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: The command setlocal
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: C:\Program Files (x86)\CMake 2.8\bin\cmake.exe -DBUILD_TYPE=Debug
-P cmake_install.cmake
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: if %errorlevel% neq 0 goto :cmEnd
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: :cmEnd
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: endlocal  call :cmErrorLevel %errorlevel%  goto :cmDone
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: :cmErrorLevel
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: exit /b %1
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: :cmDone
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: if %errorlevel% neq 0 goto :VCEnd
5C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
MSB3073: :VCEnd exited with code 1.

Till today I used 3.0 branch, and did not have the issue. Is this known, and
if so, is there a workaround ?
Sorry, not a cmake expert.

Cheers, PP
___
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] Install Issue with current trunk

2011-10-28 Thread PP CG

On 28.10.2011 11:23, Robert Osfield wrote:

Hi Peter,

On Fri, Oct 28, 2011 at 10:17 AM, PP CGp...@cg.uni-saarland.de  wrote:

Yes, you're right it didn't built, but thought that the cmake script would
install all the rest.
However, it does not built as the linker can't find a libjpeg.lib in my 3rd
party library, which is right as I do not have it. I have the jpeg.lib and
jpegD.lib inside the 3rd party package downloaded from the osg download
site. I have not changed this package when I updated from 3.0 branch to
trunk. Just right now I re-downloaded the 3rd party libs, there is no
libjpeg.lib present. Is libjpeg.lib required now, or can jpeg.lib still be
used ?

I'm afraid I can't help specifically with use of CMake under Windows
as I haven't used Windows for development for over a decade, but from
the sound of it CMake hasn't been configured correctly somewhere along
the line.  It's sounds like it's building against Jpeg and failing so
I'd recommend looking into what is going on, and if you don't need to
read jpeg images then change the CMakeSetup entries for JPEG to blank
and then reconfigure and build the project files.


Thank you,
I have just duplicated the jpeg.lib, and renamed the copy to 
libjpeg.lib. Building and installing is working now. If I face trouble 
reading reading jpeg files, I'll follow your advice.


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


[osg-users] Install Issue with current trunk

2011-10-27 Thread PP CG

Hi,

I'm having Issues installing my built of the current trunk, using 
VS2010, Win 7 x64.

LIBs and DLLs do get installed, but no applications and examples.

Error Message in VS:
5  CMake Error at src/osgPlugins/jpeg/cmake_install.cmake:32 (FILE):
5file INSTALL cannot find
5
D:/PP/OSG/OpenSceneGraph-SVN/build/bin/osgPlugins-3.1.0/osgdb_jpegd.dll.

5  Call Stack (most recent call first):
5src/osgPlugins/cmake_install.cmake:53 (INCLUDE)
5src/cmake_install.cmake:51 (INCLUDE)
5cmake_install.cmake:108 (INCLUDE)
5
5
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: The command setlocal
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: C:\Program Files (x86)\CMake 2.8\bin\cmake.exe 
-DBUILD_TYPE=Debug -P cmake_install.cmake
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: if %errorlevel% neq 0 goto :cmEnd
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: :cmEnd
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: endlocal  call :cmErrorLevel %errorlevel%  goto :cmDone
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: :cmErrorLevel
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: exit /b %1
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: :cmDone
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: if %errorlevel% neq 0 goto :VCEnd
5C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): 
error MSB3073: :VCEnd exited with code 1.


Till today I used 3.0 branch, and did not have the issue. Is this known, 
and if so, is there a workaround ?

Sorry, not a cmake expert.

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


Re: [osg-users] Updating geometry vertex data

2011-10-26 Thread PP CG

Hi Aitor,

The same issue you face, is there as well with the default morphing and 
skinning of osgAnimation. You need to do this steps to make it work.
First Create your custom morph geometry, add it to a geode, add the 
geode to a group ( groupMorph ) and attach this somwhere to the 
scengraph, prefarably directly bellow root.


To the Group ( gropMorph ) attach a cull callback, which just stops 
the traversing of the cullVisitor.

struct FilterCullCallback : osg::NodeCallback  {
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)  {}  
// do nothing and stop traverse

};

groupMorph-setCullCallback( new FilterCullCallback() ) ;

now with osgAnimation you would attach a osgANimation::UpdateMorph to 
the Geode, so do whatever fits your needs here.


Finally the you need to attach the same geometry which gets updated here 
to the RigGeometry of your Skeleton. This works for me.


Cheers, PP



I respond to myself: Removing the model skeleton, and therefore the animation 
manager, I can see the morphing on the model...
Is there any way to combine skeletal osgAnimation and manual vertex edition to 
do morphin myselft? I dont want to use osg morphing system...

Thank you!

Cheers,
Aitor

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





___
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] Update out of sync with osgAnimation between Bone and RigGeometry

2011-10-22 Thread PP CG

Hi,

I noticed that animated transforms and Bones do update faster than 
osgAnimation::RigGeometry which is attached to bones. Is this a known 
issue ? Can this be fixed from my Side ?


This looks very odd in the case of a skinned character, and rigid ( 
MatrixTransform ) Eyes, as they move out of the character slightly but 
obviously noticeable.


Attached is a test scene, displaying the issue. The red cube is rigid 
transformed with 3 linear keyframes. The green cube is a RigGeometry 
transformed by a Bone which has the same keyframe  ( z ) values . The 
blue cube is a child of the bone without animation or deformation.

Please note that the green cube is allways ( one frame ? ) behind.

Thank you,

Cheers, PP


#Ascii Scene 
#Version 80 
#Generator OpenSceneGraph 3.0.1 

osg::Group {
  UniqueID 1 
  Name RigGeometry_Update 
  UpdateCallback TRUE {
osgAnimation::BasicAnimationManager {
  UniqueID 2 
  Animations 1 {
osgAnimation::Animation {
  UniqueID 3 
  Name No Character 
  Weight 1 
  Channels 2 {
Type Vec3LinearChannel {
  Name position 
  TargetName plyCube_XForm_Callback 
  KeyFrameContainer TRUE 3 {
0 -2 0 0 
1 -2 0 4 
2 -2 0 0 
  }
}
Type Vec3LinearChannel {
  Name position 
  TargetName jnt_Skin_Callback 
  KeyFrameContainer TRUE 3 {
0 0 0 0 
1 0 0 4 
2 0 0 0 
  }
}
  }
}
  }
}
  }
  StateSet TRUE {
osg::StateSet {
  UniqueID 4 
  ModeList 1 {
GL_NORMALIZE ON 
  }
}
  }
  Children 1 {
osg::Group {
  UniqueID 5 
  Name world 
  Children 2 {
osg::MatrixTransform {
  UniqueID 6 
  Name plyCube_XForm 
  DataVariance DYNAMIC 
  UpdateCallback TRUE {
osgAnimation::UpdateMatrixTransform {
  UniqueID 7 
  Name plyCube_XForm_Callback 
  StackedTransforms 3 {
osgAnimation::StackedTranslateElement {
  UniqueID 8 
  Name position 
  Translate -2 0 0 
}
osgAnimation::StackedQuaternionElement {
  UniqueID 9 
  Name quaternion 
}
osgAnimation::StackedScaleElement {
  UniqueID 10 
  Name scale 
  Scale 1 1 1 
}
  }
}
  }
  Children 1 {
osg::Geode {
  UniqueID 11 
  Name plyCube_XFormShape 
  StateSet TRUE {
osg::StateSet {
  UniqueID 12 
  ModeList 1 {
GL_CULL_FACE OFF 
  }
  AttributeList 1 {
osg::LightModel {
  UniqueID 13 
  AmbientIntensity 0 0 0 1 
  LocalViewer TRUE 
  TwoSided TRUE 
}
Value OFF 
  }
}
  }
  Drawables 1 {
osg::Geometry {
  UniqueID 14 
  Name plyCube_XFormShape_lambert1 
  DataVariance STATIC 
  UseDisplayList FALSE 
  UseVertexBufferObjects TRUE 
  PrimitiveSetList 1 {
DrawElementsUByte GL_TRIANGLES 36 {
  5 16 10 10 
  16 21 11 22 
  8 8 22 19 
  7 18 2 2 
  18 13 1 12 
  4 4 12 15 
  17 14 23 23 
  14 20 0 3 
  6 6 3 9 
}

  }
  VertexData {
Array TRUE ArrayID 1 Vec3fArray 24 {
  -1 -1 -1 
  -1 -1 -1 
  -1 -1 -1 
  -1 -1 1 
  -1 -1 1 
  -1 -1 1 
  -1 1 -1 
  -1 1 -1 
  -1 1 -1 
  -1 1 1 
  -1 1 1 
  -1 1 1 
  1 -1 -1 
  1 -1 -1 
  1 -1 -1 
  1 -1 1 
  1 -1 1 
  1 -1 1 
  1 1 -1 
  1 1 -1 
  1 1 -1 
  1 1 1 
  1 1 1 
  1 1 1 
}
Indices FALSE 
Binding BIND_PER_VERTEX 
Normalize 0 
  }
  

[osg-users] BUG report : osgAnimation::RigGeometry Serializer ( minor )

2011-10-13 Thread PP CG

Hi,

I am on Win 7, osg 3.0.1
When writing out files which include a osgAnimation::RigGeometry to the 
new formats osgb, osgt, osgx and playing these files in the 
osganimationviewer, I get these messages in the CommandPrompt:


InputStream::readObject(): Unsupported wrapper class 
osg::ComputeBoundingBoxCallback

InputStream::readObject(): Unsupported wrapper class osg::UpdateCallback

The problem seems to come from these lines ( found in osgt file ), which 
are not present in the old osg file format.


osgAnimation::RigGeometry {
  UniqueID 26
  DataVariance DYNAMIC
  ComputeBoundingBoxCallback TRUE {
osg::ComputeBoundingBoxCallback {
  UniqueID 27
}
  }
  SupportsDisplayList FALSE
  UseVertexBufferObjects TRUE
  UpdateCallback TRUE {
osg::UpdateCallback {
  UniqueID 28
}
  }
}

The problem is re-constructable with the osganimationskinning example, 
writing it to disk and reading back into osganimationviewer.


So far no visual problem is noticeable, only the annoying error messages.

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


Re: [osg-users] Viewer thread safety question

2011-10-13 Thread PP CG

Uh, sorry, how could this end up as a reply ? Please ignore, I'll repost.

Cheers, PP


On 10/12/2011 9:41 AM, Chris 'Xenon' Hanson wrote:

On 10/12/2011 8:31 AM, Joshua Cook wrote:
To make a long story short COIN was failing in a bad way but the 
standard notify message at the INFO level is:

DynamicLibrary::failed loading osgPlugins-3.0.0/osgdb_ivd.dll
Warning: Could not find plugin to read objects from file 
../../some_file.iv.
So, I know that COIN's failure is not an OSG problem but I do 
believe there may be room for a more useful debug output when a dll 
has problems that don't revolve around not existing.
   Are you 100% sure the DLL _is_ actually loading but the IV file 
fails to load?


   How have you verified this? You can set breakpoints in the DLL, or 
use something like
SysInternals' ProcessMonitor to snoop on successful (and 
unsuccessful) DLL loads.


Assuming the error message is correct and the plugin isn't being found...

osgWorks has an app to find plugins. I don't have the .iv plugin, but 
here's an example of using it to find the .flt plugin:

osgwwhich -p flt
Using plugin name: osgPlugins-3.0.1/osgdb_openflight.dll.
C:\Program Files\OpenSceneGraph\bin\osgPlugins-3.0.1\osgdb_openflight.dll

You can also set OSG_NOTIFY_LEVEL=DEBUG_FP to have OSG print each path 
that it searches to try to find the plugin.


Hopefully these two tricks will help you figure out why OSG is 
claiming it can't load the plugin.

   -Paul


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


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


[osg-users] BUG report : osgAnimation::RigGeometry Serializer ( minor )

2011-10-13 Thread PP CG

Hi,

I am on Win 7, osg 3.0.1
When writing out files which include a osgAnimation::RigGeometry to the 
new formats osgb, osgt, osgx and playing these files in the 
osganimationviewer, I get these messages in the CommandPrompt:


InputStream::readObject(): Unsupported wrapper class 
osg::ComputeBoundingBoxCallback

InputStream::readObject(): Unsupported wrapper class osg::UpdateCallback

The problem seems to come from these lines ( found in osgt file ), which 
are not present in the old osg file format.


osgAnimation::RigGeometry {
  UniqueID 26
  DataVariance DYNAMIC
  ComputeBoundingBoxCallback TRUE {
osg::ComputeBoundingBoxCallback {
  UniqueID 27
}
  }
  SupportsDisplayList FALSE
  UseVertexBufferObjects TRUE
  UpdateCallback TRUE {
osg::UpdateCallback {
  UniqueID 28
}
  }
}

The problem is re-constructable with the osganimationskinning example, 
writing it to disk and reading back into osganimationviewer.


So far no visual problem is noticeable, only the annoying error messages.

This is a repost, as the previous post  ended up at the wrong place, sorry.

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


[osg-users] Culling Issue with osgAnimation::rigGeometry

2011-10-13 Thread PP CG

  
  
Hi,

I created a cube with one bone in the center, and 3 children at
three corners of the cube. When the child bones are translated away
from center, the expanded cube corners get culled away. Do I need to
write some kind of Compute Bounding Box Callback, or do I have to
use some for osgAnimation Namespace ( can't find any ). Osgt file
attached, this happens in osg file format as well. Launch with
osganimationviewer, play the animation and rotate around.

Non Transformed Cube:


Transformed Cube:


Thank you, !

Cheers, PP
  

#Ascii Scene 
#Version 80 
#Generator OpenSceneGraph 3.0.1 

osg::Group {
  UniqueID 1 
  Name M2O_Skin 
  UpdateCallback TRUE {
osgAnimation::BasicAnimationManager {
  UniqueID 2 
  Animations 1 {
osgAnimation::Animation {
  UniqueID 3 
  Name No Character 
  Weight 1 
  Channels 4 {
Type Vec3LinearChannel {
  Name position 
  TargetName jnt_PX_PY_PZ_Callback 
  KeyFrameContainer TRUE 3 {
0 2 2 2 
0.5 5 5 5 
1 2 2 2 
  }
}
Type Vec3LinearChannel {
  Name position 
  TargetName jnt_NX_PY_NZ_Callback 
  KeyFrameContainer TRUE 3 {
0 -2 2 -2 
0.5 -5 5 -5 
1 -2 2 -2 
  }
}
Type Vec3LinearChannel {
  Name position 
  TargetName jnt_NX_NY_PZ_Callback 
  KeyFrameContainer TRUE 3 {
0 -2 -2 2 
0.5 -5 -5 5 
1 -2 -2 2 
  }
}
Type Vec3LinearChannel {
  Name position 
  TargetName jnt_PX_NY_NZ_Callback 
  KeyFrameContainer TRUE 3 {
0 2 -2 -2 
0.5 5 -5 -5 
1 2 -2 -2 
  }
}
  }
}
  }
}
  }
  StateSet TRUE {
osg::StateSet {
  UniqueID 4 
  ModeList 1 {
GL_NORMALIZE ON 
  }
}
  }
  Children 1 {
osg::Group {
  UniqueID 5 
  Name world 
  Children 5 {
osg::MatrixTransform {
  UniqueID 6 
  Name plyCube 
  Children 1 {
osgAnimation::Skeleton {
  UniqueID 7 
  Name plyCubeShape 
  UpdateCallback TRUE {
osgAnimation::UpdateSkeleton {
  UniqueID 8 
}
  }
  Children 2 {
osgAnimation::Bone {
  UniqueID 9 
  Name jntCenter 
  DataVariance DYNAMIC 
  UpdateCallback TRUE {
osgAnimation::UpdateBone {
  UniqueID 10 
  Name jntCenter_Callback 
  StackedTransforms 3 {
osgAnimation::StackedTranslateElement {
  UniqueID 11 
  Name position 
}
osgAnimation::StackedQuaternionElement {
  UniqueID 12 
  Name quaternion 
}
osgAnimation::StackedScaleElement {
  UniqueID 13 
  Name scale 
  Scale 1 1 1 
}
  }
}
  }
  Children 4 {
osgAnimation::Bone {
  UniqueID 14 
  Name jnt_PX_PY_PZ 
  DataVariance DYNAMIC 
  UpdateCallback TRUE {
osgAnimation::UpdateBone {
  UniqueID 15 
  Name jnt_PX_PY_PZ_Callback 
  StackedTransforms 3 {
osgAnimation::StackedTranslateElement {
  UniqueID 16 
  Name position 
  Translate 2 2 2 
}
osgAnimation::StackedQuaternionElement {
  UniqueID 17 
  Name quaternion 
}
osgAnimation::StackedScaleElement {
  UniqueID 18 
  Name scale 
  Scale 1 1 1 
}
  }
}
  }
  Matrix {
1 0 0 0 
0 1 0 0 
0 0 1 0 
2 2 2 1 
  }
  
  

Re: [osg-users] Does pure GL3 context work with default camera manipulator ?

2011-10-12 Thread PP CG

O.K. in any case, thank you for your time Paul.

@Community, I wonder if this behavior should be treated as bug and 
should be reported. What else could be done to find the source of the 
problem ?
Summary: My GL3 compiled osg version does not reach the code where a 
forward compatible GL3 context gets created. What should be my next steps ?


Meanwhile I recompiled for GL3 following this article, and made sure QT 
does not get build:

http://forum.openscenegraph.org/viewtopic.php?t=7322

Cheers, PP

You are on Windows, right? And I assume you built OSG for GL3 (changed 
all the CMake setting from their default GL2 values)?

   -Paul


On 10/11/2011 10:25 AM, PP CG wrote:

Hi Paul,

thanks, but unfortunately this does not help as the method 
GraphicsWindowWin32::createContextImplementation() does not get 
called at all, and the glContextVersion does not get parsed ( at my 
site ). This brings me back to my doubts and original question, 
probably I use the wrong way to create the GL3 context, so what is 
the right way ?


I am sorry, I am getting lost in the osg code here. Have no idea what 
to do to get this particular method called.


Thank you

Cheers, PP

Hi -- A simple search of the source code shows that glContextVersion 
is parsed in only one place: GraphicsContextWin32.cpp, line 1678. 
Set a breakpoint there in the debugger and step through the 
following lines of code to ensure you're getting the right context.

   -Paul


On 10/11/2011 1:32 AM, PP CG wrote:

Hello community,

I compiled osg for GL3, and created a glContextVersion( 3.3 ) GL 
context. In my simple test application Camera Manipulation and 
MatrixTransforms are working as usual without me writing any 
transformation shader. Is this possible ?


As I have doubts about this I guess that I have setup the GL 
context in a wrong way, so how does one set it up properly ?


My way:
osg::GraphicsContext::Traits * traits = new 
osg::GraphicsContext::Traits() ;

int width = 1920 , height = 1200 ;
traits - x = 0 ;
traits - y = 0 ;
traits - width  = width ;
traits - height = height ;
traits - windowDecoration = true ;
traits - doubleBuffer = true ;
traits - glContextVersion = std::string( 3.3 ) ;
traits - windowDecoration = false ;

osg::GraphicsContext * graphicsContext = 
osg::GraphicsContext::createGraphicsContext( traits ) ;

osg::Camera * cam = new osg::Camera() ;
cam - setGraphicsContext( graphicsContext ) ;
cam - setViewport( 0 , 0 , width , height ) ;
cam - setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
cam - setClearColor( osg::Vec4( 0.0 , 0.0 , 0.0 , 1.0 ) ) ;
cam - setProjectionMatrixAsPerspective( 30.0f , ( float )width 
/ ( float )height , 1.0 , 1000.0 ) ;


viewer.setCamera( cam ) ;
viewer.setSceneData( xform.get() ) ;
viewer.realize() ;
return viewer.run() ;

Thank you

Cheers, PP

___
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] VBO Bug ?

2011-10-12 Thread PP CG

On 12.10.2011 15:55, Wojciech Lewandowski wrote:


Could you guys check if this problem also happens in other systems ?



Hi Wojtek, bad result.

Win 7 x64, osg build for x86
NVIDIA GTX 295
driver 280.26

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


[osg-users] Does pure GL3 context work with default camera manipulator ?

2011-10-11 Thread PP CG

Hello community,

I compiled osg for GL3, and created a glContextVersion( 3.3 ) GL 
context. In my simple test application Camera Manipulation and 
MatrixTransforms are working as usual without me writing any 
transformation shader. Is this possible ?


As I have doubts about this I guess that I have setup the GL context in 
a wrong way, so how does one set it up properly ?


My way:
osg::GraphicsContext::Traits * traits = new 
osg::GraphicsContext::Traits() ;

int width = 1920 , height = 1200 ;
traits - x = 0 ;
traits - y = 0 ;
traits - width  = width ;
traits - height = height ;
traits - windowDecoration = true ;
traits - doubleBuffer = true ;
traits - glContextVersion = std::string( 3.3 ) ;
traits - windowDecoration = false ;

osg::GraphicsContext * graphicsContext = 
osg::GraphicsContext::createGraphicsContext( traits ) ;

osg::Camera * cam = new osg::Camera() ;
cam - setGraphicsContext( graphicsContext ) ;
cam - setViewport( 0 , 0 , width , height ) ;
cam - setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
cam - setClearColor( osg::Vec4( 0.0 , 0.0 , 0.0 , 1.0 ) ) ;
cam - setProjectionMatrixAsPerspective( 30.0f , ( float )width / ( 
float )height , 1.0 , 1000.0 ) ;


viewer.setCamera( cam ) ;
viewer.setSceneData( xform.get() ) ;
viewer.realize() ;
return viewer.run() ;

Thank you

Cheers, PP

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


Re: [osg-users] Does pure GL3 context work with default camera manipulator ?

2011-10-11 Thread PP CG

Hi Paul,

thanks, but unfortunately this does not help as the method 
GraphicsWindowWin32::createContextImplementation() does not get called 
at all, and the glContextVersion does not get parsed ( at my site ). 
This brings me back to my doubts and original question, probably I use 
the wrong way to create the GL3 context, so what is the right way ?


I am sorry, I am getting lost in the osg code here. Have no idea what to 
do to get this particular method called.


Thank you

Cheers, PP

Hi -- A simple search of the source code shows that glContextVersion 
is parsed in only one place: GraphicsContextWin32.cpp, line 1678. Set 
a breakpoint there in the debugger and step through the following 
lines of code to ensure you're getting the right context.

   -Paul


On 10/11/2011 1:32 AM, PP CG wrote:

Hello community,

I compiled osg for GL3, and created a glContextVersion( 3.3 ) GL 
context. In my simple test application Camera Manipulation and 
MatrixTransforms are working as usual without me writing any 
transformation shader. Is this possible ?


As I have doubts about this I guess that I have setup the GL context 
in a wrong way, so how does one set it up properly ?


My way:
osg::GraphicsContext::Traits * traits = new 
osg::GraphicsContext::Traits() ;

int width = 1920 , height = 1200 ;
traits - x = 0 ;
traits - y = 0 ;
traits - width  = width ;
traits - height = height ;
traits - windowDecoration = true ;
traits - doubleBuffer = true ;
traits - glContextVersion = std::string( 3.3 ) ;
traits - windowDecoration = false ;

osg::GraphicsContext * graphicsContext = 
osg::GraphicsContext::createGraphicsContext( traits ) ;

osg::Camera * cam = new osg::Camera() ;
cam - setGraphicsContext( graphicsContext ) ;
cam - setViewport( 0 , 0 , width , height ) ;
cam - setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
cam - setClearColor( osg::Vec4( 0.0 , 0.0 , 0.0 , 1.0 ) ) ;
cam - setProjectionMatrixAsPerspective( 30.0f , ( float )width / 
( float )height , 1.0 , 1000.0 ) ;


viewer.setCamera( cam ) ;
viewer.setSceneData( xform.get() ) ;
viewer.realize() ;
return viewer.run() ;

Thank you

Cheers, PP

___
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] Does pure GL3 context work with default camera manipulator ?

2011-10-11 Thread PP CG
Yes I am on Windows, sorry for not mentioning. And yes I turned off all 
GL features but GL3 in the cmake built, as explained in other posts.


Cheers, PP

You are on Windows, right? And I assume you built OSG for GL3 (changed 
all the CMake setting from their default GL2 values)?

   -Paul


On 10/11/2011 10:25 AM, PP CG wrote:

Hi Paul,

thanks, but unfortunately this does not help as the method 
GraphicsWindowWin32::createContextImplementation() does not get 
called at all, and the glContextVersion does not get parsed ( at my 
site ). This brings me back to my doubts and original question, 
probably I use the wrong way to create the GL3 context, so what is 
the right way ?


I am sorry, I am getting lost in the osg code here. Have no idea what 
to do to get this particular method called.


Thank you

Cheers, PP

Hi -- A simple search of the source code shows that glContextVersion 
is parsed in only one place: GraphicsContextWin32.cpp, line 1678. 
Set a breakpoint there in the debugger and step through the 
following lines of code to ensure you're getting the right context.

   -Paul


On 10/11/2011 1:32 AM, PP CG wrote:

Hello community,

I compiled osg for GL3, and created a glContextVersion( 3.3 ) GL 
context. In my simple test application Camera Manipulation and 
MatrixTransforms are working as usual without me writing any 
transformation shader. Is this possible ?


As I have doubts about this I guess that I have setup the GL 
context in a wrong way, so how does one set it up properly ?


My way:
osg::GraphicsContext::Traits * traits = new 
osg::GraphicsContext::Traits() ;

int width = 1920 , height = 1200 ;
traits - x = 0 ;
traits - y = 0 ;
traits - width  = width ;
traits - height = height ;
traits - windowDecoration = true ;
traits - doubleBuffer = true ;
traits - glContextVersion = std::string( 3.3 ) ;
traits - windowDecoration = false ;

osg::GraphicsContext * graphicsContext = 
osg::GraphicsContext::createGraphicsContext( traits ) ;

osg::Camera * cam = new osg::Camera() ;
cam - setGraphicsContext( graphicsContext ) ;
cam - setViewport( 0 , 0 , width , height ) ;
cam - setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
cam - setClearColor( osg::Vec4( 0.0 , 0.0 , 0.0 , 1.0 ) ) ;
cam - setProjectionMatrixAsPerspective( 30.0f , ( float )width 
/ ( float )height , 1.0 , 1000.0 ) ;


viewer.setCamera( cam ) ;
viewer.setSceneData( xform.get() ) ;
viewer.realize() ;
return viewer.run() ;

Thank you

Cheers, PP

___
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] How to setup and confirm a proper forward-compatipble GL3 context

2011-10-07 Thread PP CG

Hi J-S,

thank you for your answer, and sorry my late response, was without 
connection for some time.


I activated the uniforms, but still the uniforms don't get printed 
through my update callback.
When I activate these uniforms, does this mean at all that they should 
be get in any StateSet of any Node ? I think they should, as otherwise I 
couldn't use them, right ?


Does anybody else tell me how I can create and confirm a proper GL3 
context ?


Thank you,

Cheers, PP


Hi Peter,

I don't know about your other questions about the GL 3 context, but I 
can answer this since I've been looking at it recently.



How do I get these default osg_ Uniforms into the StateSet ? The only
place where I find code for creaating them is osgUtil::SceneView, which
is marked as deprecated.


See the osgvertexattributes example, there you will see that you need 
to do:


  context-getState()-setUseModelViewAndProjectionUniforms(true);

once you've created your context. You'll probably also need

  context-getState()-setUseVertexAttributeAliasing(true);

Though I'm not sure exactly what it does.

Search in the OSG sources for getUseModelViewAndProjectionUniforms() 
and getUseVertexAttributeAliasing() and you'll see where they are used 
to create and update the uniforms / variables.


Hope this helps,

J-S


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


Re: [osg-users] How to setup and confirm a proper forward-compatipble GL3 context

2011-10-07 Thread PP CG

Hi J-S,

thanks for your reply, that makes sense and helps.

I'll try to ask the community about the GL3 context in another topic if 
nobody answers here anymore. Maybe this will solve the other issues.


Cheers, PP


Hi Peter,


I activated the uniforms, but still the uniforms don't get printed
through my update callback.
When I activate these uniforms, does this mean at all that they should
be get in any StateSet of any Node ? I think they should, as otherwise I
couldn't use them, right ?


No, they get pushed into the state by the SceneView and other internal 
classes, so it's very possible that you'll never see them in any 
StateSet. As I said before:


 Search in the OSG sources for getUseModelViewAndProjectionUniforms()
 and getUseVertexAttributeAliasing() and you'll see where they are used
 to create and update the uniforms / variables.

Hope this helps,

J-S


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


Re: [osg-users] [ANN] New OSG book on the way, and new plan of OSG recipes

2011-09-30 Thread PP CG

Hi Wang,

Don't worry about this. The title may not be able to tell the methods
used directly. In fact there are already several examples showing how
to integrate OSG and OpenGL in different ways:
[Ch2] Using draw callbacks to execute NVIDIA Cg functions: use camera
draw callbacks to call NVCG functions, can be easily extended to OGL
functions.
[Ch3] Drawing a NURBS surface: customize Drawable to execute GLU functions
[Ch6] Creating a piece of cloud: customize Drawable to render cloud particles
[Ch6] Customizing the state attribute: customize StateAttribute to call NVCG


Very nice, looking forward to this :-)


I'm also thinking of implementing a recipe in the last chapter that
make use of OSG in a GLUT program. But it depends. :-)


I would appreciate this, I'm using OpenFrameworks, which uses GLUT. 
Would be very cool to know how to combine OSG and this library. Even 
better would be to use OSGs Windowing System with OF, but I think this 
would get too complicated. However, looking forward to read cook book :-)


Regards, Peter

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


Re: [osg-users] [ANN] New OSG book on the way, and new plan of OSG recipes

2011-09-29 Thread PP CG

Hi Wang,

your first book was an enlightenment and answered a lot of questions 
which were not so clear, from source, doxygen, mailing list and web 
search. I would have one request for a topic, which I do not find in 
your content list: How to add and use OpenGL code within OSG. Now and 
then there are some mails on the List, but they seem already quite 
advanced. Could you possibly add few examples about this topic ?


Thank you very much.

Regards, Peter



Hi Alessandro,

I'd like to list the titles of all recipes finished until now as below.

Thanks for the support. :-)

Wang Rui

---

[Chapter 1]
Checking  out the latest version of OSG.
Configure Configuring CMake options.
Building plug-ins to support common file externsions.
Compile Compiling and package packaging OSG on different platforms.
Compile Compiling and use using OSG on mobile devices.
Compile Compiling and use using dynamic and static libraries.
Generate Generating the API documentation.
Create Creating your own project using Cmake

[Chapter 2]
Using smart and observer pointers
Sharing and cloning objects
Computing the world bounding box of any node
Creating a running car
Mirroring the scene graph
Designing a breadth-first node visitor
Implementing a background image node
Making your node always face to screen
Using draw callbacks to execute NVIDIA Cg functions
Implementing a compass node

[Chapter 3]
Creating a polygon with borderlines
Extruding a 2D shape to 3D
Drawing a NURBS surface
Drawing a dynamic clock on the screen
Drawing a ribbon following a model
Selecting and highlighting a model
Selecting a triangle face of the model
Selecting a point of the model
Using vertex displacement mapping in shaders
Using the draw instanced extension

[Chapter 4]
Setting up views on multiple screens
Using slave cameras to simulate a power-wall
Using depth partition to display huge scene
Implementing the radar map
Showing the top, front and side views of a model
Manipulating the top, front and side views
Following a moving model
Using manipulator to follow models
Designing a 2D camera manipulator
Manipulating the view with joysticks

[Chapter 5]
Opening and closing the door
Playing a movie in the 3D world
Designing scrolling texts
Implementing a morph geometry
Fading in and out
Animating a flight on fire
Dynamically lighting within shaders
Creating a simple 'Galaxian' game
Building a skeleton system
Skinning a skeleton system
Letting the physics engine be

[Chapter 6]
Using the bump mapping technique
Simulating the view-dependent shadow
Implementing transparency with multiple passes
Reading and displaying the depth buffer
Implementing the night vision effect
Implementing the depth-of-field effect
Designing a skybox with the cubemap
Creating simple water effect
Creating a piece of cloud
Customizing the state attribute
Using MRT to create the G-buffer
Completing the deferred shading algorithm

[Chapter 7]
Preparing the VPB (VirtualPlanetBuilder) tool
Generating small terrain database
Generating terrain database on the earth
Working with multiple imagery and elevation data
Patching existing terrain database with newer data
Building NVTT support for device-independent generation
Using SSH to implement cluster generation
Configuring and loading terrain from the Internet
Playing with osgEarth: another way to visualize the world
Use osgEarth to display VPB generated database
___
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] Motion Blur (or What is Post Processing?)

2011-09-20 Thread PP CG

Hi all,

totally agree with you Serge. I wonder why its not part of osg core. Is 
there any chance that this might happen ?


Cheers, PP



Hi Jeremy,

osgPPU is absolutely what you're looking for, just take a look to it's 
examples, it's a really powerful toolkit.


Cheers,

On Tue, Sep 20, 2011 at 8:38 AM, Daniel Trstenjak 
daniel.trsten...@science-computing.de 
mailto:daniel.trsten...@science-computing.de wrote:



Hi Jeremy,

 And as far as performance is concerned: how often is this rendering
 paradigm used in high-fps applications?

Games like Killzone 2 are using deferred rendering
(http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf)
in conjunction with 'Multiple Render Targets' to achieve the
desired performance.


Greetings,
Daniel

--

 Daniel Trstenjak Tel   : +49 (0)7071-9457-264
tel:%2B49%20%280%297071-9457-264
 science + computing ag   FAX   : +49 (0)7071-9457-511
tel:%2B49%20%280%297071-9457-511
 Hagellocher Weg 73   mailto:
daniel.trsten...@science-computing.de
mailto:daniel.trsten...@science-computing.de
 D-72070 Tübingen WWW   : http://www.science-computing.de/
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196


___
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] Motion Blur (or What is Post Processing?)

2011-09-20 Thread PP CG

Hi Robert,

yes I read this one. In that thread you are talking about refactoring 
lot of code. Could you give some more specifics about the way you would 
like it implemented, or changed ? I'd like to work on it if I find time, 
and the maintainer is fine with it.


Cheers, PP


Hi PP,

On Tue, Sep 20, 2011 at 1:27 PM, PP CGp...@cg.uni-saarland.de  wrote:

totally agree with you Serge. I wonder why its not part of osg core. Is
there any chance that this might happen ?

A year or so ago I did a review of osgPPU and didn't feel that it's
design didn't fit well enough in with the core OSG API for it to be
merged without problems of API coherency.  I believe it would be
better to see the core OSG API evolved to provide the functionality
that osgPPU provides, but in a way that fits in better.

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