Hi again,
I've managed to avoid the exception.
I think there is a bug in View3D.as: In render method there is no
check for null context before calling updateLights and
renderSceneDepth.
Here is the modification I made in View3D.as:
Before (at line 317):
updateLights(_entityCollector);
if (_requireDepthRender)
renderSceneDepth(_entityCollector);
After:
if(context)
{
updateLights(_entityCollector);
if (_requireDepthRender)
renderSceneDepth(_entityCollector);
}
After making this change a new exception arises at
popModelViewProjection in Entity.as, caused by the call to
_entityCollector.cleanUp() at line 338 in render method:
RangeError: Error #1125: The index 1 is out of range 1.
at away3d.entities::Entity/pushModelViewProjection()[C:\Downloads
\Flash\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\entities
\Entity.as:157]
at away3d.core.partition::EntityNode/isInFrustum()[C:\Downloads\Flash
\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\core\partition
\EntityNode.as:70]
at away3d.core.traverse::EntityCollector/enterNode()[C:\Downloads
\Flash\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\core\traverse
\EntityCollector.as:133]
at away3d.core.partition::MeshNode/acceptTraverser()[C:\Downloads
\Flash\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\core\partition
\MeshNode.as:39]
at away3d.core.partition::NodeBase/acceptTraverser()[C:\Downloads
\Flash\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\core\partition
\NodeBase.as:100]
at away3d.core.partition::Partition3D/traverse()[C:\Downloads\Flash
\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\core\partition
\Partition3D.as:38]
at away3d.containers::Scene3D/traversePartitions()[C:\Downloads\Flash
\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\containers\Scene3D.as:
52]
at away3d.lights.shadowmaps::DirectionalShadowMapper/drawDepthMap()[C:
\Downloads\Flash\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\lights
\shadowmaps\DirectionalShadowMapper.as:46]
at away3d.lights.shadowmaps::ShadowMapperBase/renderDepthMap()[C:
\Downloads\Flash\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\lights
\shadowmaps\ShadowMapperBase.as:90]
at away3d.containers::View3D/updateLights()[C:\Downloads\Flash
\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\containers\View3D.as:
398]
at away3d.containers::View3D/render()[C:\Downloads\Flash
\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\containers\View3D.as:
319]
at SoftShadowTest/_handleEnterFrame()[C:\Downloads\Flash
\away3d_4_0_0_svn\broomstick\Examples\Away3D\as\src\SoftShadowTest.as:
156]
To solve it I've added a check before decreasing _mvpIndex:
public function popModelViewProjection() : void
{
if(_mvpIndex>0)
--_mvpIndex;
}
I think this deserves a deeper insight because there are more pops
than pushes, something misssed there.
With these changes I have removed the exception but the shadows
continue rendering in software mode.
Hope this helps.
On 16 mayo, 12:02, DerSchmale <[email protected]> wrote:
> Ragaes: Hm, I'm not sure what causes that issue, it's something I'll
> have to investigate. Any example code you can provide would help us
> duplicate the error.
>
> Mobstar: You could try the SlowFilteredShadowMapMethod (the name is
> purely temporary ;-) ), but also be sure to set the camera.lens.far
> parameter no larger than it needs to be to render the visible
> geometry. That allows the shadow map to be constrained to the area of
> interest, providing a higher resolution.
>
> Hth,
> David
>
> On May 16, 10:16 am, mobstar07 <[email protected]> wrote:
>
>
>
> > I have no clue about your error, but I have similar results with the
> > various shadowmap methods.
> > They all look jagged on the edges, no matter which params (like
> > stepsize) I feed them.
> > I tried it on different machines with different graphicscards: it's
> > all the same.
> > Am I missing something? How to get smooth and acceptable shadows with
> > Away3D?
>
> > On May 16, 9:42 am, ragaes <[email protected]> wrote:
>
> > > Hi,
>
> > > While trying the SoftShadowTest sample in Away3D 4 I'm getting the
> > > following exception:
>
> > > RangeError: Error #1125: The index 4294967295 is out of range 8.
> > > at away3d.lights.shadowmaps::ShadowMapperBase/renderDepthMap()[C:
> > > \Downloads\Flash\away3d_4_0_0_svn\broomstick\Away3D\src\away3d\lights
> > > \shadowmaps\ShadowMapperBase.as:88]
> > > at away3d.containers::View3D/updateLights()[C:\Downloads\Flash
> > > \away3d_4_0_0_svn\broomstick\Away3D\src\away3d\containers\View3D.as:
> > > 395]
> > > at away3d.containers::View3D/render()[C:\Downloads\Flash
> > > \away3d_4_0_0_svn\broomstick\Away3D\src\away3d\containers\View3D.as:
> > > 317]
> > > at SoftShadowTest/_handleEnterFrame()[C:\Downloads\Flash
> > > \away3d_4_0_0_svn\broomstick\Examples\Away3D\as\src\SoftShadowTest.as:
> > > 151]
>
> > > If I enter in debug mode I can see that the problem is that context is
> > > null.
>
> > > If I choose to continue the execution, then shadows are rendered but
> > > always in Software mode.
>
> > > If have tried also with all shadow related methods:
> > > SoftShadowMapMethod, HardShadowMapMethod, FilteredShadowMapMethod and
> > > SlowFilteredShadowMapMethod.
>
> > > Always getting the same result.
>
> > > Is this a problem with my graphics card?
>
> > > Thanks in advance.- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -