Re: [osg-users] Render to Texture

2010-12-13 Thread J.P. Delport
Hi, On 13/12/10 19:25, Sajjadul Islam wrote: Hi Delport, I am sorry that i did not get much from your last reply asking how am i changing the texture when i switch the branches. Do i have to explicitly specify the texture? Even it is i believe that it is done as follows:

[osg-users] Render to Texture

2010-12-12 Thread Sajjadul Islam
Hello forum, a scene is rendered to a texture. Is that ok to render to the same texture by another camera? Thank you! Sajjadul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34745#34745 ___

Re: [osg-users] Render to Texture

2010-12-12 Thread Robert Osfield
Hi Sajjadul, On Sun, Dec 12, 2010 at 10:58 AM, Sajjadul Islam dosto.wa...@gmail.com wrote: a scene is rendered to a texture. Is that ok to render to the same texture by another camera? The normal way to do render to texture (RTT) with the OSG is to use a separate osg::Camera to do the render

Re: [osg-users] Render to Texture

2010-12-12 Thread J.P. Delport
Hi, On 12/12/10 12:58, Sajjadul Islam wrote: Hello forum, a scene is rendered to a texture. Is that ok to render to the same texture by another camera? yes, you can render to the same texture from multiple cameras. What you should avoid is reading and writing to the same texture in the

Re: [osg-users] Render to texture for IPhone

2010-10-27 Thread Stephan Huber
Hi, Am 22.10.10 05:47, schrieb Thomas Hogarth: I'm gonna continue digging but would really appreciate if you could lend a hand. Once this is working I think we have the full set of features I commonly use in OSG all working for IPhone. I tried some stuff to get FBOs working on the iPhone, but

Re: [osg-users] Render to texture for IPhone

2010-10-27 Thread Thomas Hogarth
Hi I think i've pinned it down to the fact the context isn't actually ready on the first call to frame (only get created once the views are shown) So I'm gonna have a play with changing when the timer gets started and see if that fixes things. Tom On 27 October 2010 20:30, Stephan Huber

Re: [osg-users] Render to texture for IPhone

2010-10-21 Thread Thomas Hogarth
Hi Stephan perhaps all you have to do is this: replace #define LOAD_FBO_EXT .. in FrameBufferObject.cpp (around line 42) with #if defined(OSG_GLES1_AVAILABLE) #define LOAD_FBO_EXT(name) setGLExtensionFuncPtr(name, (#name), ( std::string(#name)+std::string(OES) ).c_str() ) #else

Re: [osg-users] Render to texture for IPhone

2010-10-21 Thread Thomas Hogarth
Bit more info I've tracked it down to lines 541-553 of FrameBufferObject.cpp Texture::TextureObject *tobj = 0; if (_ximpl-textureTarget.valid()) { tobj = _ximpl-textureTarget-getTextureObject(contextID); if (!tobj || tobj-id() == 0) {

[osg-users] Render to texture for IPhone

2010-10-20 Thread Thomas Hogarth
Hi All Have a quick question about render to texture. I'm trying to use it in an AR app on IPhone so I can do some post processing on my final scene etc. At the moment only FRAME_BUFFER mode works and is quite slow. I know OpenGLES supports FRAME_BUFFER_OBJECTS I know these to be a little faster

Re: [osg-users] Render to texture for IPhone

2010-10-20 Thread Robert Osfield
Hi Thomas, I don't believe there is any PBuffer support available for OpenGLES so this is no go. There looks to be the frame buffer objects API available in OpenGLES 2.0, but it would be worth checking to see if the OSG's extension setup for these functions is working for GLES2. A general note,

Re: [osg-users] Render to texture for IPhone

2010-10-20 Thread Thomas Hogarth
Thanks roberts, I'll start having a little digg around. Also found that apple added FBOs to there es 1 implementation so I'll get that working also.

Re: [osg-users] Render to texture for IPhone

2010-10-20 Thread Stephan Huber
Hi Tom, Am 20.10.10 17:53, schrieb Thomas Hogarth: To save me a little time would you mind explaining to me how the FBOs are binded to the current context? I.e. is it something the Viewer needs to handle, as I don't see platform specific implementations of FBOs perhaps all you have to do is

Re: [osg-users] Render to texture for IPhone

2010-10-20 Thread Thomas Hogarth
Cheers Stephan I'll give this a quick try and if it doesn't work I'll make a simple example to send you. Also your changes for the git were all fine other then I still need to use the screen mode size not bounds size to get the proper resolution. I'm wondering if it's an OS version issue or an

Re: [osg-users] Render to texture

2010-10-07 Thread Aitor Ardanza
Hi Mahendra, Mahendra G.R wrote: Hello Robert, Thanks, i figured it out. On Fri, Oct 1, 2010 at 2:42 PM, Robert Osfield () wrote: -- http://www.mahendragr.com (http://www.mahendragr.com) -- Post generated by Mail2Forum I'm trying something similar like you, but

Re: [osg-users] Render to texture

2010-10-07 Thread Mahendra G.R
Hi Aitor, Sorry, what exactly do you want me to tell?, i'm trying to RTT of some data with a FBO, in a fragment shader that is. Then take this texture data and save it onto to the disc as an image, this is where i'm struck, because what i'm doing is for 3D data, it would be really nice if

Re: [osg-users] Render to texture

2010-10-07 Thread Aitor Ardanza
Hi, Is it only possible, with FBO, to use the same color for each texture channel? if I use the following code on channel 0 give me a black textured ... Code: static const char *shaderSource = { uniform sampler2D baseMap;\n varying vec2 Texcoord;\n void

[osg-users] Render to texture

2010-10-01 Thread Mahendra G.R
Hello guys, this is my situation : i have a fragment shader doing some calculation and i want to store it in a texture, i saw some examples but most of them dont talk about shaders. how can i get the data back from the shader and store it as a texture using OSG. I'm trying to do it with an FBO

Re: [osg-users] Render to texture

2010-10-01 Thread Ulrich Hertlein
Hi, On 1/10/10 20:11 , Mahendra G.R wrote: this is my situation : i have a fragment shader doing some calculation and i want to store it in a texture, i saw some examples but most of them dont talk about shaders. how can i get the data back from the shader and store it as a texture using

Re: [osg-users] Render to texture

2010-10-01 Thread Mahendra G.R
Hello, Thanks or ur reply, how should i read back the data from the texture, can i attach an image to the camera(or texture?) and read data from that image?, is it possible and how. Thanks, Best regards On Fri, Oct 1, 2010 at 12:52 PM, Ulrich Hertlein u.hertl...@sandbox.dewrote: Hi, On

Re: [osg-users] Render to texture

2010-10-01 Thread Robert Osfield
HI Mahendra On Fri, Oct 1, 2010 at 1:30 PM, Mahendra G.R mahen...@mahendragr.com wrote: Thanks or ur reply, how should i read back the data from the texture, can i attach an image to the camera(or texture?) and read data from that image?, is it possible and how. See osgprerender example, in

Re: [osg-users] Render to texture

2010-10-01 Thread Mahendra G.R
Hello Robert, Thanks, i figured it out. On Fri, Oct 1, 2010 at 2:42 PM, Robert Osfield robert.osfi...@gmail.comwrote: HI Mahendra On Fri, Oct 1, 2010 at 1:30 PM, Mahendra G.R mahen...@mahendragr.com wrote: Thanks or ur reply, how should i read back the data from the texture, can i

Re: [osg-users] Render to texture

2010-10-01 Thread Mahendra G.R
Hello, Sorry guys, i have a problem agian. What i'm trying to do is render into a 3D texture and i have a problem here, as far as i know, what i'm doing now is render into a 2D texture (using a FBO). I saw some samples in opengl where they actually loop through all the slices in Z direction and

Re: [osg-users] Render to texture

2010-10-01 Thread Robert Osfield
Hi Mahendra, Hows about looking at the osg::Camera API, it should become obvious how one sets a specific face of texture cube map or a 3d texture when doing render to texture. Learning how to investigate how to solve your own problems by looking at the API and examples will really speed your

Re: [osg-users] Render to texture

2010-10-01 Thread Mahendra G.R
Hello Robert, Ok, will do that. I'm pretty new to ALL these things. On Fri, Oct 1, 2010 at 3:38 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Mahendra, Hows about looking at the osg::Camera API, it should become obvious how one sets a specific face of texture cube map or a 3d

Re: [osg-users] Render to texture

2010-10-01 Thread Frederic Bouvier
Hi, An advanced way to do that is to combine layered rendering with a geometry shader and geometry instancing to generate the slices. OSG SVN has support to let the geometry shader choose the right layer via the gl_Layer variable. -Fred - Mahendra G.R mahen...@mahendragr.com a écrit :

[osg-users] Render to texture memory usage

2010-05-05 Thread Martin Aasen
Hi, I am rendering to a texture using a FBO: camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); camera-attach(osg::Camera_COLOR_BUFFER, texture, 0, 0, false, 0, 0); The consumption of GPU memory is about three times higher than I would expect: about 800 MB for a 8192 x

Re: [osg-users] Render to texture memory usage

2010-05-05 Thread Wojciech Lewandowski
to zero. Cheers, Wojtek - Original Message - From: Martin Aasen martin-ferstad.aa...@ffi.no To: osg-users@lists.openscenegraph.org Sent: Wednesday, May 05, 2010 3:32 PM Subject: [osg-users] Render to texture memory usage Hi, I am rendering to a texture using a FBO: camera

Re: [osg-users] Render to texture memory usage

2010-05-05 Thread Martin Aasen
Thanks Wojciech, By setting the mask the memory usage was reduced to just over 300MB. Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27582#27582 ___ osg-users mailing list

Re: [osg-users] Render to texture (ping pong) - textures cleared after 2 iterations

2010-04-15 Thread Luciano Pica
Hi, sorry for the late reply, i had to finish another task before trying this out. Thanks for your advice, it helped me to solve the problem. I'm using 2 cameras now and it works (at least for sort-first distribution). Regards, Luciano J.P. Delport wrote: Hi, On 08/04/10 08:46, J.P.

Re: [osg-users] Render to texture (ping pong) - textures cleared after 2 iterations

2010-04-08 Thread J.P. Delport
Hi, I think the problem is the multiple attach calls on the camera. You have to somehow clear the previous attachments and it's a bit tricky at the moment, you have to mess with RenderStage. See here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/54990/focus=55025 rgds jp

Re: [osg-users] Render to texture (ping pong) - textures cleared after 2 iterations

2010-04-08 Thread J.P. Delport
Hi, On 08/04/10 08:46, J.P. Delport wrote: Hi, I think the problem is the multiple attach calls on the camera. You have to somehow clear the previous attachments and it's a bit tricky at the moment, you have to mess with RenderStage. See here:

Re: [osg-users] Render to Texture with independent framerate (Solution)

2010-03-18 Thread Georg Martius
Hi folks, I would like to post my solution to the problem of rendering to a texture independently on the framerate of the viewer, the code is attached. My solution is to derived a Viewer from osgViewer::Viewer, added a custom offScreenRender() function mimicking frame() and

Re: [osg-users] Render to Texture with independent framerate

2010-03-11 Thread Georg Martius
Hi, thanks again for answering. J.P. Delport wrote: Hi, Georg Martius wrote: Hi JP, thanks for you hint. I tried to code from the linked thread. Unfortunately it does not really work very well. To get you updated: I have 2 cameras, one is the original viewer cam and the other is a

Re: [osg-users] Render to Texture with independent framerate

2010-03-10 Thread Georg Martius
Hi JP, thanks for you hint. I tried to code from the linked thread. Unfortunately it does not really work very well. To get you updated: I have 2 cameras, one is the original viewer cam and the other is a pbuffer one. My scenegraph has two nodes: root - scene - RRT Camera - scene2 I have

Re: [osg-users] Render to Texture with independent framerate

2010-03-10 Thread J.P. Delport
Hi, Georg Martius wrote: Hi JP, thanks for you hint. I tried to code from the linked thread. Unfortunately it does not really work very well. To get you updated: I have 2 cameras, one is the original viewer cam and the other is a pbuffer one. My scenegraph has two nodes: root - scene

Re: [osg-users] Render to Texture with independent framerate

2010-03-07 Thread J.P. Delport
Hi Georg, maybe have a look at this: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/49423 you can render to texture with the main camera disabled. jp Georg Martius wrote: Hello, I am using OSG for a robotics simulator [1] already a while. Now I want to implement a camera

[osg-users] Render to Texture with independent framerate

2010-03-05 Thread Georg Martius
Hello, I am using OSG for a robotics simulator [1] already a while. Now I want to implement a camera sensor, meaning the simulation of a physical camera mounted on a robot. I got it to work with Render to Texture. However I have the following problem: The rendering of the normal graphics is

[osg-users] Render to texture multiple cameras into one texture

2010-01-02 Thread Eduardo Alberto Hernández Muñoz
Hi list, I have 4 cameras independent of each other, and each one covers a 4th of the screen. I want to take a screenshot of each one then put the 4 images into a single texture. Also note that I'm not using the composite viewer. My first problem is that the normal approach is to attach a

Re: [osg-users] Render to texture multiple cameras into one texture

2010-01-02 Thread Paul Martz
Eduardo Alberto Hernández Muñoz wrote: My first problem is that the normal approach is to attach a texture to a camera, but this means that I will get the data from the next frame since I will have to render it again; I suppose I could render the image again but this seems like a waste, instead

Re: [osg-users] Render to texture and Shadows

2009-11-04 Thread Tugkan Calapoglu
more chance to work as intended. I apologize for trouble. Wojtek Lewandowski - Original Message - From: Tugkan Calapoglu tug...@vires.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Tuesday, November 03, 2009 9:10 AM Subject: [osg-users] Render to texture

[osg-users] Render to texture and Shadows

2009-11-03 Thread Tugkan Calapoglu
Hi All, I am using Light Space Perspective Shadow Maps for shadowing. I would like to render the shadowed scene to a texture, so I have another camera on top of the shadowed scene. It looks like following: root | RTTCamera | ShadowedScene I also render a small sized screen aligned quad which

Re: [osg-users] Render to texture and Shadows

2009-11-03 Thread Wojciech Lewandowski
Lewandowski - Original Message - From: Tugkan Calapoglu tug...@vires.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Tuesday, November 03, 2009 9:10 AM Subject: [osg-users] Render to texture and Shadows Hi All, I am using Light Space Perspective Shadow Maps

Re: [osg-users] Render-to-texture TextureRectangle

2009-09-12 Thread Guy Volckaert
NPOT = non-power-of-two POT = power-of-two Since my card does not support NPOT textures, can I create a POT texture but command the renderTargetImplemtation to only render to a specific region of the texture. For example, if my texture if 512x512 (i.e POT texture) and my viewport is 320x240

Re: [osg-users] Render-to-texture TextureRectangle

2009-09-12 Thread Guy Volckaert
I was able to use a POT texture after all with the renderTargetImplementation of camera (as I mentioned in my last post). All is well with the world once again. Thanks everyone. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17307#17307

[osg-users] Render-to-texture TextureRectangle

2009-09-11 Thread Guy Volckaert
Hi, I am having a weird problem which I hope you can help. I am running on Win2000 with a relatively old nvidia card. 1) When I run then osgtexturerectangle example and I supply a non-power-of-two image as a command line argument, the example still runs as expected. So that tell me that my

Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-20 Thread Adrian Egli OpenSceneGraph (3D)
Hi Torben, Well if you don't attach the texture object (32BIT) just the image (32BIT) the RTT works with 8BIT. I guess OSG generates a own texture object and attach the image. but this isn't a 32Bit texture (internal format). So you would be attach the texture object, this is the correct way.

[osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi all, How can i test the GL_RGBA32F_ARB render to texture quality. i don't know whether i did a mistake in programming or my Nivida quadra fx 570m with windows vista driver doesn't support it. Or do i have to generate an own graphic context for enabling this feature? /regards adrian //

Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread J.P. Delport
Hi Adrian, mmm, I'm not sure about the setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER_RTT) Do you need to use this? I've only used float render targets with FBOs and I know they work without special contexts. ITO quality I suppose you mean you want to find out if actual float

Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi JP, 2009/8/19 J.P. Delport jpdelp...@csir.co.za Hi Adrian, mmm, I'm not sure about the setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER_RTT) Do you need to use this? FBO is also ok. I've only used float render targets with FBOs and I know they work without special

Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi all, for others, it works perfectly we need just to replace RTTInfoPreprocessingBackFront._camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER), _RTTInfoPreprocessingBackFront._image.get(),0,0); with

Re: [osg-users] Render to texture with 32BIT (float) : How to test

2009-08-19 Thread Torben Dannhauer
Hi, hmmm, whats the difference between both lines? Greetings, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16440#16440 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Render-To-Texture.

2009-06-15 Thread Guy Volckaert
Hi, I was wondering is someone can help me with a specific problem I'm having with render-to-texture. In essence, I have a pre-render camera (i.e m_pRttCamera) that renders the entire scene to a rectangular texture (i.e m_pRttTexture). This texture is the mapped to a simple quad that fills the

Re: [osg-users] Render-To-Texture.

2009-06-15 Thread Jason Daly
Hi, Guy, Great explanation, except you didn't say what the problem was :-) --J Guy Volckaert wrote: Hi, I was wondering is someone can help me with a specific problem I'm having with render-to-texture. In essence, I have a pre-render camera (i.e m_pRttCamera) that renders the entire

Re: [osg-users] Render-To-Texture.

2009-06-15 Thread Jason Daly
Ignore me, I just found it... --J Guy Volckaert wrote: Hi, I was wondering is someone can help me with a specific problem I'm having with render-to-texture. In essence, I have a pre-render camera (i.e m_pRttCamera) that renders the entire scene to a rectangular texture (i.e m_pRttTexture).

[osg-users] Render-to-texture question.

2009-06-01 Thread Guy Volckaert
Hi, I was wondering if you can provide me with some guidance regarding RTT. BTW: I read and understood the osgMultipleRenderTargets example very well (hopefully 8)). However, I was wondering if it would be possible to simply it a little for my app. My application has multiple slave cameras

Re: [osg-users] Render to Texture and per vertex colors

2009-02-04 Thread Joseba
Hi Art, It would be great to see this demo!!! Another good idea is to use another camera for the 'glow objects', this match perfectly with my pipeline, with minor changes on the shaders. Although i propossed to use OsgPPU on the app we are doing, at this time we use another postprocessing

Re: [osg-users] Render to Texture and per vertex colors

2009-02-04 Thread Art Tevs
Hi Joseba, Yes, I also think that osgPPU is a 'must have' in osg, however I am not the maintainer of the osg code, hence I hope that osgPPU would not die in the future or will not be replaced by something else in the main core, which would be very ungente ;) As to your error in the applied

Re: [osg-users] Render to Texture and per vertex colors

2009-02-04 Thread Art Tevs
Hi, Joseba ok, there is now a new example called glow in the osgPPU svn. I have implemented the first version of the glow. Hence just created a slave camera and render only the thing, which I want to glow by the second camera. Then apply gaussian blur on the output of the second camera and

Re: [osg-users] Render to Texture and per vertex colors

2009-02-04 Thread Joseba
Thanks, I will take a look!! J. -- Read this topic online here: http://osgforum.tevs.eu/viewtopic.php?p=5923#5923 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Render to Texture and per vertex colors

2009-01-27 Thread Joseba
Anyone has experience something similar? J. Hi all, I want to do an RTT of the current camera to do some PostProcesses on it (using shaders). When the geometry is textured, everything works ok, but when i use non-textured objects, the objects renders in black. I tryed the code in

Re: [osg-users] Render to Texture and per vertex colors

2009-01-27 Thread Art Tevs
Hi Joseba, have you took a look into osgPPU? This can do exactly what you are looking for. art -- Read this topic online here: http://osgforum.tevs.eu/viewtopic.php?p=5222#5222 ___ osg-users mailing list

Re: [osg-users] Render to Texture and per vertex colors

2009-01-27 Thread Gordon Tomlinson
__ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Joseba Sent: Tuesday, January 27, 2009 3:22 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Render to Texture and per vertex colors Anyone

[osg-users] Render to Texture and per vertex colors

2009-01-23 Thread Joseba
Hi all, I want to do an RTT of the current camera to do some PostProcesses on it (using shaders). When the geometry is textured, everything works ok, but when i use non-textured objects, the objects renders in black. I tryed the code in osgprerender example in my app and it does the same

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
(osgViewer::Viewer::SingleThreaded); Unfortunately, the texture is still gray. Åsa -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För J.P. Delport Skickat: den 7 november 2008 08:22 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi

Re: [osg-users] Render to texture problem

2008-11-07 Thread J.P. Delport
] För J.P. Delport Skickat: den 7 november 2008 08:22 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi, any reason why you have RGBA texture, but RGB in callback? jp Engvall Åsa wrote: Hi! I want to render the scene to a texture and use the texture in a shader

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
:42 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi, is your RTT camera the child of anything? I'm just guessing without having an example to run. jp Engvall Åsa wrote: I thought that the texture must be in RGBA to be used in a shader. The callback was just

Re: [osg-users] Render to texture problem

2008-11-07 Thread Andreas Lindmark
PROTECTED] För J.P. Delport Skickat: den 7 november 2008 09:42 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi, is your RTT camera the child of anything? I'm just guessing without having an example to run. jp Engvall Åsa wrote: I thought that the texture

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
? Trying to learn more... Åsa -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För J.P. Delport Skickat: den 7 november 2008 13:47 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem I just read quickly, but it seems your camera is still

Re: [osg-users] Render to texture problem

2008-11-07 Thread Robert Osfield
Hi Asa, On Fri, Nov 7, 2008 at 1:16 PM, Engvall Åsa [EMAIL PROTECTED] wrote: It isn't obvious to me why the RTT camera must be under the viewer. I just thought of the viewer as a camera which looks at the scene. Is the viewer more like something that collects the pictures from all cameras

Re: [osg-users] Render to texture problem - resolved

2008-11-07 Thread Engvall Åsa
OK, that sounds logical. Thank you, bye for now! Åsa -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Robert Osfield Skickat: den 7 november 2008 14:22 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi Asa, On Fri, Nov 7, 2008

Re: [osg-users] Render to texture problem

2008-11-07 Thread J.P. Delport
(); } *Från:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *För *Andreas Lindmark *Skickat:* den 7 november 2008 10:33 *Till:* OpenSceneGraph Users *Ämne:* Re: [osg-users] Render to texture problem The camera has to be somewhere

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem The camera has to be somewhere in the scenegraph under the root. Something like this: Root /\ RTTCamera Node1 \/ World Set the uniforms that you currently set

[osg-users] Render to texture problem

2008-11-06 Thread Engvall Åsa
Hi! I want to render the scene to a texture and use the texture in a shader. The texture image is saved to file by a postdraw callback, so I can look at it. I'm doing something wrong because the texture becomes all gray. My scene graph looks like this: RTT camera root |

Re: [osg-users] Render to texture problem

2008-11-06 Thread Csaba Halász
On Thu, Nov 6, 2008 at 5:16 PM, Engvall Åsa [EMAIL PROTECTED] wrote: I want to render the scene to a texture and use the texture in a shader. The texture image is saved to file by a postdraw callback, so I can look at it. I'm doing something wrong because the texture becomes all gray. I have

Re: [osg-users] Render to texture problem

2008-11-06 Thread J.P. Delport
Hi, can you force single threaded osgviewer and see if it still is a problem? jp Engvall Åsa wrote: Hi! I want to render the scene to a texture and use the texture in a shader. The texture image is saved to file by a postdraw callback, so I can look at it. I'm doing something wrong because

Re: [osg-users] Render to texture problem

2008-11-06 Thread J.P. Delport
Hi, any reason why you have RGBA texture, but RGB in callback? jp Engvall Åsa wrote: Hi! I want to render the scene to a texture and use the texture in a shader. The texture image is saved to file by a postdraw callback, so I can look at it. I'm doing something wrong because the texture

Re: [osg-users] render to texture - alpha blending

2008-07-30 Thread Stephan Maximilian Huber
Hi Sherman, sherman wilcox schrieb: My question is this: what other method might I employ to deal with these alpha blending issues? How do you guys recommend handling this? What's the recommend route to take? have you tried using osg::ColorMask and disable writing to the alpha-channel? You'll

[osg-users] render to texture - alpha blending

2008-07-29 Thread sherman wilcox
Hi guys - I'm using render to texture in one of my apps and I'm experiencing alpha blending issues. Here's what I have: simple RTT (render to texture) with two quads. Each quad has as a background an opaque black background (24-bit BMP). In front of that is a small (doesn't cover the entire

[osg-users] Render to texture and ClearColor

2008-07-24 Thread David _
Hi i´m currently rendering to a texture using a slave camera my problem is that i can´t set the clear color to alpha. Each time the slave camera renders a new frame i get a nice blue background instead of the transparent background i´m looking for i´ve tried with values of 0.0, 0.5 add 1.0

Re: [osg-users] Render to texture and ClearColor

2008-07-24 Thread Robert Osfield
Dous you FBO have an alpha channel On Thu, Jul 24, 2008 at 12:42 PM, David _ [EMAIL PROTECTED] wrote: Hi i´m currently rendering to a texture using a slave camera my problem is that i can´t set the clear color to alpha. Each time the slave camera renders a new frame i get a nice blue

Re: [osg-users] Render to texture and ClearColor

2008-07-24 Thread David _
From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Render to texture and ClearColor Dous you FBO have an alpha channel On Thu, Jul 24, 2008 at 12:42 PM, David _ [EMAIL PROTECTED] wrote: Hi i´m currently rendering to a texture using a slave camera

Re: [osg-users] Render to texture and ClearColor

2008-07-24 Thread David _
i guess i spoke too fast. I get transparency no, but it´s not exactly what i want how do i know what kind of FBO i´m using??? From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Date: Thu, 24 Jul 2008 14:00:56 +0200 Subject: Re: [osg-users] Render to texture and ClearColor

Re: [osg-users] Render to Texture

2008-07-21 Thread Roberts, Gareth
, this also fails with osg 2. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 16 July 2008 14:48 To: OpenSceneGraph Users Subject: Re: [osg-users] Render to Texture *** WARNING *** This mail has originated outside your organization, either from

Re: [osg-users] Render to Texture

2008-07-21 Thread Robert Osfield
with OSG 2.0 and 2.4 I have also used an openGL read with osg 1.0, this also fails with osg 2. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 16 July 2008 14:48 To: OpenSceneGraph Users Subject: Re: [osg-users] Render to Texture *** WARNING

Re: [osg-users] Render to Texture

2008-07-21 Thread Gordon Tomlinson
for render to textures -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roberts, Gareth Sent: Monday, July 21, 2008 5:42 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Render to Texture I used this code... const int TEX_WIDTH = 512; const int

Re: [osg-users] Render to Texture

2008-07-21 Thread paul1492
without the need to render it? Paul P. - Original Message From: Gordon Tomlinson [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Monday, July 21, 2008 7:13:58 AM Subject: Re: [osg-users] Render to Texture HI WRT your OGL read, I suspect you are doing

Re: [osg-users] Render to Texture

2008-07-16 Thread David Spilling
Paul, FYI, the HDR (Radiance format) plugin also supports writing 32Fs, which can be viewed with a number of applications. I think I also saw a recent submission that allowed the TIFF plugin to write floats, but I might be mistaken. David ___ osg-users

[osg-users] Render to Texture

2008-07-15 Thread paul1492
I'm attempting to render to a texture and then dump the rendered texture to a file (every frame), but I'm having trouble. I've attempted to use the osgprerender example (using the --image option), and replaced the MyCameraPostDrawCallback::operator() to have a     osgDB::writeImageFile(*_image,

Re: [osg-users] Render to Texture

2008-07-15 Thread J.P. Delport
Hi, make sure the image writer can handle your image format. Bands usually mean an alignment error in the data the writer expects. E.g. expects binary input data to be RGB, but the data is RGBA. .jpg does not support alpha I think. Try .png jp [EMAIL PROTECTED] wrote: I'm attempting to

[osg-users] render to texture only delivers black texture

2008-07-10 Thread Steffen Kim
Hi everyone. I have some issues with rendering to a texture. I am writing a plug-in for an application. This application has a main-viewer-window, where it displays a scene. My plug-in has an own window with a new viewer and everything. The new window now needs a texture showing what the main

Re: [osg-users] render to texture only delivers black texture

2008-07-10 Thread Robert Osfield
Hi Steffen, I'm finding it hard to follow exactly what your set up is. Since I'm not clear the best I can do is have an educated guess. Could it be that you are using rendering to the texture in one graphics context, then trying to reuse that same texture in another graphics context? Robert.

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-04 Thread J.P. Delport
Hi, sorry, I don't know the answer. jp hesicong2006 wrote: Hi, Robert: Could you give me an answer? Thanks! Hesicong J.P. Delport wrote: Yes, I'm not sure about the interaction between AA and floating point buffers. jp

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread J.P. Delport
Hi, have you tried using COLOR_BUFFER0 and gl_FragData in shader? jp hesicong2006 wrote: Hi, Robert: I'm now writing shader to compute world coordinate of the scene and save them as image. The value output by shader will exceed 1 and require float values, so I use GL_RGBA32F_ARB for RTT

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread J.P. Delport
Hi, I have just edited osgmultiplerendertargets example and can confirm you can get values 1. In the example, search for e-12 and change to e12 in the shader. Run with: osgmultiplerendertargets --hdr --image. You will see that it prints values 1. jp hesicong2006 wrote: Hi, Robert:

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread hesicong2006
Hi, Delport: I use them, the fragment shader code is very easy. varying vec4 worldPos; void main(void) { gl_FragData[0]=worldPos; } I'm sure the worldPos is calculated right, you can try if(worldPos.x1) { gl_FragData[0]=vec4(0,1,1,1); } else {

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread hesicong2006
Hi, Delport: I tried your method, that's OK, I see the output. I'll check what's wrong with my code or if there's some tricky code I ignore. Thanks! J.P. Delport wrote: Hi, I have just edited osgmultiplerendertargets example and can confirm you can get values 1. In the example,

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread J.P. Delport
Hi, good, make sure of difference between COLOR_BUFFER versus COLOR_BUFFER0. jp hesicong2006 wrote: Hi, Delport: I tried your method, that's OK, I see the output. I'll check what's wrong with my code or if there's some tricky code I ignore. Thanks! J.P. Delport wrote: Hi, I have just

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread hesicong2006
I found out the tricky code! YOU MUST ATTACH the texture and your image~, see the code segment of osgmultiplerendertargets.cpp from line 343 to 360: for (int i=0; iNUM_TEXTURES; i++) { camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER0+i), textureRect[i]); } // we can

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread Wojciech Lewandowski
To: OpenSceneGraph Users Sent: Thursday, July 03, 2008 10:05 AM Subject: Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1! I found out the tricky code! YOU MUST ATTACH the texture and your image~, see the code segment of osgmultiplerendertargets.cpp

Re: [osg-users] Render To Texture attached Image do not support RGBA32 format, value clamped to 1!

2008-07-03 Thread hesicong2006
Hi, Delport and Robert: I now want to set the camera with FSAA support, the newest SVN version has provided the parameters for camera-attach. I changed line 344 of osgmultiplerendertargets.cpp from camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER0+i), textureRect[i]);

<    1   2   3   >