umasteeringgroup / UMA

Unity Multipurpose Avatar
MIT License
739 stars 168 forks source link

UMA shaders/materials not fully converted to URP #329

Closed iCeDrAgOn2025 closed 3 years ago

iCeDrAgOn2025 commented 4 years ago

Describe the bug After setting up UMA and the URP. by doing convert textures to URP from the Edit->Render Pipeline->Universal Render Pipeline->Upgrade Project to UniversalRP Material, and UMA->SRP->Convert To URP (LWRP). Most but not all materials convert and work properly The only issues seem to be with the hair materials, these are not converted to a URP equivalent. and the materials still reference the supplied UMA shaders which are not compatible with the SRP.

Environment (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Create a URP Project
  2. Import UMA
  3. Convert materials using the Render Pipeline option on the edit menu
  4. Convert to URP from the SRP option on the UMA menu
  5. Set up a UMA character in the scene
  6. Drag a hair wardrobe item in to the default wardrobe slots
  7. Run Result: Hair textures show up as Bright magenta in the scene. Only seems to effect hair that actually has a mesh, texture overlays are not effected when it comes to hair

Expected behavior What is expected is a UMA Avatar with all textures showing correctly. no bright magenta missing texture indicators.

Additional context The following Materials appear to not be converted

Atlas Module -- Still uses UMA/AtlasShaderNew Hair Mat Ansio -- Still uses UMA/Hair Fade Cutout Hair Mat std -- Still uses UMA/Hair Fade Cutout UMA_Mesh_Hair_Double Sided -- Still uses UMA/Hair Fade Cutout UMA_Mesh_Hair_Single Sided -- Still uses UMA/Hair Fade Cutout (Single)

Jaimi commented 3 years ago

Hair now converted to use Speedtree8 shader (best I could find...)

Radivarig commented 3 years ago

I still experience this problem. If I change the shader directly it gets overriden in play mode. Can you point me to where I can set this?

Jaimi commented 3 years ago

If you have fixed the shader on the materials, and fixed the UMAMaterials, and it works at edit time, then the only thing I can think of is you are using Asset Bundles or Addressables, and have forgotten to rebuild the bundles - so when the game runs, it loads the materials from the bundles (which haven't been updated).

Radivarig commented 3 years ago

For the above, I've figured the locations of overlays and their configs which reference the materials, so I know where to update materials by hand, but I don't see one that looks good for hair.

I've done the Unity URP upgrade of materials and the UMA upgrade to URP, then had to enter and exit play mode to get them applied, but the hair is still pink. It is called UMA/Hair Fade Cutout.

Should there be a correctly generated URP hair material replacement that comes with the UMA 2 package?

Have I missed a step?

Jaimi commented 3 years ago

The best built-in shader for hair in URP is probably the "Speed Tree 8" shader. We made a pass at converting hair to that shader, but it doesn't work sometimg. Open the UMAMaterial for the hair, and select the material in it, and change it to use the Speed Tree 8 shader. Then, edit the UMAMaterial, and make sure the texture names in the channels are correct.