Hi Jan, This looks like interesting problem to debug ;-P but unfortunately I am really swamped. At least for month if not more.
My hypothesis: ConvexPolyhedron is bascially a frustum sculpted into convex volume which is build from many cuts by various planes defined by scene bounding boxes, main and light camera frusta etc. Real problem with ConvexPolyhedron is a math precision of plane intersections. Even though its done with doubles it often may result in some precision errors which effectively make the volume non convex. When it becomes non-convex weird problems start to appear. That one may be also related to some precision error. There is one thing you may try to improve that precision. Especially if you use geocentric earth model. Try setting up modelling frame. osgshadow example shows how to do that. If this not helps ... I will not be able to help otherwise too soon. Sorry. Cheers, Wojtek 2013/7/9 Jan Ciger <[email protected]> > Hello, > > I am playing with the LightSpacePerspectiveShadowMap and all of those > techniques crash on me like this: > > ------- > Debug Assertion Failed! > > Program: C:\Windows\system32\MSVCP110D.dll > File: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\deque > Line: 1418 > > Expression: deque subscript out of range > > > Typically zooming around the scene for a bit triggers this crash. > ------- > > This is using a 64bit debug build, with Visual Studio 2012. > > > Stack: > > > osg98-osgShadowd.dll!std::deque<osg::Vec3d,std::allocator<osg::Vec3d> > >::operator[](unsigned __int64 _Pos=2) Line 1421 C++ > > osg98-osgShadowd.dll!osgShadow::ConvexPolyhedron::transformClip(const > osg::Matrixd & matrix={...}, const osg::Matrixd & inverse={...}) Line > 604 + 0x12 bytes C++ > osg98-osgShadowd.dll!osgShadow::ConvexPolyhedron::transform(const > osg::Matrixd & matrix={...}, const osg::Matrixd & inverse={...}) Line > 307 C++ > > osg98-osgShadowd.dll!osgShadow::MinimalShadowMap::ViewData::frameShadowCastingCamera(const > osg::Camera * cameraMain=0x0000000000110af0, osg::Camera * > cameraShadow=0x000000000012add0, int pass=1) Line 254 + 0x4b > bytes C++ > > osg98-osgShadowd.dll!osgShadow::ProjectionShadowMap<osgShadow::MinimalCullBoundsShadowMap,osgShadow::LightSpacePerspectiveShadowMapAlgorithm>::ViewData::frameShadowCastingCamera(const > osg::Camera * cameraMain=0x0000000000110af0, osg::Camera * > cameraShadow=0x000000000012add0, int pass=1) Line 77 C++ > > osg98-osgShadowd.dll!osgShadow::MinimalCullBoundsShadowMap::ViewData::aimShadowCastingCamera(const > osg::Light * light=0x0000000003270b40, const osg::Vec4f & > lightPos={...}, const osg::Vec3f & lightDir={...}, const osg::Vec3f & > lightUp={...}) Line 58 C++ > osg98-osgShadowd.dll!osgShadow::StandardShadowMap::ViewData::cull() > Line 458 C++ > > osg98-osgShadowd.dll!osgShadow::ViewDependentShadowTechnique::cull(osgUtil::CullVisitor > & cv={...}) Line 84 + 0x10 bytes C++ > > osg98-osgShadowd.dll!osgShadow::ShadowTechnique::traverse(osg::NodeVisitor > & nv={...}) Line 88 + 0x20 bytes C++ > > osg98-osgShadowd.dll!osgShadow::ViewDependentShadowTechnique::traverse(osg::NodeVisitor > & nv={...}) Line 43 C++ > > osg98-osgShadowd.dll!osgShadow::ShadowedScene::traverse(osg::NodeVisitor > & nv={...}) Line 65 C++ > osg98-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) > Line 194 C++ > > osg98-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node > & node={...}) Line 314 C++ > osg98-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & > node={...}) Line 1220 C++ > > osg98-osgShadowd.dll!osgShadow::ShadowedScene::accept(osg::NodeVisitor > & nv={...}) Line 36 + 0x62 bytes C++ > osg98-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) > Line 62 + 0x32 bytes C++ > osg98-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) > Line 194 C++ > > osg98-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node > & node={...}) Line 314 C++ > osg98-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & > node={...}) Line 1220 C++ > osg98-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) > Line > 38 + 0x60 bytes C++ > osg98-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) > Line 62 + 0x32 bytes C++ > osg98-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) > Line 194 C++ > osg98-osgUtild.dll!osgUtil::SceneView::cullStage(const osg::Matrixd > & projection={...}, const osg::Matrixd & modelview={...}, > osgUtil::CullVisitor * cullVisitor=0x000000000012e370, > osgUtil::StateGraph * rendergraph=0x000000000012d720, > osgUtil::RenderStage * renderStage=0x000000000012d8b0, osg::Viewport * > viewport=0x00000000042e17d0) Line 906 C++ > osg98-osgUtild.dll!osgUtil::SceneView::cull() Line 767 + 0xf4 > bytes C++ > osg98-osgViewerd.dll!osgViewer::Renderer::cull() Line 638 C++ > osg98-osgViewerd.dll!osgViewer::ViewerBase::renderingTraversals() > Line 807 C++ > osg98-osgViewerd.dll!osgViewer::ViewerBase::frame(double > simulationTime=1.7976931348623157e+308) Line 658 C++ > osg98-osgViewerd.dll!osgViewer::ViewerBase::run() Line 628 C++ > osg98-osgViewerd.dll!osgViewer::Viewer::run() Line 412 C++ > shader-test.exe!main(int argc=1, char * * argv=0x000000000007fc20) > Line 407 C++ > shader-test.exe!__tmainCRTStartup() Line 536 + 0x19 bytes C > shader-test.exe!mainCRTStartup() Line 377 C > > > Regards, > > Jan > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

