Re: [osg-users] EXTERNAL: Re: voxelization using offscreen rendering

2012-06-08 Thread Pecoraro, Alexander N
Thanks, that sounds much better than the way I was attempting to do it.

Alex

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Thursday, June 07, 2012 8:44 PM
To: OpenSceneGraph Users
Subject: EXTERNAL: Re: [osg-users] voxelization using offscreen rendering

Hi Alex,

To use the same view point for LOD calculations for nested Camera's the 
osg::Camera class has a support for setting the ReferenceFrame of the nested 
Camera to ABSOLUTE_RF_INHERIT_VIEWPOINT which allows them to have independent 
view matrices but use the same viewpoint and the parent Camera for LOD calcs.  
The osgShadow NodeKit uses this in it's implementations so have a look the 
source code entries for setReferenceFrame in it for examples.

Robert.

On 7 June 2012 22:09, Pecoraro, Alexander N alexander.n.pecor...@lmco.com 
wrote:
 Hi,



 I'm wondering if someone can suggest an elegant solution to the 
 problem of trying to voxelize some triangle based geometry. The 
 general algorithm is to render the scene from multiple different 
 camera view points and then use the resulting color and depth buffer 
 from each render pass to construct a voxel data set. However, the 
 problem is that the geometry that I'm attempting to voxelize has 
 multiple levels of detail so each camera view sees a slightly different level 
 of detail which ends up generating a fuzzy voxel data set.
 What I need is for the first render pass using the top down overhead 
 camera be the determining factor in the level of detail selection and 
 then all the other camera's should use the same level of detail (i.e. 
 same list of osg::Geometry nodes) when they render. How can I do this 
 using the osg::Camera class?



 Thanks.



 Alex


 ___
 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] 139.com Spam

2012-06-08 Thread Robert Osfield
Hi Rui,

On 8 June 2012 05:03, Wang Rui wangra...@gmail.com wrote:
 I also received the email and fortunately I can speak Chinese. The mail is
 sent from the 139.com administer and it said that a registered user with the
 address 13488874...@139.com here is not active, but we still sent mail to
 him (I think this is because the mail list server automatically send every
 mail to him), so the 139.com server automatically replied with the notice.

 A best way to solve it is to remove the inactive user from our mail list.
 Robert if you couldn't find him, I'll try to contact with their manager to
 explain the situation.

There isn't anyone subscribed to osg-users and osg-submissions with a
139.com domain, let alone this specific address.

Could it be another address that is subscribed is forwarding to the
13488874...@139.com address?

Thanks for looking into it,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 139.com Spam

2012-06-08 Thread Wang Rui
Hi Robert,

I've already wrote a mail to t...@139.com but I don't think they will reply
quickly enough, as 139.com in fact belongs to a huge state-owned company
(China Mobile) who always ignores others' feelings ;-(

Is it possible that this address is registered to the forum and the mail is
forwarded from there?

Wang Rui


2012/6/8 Robert Osfield robert.osfi...@gmail.com

 Hi Rui,

 On 8 June 2012 05:03, Wang Rui wangra...@gmail.com wrote:
  I also received the email and fortunately I can speak Chinese. The mail
 is
  sent from the 139.com administer and it said that a registered user
 with the
  address 13488874...@139.com here is not active, but we still sent mail
 to
  him (I think this is because the mail list server automatically send
 every
  mail to him), so the 139.com server automatically replied with the
 notice.
 
  A best way to solve it is to remove the inactive user from our mail list.
  Robert if you couldn't find him, I'll try to contact with their manager
 to
  explain the situation.

 There isn't anyone subscribed to osg-users and osg-submissions with a
 139.com domain, let alone this specific address.

 Could it be another address that is subscribed is forwarding to the
 13488874...@139.com address?

 Thanks for looking into it,
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] Multiple Qt windows showing different nodes without performance loss?

2012-06-08 Thread Filip Arlet
Hi,
I am sorry, I do not understand this. Could you expand on this? Which 
 code are you referring to?


I'm reffering to ViewerBase::run(). And managing frames. Calling 
ViewerBase::frame renders one frame. Run() function handles frame rate and on 
demand rendering, etc.

In Qt I'm referering to class HeartBeat localy defined in GraphicsWindowQt.cpp 
which in fucntion timerEvent handles rendering of frames. Main idea in this is 
rendering frames in Qt event loop with timer. Timer event is called whenever Qt 
is not busy with handling other events. Thus you don't have to create custom 
QTimer for rendering nor custom run() function (or frame() function) with 
something like HandleQtEvents() call inside.

osgQt::setViewer is sufficient, but if you want to render in different thread, 
you will have to create custom thread loop with exec() call.

CompositeViewer:
It's very simple, just use osgviewerQt example, but instead of defining timer 
for updating(), call osgQt::setViewer() in main function (warning: setViewer() 
uses observer_ptr and locks it, so you will have to create reference pointer of 
widget instead of normal one)

Thank you!

Cheers,
Filip[/quote]

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





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


Re: [osg-users] Using the notification API with multi-threading - heap corruption errors

2012-06-08 Thread Filip Arlet
Hi,
Beyond mutexes, I am less skilled with thread synchronisation. But in
other libraries like Qt sometimes the concept of thread local storage
is used to separate resource access from parallel threads. Do you
think this concept would be applicable to provide every thread with
its own stream? Would this concept be more efficient compared to
mutexes? I could imagine that every thread writes to an own stream
which then calls the *same* osg::NotifyHandler subclass. This way, the
notify handler would be responsible for thread-safeness again (as it
is now).

It's always problem of standard library. Creating output streams for every 
thread is overkill and not safe either. What if internal implementation of new 
streams will call some static internal write() function that won't be 
threadsafe ?

I agree with the argument not to add extra mutexes. But what do you
mean with assumption that stream are thread safe? Obviously neither
the stream implementation of the Visual compiler under Windows nor the
one of the GNU compiler under Lubuntu are thread-safe by nature. Do
you know any such implementations or platforms or maybe compiler flags
which fulfill this assumption?

I agree with that too. Solution using custom osg::NotifyHandler with mutexes is 
easy and it dont have to be in osg core library, what about using NotifyHandler 
with mutexes if OSG_NOTIFY_LEVEL is set ? 
Ok the problem will always persist, if someone use std::out directly, but that 
is not OSG problem 
Cheers,
Filip

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





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


Re: [osg-users] problem with seams while drawing quads and quad strips

2012-06-08 Thread Michael Schanne
You're right, the normals were the problem.  My mistake was using the 
QUAD_STRIPS and setting the normals for the shared vertices to the combined 
normals of the adjacent faces.  I changed everything to QUADS and used the 
face's normal as each vertex's normal, and then it looked correct.

Thanks!

Cheers,
Michael

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





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


[osg-users] Depth test and RenderBin details

2012-06-08 Thread Bob Slobodan
Hi guys,

I've been implementing my own dragger (from scratch, I didn't use the osg 
draggers for specific reasons) and I have some problem with the render order. 
Basically my dragger is composed of four sub-draggers :
- 3 axis dragger (each one composed of a line and a cone)
- 1 sphere dragger
The 3 axis dragger and the sphere have the same origin.

The thing is that I want my whole dragger (the 3 axis and the sphere) to always 
be rendered on top of the rest of the scene.

But when I deactivate the depth test and set the RenderBinDetails on my main 
dragger (node that contains the four sub-draggers), the sphere (which is the 
last node to be added to my main dragger) always appears on top of the axis.

Is there a way to render my dragger with the depth test between the axis and 
the sphere, and then to display the whole dragger on top of the rest of the 
scene ?

Thank you!

Cheers,
Bob

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





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


Re: [osg-users] 139.com Spam

2012-06-08 Thread Martin Naylor
Hi all,

Interestingly I don't have any, junk mail or anywhere?

I guess this could be filtered out before it reaches me by my ISP(virgin
media).

 

Good luck.

 

Martin

 

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Wang Rui
Sent: 08 June 2012 09:51
To: OpenSceneGraph Users
Subject: Re: [osg-users] 139.com Spam

 

Hi Robert,

 

I've already wrote a mail to t...@139.com but I don't think they will reply
quickly enough, as 139.com in fact belongs to a huge state-owned company
(China Mobile) who always ignores others' feelings ;-(

 

Is it possible that this address is registered to the forum and the mail is
forwarded from there?

 

Wang Rui

 

2012/6/8 Robert Osfield robert.osfi...@gmail.com

Hi Rui,


On 8 June 2012 05:03, Wang Rui wangra...@gmail.com wrote:
 I also received the email and fortunately I can speak Chinese. The mail is
 sent from the 139.com administer and it said that a registered user with
the
 address 13488874...@139.com here is not active, but we still sent mail to
 him (I think this is because the mail list server automatically send every
 mail to him), so the 139.com server automatically replied with the notice.

 A best way to solve it is to remove the inactive user from our mail list.
 Robert if you couldn't find him, I'll try to contact with their manager to
 explain the situation.

There isn't anyone subscribed to osg-users and osg-submissions with a
139.com domain, let alone this specific address.

Could it be another address that is subscribed is forwarding to the
13488874...@139.com address?

Thanks for looking into it,
Robert.

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

 

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


[osg-users] Custom Camera and Multi-stage Rendering (RenderStage)

2012-06-08 Thread Paul Leopard
I'm a little confused here … I’m working on an application and I think I’m 
close to completing it but I have come to a point where I need some help. 
First some background :

The application requires anti-aliasing of a scene and the subsequent creation 
of floating point color and depth textures that can be sampled and used like 
any ordinary texture.  Specifically I need to do the following:
1)  Render the scene to an offscreen FBO that has float color and depth 
render buffers attached to it and is configured for AA 
2)  Automatically blit the color and depth buffers in the FBO to another 
FBO that has attached float color and depth textures.
3)  Query/sample the depth texture and map the color texture onto a quad

I have successfully got this to work in standard OpenGL. Now I am trying to 
understand how to do this in an OpenSceneGraph context. I see that RenderStage 
has what I need in terms of the render buffer and resolve buffer blit … good so 
far …

So … I suspect that what I need to do is to get a pointer to a RenderStage and 
configure that instance. I have a custom camera class (class IRCamera : public 
osg::Camera) that I am using for offscreen rendering. Currently it just has a 
color texture attached to it and I am using that rendered texture successfully. 
I want to rework this custom camera class to use the multi-stage approach so 
that I can take advantage of AA and still have the rendered results in a 
texture.

Is there a way for me to get a pointer to a RenderStage instance associated 
with my custom camera? Is this the proper approach for what I want to do?
Thanks in advance,
Paul

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





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


Re: [osg-users] Custom Camera and Multi-stage Rendering (RenderStage)

2012-06-08 Thread Paul Martz
I'm fairly certain you can access the RenderStage in a Camera callback, but I'm 
not sure you're approaching the problem correctly.


It seems like the multipass rendering you describe below could be accomplished 
by using a series of Cameras. In OSG these must be arranged hierarchically, but 
you set the Cameras as pre- or post-render to specify the sequential rendering 
order. There's an osgprerender example that uses multiple Cameras, which you 
might find helpful.

   -Paul


On 6/8/2012 9:30 AM, Paul Leopard wrote:

I'm a little confused here … I’m working on an application and I think I’m 
close to completing it but I have come to a point where I need some help.
First some background :

The application requires anti-aliasing of a scene and the subsequent creation 
of floating point color and depth textures that can be sampled and used like 
any ordinary texture.  Specifically I need to do the following:
1)  Render the scene to an offscreen FBO that has float color and depth 
render buffers attached to it and is configured for AA
2)  Automatically blit the color and depth buffers in the FBO to another 
FBO that has attached float color and depth textures.
3)  Query/sample the depth texture and map the color texture onto a quad

I have successfully got this to work in standard OpenGL. Now I am trying to 
understand how to do this in an OpenSceneGraph context. I see that RenderStage 
has what I need in terms of the render buffer and resolve buffer blit … good so 
far …

So … I suspect that what I need to do is to get a pointer to a RenderStage and 
configure that instance. I have a custom camera class (class IRCamera : public 
osg::Camera) that I am using for offscreen rendering. Currently it just has a 
color texture attached to it and I am using that rendered texture successfully. 
I want to rework this custom camera class to use the multi-stage approach so 
that I can take advantage of AA and still have the rendered results in a 
texture.

Is there a way for me to get a pointer to a RenderStage instance associated 
with my custom camera? Is this the proper approach for what I want to do?
Thanks in advance,
Paul

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





___
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] Custom Camera and Multi-stage Rendering (RenderStage)

2012-06-08 Thread Tim Moore
There's also the osgfpdepth example, which does render to an FBO with
a floating point depth buffer and then renders the image to the window
color buffer.

Tim

On Fri, Jun 8, 2012 at 6:25 PM, Paul Martz pma...@skew-matrix.com wrote:
 I'm fairly certain you can access the RenderStage in a Camera callback, but
 I'm not sure you're approaching the problem correctly.

 It seems like the multipass rendering you describe below could be
 accomplished by using a series of Cameras. In OSG these must be arranged
 hierarchically, but you set the Cameras as pre- or post-render to specify
 the sequential rendering order. There's an osgprerender example that uses
 multiple Cameras, which you might find helpful.
   -Paul



 On 6/8/2012 9:30 AM, Paul Leopard wrote:

 I'm a little confused here … I’m working on an application and I think I’m
 close to completing it but I have come to a point where I need some help.
 First some background :

 The application requires anti-aliasing of a scene and the subsequent
 creation of floating point color and depth textures that can be sampled and
 used like any ordinary texture.  Specifically I need to do the following:
 1)      Render the scene to an offscreen FBO that has float color and
 depth render buffers attached to it and is configured for AA
 2)      Automatically blit the color and depth buffers in the FBO to
 another FBO that has attached float color and depth textures.
 3)      Query/sample the depth texture and map the color texture onto a
 quad

 I have successfully got this to work in standard OpenGL. Now I am trying
 to understand how to do this in an OpenSceneGraph context. I see that
 RenderStage has what I need in terms of the render buffer and resolve buffer
 blit … good so far …

 So … I suspect that what I need to do is to get a pointer to a RenderStage
 and configure that instance. I have a custom camera class (class IRCamera :
 public osg::Camera) that I am using for offscreen rendering. Currently it
 just has a color texture attached to it and I am using that rendered texture
 successfully. I want to rework this custom camera class to use the
 multi-stage approach so that I can take advantage of AA and still have the
 rendered results in a texture.

 Is there a way for me to get a pointer to a RenderStage instance
 associated with my custom camera? Is this the proper approach for what I
 want to do?
 Thanks in advance,
 Paul

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





 ___
 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] Custom Camera and Multi-stage Rendering (RenderStage)

2012-06-08 Thread Paul Leopard
Thanks for your help, I'll check into the Camera callback. I've dissected the 
the osgfpdepth example already ... that's where I learned to do the floating 
point depth buffer and the anti-aliasing setup for a frame buffer object. I'll 
look into it again to see if I've missed something ...

I'm fairly certain that I'm approaching it the correct way as RenderStage calls 
glBlitFramebuffer(...) to blit from a buffer to a texture according to a buffer 
attachment map owned by its resolve FBO :


Code:
GLbitfield blitMask = 0;
//find which buffer types should be copied
for (FrameBufferObject::AttachmentMap::const_iterator
it = _resolveFbo-getAttachmentMap().begin(),
end =_resolveFbo-getAttachmentMap().end(); it != end; ++it)
{
switch (it-first)
{
case Camera::DEPTH_BUFFER:
blitMask |= GL_DEPTH_BUFFER_BIT;
break;
case Camera::STENCIL_BUFFER:
blitMask |= GL_STENCIL_BUFFER_BIT;
break;
case Camera::PACKED_DEPTH_STENCIL_BUFFER:
blitMask |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT;
break;
case Camera::COLOR_BUFFER:
blitMask |= GL_COLOR_BUFFER_BIT;
break;
default: ...
}
}
// Bind the resolve framebuffer to blit into.
_fbo-apply(state, FrameBufferObject::READ_FRAMEBUFFER);
_resolveFbo-apply(state, FrameBufferObject::DRAW_FRAMEBUFFER);
if (blitMask)
{
// Blit to the resolve framebuffer.
fbo_ext-glBlitFramebuffer(
0, 0, static_castGLint(_viewport-width()), 
static_castGLint(_viewport-height()),
0, 0, static_castGLint(_viewport-width()), 
static_castGLint(_viewport-height()),
blitMask, GL_NEAREST);
}


[/code]

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





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


[osg-users] The cow is alive! .... with Necessitas

2012-06-08 Thread Massimo Tarantini
Hi,

after many days i have been succesfull to display that hell of cow
on my Archos 80 G9, using OSG 3.0.1 compiled for Android under Ubuntu 11,
and Necessitas (QT for Android) using OGLES1.1

[Image: http://img17.imageshack.us/img17/7555/p6082164.jpg ]

Probably i have made some mistakes, but i have been forced to recompile
Necessitas QT Framework to debug some libEGL errors, and i have modified two 
lines of code:

In qandroideglplatformcontext.ccp
//m_eglContext = eglCreateContext(m_eglDisplay,config, 
  EGL_NO_CONTEXT, attribList); 

-  m_eglContext = eglCreateContext(m_eglDisplay,config,   
   EGL_NO_CONTEXT, 0);


In qeglconvenience.cpp
EGLConfig cfg = 0;
QVectorEGLint configureAttributes = 
   q_createConfigAttributesFromFormat(format);
[...]
configureAttributes.append(EGL_OPENGL_ES2_BIT);
configureAttributes.append(EGL_NONE);

-   EGLConfig cfg = 0;
QVectorEGLint configureAttributes = 
   q_createConfigAttributesFromFormat(format);
[...]
configureAttributes.append(EGL_OPENGL_ES_BIT);
configureAttributes.append(EGL_NONE);

I have not enough skills to fully understand this code, but i guess
that QT was initializing EGL for OGLES 2.0 and not for OGLES 1.1, 
while i was using the following defines in QT Creator
DEFINES += \
QT_OPENGL_ES \
QT_OPENGL_ES_1 \
EGL_OPENGL_ES_API \
OSG_GLES1_AVAILABLE \
OSG_GL_MATRICES_AVAILABLE \
OSG_GL_VERTEX_FUNCS_AVAILABLE \
OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE \
OSG_GL_FIXED_FUNCTION_AVAILABLE \
OSG_BUILD_PLATFORM_ANDROID \
OSG_LIBRARY_STATIC

The cow.osg file ha been reduced removing the texture, to avoid errors with 
OGLES 1.1

Cheers,
Massimo[/img]

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





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


[osg-users] 8 Weeks till the Openscenegraph BOF at SIGGRAPH

2012-06-08 Thread John Richardson
Hello,

Delurking.

8 August 2012. 10AM - 11AM.

Commence making those videos and slides. Be the first geek in your
neighborhood to reserve a slot:)

John F. Richardson


smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osggis_build

2012-06-08 Thread 翟小明
Hi, all! when i use osggis_build tool to create the boston-sample
example.the cmd is C:\Documents and Settings\Administratorosggis_buildd
--threads 1 -f
E:\Program Files\osg_3_0_0VS9SP1\osgGIS\GISDATA\boston-sample\project.xml,
but no data output and there is a warn[osgGIS] WARN: Unable to load data
for terrain default.
[osgGIS] Done, total build time = 1.15577s
Closing DynamicLibrary osgPlugins-3.0.0/osgdb_ived.dll.
why? And how do i? thank you.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org