Hi Rob,
This type of problem is next to impossible to guess what might be wrong
without having the same configuration in front of me, there are too many
things that might affect things in the mix. I haven't use Equalizer
myself, I'd guess lots of other OSG users won't have either so you'll
Hi all
I have a strange problem I cannot solve. I use OpenSceneGraph 3.2.1, osgEarth
2.6 and Equalizer (parallel rendering framework).
When I load a sample osgEarth file, I should have a sky and the earth. But I
only get one of these, depending on how I set the depth buffer and culling
I figured it out, I think it was due to my linearization of the z-buffer
values.
This is the right way to compute it, and it works for me:
Code:
float z, z_b, z_n=0;
for(int j=winH-1; j=0; j--)
{
for(int k=0; kwinW; k++)
{
Thanks, hybr. But I still do not know why the values in the image attached to
the depth buffer are the same in every single array cell, when I would expect
to see a lot of variance between the top and bottom portions of the image,
given that the top portion would be covering the sky, and the
Hi
Is the image that you attach to camera have same dimensions as camera viewport?
May be you rendering only small part of picture to your image ( like small
piece of sky )
Cheers,
Sergey.
17.09.2012, 17:09, Andrey Shvartsman ashvarts...@dcscorp.com:
Thanks, hybr. But I still do not know why
For some reason the forum software is not letting me post the full code yet,
because I don't have 2 posts yet. Hopefully after this post I will be able to
post the full code.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50032#50032
Full code attached below:
Code:
/* -*-c++-*- OpenSceneGraph Cookbook
* Chapter 6 Recipe 4
* Author: Wang Rui
*/
#include osg/Texture2D
#include osg/Group
#include osgDB/ReadFile
#include osgViewer/Viewer
#include CommonFunctions
#include osg/io_utils
#include sstream
osg::ref_ptrosg::Image
Hi
to compute depth from z-buffer depth you should use:
depth = -gl_ProjectionMatrix[3].z/(zb_depth * (-2.0) + 1.0 -
gl_ProjectionMatrix[2].z)
where:
gl_ProjectionMatrix[3].z = - 2*far*near / (far - near)
gl_ProjectionMatrix[2].z = - (far + near) / (far - near)
Cheers.
14.09.2012, 00:49,
Hi community,
what is the simplest way to display the depth buffer?
Nick
http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi there
I have the following RTT method:
ref_ptrImage image = new Image;
image-allocateImage(osgViewer-width(), osgViewer-height(), 1,
GL_RGBA, GL_UNSIGNED_BYTE);
// resets the size of the texture
texture-setTextureSize(osgViewer-width(), osgViewer-height());
// sets
2010/1/11 Dominic Stalder dominic.stal...@bluewin.ch
camera-attach(Camera::COLOR_BUFFER, image.get(), 0, 0); --
camera-attach(Camera::DEPTH_BUFFER, image.get(), 0, 0);
Well you are trying to attach a depth texture to the color buffer, that's
not going to work.
Try
Hi Dominic,
AFAIK, the png plugin does not support writing depth image. Try the tiff
plugin in svn/trunk ; a recent submission made it write depth images, and it
works for me.
Mourad
On Mon, Jan 11, 2010 at 4:17 PM, Dominic Stalder dominic.stal...@bluewin.ch
wrote:
Hi there
I have the
Hi,
I am trying to do the same. I noticed two methods of Texture2D.
texShadowMap-setShadowComparison(true);
texShadowMap-setShadowTextureMode(Texture2D::LUMINANCE);
what are these doing? Also, what is to be done to display the depth texture
on screen.
Thanks
Nick
Hi Simon
I'm attaching to the depth buffer (look on the right --
camera-attach(Camera::DEPTH_BUFFER, image.get(), 0, 0); ;-)
Thanks anyway.
Dominic
Am 11.01.10 22:15, schrieb Simon Hammett:
2010/1/11 Dominic Stalder dominic.stal...@bluewin.ch
mailto:dominic.stal...@bluewin.ch
, January 11, 2010 10:31 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Depth buffer for shadow mapping
Hi,
I am trying to do the same. I noticed two methods of Texture2D.
texShadowMap-setShadowComparison(true);
texShadowMap-setShadowTextureMode(Texture2D::LUMINANCE);
what are these doing
Its still not working with tiff. But I also have problems when I put it
directly into the texture, it doesn't work too.
Any ideas?
Am 11.01.10 22:27, schrieb Mourad Boufarguine:
Hi Dominic,
AFAIK, the png plugin does not support writing depth image. Try the
tiff plugin in svn/trunk ; a
*DrawableDrawWithDepthShadowComparisonOffCallback* callback
Wojtek
*From:* Trajce Nikolov nikolov.tra...@gmail.com
*Sent:* Monday, January 11, 2010 10:31 PM
*To:* OpenSceneGraph Users osg-users@lists.openscenegraph.org
*Subject:* Re: [osg-users] Depth buffer for shadow mapping
Hi,
I am trying
Hi,
The attached .osg file shows what you get with Glen's suggestion to use a
ClusterCullingCallback + render bins + depth function ALWAYS for the icons. Is
this the effect you want?
Cheers,
Tony
--
Read this topic online here:
Hi, tony!
thank you!
yes! this is the effect I want!
can you post some c++ code?
Thank you!
Cheers,
Sergey
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16604#16604
___
osg-users mailing list
Hi,
yes, icons is the place labels on the eart (for example city label), objects
above earth - ballistic missile or plane.
Now if label and air object is in one eye point - label masks air object.
Sorry for my english, mixed up under and above in previous posts. :-)
Thank you!
Cheers,
Sergey,
Thanks for the clarification.
What happens if you also disable writing to the depth buffer for the icons?
You might also have to set render bins to control render order.
Earth - icons - objects above earth
This will allow all labels to show through the earth, which might not be what
Here's an idea..
First, apply a ClusterCullingCallback to each icon, with the normal vector
being the up-vector at the icon's location. This is prevent icons from
rendering behind the Earth .
Render the Earth normally, and then also to the stencil buffer.
Increase the render bin # of the icons
Hi, Glenn
can you post some example code ?
Cheers,
Sergey
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15790#15790
___
osg-users mailing list
osg-users@lists.openscenegraph.org
For which part? I can refer to you code in the examples:
osgfadetext - demonstrates cluster culling (osg::ClusterCullingCallback)
osgreflect - demonstrates writing and reading the stencil buffer
(osg::Stencil) and setting render bin numbers
(osg::StateSet::setRenderBinDetails)
HTH.
Glenn
Hi Sergey,
How about putting the icons under a second camera using orthographic projection
and POST_RENDER order.
You can then have the earth model rendered with depth testing independently of
anything else.
The osghud example should help.
Cheers,
Tony
--
Read this
Hi,
icons should be closed by object under Earth, but shold not sink into Earth.
Thank you!
Cheers,
Sergey
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15749#15749
___
osg-users mailing list
Hi,
Could you provide a screenshot showing the problem?
Are the icons used as place labels on the earth?
Cheers,
Tony
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15754#15754
___
osg-users
Hi, all
I have a problem. I have a planet Earth in my scene and some icons presented by
osg::Text on it. Icons always looks to the camera. When I move my camera my
icons sink in Earth. When I set DEPH test for icons to OFF all looks good, but
objects under earth (plane for example) is behind
Hi YangXiao,
On 2/4/09 3:22 PM, YangXiao wrote:
z = float ( (depthBuffer-data())[i*4] );
Could it be your cast is wrong? You're only reading every fourth byte and casting that to
float, which explains why you're only seeing 0-255.
Try z = ((float*) depthBuffer-data())[i]; instead.
Thanks ulrich
I paste this code from others,and not check!
--- 09年4月2日,周四, Ulrich Hertlein u.hertl...@sandbox.de 写道:
发件人: Ulrich Hertlein u.hertl...@sandbox.de
主题: Re: [osg-users] Depth buffer data is not clamp to [0.0,1.0].
收件人: OpenSceneGraph Users osg-users@lists.openscenegraph.org
日期: 2009年
Hi everyone:
Here is My code:
depthBuffer-allocateImage(width, height, 1,GL_DEPTH_COMPONENT,GL_FLOAT);
viewer.getCamera()-setPostDrawCallback( new ScreenShotCallback());
while (!viewer.done())
{
viewer.getCamera()-attach(osg::Camera::DEPTH_BUFFER, depthBuffer);
viewer.frame();
Hello all,
I want to render a scene to a texture. Here is my implementation of the
texture and the camera.
osg::Texture2D* texture = new osg::Texture2D;
texture -setTextureSize(700, 525);
texture -setInternalFormat(GL_RGBA);
texture
HI Martin,
I'm not sure where to start because you code is simply setting up a
render to texture which assigns the texture as the colour buffer not
the depth buffer... so you'll never get the alpha value filled with
depth values.
To capture the depth buffer you'll need to attach a separate
Hi Wojtek,
it works ! thanks a lot for your precious answear.
For those who will be interrested, i'll post later the complete source code
with corrections.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
In fact i've got a new problem (perhaps it's normal), the transformations
applied with texgen are not take into account when i use my shader. Do you
have any idea of how to proceed ? I attach a screen capture of my problem.
Thanks
On Fri, Jun 13, 2008 at 4:53 PM, Mathieu Schoutteten [EMAIL
week. I hope it helps. If not maybe others on this forum
will offer some assistance.
Cheers,
Wojtek
- Original Message -
From: Mathieu Schoutteten
To: OpenSceneGraph Users
Sent: Friday, June 13, 2008 5:42 PM
Subject: Re: [osg-users] [Depth Buffer rendering]
In fact i've
Hello,
I would like to create an effect (using osgFX) which render the depth
buffer. I'm using a RTT and then apply the texture to the object but i'm
having some problem for mapping correctly the texture on the object (see
capture in attachment). My RTT camera must be similar to my viewer camera,
i post my source code for more clarity.. Maybe someone already try to have
the same effect.
DepthBuffer.cpp include a main method for test.
#include DepthBuffer.h
#include osgFX/Registry
#include osgViewer/Viewer
#include osgDB/ReadFile
namespace
{
osgFX::Registry::Proxy proxy(new
other model.
Hope it helps, and no guarrantees, I have no time to verify if everything
what I wrote is 100% correct.
Cheers,
Wojtek
- Original Message -
From: Mathieu Schoutteten
To: osg-users@lists.openscenegraph.org
Sent: Thursday, June 12, 2008 4:35 PM
Subject: Re: [osg-users
I have to laugh at myself for this brilliant idea! Alpha blending is
mutually exclusive with occlusion. In otherwords, the parts that I
want occluded by the invisible portion, if that invisible portion is
alpha blended, will be visible. However, I want a copy of the
invisible geometry so that I
Hi Frédéric,
Thanks for your advice. The invisible objects are in the scenegraph
before the visible ones so at least I have that going for me. I think
we won't be moving the camera view too much so I think it will be OK.
I just thought it was weird that I would get the expected behavior
until I
Hi Judie,
I'm afraid I've just found it too difficult to work out what you are
doing to be able to provide any suggestions. Could you provide a high
level explanation of what you are trying to do and why to give a bit
of context. Then why you provide code snippets could you space them
better as
Hi Judie,
On Wed, Apr 16, 2008 at 3:16 PM, Judie [EMAIL PROTECTED] wrote:
High level explanation of what I am trying to do:
Replace some of the geometry in the scene with live camera feed. But
in order to do this, I still need the actual geometry in the scene to
modify the depth buffer
Hi Robert,
I am sorry for not providing an adequate description.
High level explanation of what I am trying to do:
Replace some of the geometry in the scene with live camera feed. But
in order to do this, I still need the actual geometry in the scene to
modify the depth buffer as if it were
Hi Judie,
What I noticed using colormask is, if you want some invisible objects
(with a colormask to false) to occlude some other objects you must add
the invisible ones before the others in the scenegraph. When I say
before it is from the scenegraph traversal point of view.
I don't know if
The application is for augemented reality. Here is an example:
http://www.youtube.com/watch?v=P9KPJlA5yds
I have realized another method. Instead of disabling and enabling the
color buffer, I will set the transparency to 100% transparent on the
objects I don't want to be visible.
Judie
On Apr
In my code I have an OSG tree with the following global state
attributes defined:
osgUtil::CullVisitor *pCullVisitor = m_sceneView-
getCullVisitor();
osgUtil::RenderBin *pRenderBin = pCullVisitor-getCurrentRenderBin();
Hi,
Can someone provide me with the algorithm to convert the value of the
depth buffer pixels to ranges?
Thanks
This is an e-mail from General Dynamics Land Systems. It is for the intended
recipient only and may contain confidential and privileged information. No one
else may read, print,
Download the GLU source code from opengl.org and look at how gluUnProject()
works.
-Paul
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 6:16 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Depth
AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Depth Buffer to Distance Conversion
Hi,
Can someone provide me with the algorithm to convert the value
of the depth buffer pixels to ranges?
Thanks
Thanks a lot!
This is what I need. :-)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jason Daly
Sent: Wednesday, September 19, 2007 2:56 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] depth buffer - real pixel z - depth
zarrandreas wrote:
Hi
zarrandreas wrote:
Hi,
I render depth buffer to the image, but values I have there are between
[0.0, 1.0].
How can I get real z-depth?
This page explains a simple conversion pretty well:
http://www.cs.unc.edu/~hoff/techrep/openglz.html
--J
Hi,
I render depth buffer to the image, but values I have there are between
[0.0, 1.0].
How can I get real z-depth?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
13, 2007 5:42 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Depth Buffer max and min values?
Hi,
as far as I know these values are real depth values and not in range [0,1].
--marcus
zarrandreas wrote:
Hi,
If I use osg::CameraNode to render DepthBuffer, what kind of values
To: OpenSceneGraph Users
Subject: Re: [osg-users] Depth Buffer max and min values?
Look at the osgShadow::ShadowMaps class ;)
zarrandreas wrote:
Oh cool.
Is there a good example for rendering depth buffer to a texture with
osg::CameraNode?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
Hi,
If I use osg::CameraNode to render DepthBuffer, what kind of values is then
in Depth Buffer? Is that float values between [0, 1.0] or real depth values?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Oh cool.
Is there a good example for rendering depth buffer to a texture with
osg::CameraNode?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marcus
Fritzen
Sent: Thursday, September 13, 2007 5:42 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users
57 matches
Mail list logo