Re: [osg-users] osgWidget performances

2012-04-18 Thread Vincent Bourdier

Hi,

The masks was a good idea, and there is a little bit improvement but not 
enough in my case...
I'm still trying to make some improvement using them, but without the 
expected success.


So if you have any other idea... please share it !

Thanks.

Regards,
Vincent

Le 16/04/2012 17:27, Kim Bale a écrit :
Whilst I haven't used osgWidget, I know we had a similar performance 
issue with picking when we didn't use an appropriate node mask for 
picking so that only the pickable objects in the scene are considered.


I wonder if osgWidget has implemented one in it's pick handler.

Regards,

Kim.


On 16 April 2012 16:19, Vincent Bourdier vincent.bourd...@gmail.com 
mailto:vincent.bourd...@gmail.com wrote:


Hi all,

I'm currently trying to find a performance improvement in
osgWidget due to some lag we have in our application : We use
osgWidget to manage some things at runtime, but we realized that
performances were dropping in big scenes.
Using profiler  co, I found that the
osgWidget::WindowManager::pickAtXY function is very expensive in
time...

Here is my question : this method is called on every event,
specially on mouse move and click, event if the mouse is not over
Widgets... Is there any reason to make this ? Can this be
improved, for example doing it only if the mouse is over the
widgets, using a simple XY square test...

Thanks for your answers.

Regards,
  Vincent.

-- 



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


Re: [osg-users] osgWidget performances

2012-04-18 Thread Robert Osfield
Hi Vincent,

On 18 April 2012 08:55, Vincent Bourdier vincent.bourd...@gmail.com wrote:
 The masks was a good idea, and there is a little bit improvement but not
 enough in my case...
 I'm still trying to make some improvement using them, but without the
 expected success.

 So if you have any other idea... please share it !

I'm not that familiar with osgWidget but change WindowManager.cpp to
use a local IntersectionVisitor to traversal just the osgWidget
subgraph rather than the whole scene graph this way the performance
won't vary with the main scene graph.

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


Re: [osg-users] Rotate two (or more) texts as one to the Screen

2012-04-18 Thread Martin Hahner
Hi Robert,

thanks for your tip!
It worked perfectly that way :)

So thank you again and I'm sorry for the late reply, but I haven't had time to 
try it lately :(

Cheers,
Martin

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





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


Re: [osg-users] Rendering osgText::Text using osg::Material?

2012-04-18 Thread Filip Arlet
Hi,

Because osgText calls state.Color in drawImplementation and this overrides 
glColor4fv in osg::Material::apply(State) const when using osg::Material with 
colorMode = OFF

Cheers,
Filip

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





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


[osg-users] What can cause glCompileShader FAILED?

2012-04-18 Thread Mike Wozniewski
Hi all,

Can someone explain what can cause a shader to not compile? I have a two 
programs with nearly identical build systems, using the same OSG libraries 
(3.1.1) on the same machine. One can compile and run shaders, while the other 
produces this:


Code:
Compiling VERTEX source:
1: // microshader - colors a fragment based on its position
2: varying vec4 color;
3: void main(void)
4: {
5: color = gl_Vertex;
6: gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
7: }

VERTEX glCompileShader  FAILED

Compiling FRAGMENT source:
1: varying vec4 color;
2: void main(void)
3: {
4: gl_FragColor = clamp( color, 0.0, 1.0 );
5: }

FRAGMENT glCompileShader  FAILED
Linking osg::Program  id=0 contextID=0
glLinkProgram  FAILED



I am invoking it in a standard way like this:

Code:
osg::Geode* geode = new osg::Geode();
geode-addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(1,1,1), 1)));
root-addChild(geode);
osg::Program * prog = new osg::Program;
prog-addShader ( new osg::Shader(osg::Shader::VERTEX, microshaderVertSource ) 
);
prog-addShader ( new osg::Shader(osg::Shader::FRAGMENT, microshaderFragSource 
) );
geode-getOrCreateStateSet()-setAttributeAndModes( prog, 
osg::StateAttribute::ON );



It has to be something in my scene graph. Some state being inherited, or some 
setting that I'm unaware of. Any help would be greatly appreciated.

Extra info:
OSX=10.7.3, osgversion=3.1.1, GPU=nvidia GeForce 8600M GT
glVersion=2.1, isGlslSupported=YES, glslLanguageVersion=1.2

Thanks,
Mike

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





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


Re: [osg-users] What can cause glCompileShader FAILED?

2012-04-18 Thread Sebastian Messerschmidt

Hello Mike,

maybe it is easier for us to follow if you elaborate in what the nearly 
identical build systems differ.


cheers
Sebastian

Hi all,

Can someone explain what can cause a shader to not compile? I have a two 
programs with nearly identical build systems, using the same OSG libraries 
(3.1.1) on the same machine. One can compile and run shaders, while the other 
produces this:


Code:
Compiling VERTEX source:
1: // microshader - colors a fragment based on its position
2: varying vec4 color;
3: void main(void)
4: {
5: color = gl_Vertex;
6: gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
7: }

VERTEX glCompileShader  FAILED

Compiling FRAGMENT source:
1: varying vec4 color;
2: void main(void)
3: {
4: gl_FragColor = clamp( color, 0.0, 1.0 );
5: }

FRAGMENT glCompileShader  FAILED
Linking osg::Program  id=0 contextID=0
glLinkProgram  FAILED



I am invoking it in a standard way like this:

Code:
osg::Geode* geode = new osg::Geode();
geode-addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(1,1,1), 1)));
root-addChild(geode);
osg::Program * prog = new osg::Program;
prog-addShader ( new osg::Shader(osg::Shader::VERTEX, microshaderVertSource ) 
);
prog-addShader ( new osg::Shader(osg::Shader::FRAGMENT, microshaderFragSource 
) );
geode-getOrCreateStateSet()-setAttributeAndModes( prog, 
osg::StateAttribute::ON );



It has to be something in my scene graph. Some state being inherited, or some 
setting that I'm unaware of. Any help would be greatly appreciated.

Extra info:
OSX=10.7.3, osgversion=3.1.1, GPU=nvidia GeForce 8600M GT
glVersion=2.1, isGlslSupported=YES, glslLanguageVersion=1.2

Thanks,
Mike

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





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


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


Re: [osg-users] What can cause glCompileShader FAILED?

2012-04-18 Thread Mike Wozniewski
Hi Sebastian,

Indeed, I now realize that it is some sort of build setting!

To clarify, the program with broken shaders was built with XCode, while the one 
that works was built with an autotools project. Both link with the same libs 
and have all the same flags (I think; will verify). Furthermore, I just tried 
to build the broken program using an autotools system and the exact same code 
works... so it definitely a setting in my XCode project.

I'll poke around to see if I can find the setting, but if anyone knows of an 
XCode flag that would prevent shaders from working, I'd be grateful to know.

-Mike

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





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


[osg-users] Strange line in FileUtils.cpp

2012-04-18 Thread Eduardo Poyart
Hello,

Line 59 in FileUtils.cpp seems strange:

#ifdef __IPHONE_4_0  (__IPHONE_OS_VERSION_MIN_REQUIRED = __IPHONE_4_0)

Clang warns me about extra tokens at end of #ifdef directive at the .

Shouldn't the correct syntax be as below?

#if defined( __IPHONE_4_0)  (__IPHONE_OS_VERSION_MIN_REQUIRED = __IPHONE_4_0)

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


Re: [osg-users] Character modeling + Cloth simulation + Blender osgExporter

2012-04-18 Thread Maia Randria
Hi,

Thank you for replying. Glad to see that other people are using Makehuman + OSG.
I reported some issues about the exporter at :
https://github.com/cedricpinson/osgexport/issues/10#issuecomment-4973016

If I understand, do you export in fbx from Blender ? Are there some reasons why 
you preferred to export in .fbx instead of .osg ? While trying to export a 
clothed model to .fbx and displaying the .fbx file with QuickTime, I got the 
skin as peeking through the clothing as in Makehuman GUI.

Have you also encountered problems about exporting the eyebrows with .fbx 
format ? I had such a problem while exporting to OSG from Blender. This problem 
does not occur while importing to 3DSMAx as. obj file from Makehuman and 
exporting to OSG with the MaxExporter. 

About the clothing with Makehuman model, could you explain more about how you 
did it ? As far as I understand, MakeHuman uses masks to hide the parts of the 
body which are covered with clothes, so there is no UV map for clothes. 

Also, did you use the MHX tools (MHX expression, MHX Lipsync) for animation ? 
If so, did they export well with fbx ?

A great lab in Geneva, Miralab, works a lot on cloth simulation and they are 
using OSG as their 3D engine. I read an interesting thesis report using Poser + 
OSG from their lab (“Virtual mirror” by using real-time motion capture” …


Thank you!

Cheers,
Maia

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





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


Re: [osg-users] osgVolume not working with latest ATI Radeon drivers on Windows

2012-04-18 Thread Poirier, Guillaume
Hello OSG users,

osgvolume does not work for me with an ati card and found the following thread 
in the archives which sounds
like the same issue but unfortunately without a solution:
http://forum.openscenegraph.org/viewtopic.php?t=8913start=0postdays=0postorder=aschighlight=

I am using Windows Vista 64 with a ATI Radeon HD 5800 with the most recent 
Catalyst driver and get a black
screen whenever I load a stack of images in osgvolume. The volume displays fine 
with a GeForce card.

Other people have had similar issues ?


cheers,


guillaume





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


[osg-users] How to use CMake to construct an OpenSceneGraph project ?

2012-04-18 Thread Lawrence Tsang
Hi,

 I have just downloaded the OpenSceneGraph source, unzip it into
~/OpenSceneGraph-3.0.1 directory and use CMake to create an out-of-source
eclipse make project in ~/OpenSceneGraph-3.0.1-build-eclipse-cdt
directory. When I execute make in
~/OpenSceneGraph-3.0.1-build-eclipse-cdt directory, OpenSceneGraph builds
successfully. I have not run sudo make install as I do not want to
install OpenSceneGraph tightly into my Ubuntu system.

 Now I want to use CMake to create a project using the compiled
OpenSceneGraph libraries. I use the following codes in CMakeLists.txt :

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT( test_proj )
FIND_PACKAGE(OpenSceneGraph)
ADD_EXECUTABLE( test test.cpp )
INCLUDE_DIRECTORIES(${OPENSCENEGRAPH_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES( test ${OPENSCENEGRAPH_LIBRARIES} )

 But it seems that OpenSceneGraph could not be found by CMake.

 Does anyone know how CMake could find the compiled OpenSceneGraph
libraries in the ~/OpenSceneGraph-3.0.1-build-eclipse-cdt directory and
use it to create projects as if I have tightly installed OpenSceneGraph
using sudo make install. Thanks for any suggestion.

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