Re: [osg-users] Improving performance of OBJ rendering by back face culling

2012-05-29 Thread Gio
So... your suggestion is to optimize the 3d model reducing the number of 
vertices because face culling will not improve performance? 
Can you argue more about why is like that?
Thank you.
John

On May 29, 2012, at 11:26 PM, Paul Martz wrote:

> Enabling face culling will improve performance only when rendering is 
> fill-limited. If you're vertex-limited, face culling will not affect 
> performance.
>   -Paul
> 
> 
> 
> On 5/29/2012 2:48 PM, Gio wrote:
>> Hello,
>> I am developing an application for iphone and ipod touch using 
>> openscenegraph. It is an augmented reality application and I have to load a 
>> very complex model. The original 3d model has 5 million vertices.
>> Since I am using a mobile platform which is limited in computational power I 
>> simplified the model using 3d studio max. I reduced the size of the model 
>> from 500Mb to 4.2 Mb using proOptimizer.
>> The model now has in total about 36,000 vertices and about 53,000 faces.
>> 
>> I am able to render it but frame rate is slow. I'd like to improve 
>> performance using back face culling. The point is I don't know how to 
>> activate it (if it is possible):
>> I tried with these lines of code but frame rate is still low:
>> 
>> [code]
>> osg::StateSet* ss = _root->getOrCreateStateSet();
>> osg::CullFace* cf = new osg::CullFace(osg::CullFace::BACK );
>> ss->setAttribute( cf );
>> [/code]
>> 
>> I am using OpenGL ES 2.0 and shaders.
>> 
>> I setup the camera in this way:
>> 
>> [code]
>> //set the clear color of the camera to be transparent
>> _viewer->getCamera()->setClearColor(osg::Vec4(0.0f, 0.0f, 0.0f, 0.0f));
>> //set the clear mask for the camera
>> _viewer->getCamera()->setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
>> _viewer->getCamera()->setRenderOrder(osg::CameraNode::PRE_RENDER);
>> _viewer->getCamera()->setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR);
>> [/code]
>> 
>> I use DO_NOT_COMPUTE_NEAR_FAR because I need to set manually projection and 
>> viewMatrix at every drawing cycle.
>> 
>> I also initially set viewport like this:
>> 
>> [code]
>> _viewer->getCamera()->setViewport(new osg::Viewport(0, 0, 
>> graphicsContext->getTraits()->width, graphicsContext->getTraits()->height));
>> [/code]
>> 
>> The hierarchy of my object is structured as:
>> 
>> _root is a osg::MatrixTransform
>> 
>> my 3d model is divided in subparts.
>> all the subparts of my 3d model are direct child of _root and are of type 
>> osg::Node
>> 
>> I hope you can give me some tips to improve performance. If you need some 
>> other information about my setup I will be glad to give it.
>> 
>> Thank you.
>> 
>> Greetings,
>> John Moore
>> ___
>> 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] Building a slimmed down static version of OSG

2012-05-29 Thread Preet
Thanks for the reply.

After messing with the CMakeLists in OpenThreads (forced pthreads), I
got it to compile and build me a static lib archive... unfortutely I
have pretty much the same problem, about a bajillion of these errors
originating from various osg sources.

Program.cpp:(.text+0x5158): undefined reference to
`OpenThreads::Mutex::Mutex(OpenThreads::Mutex::MutexType)'
Program.cpp:(.text+0x5160): undefined reference to
`OpenThreads::Mutex::~Mutex()'



On Tue, May 29, 2012 at 5:02 PM, Thomas Hogarth
 wrote:
> Hi Preet
>
> Good to hear you're working on a Blackberry port.
>
> In regard to the libs you need your main aim is to get osgViewer compiling.
> If that compiles then you can setup a viewer a render your scenegraph.
>
> You'll have two options for this, you can either create your own 
> implementation of osgViewer::GraphicsWindow to handle setting up an OpenGL 
> context, window etc. Or you can just use the OpenGL example you have and 
> setup the viewer using the setupViewerAsEmbeded function which will allow you 
> to draw the osg scenegraph into your example OpenGL view.
>
> Probably easiest to try setupViewerAsEmbeded first to test osg itself is 
> working, then you can try and create your own viewer.
>
> With regard to OpenThreads it's probably related to the actual operating 
> system you are using to build the libs. For example if you are on windows 
> then CMake is probably selecting the windows threading stuff because it's not 
> aware your trying to build for blackberry.
>
> If you take a look at src/OpenThreads/CMakeLists.txt near the bottom you'll 
> find this
>
>
> Code:
> IF(NOT ANDROID)
> # Use our modified version of FindThreads.cmake which has Sproc hacks.
>    FIND_PACKAGE(Threads)
> ENDIF()
> # Do we have sproc?
> IF(CMAKE_SYSTEM MATCHES IRIX)
>    IF(CMAKE_USE_SPROC_INIT)
>        # In this case, only Sproc exists, so no option.
>        SET(OPENTHREADS_USE_SPROC_INSTEAD_OF_PTHREADS 1)
>    ELSE()
>        IF(CMAKE_HAVE_SPROC_H)
>            OPTION(OPENTHREADS_USE_SPROC_INSTEAD_OF_PTHREADS "Set to ON to 
> build OpenThreads against sproc instead of pthreads" OFF)
>        ENDIF()
>    ENDIF()
> ENDIF(CMAKE_SYSTEM MATCHES IRIX)
>
> # Add support for using Qt threads
> IF(QT4_FOUND)
>    OPTION(BUILD_OPENTHREADS_WITH_QT "Build OpenThreads with Qt threading 
> support." OFF)
> ENDIF()
>
> # Maybe we should be using the FindThreads.cmake module?
> IF(ANDROID)
>    SUBDIRS(pthreads)
> ELSEIF(QT4_FOUND AND BUILD_OPENTHREADS_WITH_QT)
>    SUBDIRS(qt)
> ELSEIF(WIN32)
>    # So I think Cygwin wants to use pthreads
>    IF(CYGWIN)
>        SUBDIRS(pthreads)
>    ELSE()
>        # Everybody else including Msys should probably go here
>        SUBDIRS(win32)
>        # examples)
>    ENDIF()
> ELSE()
>    IF(UNIX)
>        IF(OPENTHREADS_USE_SPROC_INSTEAD_OF_PTHREADS)
>            SUBDIRS(sproc)
>        ELSE()
>            SUBDIRS(pthreads)
>        ENDIF()
>    ELSE()
>        MESSAGE("Sorry, OpenThreads may not support your platform")
>    ENDIF()
> ENDIF()
>
>
>
>
> In there it is selecting the correct  threading module for the platform. For 
> a temporary fix you can just force the use of pthreads.
>
> Regarding plugins, cmake will only generate build targets for pulgins for 
> which it has found the dependancies. Be careful though that it doesn't find 
> your operating system versions. For good asset support you'll need at least
> libpng for loading of png images, and freetypes for fonts.
>
> The osg format plugins themselves have no external dependancies so should 
> build as long as osg does.
>
> Cheers
> Tom
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47924#47924
>
>
>
>
>
> ___
> 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] Improving performance of OBJ rendering by back face culling

2012-05-29 Thread Paul Martz
Enabling face culling will improve performance only when rendering is 
fill-limited. If you're vertex-limited, face culling will not affect performance.

   -Paul



On 5/29/2012 2:48 PM, Gio wrote:

Hello,
I am developing an application for iphone and ipod touch using openscenegraph. 
It is an augmented reality application and I have to load a very complex model. 
The original 3d model has 5 million vertices.
Since I am using a mobile platform which is limited in computational power I 
simplified the model using 3d studio max. I reduced the size of the model from 
500Mb to 4.2 Mb using proOptimizer.
The model now has in total about 36,000 vertices and about 53,000 faces.

I am able to render it but frame rate is slow. I'd like to improve performance 
using back face culling. The point is I don't know how to activate it (if it is 
possible):
I tried with these lines of code but frame rate is still low:

[code]
osg::StateSet* ss = _root->getOrCreateStateSet();
osg::CullFace* cf = new osg::CullFace(osg::CullFace::BACK );
ss->setAttribute( cf );
[/code]

I am using OpenGL ES 2.0 and shaders.

I setup the camera in this way:

[code]
//set the clear color of the camera to be transparent
_viewer->getCamera()->setClearColor(osg::Vec4(0.0f, 0.0f, 0.0f, 0.0f));
//set the clear mask for the camera
_viewer->getCamera()->setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
_viewer->getCamera()->setRenderOrder(osg::CameraNode::PRE_RENDER);
_viewer->getCamera()->setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR);
[/code]

I use DO_NOT_COMPUTE_NEAR_FAR because I need to set manually projection and 
viewMatrix at every drawing cycle.

I also initially set viewport like this:

[code]
_viewer->getCamera()->setViewport(new osg::Viewport(0, 0, 
graphicsContext->getTraits()->width, graphicsContext->getTraits()->height));
[/code]

The hierarchy of my object is structured as:

_root is a osg::MatrixTransform

my 3d model is divided in subparts.
all the subparts of my 3d model are direct child of _root and are of type 
osg::Node

I hope you can give me some tips to improve performance. If you need some other 
information about my setup I will be glad to give it.

Thank you.

Greetings,
John Moore
___
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] Building a slimmed down static version of OSG

2012-05-29 Thread Thomas Hogarth
Hi Preet

Good to hear you're working on a Blackberry port.

In regard to the libs you need your main aim is to get osgViewer compiling.
If that compiles then you can setup a viewer a render your scenegraph.

You'll have two options for this, you can either create your own implementation 
of osgViewer::GraphicsWindow to handle setting up an OpenGL context, window 
etc. Or you can just use the OpenGL example you have and setup the viewer using 
the setupViewerAsEmbeded function which will allow you to draw the osg 
scenegraph into your example OpenGL view.

Probably easiest to try setupViewerAsEmbeded first to test osg itself is 
working, then you can try and create your own viewer.

With regard to OpenThreads it's probably related to the actual operating system 
you are using to build the libs. For example if you are on windows then CMake 
is probably selecting the windows threading stuff because it's not aware your 
trying to build for blackberry.

If you take a look at src/OpenThreads/CMakeLists.txt near the bottom you'll 
find this


Code:
IF(NOT ANDROID)
# Use our modified version of FindThreads.cmake which has Sproc hacks.
FIND_PACKAGE(Threads)
ENDIF()
# Do we have sproc?
IF(CMAKE_SYSTEM MATCHES IRIX)
IF(CMAKE_USE_SPROC_INIT)
# In this case, only Sproc exists, so no option.
SET(OPENTHREADS_USE_SPROC_INSTEAD_OF_PTHREADS 1)
ELSE()
IF(CMAKE_HAVE_SPROC_H)
OPTION(OPENTHREADS_USE_SPROC_INSTEAD_OF_PTHREADS "Set to ON to 
build OpenThreads against sproc instead of pthreads" OFF)
ENDIF()
ENDIF()
ENDIF(CMAKE_SYSTEM MATCHES IRIX)

# Add support for using Qt threads
IF(QT4_FOUND)
OPTION(BUILD_OPENTHREADS_WITH_QT "Build OpenThreads with Qt threading 
support." OFF)
ENDIF()

# Maybe we should be using the FindThreads.cmake module?
IF(ANDROID)
SUBDIRS(pthreads)
ELSEIF(QT4_FOUND AND BUILD_OPENTHREADS_WITH_QT)
SUBDIRS(qt)
ELSEIF(WIN32)
# So I think Cygwin wants to use pthreads
IF(CYGWIN)
SUBDIRS(pthreads)
ELSE()
# Everybody else including Msys should probably go here
SUBDIRS(win32) 
# examples)
ENDIF()
ELSE()
IF(UNIX)
IF(OPENTHREADS_USE_SPROC_INSTEAD_OF_PTHREADS)
SUBDIRS(sproc)
ELSE()
SUBDIRS(pthreads)
ENDIF()
ELSE()
MESSAGE("Sorry, OpenThreads may not support your platform")
ENDIF()
ENDIF()




In there it is selecting the correct  threading module for the platform. For a 
temporary fix you can just force the use of pthreads.

Regarding plugins, cmake will only generate build targets for pulgins for which 
it has found the dependancies. Be careful though that it doesn't find your 
operating system versions. For good asset support you'll need at least
libpng for loading of png images, and freetypes for fonts.

The osg format plugins themselves have no external dependancies so should build 
as long as osg does.

Cheers
Tom

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





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


[osg-users] Improving performance of OBJ rendering by back face culling

2012-05-29 Thread Gio
Hello, 
I am developing an application for iphone and ipod touch using openscenegraph. 
It is an augmented reality application and I have to load a very complex model. 
The original 3d model has 5 million vertices. 
Since I am using a mobile platform which is limited in computational power I 
simplified the model using 3d studio max. I reduced the size of the model from 
500Mb to 4.2 Mb using proOptimizer.
The model now has in total about 36,000 vertices and about 53,000 faces.

I am able to render it but frame rate is slow. I'd like to improve performance 
using back face culling. The point is I don't know how to activate it (if it is 
possible):
I tried with these lines of code but frame rate is still low:

[code]
osg::StateSet* ss = _root->getOrCreateStateSet();
osg::CullFace* cf = new osg::CullFace(osg::CullFace::BACK ); 
ss->setAttribute( cf );
[/code]

I am using OpenGL ES 2.0 and shaders.

I setup the camera in this way:

[code]
//set the clear color of the camera to be transparent
_viewer->getCamera()->setClearColor(osg::Vec4(0.0f, 0.0f, 0.0f, 0.0f)); 
//set the clear mask for the camera
_viewer->getCamera()->setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
_viewer->getCamera()->setRenderOrder(osg::CameraNode::PRE_RENDER);
_viewer->getCamera()->setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR);
[/code]

I use DO_NOT_COMPUTE_NEAR_FAR because I need to set manually projection and 
viewMatrix at every drawing cycle.

I also initially set viewport like this:

[code]
_viewer->getCamera()->setViewport(new osg::Viewport(0, 0, 
graphicsContext->getTraits()->width, graphicsContext->getTraits()->height));
[/code]

The hierarchy of my object is structured as:
 
_root is a osg::MatrixTransform

my 3d model is divided in subparts.
all the subparts of my 3d model are direct child of _root and are of type 
osg::Node

I hope you can give me some tips to improve performance. If you need some other 
information about my setup I will be glad to give it.

Thank you.

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


Re: [osg-users] Building a slimmed down static version of OSG

2012-05-29 Thread Preet
Quick follow up,

After playing around with the CMake gui for awhile, I managed to get
it to compile a set of static libs. Unfortunately it seems that
OpenThreads is missing from the built libs, and trying to compile a
project that links with osg results in a bunch of errors regarding
missing OpenThreads symbols.

The Playbook runs QNX, which has pthreads. The CMake Configure still
seems to fail the OpenThreads tests (is there anything I can point
CMakeLists to so it'll pass the tests?). I'd appreciate any advice.

Regards,

Preet


On Mon, May 28, 2012 at 6:00 PM, Preet  wrote:
> Hi,
>
> I'm trying to build OSG for another platform (the BlackBerry
> Playbook). The NDK for the Playbook includes the tool chains required
> to compile libs/apps for the device. It also has OpenGL ES 1.1/2.0
> libs, EGL, freetype, etc. I feel like it should be possible to compile
> OSG for the Playbook but I'm a little lost dealing with the included
> CMakeLists.
>
> I tried looking at this for reference:
> http://www.openscenegraph.com/index.php/documentation/platform-specifics/ios/23-configuring-cmake-for-ios,
> but I don't understand how to enable/disable certain plugins for OSG
> when configuring with CMake or how to know what's really required in a
> minimal build.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] TransformFeedbackBufferBinding

2012-05-29 Thread Martin Großer
Hello,

there are anyone who has experience with the 
osg::TransformFeedbackBufferBinding class? How can I use it? Have someone a 
little example?

Thanks

Martin
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!  

Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Advice on scene structuring

2012-05-29 Thread Sergey Polischuk
Hi, Pau

GL_ARB_draw_instanced extension. Osg support instanced drawing, 
osg:PrimitiveSet allows to set number of instances for drawing. You'll need to 
write shader which will transform vertices according to gl_InstanceID (most 
basic way is to use uniform array with transform matrices for each instance, 
and index it with gl_InstanceID).

29.05.2012, 14:40, "Pau Estalella" :
> Hi,
>
> Can anyone point me to some example or provide some advice on how to 
> structure a
> scene with a low poly object replicated thousands of times, at different
> orientations and positions? Each instance can be in one of the several states
> that the object can be, using an osg::Switch. The state of each instance 
> changes
> independently of the others.
> I think osg::PositionAttitudeTransform for each instance is not an option, as 
> it
> kills culling performance. Replicating the geometry and transforming the
> vertices seems a little bit wrong, and a total memory waste.
> Any ideas?
>
> Thank you very much.
>
> Cheers,
> Pau
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47912#47912
>
> ___
> 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] Advice on scene structuring

2012-05-29 Thread Jordi Torres
Hi Pau,

Maybe you can make use of Geometry Instancing, take a look at
osgdrawinstanced example. I've make use of instanced rendering to draw a
large amount of cubes and spheres.

Hope it helps.

2012/5/29 Pau Estalella 

> Hi,
>
> Can anyone point me to some example or provide some advice on how to
> structure a
> scene with a low poly object replicated thousands of times, at different
> orientations and positions? Each instance can be in one of the several
> states
> that the object can be, using an osg::Switch. The state of each instance
> changes
> independently of the others.
> I think osg::PositionAttitudeTransform for each instance is not an option,
> as it
> kills culling performance. Replicating the geometry and transforming the
> vertices seems a little bit wrong, and a total memory waste.
> Any ideas?
>
> Thank you very much.
>
> Cheers,
> Pau
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47912#47912
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Jordi Torres Fabra

gvSIG 3D blog
http://gvsig3d.blogspot.com
Instituto de Automática e Informática Industrial
http://www.ai2.upv.es
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Advice on scene structuring

2012-05-29 Thread Pau Estalella
Hi,

Can anyone point me to some example or provide some advice on how to structure a
scene with a low poly object replicated thousands of times, at different 
orientations and positions? Each instance can be in one of the several states 
that the object can be, using an osg::Switch. The state of each instance changes
independently of the others. 
I think osg::PositionAttitudeTransform for each instance is not an option, as 
it 
kills culling performance. Replicating the geometry and transforming the
vertices seems a little bit wrong, and a total memory waste. 
Any ideas?

Thank you very much.

Cheers,
Pau

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





___
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: mixing skin and morph animation.

2012-05-29 Thread Sergey Polischuk
Hi, Gil

skinning + morph animation dont work out of the box with fbx files, ways to 
make it work was repeatedly discussed in mailing lists, i think you'll be able 
to find it with forum search or google

Cheers,
Sergey.

20.05.2012, 12:41, "Gil Hadas" :
> Hi,
> I am new in the OSG forum.
> I have the same problem,
> I am using exported fbx file , exported from maya, with skeleton.
> I am using libfbxsdk-2013.1.
> I suspect it is related to the warning:
> "class osg::ComputeBoundingBoxCallback
> InputStream::readObject(): Unsupported wrapper class osg::UpdateCallback"
> any idea someone?
> I have modified the code of the fbx plugin to support this sdk version.
> if someone interested in the new FBX SDK code,how can I deliver my code 
> modification?
> Thank you!
>
> Cheers,
> Gil
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47778#47778
>
> ___
> 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] Proland: a new open source planet rendering engine

2012-05-29 Thread Robert Osfield
On 29 May 2012 10:43, michael kapelko  wrote:
> I'm wondering how is that related to OSG in the first place :)
>
> *prepares to advertise his backyard t-shirt sales in OSG mailing list*

;-)

Given Eric hasn't replied it rather does look like he's spamming the
OSG developer community with non OSG adverts.  Perhaps Eric will
provide a reciprocal arrangement where we can spam the INRIA community
with adverts.

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


Re: [osg-users] Help: intersectionVisitor in a separate working thread cannot work when it is to visit a view node

2012-05-29 Thread Robert Osfield
Hi Shuiying,

There isn't really anything others can do to help you as you are the
one with your code with your particular OSG usage approach, it's
really now down to you to work out what is going on with your
application.  The best thing I can suggest is step through the
application with a debugger, perhaps you'll spot something wrong.

Robert.


On 29 May 2012 10:53, wang shuiying  wrote:
> Hello, Robert
>
> Sorry for the late response. But I still cannot figure out why the thread
> calling "viewNode->accept(IntersectionVisitor)" just stops there without
> going any further. I took a look at the source code of "accept()" function
> as well as the "frame()" function of viewer, but I didn't find a mutex or
> something like that to protect the node from being visited by two
> nodevisitors at the same time.  In my application, intersectionVisitor will
> not change the scene data, only to get intersections. I try to do this
> because I need the intersectionVisitor  to change matrix and perform
> intersection at a higher frequency than the main frame frequency of the
> scenedata traversal. Is there any possibility to work this out?
>
>
> Thank you very much in advance!
>
> Best regards
>
> Shuiying
>
> On 04/01/2012 09:05 PM, osg-users-requ...@lists.openscenegraph.org wrote:
>>
>> Message: 11
>> Date: Sun, 1 Apr 2012 18:44:28 +0100
>> From: Robert Osfield
>> To: OpenSceneGraph Users
>> Subject: Re: [osg-users] Help: intersectionVisitor in a separate
>>        working thread cannot work when it is to visit a view node
>> Message-ID:
>>
>>  
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Hi Shuiying,
>>
>> It's not safe to read for a data structure that is written to be
>> another thread.  If you scene graph is not changing then it'll be safe
>> to traverse multi-threaded without problem but if it's changing you'll
>> need to serialize the reading from the writing threads in some manner.
>>  The normal frame loop that the OSG provides with the update and event
>> traversal that can do updates occurring single threaded and before the
>> cull and draw traversals start.
>>
>> Robert.
>>
>> On 1 April 2012 09:46, wang shuiying  wrote:
>>>
>>> >  Hello,
>>> >
>>> >  In my programme, I have among others a view node and a thread. The
>>> >  geometries under the view node changes every frame. The thread
>>> > controls the
>>> >  frequency at which an IntersectionVisitor visits the view node.
>>> >
>>> >  However it turns out it doesn't work. When the intersectionVisitor is
>>> > ready
>>> >  to visit the view node, it stops there, without going further.
>>> >
>>> >  If ?the visit of intersectionVisitor is made to be a part of ?the
>>> >  updatecallback of view node, then it works.
>>> >
>>> >  I wonder if the intersectionVisitor can work separately from the
>>> >  updatecallback of the node that it visits
>>> >
>>> >
>>> >  Thank you very much in advance for any advice!
>>> >
>>> >  Shuiying
>>> >  ___
>>> >  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] [ANN] Proland: a new open source planet rendering engine

2012-05-29 Thread michael kapelko
I'm wondering how is that related to OSG in the first place :)

*prepares to advertise his backyard t-shirt sales in OSG mailing list*
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help: intersectionVisitor in a separate working thread cannot work when it is to visit a view node

2012-05-29 Thread wang shuiying

Hello, Robert

Sorry for the late response. But I still cannot figure out why the 
thread calling "viewNode->accept(IntersectionVisitor)" just stops there 
without going any further. I took a look at the source code of 
"accept()" function as well as the "frame()" function of viewer, but I 
didn't find a mutex or something like that to protect the node from 
being visited by two nodevisitors at the same time.  In my application, 
intersectionVisitor will not change the scene data, only to get 
intersections. I try to do this because I need the intersectionVisitor  
to change matrix and perform intersection at a higher frequency than the 
main frame frequency of the scenedata traversal. Is there any 
possibility to work this out?



Thank you very much in advance!

Best regards

Shuiying

On 04/01/2012 09:05 PM, osg-users-requ...@lists.openscenegraph.org wrote:

Message: 11
Date: Sun, 1 Apr 2012 18:44:28 +0100
From: Robert Osfield
To: OpenSceneGraph Users
Subject: Re: [osg-users] Help: intersectionVisitor in a separate
working thread cannot work when it is to visit a view node
Message-ID:

Content-Type: text/plain; charset=ISO-8859-1

Hi Shuiying,

It's not safe to read for a data structure that is written to be
another thread.  If you scene graph is not changing then it'll be safe
to traverse multi-threaded without problem but if it's changing you'll
need to serialize the reading from the writing threads in some manner.
  The normal frame loop that the OSG provides with the update and event
traversal that can do updates occurring single threaded and before the
cull and draw traversals start.

Robert.

On 1 April 2012 09:46, wang shuiying  wrote:

>  Hello,
>
>  In my programme, I have among others a view node and a thread. The
>  geometries under the view node changes every frame. The thread controls the
>  frequency at which an IntersectionVisitor visits the view node.
>
>  However it turns out it doesn't work. When the intersectionVisitor is ready
>  to visit the view node, it stops there, without going further.
>
>  If ?the visit of intersectionVisitor is made to be a part of ?the
>  updatecallback of view node, then it works.
>
>  I wonder if the intersectionVisitor can work separately from the
>  updatecallback of the node that it visits
>
>
>  Thank you very much in advance for any advice!
>
>  Shuiying
>  ___
>  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] Proland: a new open source planet rendering engine

2012-05-29 Thread Christian Buchner
So who will be porting this to OSG ;)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [AD] Win Free e-Copies of OpenSceneGraph Cookbook

2012-05-29 Thread Filip Arlet
Hi,
I think Chapter 8, Managing Massive Amounts of Data will be most interesting 
part for me, because I'm working on program that manages very large data sets 
of geographical data.
... 

Thank you!

Cheers,
Filip[/i]

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





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


Re: [osg-users] UseVertexAttributeAliasing and fixed-function pipeline

2012-05-29 Thread Pau Estalella
OK. It seems I got everything working nicely. It would be nice, anyway, to get 
a working OSG with text labels, statsHandler, etc. even when 
useModelViewAndProjectionUniforms and useVertexAttributeAliasing are set to 
TRUE;

Thank you very much,  Robert, for your assistance.

Cheers,
Pau

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





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