문제

I'm trying to make black-outlined objects using the Alternativa3D engine, I'm going for a cartoonish look. How can I do this?

도움이 되었습니까?

해결책

I had a brief look through the Alternativa3D documentation and couldn't find materials or shaders for that. Would you be able to use an alternative 3D API, like Away3D ? If so, Away3D already offers a CellShaded material, as you can see in this sample:

Away3D Cell Shading Example

Also, you have the source for the above example:

var material : ColorMaterial = new ColorMaterial(0xfbcbc1);
material.ambientColor = 0xdd5525;
material.ambient = 1; //0xdd5525;
material.specular = .25;
material.diffuseMethod = new CelDiffuseMethod(3);
material.specularMethod = new CelSpecularMethod();
material.addMethod(new OutlineMethod(0x000000, 2/50));
CelSpecularMethod(material.specularMethod).smoothness = .01;
CelDiffuseMethod(material.diffuseMethod).smoothness = .01;
material.lights = [ _light, _light2, _light3 ];

다른 팁

I don't know if A3D has a built-in solution, but in general case you should make the second model, place it under the existing one and apply entrude and tint to black shaders to it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top