MCBTay / XLGearModifier

A mod to add custom meshes into the gear menu of SkaterXL, allowing the ability to custom texture these meshes through the Gear folder.
8 stars 6 forks source link

Alpha Mask - enable alpha clip on shader #56

Open MCBTay opened 2 years ago

MCBTay commented 2 years ago

Custom alpha mask (does the alpha mask file selector even do anything?)

MCBTay commented 2 years ago

Looking through the game's collection of MaterialControllers, the only place where they are actually setting any alpha masks on a MaterialController is for the body. Meaning that assigning them is to mask the material itself of the controller you're using. So in your test case, to mask the shorts. Those alpha masks would be for how you'd attempt to mask the gear item itself.

having said that:

redgouf commented 2 years ago

Two things here:

  1. Alpha masks on the actual mesh; we can try to handle this on the albedo texture itself. I don't think we need to worry about trying to give a mesh a mask at the prefab level. It locks the asset into always having that mask, no matter what.

    I think it's much easier use these kinds of alpha masks on the fly with the albedo texture (like we can with HDRP textures, when "alpha" is enabled - ala Hair or Facial Hair).

  2. Alpha mask for the body; Whatever we have going right now works well. I guess our prefab script is actually where the masking is being changed, via threshold values... I just wish there was a way to "overwrite" the mask on a per-mesh basis.

MCBTay commented 2 years ago
  1. Yeah, I think if we looked a little deeper into it we'd probably find where they're alpha masking the waist line of pants to avoid shirt clipping. I don't know how much that will get used by creators, but it is an option on their default stuff so we should probably try to support it. Can look into it more.
  2. Yeah, the thresholds are where the actual masking is being changed. "Overwriting" the mask on the body on a per mesh basis is the part where I'm a little unsure of how to handle it as we have to think about ALL the possibilities and combinations. It's easy on Easy Day because there's only so many permutations to support. More research/thought definitely needed here.
MCBTay commented 2 years ago

Adding duplicate label as this is really a duplicate of #2, but I don't want to close this ticket due to the good conversation had here thus far.

redgouf commented 2 years ago

An example of using Alpha Clipping on CLOTHING (non-hair/facial-hair).

https://user-images.githubusercontent.com/13354972/159083947-6b0894da-f416-4c2e-ae52-e1a2244a365f.mp4

Screenshot_2

redgouf commented 2 years ago

Updating this ticket to be specific to "Material Alpha Masks".

redgouf commented 2 years ago

Once we can 'extend' the Easy Day shader (MasterCloth_v2), we might be able to enable this flag/option.

For the time being, as a workaround, if we have the 'advanced' option (via #112) on clothing, this lets us use HDRP/Lit shader and this works fine.

redgouf commented 2 years ago

I know you previously did not want to close this ticket, as per previous conversation history - but our solution to this is to be able to done via #112

Closing

MCBTay commented 2 years ago

So do you actually want to close this ticket? You said closing but it's still open hehe