Re: [osg-users] osgViewer + Fox Toolkit example
RJ schrieb: I tried building the example on linux using osg-2.0 and fox-1.6 but the executable is giving sementationfault as soon as i run the program. Has anybody tried this example on linux. Hi, yes it works fine on my linux installation, using FOX-1.7 OSG-2.0. havn't tried older FOX versions. I have built FOX from source with OpenGL enabled (FOX default settings) alexandre sent this fix: you have to replace getEventQueue()-mouseButtonPress(event-click_x, event-click_x, 1); by getEventQueue()-mouseButtonPress( regards, Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] osgViewer + Fox Toolkit example
you have to replace getEventQueue()-mouseButtonPress(event-click_x, event-click_x, 1); by getEventQueue()-mouseButtonPress( event-click_x, event-click_y, 1); ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] osgViewer + Fox Toolkit example
Hi Alexandre, amalric alexandre schrieb: I had to do this for my own application. In example's directory of osgViewer integration there is no example for FOX. It's quite simple but I hope it will help some people who wants to integrate OSG in their Fox application. I've attached a Visual 2005 project similar to example osgViewerWX called example osgViewerFOX ;-) thanks for the OSG-FOX example. I prefer using FOX-GUI, and your code worked just fine. I took your sourcecode under a new KDevelop3 Project, and linked it against OSG-2.0 and FOX-1.7 Nice! Would be fine if it was part of the OSG-2.0 source package in future ? :-) Thanks, Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] LightPointNode and shaders
Hi Brad, Can shaders be added to a osg::LightPointNode? I'm trying to add both a vertex and fragment shader (pointsprite) but I just don't see any effect. I don't have problems with shader based pointsprites on nvidia hardware. don't forget this line: stateset-setMode(GL_VERTEX_PROGRAM_POINT_SIZE, osg::StateAttribute::ON); hope it helps. Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Texture switching in Real time...
hi adrian, sorry, maybe i readyour question to fast. so i'm afraid i can't help finding the optimal solution for using builtin piplene features. if you take a look at the osgephemeris source, you can see how the the sun texture is projected on the skydome (a generated texture), using 2 texture units. i'm sure you can do it something like that, else it would be interesting to read how other users solve the task. greetings, markus Adrian Egli schrieb: Hi markus, thanks for the short answer, but i would like implement the features without using shaders, because it should also work on elder GPUs based systems /adegli 2007/3/2, Markus Hein [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi Adrian, maybe if you put the textures in 2 different texture units, adding Sampler2D uniforms and a fragment program like this: --- uniform sampler2D firstTexture; uniform sampler2D secondTexture; uniform float osg_FrameTime; void main(void) { vec4 first = texture2D( firstTexture, gl_TexCoord[0].xy); vec4 second = texture2D( secondTexture, gl_TexCoord[0].xy); gl_FragColor = mix(first, second, (0.5 + 0.5*sin (0.5 * osg_FrameTime) ) ); } -- Replace osg_FrameTime with your mix ratio, a float Uniform and you can mix it as you like. Markus hi i like to switch a texture without reloading the geometry. For example i have two different textures to map on my geometry. once i like to display texture B, i like to replace B with texture A. or B with A. May there will be many more texture than just 2, may about 5 different texture. I like to handle the texture switching by applying just one method, may a visitor. for example: i like to implement a sky - system, ... , building with reflection/env map (day, night, winter, ... ) i don't like to replace the geometry (switch node) and the texture, i like only to replace the texture for such a geometry, or may for all buildings the texture. what i like to do: * texture A only visible * texture B only visible * texture A B visible, with a blending , * may we can also blend over time, means A goes to B A ( 1 - t / BlendDuration) + B (t/BelndDuration) linear blending over time t this are the four cases i am looking for is there a technology in osg, or how should i implement it? /adegli ___ osg-users mailing list osg-users@openscenegraph.net mailto:osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Texture switching in Real time...
Hi Adrian, maybe if you put the textures in 2 different texture units, adding Sampler2D uniforms and a fragment program like this: --- uniform sampler2D firstTexture; uniform sampler2D secondTexture; uniform float osg_FrameTime; void main(void) { vec4 first = texture2D( firstTexture, gl_TexCoord[0].xy); vec4 second = texture2D( secondTexture, gl_TexCoord[0].xy); gl_FragColor = mix(first, second, (0.5 + 0.5*sin(0.5 * osg_FrameTime) ) ); } -- Replace osg_FrameTime with your mix ratio, a float Uniform and you can mix it as you like. Markus hi i like to switch a texture without reloading the geometry. For example i have two different textures to map on my geometry. once i like to display texture B, i like to replace B with texture A. or B with A. May there will be many more texture than just 2, may about 5 different texture. I like to handle the texture switching by applying just one method, may a visitor. for example: i like to implement a sky - system, ... , building with reflection/env map (day, night, winter, ... ) i don't like to replace the geometry (switch node) and the texture, i like only to replace the texture for such a geometry, or may for all buildings the texture. what i like to do: * texture A only visible * texture B only visible * texture A B visible, with a blending , * may we can also blend over time, means A goes to B A ( 1 - t / BlendDuration) + B (t/BelndDuration) linear blending over time t this are the four cases i am looking for is there a technology in osg, or how should i implement it? /adegli ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
[osg-users] license - using osg example code
Hi Robert, i wrote a little noncommercial tool (a simple bench) which is meant to check and measure the implementation of OpenGL 2.0 on different systems. I wonder how to license this? The application itself is open source, is linking against OT|OP|OSG Debian Packages. Distributed as BinPackage and as SourcePackage. Currently it is using the code from osgvertexexample, osgprerender(modified) and osgpointsprite. Also a good question: Can I redistribute parts of the osg-data ? The Cubemap-images, cessna.osg etc ? Thanks for info. regards, Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] license - using osg example code
Hi Robert, How far advanced are you with gl2benchmark? What is your delivery schedule? Some people tested it yesterday and reported their results. Some useful comments came and i have to implement more functionality and exception handling for old hardware, ati hardware :-) etc. The first version is packaged for debian ( and OSG,OT,OP dependencies ) and is installing and working on non developer installations. sid works, etch should also work. Is not public until data from systeminfo and glxinfo is also part of the whole thing. We try to make an overview over most possible system information. Some people helping with testing and packaging, so it is not a long time to get gl2benchmark public. I would love to see a good benchmark suit based on the OSG. I'm not sure our data is a good base for this though, you really want something a bit larger. I'd like to see a refresh of the OpenSceneGraph-Data in this direction too. Perhaps its time to make a call for cool models :-) yes, the testpart which uses osgprerender already uses 2 large, nice landscape images, testing realtime image processing (a fragment shader) on prerender stage and mapping the results on the flag geometry. I wish to 'facelift' all testscenes step by step. The first thing for now is to get most possible lower layer system info into the application. regards, Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] OSG feedback examples
Hi bm, None of that is very useful but it is fun to play with, so I thought I'd share it with the group. i saw the video and i like to see artistic uses of OSG. Even if it is mostly just for fun so it shows how powerful OSG is to make demos, pre-process images etc. I remember i did some experiments like this last year, using the Evolution UC-33 Midi-Controller (which has good support under linux) to control my osg-scene. Using a MIDI-Sequencer (I'm using seq24) , all osg-inputs from the UC-33 was recorded in realtime and could be manipulated for a nice playback session. So even if MIDI is old stuff, I could very easy syncronize the visual scene and some midi-soundgenerators doing principial live performances etc.. cool stuff, Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Precision - using FBO image targets as VertexTexture
Hi Robert, I'm struggling to follow what bits work and what doesn't. Is it that _image-getInternalTexureFormat() is not GL_RGBA32F_ARB? yes, finally after a debug session I found out that setting up the internal Format for the RenderBuffer (is done via: FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment attachment) depends on the right setup of the osg::Image which is attached to the Camera(Node) in osgPrerender - example, for option --image, there is following in use: image-allocateImage(tex_width, tex_height, 1, GL_RGBA, GL_FLOAT); it works ok, but the float values in the image will only be prerendered with 8bit precision this way. instead, increasing the prerender precision to 16bit is possible but not simply by using: image-allocateImage(tex_width, tex_height, 1, GL_RGBA32F_ARB , GL_FLOAT); the function will not set up the image correctly with format 0x8814 , but with a little fix inside of void Image::allocateImage(int s,int t,int r, GLenum format,GLenum type, int packing) it works. i have attached the code that works for me. btw: maybe the problem exists always, if image prerendering is done with other rendertarget formats than standard GL_RGBA? i'm not sure about this, have not tested such cases. Markus /// myfix: void Image::allocateImage(int s,int t,int r, GLenum format,GLenum type, int packing) { _mipmapData.clear(); unsigned int previousTotalSize = 0; /// GLenum internalformat = format; if(format == 0x8814) // the fix is only for format GL_RGBA32F_ARB { internalformat = format; format = GL_RGBA; } /// if (_data) previousTotalSize = computeRowWidthInBytes(_s,_pixelFormat,_dataType,_packing)*_t*_r; unsigned int newTotalSize = computeRowWidthInBytes(s,format,type,packing)*t*r; if (newTotalSize!=previousTotalSize) { if (newTotalSize) setData(new unsigned char [newTotalSize],USE_NEW_DELETE); else deallocateData(); // and sets it to NULL. } if (_data) { _s = s; _t = t; _r = r; _pixelFormat = format; _dataType = type; _packing = packing; _internalTextureFormat = internalformat; // instead of direct use of 'format' } else { // throw exception?? not for now, will simply set values to 0. _s = 0; _t = 0; _r = 0; _pixelFormat = 0; _dataType = 0; _packing = 0; _internalTextureFormat = 0; } ++_modifiedCount; } ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Precision - using FBO image targets as VertexTexture
Hi Robert, I just wonder how to debug such tings on the GPU ? Has someone played with FBO's and VertexTexture this way ? Which image-extensions (using Nvidia hardware) er best? using osg from cvs. after debugging inside of FrameBufferObject.cpp RenderStage.cpp in FrameBufferObject.cpp: GLenum format = attachment._image-getInternalTextureFormat(); It seems that RenderBuffer is not getting the right Format (GL_RGBA32F_ARB) even if i'm setting it for the RenderTarget (osg::Image) in a modified osgprerender example. instead, the FBO is rendering with GL_RGBA precision. in RenderStage.cpp: i have testet the results of hardcoded pre-rendering with GL_RGBA32F_ARB via: fbo-setAttachment(GL_COLOR_ATTACHMENT0_EXT, osg::FrameBufferAttachment(new osg::RenderBuffer(width, height, GL_RGBA32F_ARB))) then it works for me, the prerendered image has real float-precision now. until now, i havn't found a better way than setting the RenderBuffer format directly. Maybe a better place is inside of FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment attachment) ?? -Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Point Cloud Aliasing
Hi Andrew, Does anyone know how I can diminish or remove the aliasing effect? have you tried PointSprites instead of GL_POINTS ? Modify the StateSet for using PointSprites and add a suited Texture and the pointsize-gl-extension. Then you can control the appearance of your points from a GLSL Vertex Shader. Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Ephemeris Skydome
Hi Scott, May, Scott schrieb: I tried this for the moon, but during daytime it is still not blending into the sky. The moon is a dark blue compared to the sky. We are using a moon light source could that be the problem? Any ideas? right now, I have no osgEphemeris installed here, but I hope that I can give you an answer tomorrow. I have played with a lot of versions from cvs since osgEphemeris started. Some parts of the code have changed, so it can be important to know on which version (date?) of osgEphemeris you are sitting on and which system you are running. I saw there is an issue with my osgEphemeris which you can check on your system: The appearance of the stars and all the sky-colors depend from the viewer-clear-color on my system. Can you check out what happens on your system if you do: osgProducerViewer-setClearColor(osg::Vec4(0,0,0,1))AND uncomment the additional Blend settings for the stars-stateset ? Maybe Don can help, whats best to do here ? -because he is most familar with osgEphemeris ? Markus. ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Ephemeris Skydome
May, Scott schrieb: We just upgraded from to osg 1.2 and now we can see through the Ephemeris Skydome into the Stars during the day. Is there a fix or change that will return the sky to be opaque? -Thanks for all the good advise you guys give, this mailing list is great! -SRM ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ Hi, after adding Blend to the stars stateset it worked for me. there is a shader, controling the stars alpha. Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] Hang in Producer on nVidia 8800 cards
Hi, Now that the 1.0-9746 drivers are released, maybe someone with something other than an 8800 nvidia card can try running a Producer app and let us know if it hangs in the same spot. I wonder if it's an 8800 issue or an issue for all nvidia cards. as i know , the 8800 driver under linux is not the same than the latest driver used by older nvidia adapters . seems for me that the problem can depend on driverhardware version. Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
[osg-users] Precision - using FBO image targets as VertexTexture
Hi all, i did some testings with a modified osgPrerender example: what i tried was to use the image target of a CameraNode as input for a VertexTexture, controlling the vertex.z of a model in the scenegraph ( using a vertexshader ). It works good, but it seems for me that the GPU internal precision for the coordinates in the vertexShader from vertextexture hasn't float precision. How can i simply check this ? I have checked the precision of the FBO image target in MyPostDrawCallback and at this stage i can see that there is float precision. I just wonder how to debug such tings on the GPU ? Has someone played with FBO's and VertexTexture this way ? Which image-extensions (using Nvidia hardware) er best? Thanks for help, Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] What do you want from viewer functionality?
Hi Robert, hi all, I'd like feedback from the community on what you needs are on the viewer front. the applications i think about would have multiple views , sharing the same scene. what i would need to build my gui-dependent stuff on it is: Interactive Editor Views: - right-hand popup-menu for setting viewer properties with user-feedback ( a gui-independent interface for this would be fine) - all standard user-interactions ,selection-modes, dragNdrop ( a gui-independent interface for this would be fine) Fullscreen Performance View: - switching viewerwindow in fullscreen mode - highest performance highest quality :-.) - a fullscreen render-thread instantiated and controlled by the gui-mother-application Used in a GUI based application with builtin interactive editor showtime Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
Re: [osg-users] osgfadetext
Robert Osfield schrieb: Hi Markus, I have just done some testing on my machine with osgfadetext and top does show an increasing memory usage when the fade text arn't culled. Don't know what the cause is, reproducing the problem is half of the battle so I don't think it'll be too difficult to fix. Hi Robert, thanks for testing this. btw. I like to take in use the extensions which came into osgText (outlining etc.). It makes labels much more readable under certain conditions . Markus ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
[osg-users] osgfadetext
Hi All, has someone the same memory problem with osgText::FadeText:? I'm using the current code from CVS. When running osgfadetext example, my system is rapidly running out of memory . I changed the example code, so it uses osgText::Text and tried again. Now it runs without problems, and memory use is constant. I could reproduce the same issue on another machine. I wonder if it is a driver issue or it has something to do with osgText::FadeText ? thanks, Markus running Linux 2.6.18-kanotix-1 i686 Videocard nVidia GeForce 7600 GS X.Org 7.1.1 [ 1280x1024 @50hz ] GLX Version 2.1.0 NVIDIA 96.26 | Client Shell | Infobash v2.50 ___ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/