Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadow error on last dev #10836

Closed
3 of 12 tasks
lo-th opened this issue Feb 20, 2017 · 11 comments
Closed
3 of 12 tasks

shadow error on last dev #10836

lo-th opened this issue Feb 20, 2017 · 11 comments

Comments

@lo-th
Copy link

lo-th commented Feb 20, 2017

Description of the problem

A object attach to skeleton bone ( like hat ) cast bad shadow since last dev
seems shader don't find good transformation of object.
hat object don't have skinning
but this bug is since remove skinning from material

http://lo-th.github.io/root/shadow/index.html

Three.js version
  • Dev
  • r84
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • Linux
  • Android
  • IOS
Hardware Requirements (graphics card, VR Device, ...)
@RemusMar
Copy link
Contributor

Yes,

With the current .85 dev the shadows don't work properly or don't work at all.
I've tested a bunch of samples.
I don't get any console error message, so it's not easy to trace the bug.

@lo-th
Copy link
Author

lo-th commented Feb 20, 2017

i think is in shader
maybe hat object is understand like a skinned object
so position is tranform

@takahirox
Copy link
Collaborator

It seems that the root issue is the same as #10754,
material can't be shared between normal Mesh and SkinnedMesh.

So separating depth/distance material for non-skinning from the one for skinning
may be the easiest way to fix so far.

The shadow problem on the example @lo-th posted was solved by
reverting c326466 except for Line76, and Line88.

/cc @mrdoob

@takahirox takahirox mentioned this issue Feb 20, 2017
@RemusMar
Copy link
Contributor

Would you guys check if all the problems you ran into are solved with this change?
To @mrdoob and @takahirox

With the current build the shadows remain messed up for both static and skinned meshes.
Just test by yourself with a single model if

		model.castShadow = true;
		model.receiveShadow = true; 

It worked just fine before.

@mrdoob
Copy link
Owner

mrdoob commented Feb 21, 2017

I'm aware of this issue. Planning on taking a proper look tomorrow.

@takahirox
Copy link
Collaborator

takahirox commented Feb 21, 2017

With the current build

build isn't updated yet.

Locally build with the PR I sent or use

https://rawgit.com/takahirox/takahirox.github.io/master/skinning-shadow/build/three.js

@lo-th
Copy link
Author

lo-th commented Feb 21, 2017

yes is perfect with this

@RemusMar
Copy link
Contributor

build isn't updated yet.
https://rawgit.com/takahirox/takahirox.github.io/master/skinning-shadow/build/three.js

I've tested both static and skinned meshes in all the castShadow / receiveShadow combinations.
I didn't notice any issue.
Well done!

@takahirox
Copy link
Collaborator

Thanks for confirming!

@mrdoob
Copy link
Owner

mrdoob commented Feb 23, 2017

Ok, I think this should be now fixed. Sorry about that!

@mrdoob mrdoob closed this as completed Feb 23, 2017
@lo-th
Copy link
Author

lo-th commented Feb 24, 2017

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants