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

MToon outline doesn't scale when the scale of the mesh changes #1199

Open
ButzYung opened this issue Apr 1, 2023 · 3 comments
Open

MToon outline doesn't scale when the scale of the mesh changes #1199

ButzYung opened this issue Apr 1, 2023 · 3 comments
Assignees

Comments

@ButzYung
Copy link

ButzYung commented Apr 1, 2023

When the scale of VRM mesh changes, the MToon material outline doesn't scale accordingly, resulting in for example the outline being barely visible when the mesh is scaled up by a large degree. A workaround on user app's side is to scale the outlineWidthFactor property manually.

@ButzYung
Copy link
Author

ButzYung commented Apr 2, 2023

Upon further invertigation, it seems the problem is specific to MToon material with outlineWidthFactor set to anything other than screenCoordinates.

@0b5vr
Copy link
Contributor

0b5vr commented Apr 6, 2023

I'm unsure if it's an intended behavior on the VRM spec level. Let me check.

@0b5vr 0b5vr self-assigned this Apr 6, 2023
@0b5vr
Copy link
Contributor

0b5vr commented Apr 14, 2023

@ButzYung

Unfortunately, it's an undefined behavior on the spec level 😩

https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_materials_mtoon-1.0#outline

But, as the value name worldCoordinates implies, most of the implementations consider that it's a width in the world coordinate for now, which means it does not change the width along with the scale of the mesh.

You might need an app-side implementation to change the outline width for each material if you want to resize models dynamically.

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

2 participants