Re: [osg-users] SIGGRAPH 2012: OpenSceneGraph BOF
dglenn wrote: Greetings All! I assume that we are going to have a BOF this year, since I just went over the SIGGRAPH conference schedule and there is a listing with John's name on it hosting. See you there! I wish i could go to SIGGRAPH maybe some years later... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48091#48091 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] Proland: a new open source planet rendering engine
ebruneton wrote: Hello dear OSG-community, INRIA is pleased to announce that Proland has been released in Open Source. Proland is a C++/OpenGL library for the real-time realistic rendering of very large and detailed 3D natural scenes on GPU. It is capable of rendering entire planets from ground to space (with atmosphere, clouds, oceans, trees, roads, etc). Proland is released under a dual GPLv3/commercial license. You can try it by downloading a precompiled Windows demo (that you can find by googling for Proland planet rendering engine). The Proland team Congratulations! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47902#47902 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget examples dataset
markos wrote: Hi, I'm not sure if anyone noticed before, but there is a lot of data missing from OpenSceneGraph dataset that are required to properly run osgwidget* examples. For example, osgwidgetmessagebox uses theme-8-shadow.png and theme-8.png, but these assets are nowhere to be found. I've check both 3.0.0 and trunk datasets. The problem is the examples look horrible without proper themes. But even using theme-2.png as substitute, makes them much prettier. :) I'd like to ask the author if it is possible to upload the missing files or perhaps point me in the direction where to get them? Thanks. Cheers, Marko I have noticed that before. But I just use the osgwidget functions, and did not look for these data. Since you have met this too, I also want to know where are these data gone? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47048#47048 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] I am in a puzzle about the realization of osgOcean's 'Glare effect'
benang wrote: A noob trying to help a bit. Try looking at OceanScene::preRenderCull() method. You'll see that it's being used there to render the scene. Thanks a lot for your help. And sorry for so late to answer. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39263#39263 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] Iam in a puzzle about the realization of osgOcean's 'Glare effect'
Hi, I saw the code in 'OceanScen.cpp', that 5 cameras in 'osgOcean::OceanScen::_glarePasses' were used to render the glare effect. But I saw the realization code in water.frag is just as bellow: if(osgOcean_EnableGlare) { float lum = luminance(lumColor); gl_FragData[1] = vec4(lum); } And it looks like that the cameras in 'osgOcean::OceanScen::_glarePasses' were not been used anywhere. Will tell me why? Thank you! Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27346#27346 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error with osgOcean-VBO Example!
Skylark wrote: Hi Nick, Tian, I am using the latest code from the trunk and having the same issues as Jean S down in this thread. I think Tian, you did not add the --vbo command line option, that's why you're not getting the crash. If I remove that option, i.e. the ocean is rendered using the same technique as before, I don't get a crash either. But using the --vbo option, which is the whole point of the branch is to test the new ocean geometry technique, I get the crash I noted previously (and gave the stack trace for). J-S -- __ Jean-Sebastien Guay http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum Hi Jean: I have understood what you say! Thanks! This branch is just a test for VBO technic. Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26218#26218 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error with osgOcean-VBO Example!
Kim Bale wrote: Hi Tian, Are you referring to the Request Warp pointer error? I've seen this before, I believe it's more to do with osgViewer rather than osgOcean, it certainly shouldn't affect it's the program. Regards, Kim. Hi Kim: Yes. I have saw the problem now! Thanks a lot! The VBO ocean runs just well! :) I saw the code that, sky and otherthings have not been added. Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26136#26136 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error with osgOcean-VBO Example!
Trajce (Nick) Nikolov wrote: Hi Tian, I am having triubles to run it on Windows. What is your platform? -Nick Hi Nick: My platform is Visual Studio 2005 sp1 and osg2.8.2 on Window XP. What is your problem? Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26167#26167 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error with osgOcean-VBO Example!
zonk wrote: Hi, well, must of this forum's users are not chinese aware ;) can you translate the error message into english? Thank you! Cheers, Torben Hi Torben: Sorry about that! I was a little wrought-up when I met this problem. I have translate the error! -MT -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26110#26110 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error with osgOcean-VBO Example!
Kim Bale wrote: Oceansurface wasn't initialised, I've fixed and checked this in to the branch. Only additional hardware requirement is VBO support which I gather is pretty standard. If you find that you have problems with this you can disable the use of VBOs in the FFTOceanSurfaceVBO constructor and recompile. It should still work. Regards, Kim. Hi Kim: Thanks! Your modification have fixed the problem! But a new problem occured. The screen shot is as bellow! Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26111#26111 Attachments: http://forum.openscenegraph.org//files/new_error_180.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] Error with osgOcean-VBO Example!
Hi, I have updated 'branch\osgOcean-VBO' project though 'SVN', and compiled it sucessfully. When I run the 'oceanExample_SIMPLE.exe', an 'Memory Error' occured. I have a screen shot bellow! When I debug this, a break occured at: 'oceanSurface-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF)' Anyone tell what is the problem? Any new hardware capability needed for osgOcean-VBO? Thank you! Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26051#26051 Attachments: http://forum.openscenegraph.org//files/memory_error_393.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] osgOcean Geometry
Good work Kim! I have update the svn code! A little real-time |-) :D Kim Bale wrote: Hi Paul, Yes you're right this is due to the rather inefficient method of updating the surface primitives and vertices that osgOcean uses at the moment. Explained here: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-December/036735.html (http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-December/036735.html) Like I say in that post I have written a test case which significantly improves the performance of this area but haven't actually added it into the library code yet. This isn't helped by the fact that I keep forgetting to put the test code on the svn so other people can't see the approach. However, I WILL remember to do that tonight so if you want to see a solution for it you can have a go. I've done the hard bit, I just haven't had time to add it into the core library code. If you check the sandbox directory on the svn later this evening you can have a look. Regards, Kim. On 4 February 2010 13:13, Paul Palumbo () wrote: I'm running osgOcean and I'm only interested into ocean surface effects (the geometry in particular). I also have a hard time limit on each frame time. However, with osgOcean, I'm seeing some large spikes in processing time that are causing me problems. In particular, I'm seeing the FFTOceanSurface::computeVertices routine (called every 50ms) taking around 17-25ms per call and FFTOceanSurface::computePrimitives routine (called when tile LOD changes) taking 10-15ms and I'm looking for a way to make this more real-time. These timing numbers are with osgOcean parameters using in the oceanExample code. Could the ocean surface geometry be defined at initialization at the scene graph level for each tile/frame rather than being redefined every 50ms as it doing now. In computePrimitives, couldn't the geometry only need to be regenerated for the times that changed LOD? Any advice would be appreciated. Thanks, Paul P. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23670#23670 (http://forum.openscenegraph.org/viewtopic.php?p=23670#23670) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23708#23708 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] osgOcean bugs(?) and questions
paul1492 wrote: Okay... Now that I'm understanding more of the code lately, maybe that wasn't the best of images to reference. However, I'm seeing exactly the same black dots in the image when I use the standard oceanExample case with its sky dome and viewing above the ocean surface. When I turn on back face culling, I do not see the black dots. What does it mean to have back facing polygons when above the ocean surface? I can understand this when you are under the ocean surface but above. Paul P. Hi Paul: I think that, beacuse of the reflection effect, we have to have back facing polygons of the objects above surface. MT. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22774#22774 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] wave generator
Funny :) Kim Bale wrote: Kim, *ahem* Replying to myself there for some reason.. K. 2010/1/6 Kim Bale () Kim, This is to some extent what already happens with the mipmapping LOD that osgOcean currently uses. The problem is that the multi-res surface is dependant on the position of the camera and not on local features. The code to recompute the surface primitives is already pretty complicated, to do it based on both camera position and local features would be a nightmare (if at all possible). One way to address this would be to increase the resolution of the highest level of detail and only apply the iwave algorithm to tiles in close proximity to the camera. K. 2010/1/5 Trajce Nikolov () ok. I will have a look It is however a pretty expensive effect and the resolution of the ocean has to be increased How about having multi-res ocean, what I mean to have it tiled with different res on each tile Nick http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick) Sent from Devlet, Ankara, Turkey On Tue, Jan 5, 2010 at 12:10 PM, Kim Bale () wrote: Hi Nick, It isn't support in osgOcean at the moment. However, Tessendorf discusses a technique called iwave which can be used to create localised wave deformation in conjunction with the FFT ocean technique. You can read about it here: http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf (http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf) I had a student implement it in an ogl app a while back and the effect was quite good. It is however a pretty expensive effect and the resolution of the ocean has to be increased rather a lot otherwise its very chunky. (http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf)K. 2010/1/5 Trajce Nikolov () Hi gurus, Is it possible to have a wave generator at specific position in the ocean? Like the rear or front of the boat, rain drops .. etc ..? Nick http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick) Sent from Izmit, 41, Turkey ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22190#22190 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] ocgOcean question
Hi Nick: The effect is very interesting. I just want to get the effect profile, which means that we could see both underwater and above water. How could I get that effect? Cheers, MT Trajce Nikolov wrote: Hi Kim, I turned that off and I see the quad under water. see attached One more thing. I am trying to implement osgEphemeris with osgOcean, and so far it looks good but two problems. Somehow, when I add the ephemeris into the ocean scene, I am getting the sun rotated 180 around Z, and it is scaled - at least that are the visual impressions. Any thoughts on this? Nick http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick) Sent from Izmit, 41, Turkey On Tue, Jan 5, 2010 at 11:14 AM, Kim Bale () wrote: Hi Nick, osgOcean (with all the effects turned on) renders to a quad on the screen, this is because there are a number of post processing effects that require it (glare, dof). If I understand your problem correctly, you will need to set the frame buffer size to the size of your window with setScreenDims( osg::Vec2f ) and the quad will fill the window. Alternatively turn off glare and depth of field. Regards, Kim. 2010/1/5 Trajce Nikolov () What I am getting is View in a Window. Please see the attached image. The osgOcean opens another window instead of rendering in the one I created. Any ideas, hints? Nick http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick) Sent from Izmit, 41, Turkey On Mon, Jan 4, 2010 at 8:50 AM, Trajce Nikolov () wrote: Hi Tian Ma, well, the example works just fine. Also, when I step thru, I am not getting any errors. Just not able to see the ocean surface and getting the screen aligned quad (black) ... Any ideas? Nick http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick) On Mon, Jan 4, 2010 at 5:46 AM, Tian Ma () wrote: Hi Nick: Could you run the ocean example successfully? Any errors occured when you get a back screen? Cheers, MT Trajce Nikolov wrote: Hi, I am trying to embed the ocean stuff into my application. I mimic the code from the example, and all I get is 2D black screen aligned quad. Any hints? Thanks Nick http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick) (http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick)) Sent from Devlet, Ankara, Turkey -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22044#22044 (http://forum.openscenegraph.org/viewtopic.php?p=22044#22044) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22123#22123 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] ocgOcean question
Hi Nick: Could you run the ocean example successfully? Any errors occured when you get a back screen? Cheers, MT Trajce Nikolov wrote: Hi, I am trying to embed the ocean stuff into my application. I mimic the code from the example, and all I get is 2D black screen aligned quad. Any hints? Thanks Nick http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick) Sent from Devlet, Ankara, Turkey -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22044#22044 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
here it is. Kim Bale wrote: Hi Tian, There's no file attached... Kim. 2009/12/2 Tian Ma : Hi Kim: Does the information above help ? My graphic card is a little old, rihgt? :) Regards, Tian Kim Bale wrote: Hi Tian, Could you download and run this program for me: http://www.geeks3d.com/20090414/gpu-caps-viewer-170-available-with-cuda-support/ And then use the Full XML Export tool under the Tools tab and then send me the xml file please. I need to know exactly what your card supports and I can't seem to find out from my searches. Cheers. Kim. 2009/11/27 Tian Ma : Hi Kim: Thank you! By now, I am using the olde version. And I will try more. Regards, Tian Kim Bale wrote: Hi Tian, It did highlight some useful stuff. Unfortunately I won't get round to fixing this immediately. However, if you want to use the version in the trunk you can probably get round it by replacing the uniform booleans one by one with hard coded values in the water shader for the options you want to enable until it stop complaining. Obviously this is a temporary fix until I get round to investigating further. K. 2009/11/26 Tian Ma : Hi Kim: Thanks for your helpful work! Does the information inf file ocean_output.txt help? Regards, Tian Kim Bale wrote: Hi Peter, Well this is really what the many weird and wonderful configurable options are for in OceanScene, nearly every effect can be turned off an on to suit the graphics card configuration. I think it's probably better to do it this way, rather than grouping them together to give the low,medium and high settings, as you can fine tune the rendering to suit the available hardware. The core water shader itself isn't so expensive, it's largely the pre render passes that bring down the frame rate and all of these can be turned off and on as desired. (I think) the problem with Tians card at the moment is that the water shader in the trunk has used up all the maximum number of uniforms permitted on nvidia 7 series card which use a version of glsl that I'm not 100% sure of. But I think this can be worked around, I just haven't got round to it yet (plus it's quite hard to test without a suitable card) K. 2009/11/26 Peter Bear : Would it be possible to implement sort of a config option with 2 or more shaders for multiple quality levels? This would allow for the use of one shader if you have a more powerful card, or another shader for an older card. Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20395#20395 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20410#20410 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20461#20461 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: Does the information above help ? My graphic card is a little old, rihgt? :) Regards, Tian Kim Bale wrote: Hi Tian, Could you download and run this program for me: http://www.geeks3d.com/20090414/gpu-caps-viewer-170-available-with-cuda-support/ And then use the Full XML Export tool under the Tools tab and then send me the xml file please. I need to know exactly what your card supports and I can't seem to find out from my searches. Cheers. Kim. 2009/11/27 Tian Ma : Hi Kim: Thank you! By now, I am using the olde version. And I will try more. Regards, Tian Kim Bale wrote: Hi Tian, It did highlight some useful stuff. Unfortunately I won't get round to fixing this immediately. However, if you want to use the version in the trunk you can probably get round it by replacing the uniform booleans one by one with hard coded values in the water shader for the options you want to enable until it stop complaining. Obviously this is a temporary fix until I get round to investigating further. K. 2009/11/26 Tian Ma : Hi Kim: Thanks for your helpful work! Does the information inf file ocean_output.txt help? Regards, Tian Kim Bale wrote: Hi Peter, Well this is really what the many weird and wonderful configurable options are for in OceanScene, nearly every effect can be turned off an on to suit the graphics card configuration. I think it's probably better to do it this way, rather than grouping them together to give the low,medium and high settings, as you can fine tune the rendering to suit the available hardware. The core water shader itself isn't so expensive, it's largely the pre render passes that bring down the frame rate and all of these can be turned off and on as desired. (I think) the problem with Tians card at the moment is that the water shader in the trunk has used up all the maximum number of uniforms permitted on nvidia 7 series card which use a version of glsl that I'm not 100% sure of. But I think this can be worked around, I just haven't got round to it yet (plus it's quite hard to test without a suitable card) K. 2009/11/26 Peter Bear : Would it be possible to implement sort of a config option with 2 or more shaders for multiple quality levels? This would allow for the use of one shader if you have a more powerful card, or another shader for an older card. Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20395#20395 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20410#20410 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20461#20461 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20716#20716 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] How to compile osgOcean
Hi Ice-D: I think you need to compile the osgocean project first, and then the 'example' and 'install' projects. Cheers, Tian Ice-D wrote: Here some more information. I think it is not a problem with the FFTSS library, instead cmake has a problem: CMake Error at src/osgOcean/CMakeLists.txt:123 (INSTALL): install TARGETS given no FRAMEWORK DESTINATION for shared library FRAMEWORK target osgOcean. Does someone know how to solve this? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20617#20617 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: I am so sorry to reply you so late. I went out last weekend. I will try this today! Regards, Tian Kim Bale wrote: Hi Tian, Could you download and run this program for me: http://www.geeks3d.com/20090414/gpu-caps-viewer-170-available-with-cuda-support/ And then use the Full XML Export tool under the Tools tab and then send me the xml file please. I need to know exactly what your card supports and I can't seem to find out from my searches. Cheers. Kim. 2009/11/27 Tian Ma : Hi Kim: Thank you! By now, I am using the olde version. And I will try more. Regards, Tian Kim Bale wrote: Hi Tian, It did highlight some useful stuff. Unfortunately I won't get round to fixing this immediately. However, if you want to use the version in the trunk you can probably get round it by replacing the uniform booleans one by one with hard coded values in the water shader for the options you want to enable until it stop complaining. Obviously this is a temporary fix until I get round to investigating further. K. 2009/11/26 Tian Ma : Hi Kim: Thanks for your helpful work! Does the information inf file ocean_output.txt help? Regards, Tian Kim Bale wrote: Hi Peter, Well this is really what the many weird and wonderful configurable options are for in OceanScene, nearly every effect can be turned off an on to suit the graphics card configuration. I think it's probably better to do it this way, rather than grouping them together to give the low,medium and high settings, as you can fine tune the rendering to suit the available hardware. The core water shader itself isn't so expensive, it's largely the pre render passes that bring down the frame rate and all of these can be turned off and on as desired. (I think) the problem with Tians card at the moment is that the water shader in the trunk has used up all the maximum number of uniforms permitted on nvidia 7 series card which use a version of glsl that I'm not 100% sure of. But I think this can be worked around, I just haven't got round to it yet (plus it's quite hard to test without a suitable card) K. 2009/11/26 Peter Bear : Would it be possible to implement sort of a config option with 2 or more shaders for multiple quality levels? This would allow for the use of one shader if you have a more powerful card, or another shader for an older card. Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20395#20395 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20410#20410 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20461#20461 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20546#20546 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: Thanks for your helpful work! Does the information inf file ocean_output.txt help? Regards, Tian Kim Bale wrote: Hi Peter, Well this is really what the many weird and wonderful configurable options are for in OceanScene, nearly every effect can be turned off an on to suit the graphics card configuration. I think it's probably better to do it this way, rather than grouping them together to give the low,medium and high settings, as you can fine tune the rendering to suit the available hardware. The core water shader itself isn't so expensive, it's largely the pre render passes that bring down the frame rate and all of these can be turned off and on as desired. (I think) the problem with Tians card at the moment is that the water shader in the trunk has used up all the maximum number of uniforms permitted on nvidia 7 series card which use a version of glsl that I'm not 100% sure of. But I think this can be worked around, I just haven't got round to it yet (plus it's quite hard to test without a suitable card) K. 2009/11/26 Peter Bear : Would it be possible to implement sort of a config option with 2 or more shaders for multiple quality levels? This would allow for the use of one shader if you have a more powerful card, or another shader for an older card. Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20395#20395 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20410#20410 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: Thank you! By now, I am using the olde version. And I will try more. Regards, Tian Kim Bale wrote: Hi Tian, It did highlight some useful stuff. Unfortunately I won't get round to fixing this immediately. However, if you want to use the version in the trunk you can probably get round it by replacing the uniform booleans one by one with hard coded values in the water shader for the options you want to enable until it stop complaining. Obviously this is a temporary fix until I get round to investigating further. K. 2009/11/26 Tian Ma : Hi Kim: Thanks for your helpful work! Does the information inf file ocean_output.txt help? Regards, Tian Kim Bale wrote: Hi Peter, Well this is really what the many weird and wonderful configurable options are for in OceanScene, nearly every effect can be turned off an on to suit the graphics card configuration. I think it's probably better to do it this way, rather than grouping them together to give the low,medium and high settings, as you can fine tune the rendering to suit the available hardware. The core water shader itself isn't so expensive, it's largely the pre render passes that bring down the frame rate and all of these can be turned off and on as desired. (I think) the problem with Tians card at the moment is that the water shader in the trunk has used up all the maximum number of uniforms permitted on nvidia 7 series card which use a version of glsl that I'm not 100% sure of. But I think this can be worked around, I just haven't got round to it yet (plus it's quite hard to test without a suitable card) K. 2009/11/26 Peter Bear : Would it be possible to implement sort of a config option with 2 or more shaders for multiple quality levels? This would allow for the use of one shader if you have a more powerful card, or another shader for an older card. Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20395#20395 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20410#20410 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20461#20461 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: Thanks for your patience! I have done what you advised. And the ocean_output.txt file was give as followed attatchment. Will you please see what's the problem really is? Cheers, Tian Kim Bale wrote: Ok I reckon the water.frag has used up the maximum allowed uniforms for that card, I've come across this issue before with the 7 series cards. There are some tricks to get around this, so I'll see if I fix it. Is there any chance you could set the notify level to osg::NotifySeverity::INFO and then pipe the output from oceanExample to a file and send it to me? It might tell me how many I've used and are allowed to use on that card. You can do it easily in the command prompt (win32) by using the command oceanExample ocean_output.txt Regards, Kim. 2009/11/25 Tian Ma : Hi Kim: My graphics card is 'NVIDIA GeForce 7300 LE'. The version number = r181 could work normally on this card. And since r182 to 185, the error emerged. Cheers, Tian Kim Bale wrote: Hi Tian, Last night I committed the changes that permit alpha tranparencies to be used in conjunction with the glare and depth of field effects. This required the use of multiple render targets ( http://code.google.com/p/osgocean/source/detail?r=183 ) and some changes to some of the shaders. It looks like that's used up the maximum varying attributes of your card and also possibly your card doesn't support MRTs. What graphics card are you using? Could you set the notify level to osg::notifylevel::info and dump the contents to file so I can see exactly what the problem is? Cheers. Kim. 2009/11/24 Tian Ma : Hi Kim, I update the source code from SVN today and generate the new ocean project. When run the example, some errors emerge. The error image is as follow link: http://storage.openlab.net.cn/forums/2009-11-24/1981569/%e9%94%99%e8%af%af.JPG Something wrong with the water.frag? Thank you! Cheers, Tian Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20196#20196 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20309#20309
Re: [osg-users] [osgOcean] osgOcean also rendering with osgParticle?
Hi Kim: It is really my honor to test the new Version. The follow links are my test effect on my own computer: 1.We can see that: the sharp white around the boat is still there, although the around water looks transparent. http://storage.openlab.net.cn/forums/2009-11-24/1981569/boat.JPG 2. When I look up to the boat under the ocean, the boat's color seems abnormal( purple ). http://storage.openlab.net.cn/forums/2009-11-24/1981569/down_up.JPG 3.The foams around the island gone, and the water is just transparent around the shore. http://storage.openlab.net.cn/forums/2009-11-24/1981569/foam.JPG I will test the particle effect tomorrow morning on my work computer. Cheers, MT Kim Bale wrote: Erik, Tian et al. I committed some changes to the trunk last night that allow transparencies, and thus particle systems to work with the glare and depth of field effects (http://code.google.com/p/osgocean/source/detail?r=183). If you could test this functionality I would be grateful, it works fine on my machine, but I only tested it with a transparent quad and not particle systems but it appears Tian is having issues with the Multiple render target support. Color buffer writes are now done to gl_FragData[0] and luminance/depth writes to gl_FragData[1]. You can see these changes in the water, terrain and default shaders. Let me know how you get on. Kim. ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20227#20227 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: This errors occurs on the computer in my office. I think the card is a little old:( Beacause it is night here, I will do what you advised tomorrow morning. Thank you! Cheers, MT Kim Bale wrote: Hi Tian, Last night I committed the changes that permit alpha tranparencies to be used in conjunction with the glare and depth of field effects. This required the use of multiple render targets ( http://code.google.com/p/osgocean/source/detail?r=183 ) and some changes to some of the shaders. It looks like that's used up the maximum varying attributes of your card and also possibly your card doesn't support MRTs. What graphics card are you using? Could you set the notify level to osg::notifylevel::info and dump the contents to file so I can see exactly what the problem is? Cheers. Kim. 2009/11/24 Tian Ma : Hi Kim, I update the source code from SVN today and generate the new ocean project. When run the example, some errors emerge. The error image is as follow link: http://storage.openlab.net.cn/forums/2009-11-24/1981569/%e9%94%99%e8%af%af.JPG Something wrong with the water.frag? Thank you! Cheers, Tian Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20196#20196 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20229#20229 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: No, I am not. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? When go near the model, the reflection will be more and more cmoplete and looks like many triangle reflections combined together. The picture is as follow link: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: Are you using a matrix transform above OceanScene to alter the sea level? K. 2009/11/19 Tian Ma : Hi Kim: I just give the picture's URL link below: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: There's no attachment at all now :( K. 2009/11/19 Tian Ma : Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19901#19901 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20230#20230 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: Oh, great!! That fix the problem! Thank you for your quick work! Cheers, Tian Kim Bale wrote: Hi Tian, Sorry about the late reply on this, I must have got distracted and forgot to reply. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? No that shouldn't matter, transforming the ocean surface itself may cause problems though. It's possible that one side of the model is being culled in the reflection and you're seeing the inside of the model. I just added an override to the reflection camera that should force face culling to off when it's passing through the reflection camera (http://code.google.com/p/osgocean/source/detail?r=184). This might fix the problem, could you try updating from the trunk and see if the issue is resolved? Cheers. K. 2009/11/24 Tian Ma : Hi Kim: No, I am not. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? When go near the model, the reflection will be more and more cmoplete and looks like many triangle reflections combined together. The picture is as follow link: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: Are you using a matrix transform above OceanScene to alter the sea level? K. 2009/11/19 Tian Ma : Hi Kim: I just give the picture's URL link below: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: There's no attachment at all now :( K. 2009/11/19 Tian Ma : Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19901#19901 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20230#20230 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: My graphics card is 'NVIDIA GeForce 7300 LE'. The version number = r181 could work normally on this card. And since r182 to 185, the error emerged. Cheers, Tian Kim Bale wrote: Hi Tian, Last night I committed the changes that permit alpha tranparencies to be used in conjunction with the glare and depth of field effects. This required the use of multiple render targets ( http://code.google.com/p/osgocean/source/detail?r=183 ) and some changes to some of the shaders. It looks like that's used up the maximum varying attributes of your card and also possibly your card doesn't support MRTs. What graphics card are you using? Could you set the notify level to osg::notifylevel::info and dump the contents to file so I can see exactly what the problem is? Cheers. Kim. 2009/11/24 Tian Ma : Hi Kim, I update the source code from SVN today and generate the new ocean project. When run the example, some errors emerge. The error image is as follow link: http://storage.openlab.net.cn/forums/2009-11-24/1981569/%e9%94%99%e8%af%af.JPG Something wrong with the water.frag? Thank you! Cheers, Tian Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20196#20196 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20309#20309 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim, I update the source code from SVN today and generate the new ocean project. When run the example, some errors emerge. The error image is as follow link: http://storage.openlab.net.cn/forums/2009-11-24/1981569/%e9%94%99%e8%af%af.JPG Something wrong with the water.frag? Thank you! Cheers, Tian Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20196#20196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: I have seen the dicussions in the page you give. Good works about the foam added to the shoreline. I have update my source from SVN, when I test the new source, I found that the foam effects around the boat is still sharp white. Is that still a unsolved problem? Cheers, MT Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20042#20042 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 attachment: .jpg___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: I just give the picture's URL link below: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: There's no attachment at all now :( K. 2009/11/19 Tian Ma : Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19901#19901 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: No, I am not. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? Cheers, MT Kim Bale wrote: Are you using a matrix transform above OceanScene to alter the sea level? K. 2009/11/19 Tian Ma : Hi Kim: I just give the picture's URL link below: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: There's no attachment at all now :( K. 2009/11/19 Tian Ma : Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19901#19901 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19950#19950 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] osgOcean also rendering with osgParticle?
Hi Kim, Thank you! Good work! I am very glad to here that. Cheers, MT Kim Bale wrote: Hi MT, I've been working on this for the past couple of evenings. It's pretty much done, but I haven't tested it yet. I should have it checked in by Monday, I'll post on this thread when it's done. Kim. 2009/11/18 Tian Ma : Hi Kim: Have you solved the particle render problem in OsgOcean1.01? Could I open the glare and DOF effects with fire particle effect? Cheers, MT Kim Bale wrote: Haha well I've never played with them so I was rather sketchy on the theory. Using MRTs would actually make for a pretty easy fix. I shall see if I can do that this week. K. 2009/11/16 Jean-Sébastien Guay : Hi Kim, I'm not sure if Ogls multiple render target implementation is any more efficient than using a completely separate pass but rendering the ocean twice would be very costly. Yes, of course MRT is more efficient than multiple passes... It's only one pass of the geometry, but with multiple buffer attachments that you can address independently in your shaders. That's the whole point of MRT :-) J-S -- __ Jean-Sebastien Guay http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19769#19769 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19853#19853 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] osgOcean also rendering with osgParticle?
Hi Kim: Have you solved the particle render problem in OsgOcean1.01? Could I open the glare and DOF effects with fire particle effect? Cheers, MT Kim Bale wrote: Haha well I've never played with them so I was rather sketchy on the theory. Using MRTs would actually make for a pretty easy fix. I shall see if I can do that this week. K. 2009/11/16 Jean-Sébastien Guay : Hi Kim, I'm not sure if Ogls multiple render target implementation is any more efficient than using a completely separate pass but rendering the ocean twice would be very costly. Yes, of course MRT is more efficient than multiple passes... It's only one pass of the geometry, but with multiple buffer attachments that you can address independently in your shaders. That's the whole point of MRT :-) J-S -- __ Jean-Sebastien Guay http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19769#19769 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] How could I make the underwater ground looks more clearly?
Hi, I have turn off all the underwater effects, but still blurry. I want to know that: which parameter or functions can make the blurry underwater ground clear? Thank you! Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19683#19683 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] How could I make the underwater ground looks more clearly?
Hi Kim , Thanks a lot again :) I will try it tomorrow at work! Thank you! Cheers, Tian Kim Bale wrote: Hi Tian, Disabling depth of field should fix that. If it doesn't let me know and I'll see if something has got broken. Cheers, Kim. 2009/11/16 Tian Ma : Hi, I have turn off all the underwater effects, but still blurry. I want to know that: which parameter or functions can make the blurry underwater ground clear? Thank you! Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19683#19683 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19690#19690 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] How could I make the underwater ground looks more clearly?
Hi Kim, Thank you! Yes, that workds. Look better now. Cheers, MT. Kim Bale wrote: Hi Tian, Disabling depth of field should fix that. If it doesn't let me know and I'll see if something has got broken. Cheers, Kim. 2009/11/16 Tian Ma : Hi, I have turn off all the underwater effects, but still blurry. I want to know that: which parameter or functions can make the blurry underwater ground clear? Thank you! Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19683#19683 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19723#19723 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: I have downloaded the newest version through SVN, and also compiled the code successfully. When I turn on the oceanExample's testCollision, I found that the boat.3ds model is just white, the same situation I met before. Is this what the example just want to show us? In the example, you did not add any shader to the model. Does this mean that: a default shader was added to the model? But why the model looks just white? Will you please give us a example about how to add a model to the oceanScene to keep what they are? Regards, MT Kim Bale wrote: Hi MT, For the reasons I just gave, you can't add objects to the scene and have the full compliment of effects without either using the default shader or using your own shader implementation. Reflections/refractions etc will continue to work since they act on the ocean surface and not the model. However, other such as glare, depth of field, light scattering, fogging etc will not as they act on the models themselves. However, it is pretty straight forward to duplicate a subset of fixed pipeline functionality within a shader and then add the relevant osgOcean shader effects to it, you can just copy functions from the default shader and mix them in with the result of your shader. K. 2009/11/2 Tian Ma : Hi Jan,Kim: Thank you a lot. Kim, does it means that: I can never keep the models looks like what they are before? And I have to program shaders for every loaded models, in order to have reflect or other effects? I want to know that: is there a simple way to make the models just look like what they are? Kim Bale wrote: Hi Jan, Tian, osgOcean uses shaders for pretty much every effect in the scene - fogging, depth of field, glare, lighting etc. If objects that are added to the scene are to look consistent with the ocean effects they will require a shader to be applied that takes into account these effects. This is particularly necessary if the fullscreen effects are used as they require the alpha component of the frame buffer to work. In order to address this issue, OceanScene will apply a default shader to objects added as children (default_scene.frag vert) which illustrates how to use the uniforms supplied by osgocean (prefixed osgOcean_* ) in conjunction with your own shader. Since I could not anticipate the many wierd and wonderful ways that shaders can be used it only offers a very basic implementation (1 texture unit, limited phong lighting etc) and should be seen as a shader to customise and build on yourself. You can override the default shader either by attaching a new program to the object you wish to use in the scene or by using this function in OceanScene: /** Override the default scene shader for custom shaders. * If custom shaders are required for individual nodes add them before adding to the OceanScene. * Dirties state. */ void setDefaultSceneShader( osg::Program* program ) { _defaultSceneShader = program; _isDirty = true; } Alternatively you can turn the default shader off completely with setter in OceanScene. Regards, Kim. 2009/11/2 Jan Ciger : Tian Ma wrote: Hi, When I load a model into the osgOcean scene, the model looks white all over, without any material. Anybody knows why? Yes, I have seen the same thing. I believe that the shaders applied by osgOcean are responsible and are not passing the the vertex colors along. I have yet to check the shader code, though. Regards, Jan ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19021#19021 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19090#19090 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: Thank you for the useful informations! I could understand the default shader code a little now. When I apply the default shader to the model, it looks a little bit too shinning and glaring Can I weaken the glaring thing? Regards, MT Kim Bale wrote: Hi MT, If you open boat.3ds in osgviewer you will notice that the model itself is white. It doesn't have any textures on it and it's there purely as a test case for the collision. But yes the default shader has been added to it. Will you please give us a example about how to add a model to the oceanScene to keep what they are? The terrain is an external model that has a custom shader applied to it, you can look at that. Alternatively look at the default shader source. K. 2009/11/3 Tian Ma : Hi Kim: I have downloaded the newest version through SVN, and also compiled the code successfully. When I turn on the oceanExample's testCollision, I found that the boat.3ds model is just white, the same situation I met before. Is this what the example just want to show us? In the example, you did not add any shader to the model. Does this mean that: a default shader was added to the model? But why the model looks just white? Will you please give us a example about how to add a model to the oceanScene to keep what they are? Regards, MT Kim Bale wrote: Hi MT, For the reasons I just gave, you can't add objects to the scene and have the full compliment of effects without either using the default shader or using your own shader implementation. Reflections/refractions etc will continue to work since they act on the ocean surface and not the model. However, other such as glare, depth of field, light scattering, fogging etc will not as they act on the models themselves. However, it is pretty straight forward to duplicate a subset of fixed pipeline functionality within a shader and then add the relevant osgOcean shader effects to it, you can just copy functions from the default shader and mix them in with the result of your shader. K. 2009/11/2 Tian Ma : Hi Jan,Kim: Thank you a lot. Kim, does it means that: I can never keep the models looks like what they are before? And I have to program shaders for every loaded models, in order to have reflect or other effects? I want to know that: is there a simple way to make the models just look like what they are? Kim Bale wrote: Hi Jan, Tian, osgOcean uses shaders for pretty much every effect in the scene - fogging, depth of field, glare, lighting etc. If objects that are added to the scene are to look consistent with the ocean effects they will require a shader to be applied that takes into account these effects. This is particularly necessary if the fullscreen effects are used as they require the alpha component of the frame buffer to work. In order to address this issue, OceanScene will apply a default shader to objects added as children (default_scene.frag vert) which illustrates how to use the uniforms supplied by osgocean (prefixed osgOcean_* ) in conjunction with your own shader. Since I could not anticipate the many wierd and wonderful ways that shaders can be used it only offers a very basic implementation (1 texture unit, limited phong lighting etc) and should be seen as a shader to customise and build on yourself. You can override the default shader either by attaching a new program to the object you wish to use in the scene or by using this function in OceanScene: /** Override the default scene shader for custom shaders. * If custom shaders are required for individual nodes add them before adding to the OceanScene. * Dirties state. */ void setDefaultSceneShader( osg::Program* program ) { _defaultSceneShader = program; _isDirty = true; } Alternatively you can turn the default shader off completely with setter in OceanScene. Regards, Kim. 2009/11/2 Jan Ciger : Tian Ma wrote: Hi, When I load a model into the osgOcean scene, the model looks white all over, without any material. Anybody knows why? Yes, I have seen the same thing. I believe that the shaders applied by osgOcean are responsible and are not passing the the vertex colors along. I have yet to check the shader code, though. Regards, Jan ___ osg-users mailing list http://lists.openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Jan,Kim: Thank you a lot. Kim, does it means that: I can never keep the models looks like what they are before? And I have to program shaders for every loaded models, in order to have reflect or other effects? I want to know that: is there a simple way to make the models just look like what they are? Kim Bale wrote: Hi Jan, Tian, osgOcean uses shaders for pretty much every effect in the scene - fogging, depth of field, glare, lighting etc. If objects that are added to the scene are to look consistent with the ocean effects they will require a shader to be applied that takes into account these effects. This is particularly necessary if the fullscreen effects are used as they require the alpha component of the frame buffer to work. In order to address this issue, OceanScene will apply a default shader to objects added as children (default_scene.frag vert) which illustrates how to use the uniforms supplied by osgocean (prefixed osgOcean_* ) in conjunction with your own shader. Since I could not anticipate the many wierd and wonderful ways that shaders can be used it only offers a very basic implementation (1 texture unit, limited phong lighting etc) and should be seen as a shader to customise and build on yourself. You can override the default shader either by attaching a new program to the object you wish to use in the scene or by using this function in OceanScene: /** Override the default scene shader for custom shaders. * If custom shaders are required for individual nodes add them before adding to the OceanScene. * Dirties state. */ void setDefaultSceneShader( osg::Program* program ) { _defaultSceneShader = program; _isDirty = true; } Alternatively you can turn the default shader off completely with setter in OceanScene. Regards, Kim. 2009/11/2 Jan Ciger : Tian Ma wrote: Hi, When I load a model into the osgOcean scene, the model looks white all over, without any material. Anybody knows why? Yes, I have seen the same thing. I believe that the shaders applied by osgOcean are responsible and are not passing the the vertex colors along. I have yet to check the shader code, though. Regards, Jan ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19021#19021 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1
Hi Skylark,Kim: Thx a lot I know quit clearly now. Thank you again for giving me so many useful messages. cheers, MT Skylark wrote: Hello Tian, Was it those that you deleted? Yes, I just delet thems, because I found that these two inline functions had not been used in anywhere. And now my project just goes right, the same with the oceanExample. Sorry I didn't pick up on this thread... I'm pretty darn busy so I just glance over threads that I don't immediately have an answer for, but looking at the OceanScene header in the osgOcean-1.0 tag, lines 213 and 223, it was immediately obvious what the problem was. You do not need to delete them. Just rename the variables called near and far to something else, like this for example: /** Set near DOF blur distance. * Updates the uniform is DOF state is valid. */ inline void setDOFNear( float zNear ) { _dofNear = zNear; if( _dofStateSet.valid() ) _dofStateSet-getUniform(osgOcean_DOF_Near)-set(_dofNear); } /** Set far DOF blur distance * Updates the uniform is DOF state is valid. */ inline void setDOFFar(float zFar ) { _dofFar = zFar; if( _dofStateSet.valid() ) _dofStateSet-getUniform(osgOcean_DOF_Far)-set(_dofNear); } Just for general reference, the problem was that on Windows compilers (and previously DOS), near and far were once keywords used to refer to memory inside the first 64k page, and outside, respectively (back when you needed to address them differently, which is a long time ago). Nowadays it's pretty obsolete, but some compilers on PC still carry that legacy. And I get bitten by it every time I do OpenGL or raytracing code that needs to have a frustum, with near and far planes :-) And it doesn't matter that these methods are not used in osgOcean or the oceanExample themselves, they're still useful methods to have in order to be able to tweak osgOcean's rendering. Sorry , I did not know the meaning of the trunk update clearly. Kim meant checking out from http://osgocean.googlecode.com/svn/trunk/ instead of http://osgocean.googlecode.com/svn/tags/osgOcean-1.0/ The 1.0 tag is pretty old now, people should not check out using it anymore... Kim, is it possible to make changes on the googlecode site so that it doesn't show up by default when people click on the source tab? The default checkout should be from the trunk now. And the trunk has the above fix already, btw. Hope this helps, J-S -- __ Jean-Sebastien Guay http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19081#19081 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: Thank you again :) I will try your advise. Regards, MT Kim Bale wrote: Hi MT, For the reasons I just gave, you can't add objects to the scene and have the full compliment of effects without either using the default shader or using your own shader implementation. Reflections/refractions etc will continue to work since they act on the ocean surface and not the model. However, other such as glare, depth of field, light scattering, fogging etc will not as they act on the models themselves. However, it is pretty straight forward to duplicate a subset of fixed pipeline functionality within a shader and then add the relevant osgOcean shader effects to it, you can just copy functions from the default shader and mix them in with the result of your shader. K. 2009/11/2 Tian Ma : Hi Jan,Kim: Thank you a lot. Kim, does it means that: I can never keep the models looks like what they are before? And I have to program shaders for every loaded models, in order to have reflect or other effects? I want to know that: is there a simple way to make the models just look like what they are? Kim Bale wrote: Hi Jan, Tian, osgOcean uses shaders for pretty much every effect in the scene - fogging, depth of field, glare, lighting etc. If objects that are added to the scene are to look consistent with the ocean effects they will require a shader to be applied that takes into account these effects. This is particularly necessary if the fullscreen effects are used as they require the alpha component of the frame buffer to work. In order to address this issue, OceanScene will apply a default shader to objects added as children (default_scene.frag vert) which illustrates how to use the uniforms supplied by osgocean (prefixed osgOcean_* ) in conjunction with your own shader. Since I could not anticipate the many wierd and wonderful ways that shaders can be used it only offers a very basic implementation (1 texture unit, limited phong lighting etc) and should be seen as a shader to customise and build on yourself. You can override the default shader either by attaching a new program to the object you wish to use in the scene or by using this function in OceanScene: /** Override the default scene shader for custom shaders. * If custom shaders are required for individual nodes add them before adding to the OceanScene. * Dirties state. */ void setDefaultSceneShader( osg::Program* program ) { _defaultSceneShader = program; _isDirty = true; } Alternatively you can turn the default shader off completely with setter in OceanScene. Regards, Kim. 2009/11/2 Jan Ciger : Tian Ma wrote: Hi, When I load a model into the osgOcean scene, the model looks white all over, without any material. Anybody knows why? Yes, I have seen the same thing. I believe that the shaders applied by osgOcean are responsible and are not passing the the vertex colors along. I have yet to check the shader code, though. Regards, Jan ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19021#19021 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19082#19082 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1
Thank you, Kim! THX a lot! Was it those that you deleted? Yes, I just delet thems, because I found that these two inline functions had not been used in anywhere. And now my project just goes right, the same with the oceanExample. Sorry , I did not know the meaning of the trunk update clearly. And I just put the ocean code in MFC+OSG project's function:InitSceanGraph(). Cheers, mt Kim Bale wrote: Hi MT, I found that: the two lines of error code in oceanscean.h had not been used in anywhere, so I just delete them. If the problem relates to lines 213 and 223 in the OceanScene header then those member variables are used to set and store the depth of field parameters.. Was it those that you deleted? If the trunk update didn't solve it I'd be keen to find out what the real cause is. Cheers, Kim. 2009/10/30 Tian Ma : Kim Bale wrote: Hi Tian, Try using the version in the trunk, there was a header conflict with windows.h in 1.0 that has since been resolved. Cheers. Kim. 2009/10/30 Tian Ma : Hi, I'am a new osgOcean user in China, My name is Tian Ma. First,I established an empty osg+MFC project. NO ERROR! Then, I add oceanScene example files to the project, and delete the main() function in the application.cpp file. Then errors emerge: c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ; c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ; In order to find the problems, I delete all the oceanScene example files, and just add code #include oceanScene head file to stdafx.h. But the same errors. Have you guys used osgOcean in MFC project? What may caused the problem? Thank you! THX a lot! I have solve the porblems, by note off two lines of code in error. I found that: the two lines of error code in oceanscean.h had not been used in anywhere, so I just delete them. Cheers, mt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18916#18916 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18927#18927 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18977#18977 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1
Hi, I'am a new osgOcean user in China, My name is Tian Ma. First,I established an empty osg+MFC project. NO ERROR! Then, I add oceanScene example files to the project, and delete the main() function in the application.cpp file. Then errors emerge: c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ; c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ; In order to find the problems, I delete all the oceanScene example files, and just add code #include oceanScene head file to stdafx.h. But the same errors. Have you guys used osgOcean in MFC project? What may caused the problem? Thank you! Cheers, mt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18916#18916 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1
Kim Bale wrote: Hi Tian, Try using the version in the trunk, there was a header conflict with windows.h in 1.0 that has since been resolved. Cheers. Kim. 2009/10/30 Tian Ma : Hi, I'am a new osgOcean user in China, My name is Tian Ma. First,I established an empty osg+MFC project. NO ERROR! Then, I add oceanScene example files to the project, and delete the main() function in the application.cpp file. Then errors emerge: c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ; c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ; In order to find the problems, I delete all the oceanScene example files, and just add code #include oceanScene head file to stdafx.h. But the same errors. Have you guys used osgOcean in MFC project? What may caused the problem? Thank you! THX a lot! I have solve the porblems, by note off two lines of code in error. I found that: the two lines of error code in oceanscean.h had not been used in anywhere, so I just delete them. Cheers, mt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18916#18916 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18927#18927 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1
Thank you! THX a lot! I have solve the porblems, by note off two lines of code in error. I found that: the two lines of error code in oceanscean.h had not been used in anywhere, so I just delete them. Cheers, mt tianxiao888 wrote: Kim Bale wrote: Hi Tian, Try using the version in the trunk, there was a header conflict with windows.h in 1.0 that has since been resolved. Cheers. Kim. 2009/10/30 Tian Ma : Hi, I'am a new osgOcean user in China, My name is Tian Ma. First,I established an empty osg+MFC project. NO ERROR! Then, I add oceanScene example files to the project, and delete the main() function in the application.cpp file. Then errors emerge: c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ; c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ; In order to find the problems, I delete all the oceanScene example files, and just add code #include oceanScene head file to stdafx.h. But the same errors. Have you guys used osgOcean in MFC project? What may caused the problem? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18916#18916 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18928#18928 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org