-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Postprocessing Ignores Morph Targets & Normals #12844
Comments
Can you create a jsfiddle showing the issue? |
I think that's not true. Besides, the material viewer of the documentation easily shows that morph target animation works (activate https://threejs.org/docs/index.html#api/materials/MeshDepthMaterial
That's correct. It's your task to ensure that morph targets are supported by the material which is intended for |
Well loading the post processing stack into jsFiddle has proven to be a complete pain, and I barely remember the details after so long and after we've just switched to a custom renderer to solve everything at once... However, I am 100% sure there were multiple booleans including "morphTargets" and "skinned" which I brute force tried every permutation of by hand to no success, and also am sure that |
Hey! Wanted to bump this issue. I just added:
in THREE.SAOPass constuctor. But after upgrading to version 0.92.0 it stopped working. I've added skinning and morphTargets in all other materials used in SAOPass.js with no luck. I can see that depth and normal buffers have all meshes in bind pose. I have set the skinning or morphTargets to true, otherwise they wont animate at all. @Mugen87 Any ideas what changed from version 0.90.0 that could affect this? |
No, sry. There were some bug fixes related to |
Found the problem. It was spot light helper, it is breaking the sao on skinnned meshes... |
When a morph target mesh is rendered with a non-morph target material, the mesh seems to render in bind pose. The
EffectComposer
framework for postprocessing uses thescene.overrideMaterial
interface to generate depth and normal buffers, so these buffers have all meshes in bind pose. You can see the issue by applying a normal buffer postprocess to the MD2 character example.I've badly hacked up three.js to take a
scene.morphOverrideMaterial
parameter to use as an alternate override for meshes which originally had a material with the morph target flags. I also updated the post processing effects to provide morph target variants of their override materials, and it allows them to render correctly on animated characters.I could share my hack, but I think a better solution would be to use the morph target and morph normal settings from the true material of a mesh, even in the presence of an override material setting. (Or... does webgl have multiple render targets?)
The text was updated successfully, but these errors were encountered: