I’m having some issues with using the SubsurfaceScatteringDiffuseMethod.
First I tried adding it as a diffuseMethod to a material which has a DirectionalLight, and that caused the following error:
Error: An abstract method was called! Either an instance of an abstract class was created, or an abstract method was not overridden by the subclass.
at away3d.lights::LightBase/getObjectProjectionMatrix()
at away3d.materials.passes::SingleObjectDepthPass/render()
at away3d.materials::MaterialBase/renderPass()
at away3d.core.render::DefaultRenderer/drawRenderables()
at away3d.core.render::DefaultRenderer/draw()
at away3d.core.render::RendererBase/executeRender()
at away3d.core.render::RendererBase/render()
at away3d.containers::View3D/render()]
Only using a PointLight instead causes the following error:
Error #3692: All buffers need to be cleared every frame before drawing.
at flash.display3D::Context3D/drawTriangles()
at away3d.materials.passes::MaterialPassBase/render()
at away3d.materials.passes::DefaultScreenPass/render()
at away3d.materials::MaterialBase/renderPass()
at away3d.core.render::DefaultRenderer/drawRenderables()
at away3d.core.render::DefaultRenderer/draw()
at away3d.core.render::RendererBase/executeRender()
at away3d.core.render::RendererBase/render()
at away3d.containers::View3D/render()
The code I’m using is this:
var material:ColorMaterial = new ColorMaterial(0xFF0000, .2);
var method:SubsurfaceScatteringDiffuseMethod = new SubsurfaceScatteringDiffuseMethod();
method.scattering = .25;
method.scatterColor = 0xFFFF00;
method.translucency = 2;
material.diffuseMethod = method;
var capsule:Capsule = new Capsule(material, 13, 24);
capsule.x = x;
capsule.y = y;
capsule.z = z;
capsule.rotationZ = 90;
var light:PointLight = new PointLight();
light.x = x;
light.y = y+12;
light.z = z;
material.lights = [light];
_view.scene.addChild(capsule);
_view.scene.addChild(light);
Am I doing something wrong, is SubsurfaceScatteringDiffuseMethod trying to use features not available on my graphics card, or should I report it as a bug?
I’m using the latest version of away3d-core-fp11 from github, have FP 11.0.r1.129 debug. Systems is Win 7 32-bit with a GTS250.