Re: [osg-users] Single-color transparency + strange issue
On Nov 2, 2007 8:49 PM, [EMAIL PROTECTED] wrote: My first question is whether it is possible to render an RGB texture with no alpha channel with binary transparency. I'd like to map a specific color to 100% transparency. Would this require shaders? If so, could someone point me to a good resource for coding shaders in OSG? You'll need to use shaders for this. Have a look at the osgshaders example or the glsl_*.osg example data files. The osgmovie also just so happens to have a fragment shader that does exactly what you are looking for. My other issue is a rather strange behavior I have observed in OSG. My app is constantly dumping a lot of points into the scene graph (osg::DrawArrays with PrimitiveSet::POINTS) while updating a transform. I have run into an issue in which nothing gets rendered at all, unless I remove either the point insertion or the transform update. Does anyone know what could cause this behavior? This read kinda like I do stuff and it doesn't work, how do I fix it? At which the best I recommend is that you fix the problem in your application and the issues should go away. Now if actually want some external help you need to be much more specific about what you are doing and what you are expecting to happens. Hows about provide a small code example of how you're adding points. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgdem and CADRG dateline holes
Hi Robert, Which version of osgdem are you using? Robert. On Nov 2, 2007 8:45 PM, Kramer, Robert W [EMAIL PROTECTED] wrote: I'm having a problem where running osgdem on NGA CADRG native format files leaves a gap (3 degrees plus or minus) at the 180-degree meridian. It seems that some of these chart products cross over the date line and are not correctly normalized. Does anybody have an easy solution to render a seamless globe at the 180? I'm using Fedora Core 6 and OSG 2.2. Thanks in advance, Robert Kramer Systems Engineering The Boeing Company ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] ShadowMap Question
Hi, after applying Mihai´s Fix for ShadowMap (thank you!) I am able to use ShadowMap in my program. There are two issues: - triangles only cast a shadow when their normal is directed towards the light. While this is, of course, the desired behaviour for real models, it is not so nice when just displaying a triangle. How can I make triangles cast shadows regardless how they are directed? - I get the artifact that dirties surfaces because of self-shadowing. An older post said to change the polygon-offset. I see that there is a state attribute for that, is that meant? And in which way could I experiment with that? Thanks for your help, Andreas P.S.: When I first tried ShadowMap with Mihai's fix, everything was shadowed. After some thought I found out that I had decorated my light with a small sphere, that cast shadow on everything ... ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ShadowMap Question
On Nov 3, 2007 2:47 PM, Andreas Goebel [EMAIL PROTECTED] wrote: Hi, after applying Mihai´s Fix for ShadowMap (thank you!) I am able to use ShadowMap in my program. There are two issues: - triangles only cast a shadow when their normal is directed towards the light. While this is, of course, the desired behaviour for real models, it is not so nice when just displaying a triangle. How can I make triangles cast shadows regardless how they are directed? Disable back face culling. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ShadowMap Question
Disable back face culling. Thank you, Robert. This works, though I had to search a while where to set this: In the code of ShadowMap, the following is set: osg::ref_ptrosg::CullFace cull_face = new osg::CullFace; cull_face-setMode(osg::CullFace::FRONT); stateset-setAttribute(cull_face.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); stateset-setMode(GL_CULL_FACE, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); I simiply disabled this, and got my shadows. The polygon-offset is hardwired into ShadowMap, too: float factor = 5.0f; float units = 1.0f; osg::ref_ptrosg::PolygonOffset polygon_offset = new osg::PolygonOffset; polygon_offset-setFactor(factor); polygon_offset-setUnits(units); stateset-setAttribute(polygon_offset.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); I get good results with the values shown above for factor and units, though now (as a drawback) there are small areas that shoud have a shadow and haven´t. The issue that objects without a texture do not render correctly is not fully solved: Those objects now seem a bit transparent. Assigning a real white texture solves that (though this is a waste of texture memory). Regards, Andreas Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Single-color transparency + strange issue
On Fri, November 2, 2007 15:49, [EMAIL PROTECTED] wrote: If so, could someone point me to a good resource for coding shaders in OSG? see GLSL Shading with OpenSceneGraph http://mew.cx/osg_glsl_july2005.pdf cheers -- mew ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSGEdit 0.7.0 RC1
Hi, A new version of OSGEdit, the OpenSceneGraph editor, has been released. This is the first release candidate of 0.7.0, and it is a complete rewrite. This time the major focus has been making it much more extensible and easier to maintain. It has a new reflection mechanism, similar to osgIntrospection, but specific to the scene editing requirements. As osgIntrospection, it is generated mostly automatically, and supports every OSG object. The new engine that powers 0.7.0 opens a lot of customization possibilities, allowing you yo create: * Custom actions, that will be activated from menu / toolbar items * Custom controls, that will provide GUI for new object attributes, or enhance usability of existing controls with a better GUI. * Custom 3D controls, that provide on-viewport direct manipulation of object attributes, like the current rotate, scale and translate 3D controls. * Custom wrappers. This is the most powerful customizable feature, because it allows you to add support for your own osg::Object (osg::Node) subclasses. * Custom layouts. So you do not like the default layout when you edit some object? You can change it by editing a simple XML file. This allows selecting which control to use for each attribute, which attributes to show, how to organize the attributes in tabs, and so on. * Your own menu and toolbar layout. All the menubar and toolbar is located in a XML file that you can edit to better fit your needs. This allows not only to change where each action is located, but also to give support for your custom actions. All this customization is supported by an extension mechanism, that is already being used by the core actions, controls and wrappers. To improve the usability, OSGEdit 0.7.0 supports direct manipulation of transformations by dragging handles in the viewport, a log window where you can check what is happening without the need of a terminal, and a history window where you can know what exactly will you undo or redo. Please, take into account that this is a release candidate and it may have lots of bugs. Send any bug report that you may find to the OSGEdit bug tracking system. Visit the OSGEdit download page to get the 0.7.0-rc1 version: http://osgedit.sourceforge.net/download.html Regards. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org