Re: [osg-users] Setting alpha channel in Frag Shader does not work.

2009-03-19 Thread Daniel Holz
I suppose you are writing the data in a texture with gl_FragColor = vec4(..., depth). What exactly are you doing with the data that you write afterwards, or how do you actually obtain your point cloud? If for example you take the position vec4(..., depth) (which is a world space position?) and

Re: [osg-users] Setting alpha channel in Frag Shader does not work.

2009-03-19 Thread Daniel Holz
For the alpha channel look here: http://forum.openscenegraph.org/viewtopic.php?t=1776 I posted the solution to my problem (similar to yours) at the end of the thread. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8785#8785

Re: [osg-users] Setting alpha channel in Frag Shader does not work.

2009-03-13 Thread Daniel Holz
Try attaching a texture to the COLOR_BUFFER0 instead of an image directly. That's what worked for me. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8465#8465 ___ osg-users mailing list

[osg-users] How do I obtain calculated zNear / zFar from an osg::Camera ?

2009-03-13 Thread Daniel Holz
Hi everyone, I am using a camera whose zNear / zFar is calculated automatically and I need to obtain the zNear / zFar values in the camera's PreRenderCallback. Just trying to use the function camera-getProjectionMatrixAsPerspective(fovy, aspect, zNear, zFar); always gives me the initial near

Re: [osg-users] How do I obtain calculated zNear / zFar from an osg::Camera ?

2009-03-13 Thread Daniel Holz
An update: I forgot to say that I am rendering to a texture. So basically what I do is the following: Code: osg::Camera* camera = new osg::Camera; ... camera-setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES); ... camera-attach( , texture); When stepping

Re: [osg-users] Can't write to ALPHA component with custom fragment shader in RTT pass

2009-03-11 Thread Daniel Holz
Thanks for all your help. It directed me to the solution! For other users who face the same problem: The setting to obtain a RGBA texture with 32Bit floats per component which one can write unclamped values to is as follows: Code: osg::Texture2D texture2D = new osg::Texture2D;

[osg-users] Can I render to a texture AND to the screen in one pass?

2009-03-11 Thread Daniel Holz
Hi everyone, what I want is to obtain the z-Buffer content from a previous render pass (pass1) where I render my scene and use it in a subsequent render pass (pass2). Of course I would like to avoid doing pass1 twice, first to render to the screen and second to render the z-buffer to a texture

Re: [osg-users] Can't write to ALPHA component with custom fragment shader in RTT pass

2009-03-09 Thread Daniel Holz
Hi Joseba, I use FBOs but the problem is that in the beginning of my application it says RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd6. Could this be the problem? And what is the reason for that? Could you tell me which internal format you where using and which issues

Re: [osg-users] Can't write to ALPHA component with custom fragment shader in RTT pass

2009-03-09 Thread Daniel Holz
Hi, I just want to make sure that we do not misunderstand each other: The problem is not to make a fragment invisible (the discard statement in fact works for that pretty well) but to simply store normalized data ([0,1]) as the alpha component of my RGBA texture by using gl_FragColor.a = ...

[osg-users] Can't write to ALPHA component with custom fragment shader in RTT pass

2009-03-08 Thread Daniel Holz
Hi everyone, I have trouble with a render to texture pass, where I try to write to the RGB and ALPHA components of an attached RGBA texture in a custom fragment shader. Writing to the RGB components works, but gl_FragColor.a = ... does not have any effect at all. The ALPHA component will

[osg-users] How do I access the Z-Buffer content from the last render pass

2009-03-08 Thread Daniel Holz
Hi osg-users, is it possible to access the Z-Buffer content from a render pass 1 in the shaders during a second render pass 2 if I do not clear the Z-Buffer content in pass 1? In my project I render my scene in pass 1 and set the clear mask for pass 2 to 0, hence not clearing neither the

[osg-users] GL_DEPTH_COMPONENT data not clamped to [0, 1] when doing osg::Image::readPixels(...)

2009-03-03 Thread Daniel Holz
Hi everyone, I am trying to store the Z-Buffer of a subgraph of my scene in an osg::Image for later processing, but the values I obtain are not as expected in the range [0,1] but appear to be integer values starting at 0 and going up to about 200. I am writing the depth buffer to the

Re: [osg-users] Creator vs 3D Studo Max

2007-12-10 Thread Daniel Holz
Hi Robert, the points you and others mention are valid, and perhaps I was being too harsh in my first posting. Both products have their strengths and Creator is well suited to airport modeling and has unique capabilities for vis-sim that 3dsmax does not offer. Cheers, Daniel Robert Weldon

Re: [osg-users] Shader Vertex Problems

2007-12-10 Thread Daniel Holz
Hi Michael, try using a osg::vec2 instead of a float for your vertex_shader_attribute. Recently I had a similar problem. I received wrong values when associating a vertex attribute array of floats with a vertex array and trying to read the floats in the shader. Using a vec2 instead and just

Re: [osg-users] Two viewer problem

2007-12-06 Thread Daniel Holz
Hi Sashidhar, some weeks ago somebody had the same problem. here his mail and the last response: Hi, try this: in groups.google.com search for this: osg-users ralph kern screenshot in google.com osg-users Taking a screenshot with cheers jp maruti

Re: [osg-users] Creator vs 3D Studo Max

2007-12-05 Thread Daniel Holz
hi, first of all: the words modeling and creator should not appear in the same sentence :). probably you can use creator for cad tasks but thats all. the texturing tools are quite ok though... i would go with a combination of both. using 3dsmax for the model and creator to compose everything

Re: [osg-users] Getting world coord bounding box

2007-12-02 Thread Daniel Holz
thats a good idea..I will definitely try that and let you know how it works out. Thank you. Siddharth - Original Message From: Daniel Holz [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Saturday, December 1, 2007 2:50:11 PM Subject: Re: [osg

Re: [osg-users] Creating shapes using Geometry

2007-12-02 Thread Daniel Holz
hi renan, i think he meant that you should look at the examples included in the osg package. quote: [..]and the examples that come with the OSG are a treasure trove of code and information. cheers, daniel Renan Mendes wrote: Hey, Jean-Sébastien. Now I'm asking for that example code

Re: [osg-users] Getting world coord bounding box

2007-12-01 Thread Daniel Holz
hi, don't you have to multiply the matrix from the left side with the vector, like this: M * x = x', whereas M is your 'WorldCoordsMatrix', x is your local BBox vector and x' is the same in world coords. hope this helps. daniel Siddharth Palaniappan wrote: Hi osg users, I'm currently

Re: [osg-users] Getting world coord bounding box

2007-12-01 Thread Daniel Holz
/MatrixTransformations In the end , robert says ways are defined ... i initially multiplied the matrix on the left side. But after reading this i changed it...am i wrong ? Siddharth - Original Message From: Daniel Holz [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org

Re: [osg-users] problems compiling osgCal with osg 2.2

2007-11-30 Thread Daniel Holz
://osgcal.sourceforge.net/ 2007/11/29, Daniel Holz [EMAIL PROTECTED]: hi, ok, got it myself. the argument of the method drawImplementation changed in osg 2.2 compared to prior versions (don't know which one in particular). in osgCal the method drawImplementation(osg::RenderInfo renderInfo) should

Re: [osg-users] 64-bit OSG

2007-11-29 Thread Daniel Holz
hi, what are the benefits of using a 64bit build of osg. as far as i know at least the floating point precision is not higher than with 32bit, or am i wrong? cheers, daniel Robert Osfield wrote: Hi Robert, The OSG support 64 bit builds on Irix, Solaris, Linux, and even Windows.. I'm not

[osg-users] problems compiling osgCal with osg 2.2

2007-11-28 Thread Daniel Holz
hi everybody, is there anybody who succeeded in compiling osgCal with osg 2.2 ? i have the following problem when compiling it in msvc8: 1 edited\include\osgCal/SubMesh(50) : error C2259: 'osgCal::SubMesh' : cannot instantiate abstract class 1due to following members: 1

[osg-users] wrong vertex attributes in vertex shader

2007-11-26 Thread Daniel Holz
hi everybody, i have a problem when reading the values of user-defined vertex attributes in the vertex shader. THE SITUATION i implemented an algorithm which generates tracks, left behind by a car which drives on a terrain. the track of one wheel is logically represented in the following way:

Re: [osg-users] Creating shapes using Geometry

2007-11-25 Thread Daniel Holz
hi, the class DrawElementsUInt is defined in the file osg/PrimitiveSet.cpp. hope this helps, daniel Renan Mendes wrote: Hi, Jean-Sébastien. I've read the Tutorial and while compiling, there has been detected that I don't have the osg::DrawElementsUInt in my computer. Would you mind