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

Point lights flicker when you move the camera. #105

Closed
Fabrazz opened this issue May 10, 2022 · 5 comments
Closed

Point lights flicker when you move the camera. #105

Fabrazz opened this issue May 10, 2022 · 5 comments

Comments

@Fabrazz
Copy link

Fabrazz commented May 10, 2022

Great shader, however point & spotlights flicker on the surface for me. This is with the built-in render pipeline using Toon (Built-in) and only occurs in play mode. Any help would be greatly appreciated
Flickers

@Fabrazz Fabrazz changed the title Point lights flicker when you move the camers. Point lights flicker when you move the camera. May 10, 2022
@Fabrazz
Copy link
Author

Fabrazz commented May 10, 2022

Update, this happens when meshes are combined during play from being set to static. Any solution to this?
image

@Nobuyuki-Kobayashi
Copy link
Contributor

As far as I can judge from the screenshot, I assume you are using UTS2 for background objects in your scene.
UTS2 is a character-specific toon shader, so there must be one real-time directional light in the scene for look design.
If you are using UTS2 for background objects and there is no available directional light in the scene, I strongly recommend using a PBR shader such as Standard Shader.

@H3idi-X
Copy link
Contributor

H3idi-X commented May 28, 2022

Hi, it looks like the light falls on flat objects. If this assumption is right, I believe this should be hard to solve, as UTS clip a light at a certain level.
For flat objects, every single normal on the meshes are completely the same. It brings about sudden change of shading when we move lights, objects or cameras.

@Nobuyuki-Kobayashi
Copy link
Contributor

For toon shaders, including UTS2, that use lights to generate paint divisions, the following methods are generally used if you want to moderate the change in the way the lights hit the planes.

  1. Instead of dividing the plane into a minimal number of divisions, add several divisions to increase the number of vertices on the plane.
  2. Transfer the vertex normals of the sphere or other part of the surface to those vertex normals using the DCC tool.

By doing 1 and 2, you can smooth the light hitting each vertex and thus avoid sudden changes in the painting.
The UTS2 normal map lighting sample does the same thing, so I recommend checking the geometry there.

https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/blob/release/legacy/2.0/Manual/UTS2_Manual_en.md#normalmap-settings-submenu

Check a ※Hint section above.

Any further usage is beyond the scope of our support, so please investigate on your own.

@H3idi-X
Copy link
Contributor

H3idi-X commented Jun 2, 2022

Hi, If we do not receive additional information, we will close this issue in a few days. We have set up a template for bug reports, so please fill it the next time you wish to submit a bug report.

@H3idi-X H3idi-X closed this as completed Jun 6, 2022
yuki4080 pushed a commit to yuki4080/com.unity.toonshader that referenced this issue Dec 22, 2022
* CheckAovRecorderIssue project is not necessary any more. [skip ci]

* DepthNormal Pass might have been supported from 10.x.x. https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@13.0/manual/upgrade-guide-10-1-x.html

* Updated CHANGELOG.md
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

3 participants