[SOLVED] Strange shadow behaviour


#1

Hey, I have an interesting issue again :slight_smile: Maybe someone already faced with this issue - The 3D model’s shadow looks like different than the model, it looks like the shadow was generated partly based on a T-pose. It’s strange because just the arm shadow which is wrong.

image
image

I’m using Heaps 1.6.1, tomorrow I will try it with 1.7 maybe it will help…
The model is from the official demo - https://heaps.io/samples/skin.html
The code for the light and for the shadow:

new DirLight(new h3d.Vector(10, 10, -5), s3d);
s3d.lightSystem.ambientLight.setColor(0x666666);

var shadow:h3d.pass.DefaultShadowMap = s3d.renderer.getPass(h3d.pass.DefaultShadowMap);
shadow.size = 2048;
shadow.power = 200;
shadow.blur.radius = 0;
shadow.bias *= 0.1;
shadow.color.set(0.7, 0.7, 0.7);

The issue in live: http://flashplusplus.net/haxe/levelup/index.html

Any idea?


#2

I just updated to Haxe Rc5 and to Heaps 1.7.0 and I faced with one more issue :face_with_head_bandage:
After a little investigation I solved it in a hacky way, maybe it will be interesting for you too: https://github.com/HeapsIO/heaps/issues/687

With this Heaps + Haxe update + hacky fix, it works well! I have proper shadow finally.
image