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

toon shading issue #20207

Closed
nagasawamaki opened this issue Jul 17, 2018 · 16 comments
Closed

toon shading issue #20207

nagasawamaki opened this issue Jul 17, 2018 · 16 comments

Comments

@nagasawamaki
Copy link

Godot version:
3.0.2

OS/device including version:
Windows 7, Nvidia GeForce GTX 1060

Issue description:
I am testing Godot toon shader for my character but I found some issues on it.

First I found there is some gradient shadow in the model even I use the toon shader.
I think The gradient shadow should not be appear in toon shading. Or am I setting wrong?

q01

Below is my setting for the material:
q02

Metallic: 0
Roughness: 0

Another issue is when the directional light enable shadow, the mesh become the following:
q03

I think it should not happen in toon shading.

Ultimately, I just want to achieve the visual effect like this:
q04

If I am doing something wrong, please tell me how can I get the toon shading like above (wind waker style). Thanks so much!

Steps to reproduce:
-make a meshInstance
-set the material to toon shading
-add directional light

Thank you!!

@CptPotato
Copy link
Contributor

CptPotato commented Jul 17, 2018

The "shadow" around the chin comes from the environment lighting. I'm not sure if there's a way to disable it with a flag.

The second shadow problem has workarounds but there's no perfect way. Using a normal offset and good bias value usually takes care of it pretty well.
Also, the screenshot you posted does not use shadows - so that would be an option, too, if you want to go for that specific look.

@nagasawamaki
Copy link
Author

thank you. so now the problem is due to the shadow from the environment lighting?
Can the shadow also be calculated as toon shaded shadow?
Or just as you said can the shadow be disabled?

Thank you.

@nunodonato
Copy link
Contributor

toon shading works well with directional lights. if you use omnilight or your sky is contributing to ambient light, you get this kind of shading. not sure if supposed to be or bug

@nagasawamaki
Copy link
Author

if no ambient light, objects which do not receive the directional light will become black.
Then how can I achieve the same result as the screenshot I posted (like the Wind Waker)?

@nunodonato
Copy link
Contributor

@nagasawamaki you can use ambient light to have some basic light in all objects, just disable(or reduce) the sky contribution in the world environment node, that's the issue

@clayjohn
Copy link
Member

@nagasawamaki using the suggested settings were you able to get things figured out? If so, can we close this issue?

@QbieShay
Copy link
Contributor

On v 3.2.stable.official this problem still appears:

Screenshot_2020-02-15_01-29-07

@volzhs
Copy link
Contributor

volzhs commented Feb 15, 2020

what @nunodonato suggested is use ambient light and disable the sky contribution.
you disabled ambient light.

@QbieShay
Copy link
Contributor

@volzhs ah yes, you are correct.
I tried, but i still see soft shading on the face.

Screenshot_2020-02-15_01-37-23

@volzhs
Copy link
Contributor

volzhs commented Feb 15, 2020

what about setting Background > Energy to 0?

@QbieShay
Copy link
Contributor

The sky becomes black, the model is unaffected.

Screenshot_2020-02-15_01-41-09

@volzhs
Copy link
Contributor

volzhs commented Feb 15, 2020

I guess this will help you.
https://www.youtube.com/watch?v=laastFVkTaA

or using built-in material
https://www.youtube.com/watch?v=1duRtTEc2SU

@clayjohn
Copy link
Member

Try background energy of 1 and ambient energy of 0.

Also, this has been fixed in 4.0. You can now disable radiance and/or irradiance as you choose.

@QbieShay
Copy link
Contributor

Here:

Screenshot_2020-02-15_23-15-38

@clayjohn any chance this can be fixed for 3.2.x? I could do it with a bit of help, if that's desired.

@QbieShay
Copy link
Contributor

Managed to obtain the typical banding, but it does not behave as expected. Opened a proposal with more detail here. godotengine/godot-proposals#484

@Calinou
Copy link
Member

Calinou commented Jan 8, 2022

Closing in favor of godotengine/godot-proposals#484, as feature proposals are now tracked on the Godot proposals repository.

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

No branches or pull requests

7 participants