[osg-users] Opaque black shadows since moving to OSG V3.0.1
Hello everybody, I'm updating some of my projects from V2.8.3 to V3.0.1 of OSG and i'm struggling with a shadow problem. In fact, osgShadow::LightSpacePerspectiveShadowMapCB produces opaque black shadows, while in previous version it darkened the objects. I've tried to change ambiant in light and objects materials with no success. What i'm looking for is something like AmbiantBias, to control the shadow intensity. Do you know any way to achieve this please? With this shadow technique, if possible. I'm running Windows 7 on an ATI Radeon HD 6850 Thanks! Cyril -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44136#44136 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane
Hi Robert I'll wait for next release so, and I'll test this new code and post the result. Feel free to send me some code if you want it to be beta tested :) (or can it be tested from the developper svn?) The situation that makes the bug very visible for me is when moving in a tunnel, all the tunnel is shadowed but not the space in front of the camera. When moving the camera all the tunnel become shadowed. Thank you! Cyril -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42023#42023 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane
Hi, Thanks for taking time when you shouldn't to see my problem ! ^^ The osg::Light is used is the default one : Code: _light = new osg::Light(); osg::ref_ptr lightSource = new osg::LightSource(); lightSource->setLight(_light); _sceneRoot->addChild(lightSource); I only changed it's ambiant value and it's position, to make it follow the car. I tried to setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR), without result. Changing the minLighMargin afterward didn't solve the problem either. I tried this on the exemple code i've attached to this post and the simulation, same result. Also, I have the same result with MinimalShadowMap or MinimalCullBoundsShadowMap, have you ever seen such problem? I don't thing i've done anything special! That's strange :/ -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42018#42018 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane
anyone can try the attached code please? Just to see if the bug comes from my compilation (even if i didn't change a think..) my code or something. Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41944#41944 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane
I couldn't reproduce my problem because the scene wasn't showing it. I've attached a zip file containinig the c++ program and the IVE scene. By moving the camera up and down you should see the problem! BTW if you see anything wrong about the code please tell me, thanks. Maybe I missed something -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41844#41844 Attachments: http://forum.openscenegraph.org//files/shadow_clippingplane_272.jpg http://forum.openscenegraph.org//files/testosgshadow_168.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane
Thank you for your answers. I tried all LightSpacePerspective shadow techniques with the same result :/ Changing the MinLightMargin didn't solve the problem either. Can it be a setting on the light or the camera? I wanted to write a short program you could try, but i couldn't reproduce the problem xD i'm now removing parts from the main program to try to find where the problem comes from -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41796#41796 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane
Hello fellow coders :) I'm asking for you help one more time. I have a problem with shadows, it seems like I have a "view dependent shadow clipping plane". I have an osgShadow::ShadowedScene with a city and a light following the player in it. The problem is that, when we move the camera, the shadows get clipped, as you can see in the attached screens, when the camera is high every buildings have a shadow, but when the camera gets to a "human" position then the clipping occurs :/ neither the models nor the light moved. I have tried many different shadow technics but it happened for all of them, right now i use a osgShadow::MinimalShadowMap, i tried to change the minLightMargin with no success. I tried to change some parameters on the light or on the camera with no success either :( that's why i come here to ask for help! I added the red line on the screens, to show the "clipping plane" position. This happens with OSG 2.8.3 and OSG 3.0.1 Thank you! Cheers, Cyril -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41789#41789 Attachments: http://forum.openscenegraph.org//files/shadow_clippingplane_109.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MinimalShadowMap and specular
Hi Wojtek, thank you very much! Specular is now rendered using StandardShadowMap sub classes, works like a charm :) I simply recompiled OSG (no warnings) and did not change anything else, i attached the new render, nice job Wojtek! thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36082#36082 Attachments: http://forum.openscenegraph.org//files/minimalshadowmap_specular_210.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] MinimalShadowMap and specular
Hello, I'm using MinimalShadowMap in an application and I would like to display objects with their specular value. But whenever I use a sub class of StandardShadowMap my objects appear totally "matte finish". If I use ShadowMap my objects are well rendered with specular so the problem comes from MinimapShadowMap I guess. I looked in the code but wasn't able to find anything that could solve my problem. Is there something I'm missing? Here is my code for light parameters and shadow : Code: //light _light->setAmbient(osg::Vec4(0.35, 0.35, 0.35, 1.0f)); _light->setDiffuse(osg::Vec4(0.65, 0.65, 0.65, 1.0f)); _light->setSpecular(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); _light->setPosition(osg::Vec4(30, 30, 170, 1)); //shadows osg::ref_ptr sm = new osgShadow::MinimalShadowMap(); sm->setTextureSize(osg::Vec2s(2048, 2048)); sm->setLight(_light); _sceneRoot->setShadowTechnique(sm.get()); I'm using Windows 7 pro 32 bits, with an ATI X1950XT card and the lastest drivers. I got the same result using osg 2.8.3 or 2.9.7. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35998#35998 Attachments: http://forum.openscenegraph.org//files/specular_nospecular_480.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org