Hi, this issue is now really getting a pain …
I need shadows, which are calculated independent of the camera's position to the center of origin. Setting and fixing some boxes, which lead to a poor shadow calculation, as suggested, is not an option. My current idea is the keep the OpenSG-navigator fixed, and to implement my own camera, that translates my scene back to the center of origin, so that everything is within the shadow-calculation area. The problem that I now have is the following: how can I do what in gl is know as glLoadIdentity(). For some reason, I just can't figure out how to set the navigator such that geFrom results in 0, 0, 0, getAt results in 0, 1,0 and up results in 0,0,1. Using the setFrom/setAt/setUp lead to somewhat unexpected results. So i would like to "reset" the scene graph at the very first node, to then apply my own transformations, from a well defined initial state. Cheers, Keyan On 30 Nov 2011, at 17:34, Carsten Neumann wrote: > Hello Keyan, > > On 11/29/2011 08:14 AM, Keyan wrote: >> I have the following problem. In my application, the object of interest may >> move from the center of origin far enough, to leave the area in which the >> ShadowStage operates as desired. The shadow map size is set to 1024, the >> objects are created small enough, such that the rendering works properly >> around the center of origin. >> >> Here is an image of what happens, when the object moves to far from the >> center: >> >> http://www.picpaste.com/screenshot-67ldo1Ma.png >> >> If it moves faster, it enters a region, in which everything is covered by a >> shadow. Right before that, the shadows are projected into infinity (this can >> be seen in the image). This area is left, no shadow is calculated anymore. I >> guess this is because the shadow map is created around the center. > > when generating the shadow map it should pick a projection that is large > enough to contain the entire scene (that is: all children of the > ShadowStage). > What type of light source (point, directional, spot) are you using? Is > any part your scene not a child of the ShadowStage? > >> So my question is, can I move it with the camera, such that the shadow is >> only casted in the camera frustum? > > IIRC it uses the bounding volume of the ShadowStage's children to > calculate the projection. One thing you could try is marking that > bounding box as static and then set it manually to contain the camera > frustum. > One problem with algorithms that focus the shadow map on the camera > frustum in this way is that shadow edges become very noisy. The > projection changes all the time so instead of usual steady jagged (or > somewhat blurred) outline you get one that is constantly changing which > is quite unpleasant. > The article "Practical Cascaded Shadow Maps" in the book Shader X7 has a > solution: it ensures that changes between frames essentially happen in > "whole pixels" of the shadow map so that the rasterization does not > change radically between frames. > > Cheers, > Carsten > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Opensg-users mailing list > Opensg-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/opensg-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users