soupday / cc_unity_tools_URP

Package for importing and auto setup of Character Creator (3 & 4) and iClone (7 & 8) character exports for Unity URP Pipeline.
GNU General Public License v3.0
102 stars 26 forks source link

WebGL build Error : The URP material appears pink in webGL build #52

Open slimshady1281 opened 10 months ago

slimshady1281 commented 10 months ago

Not sure if this is by design but the material appears pink wnen building for webgl

Unity version : 2020.3.7f1 Plugin version : URP 10.5/1.5.1,1.5.2 WebGLError Screenshot 2023-11-27 061141

DCjr-Infy commented 7 months ago

I am having the same issue. Any luck in finding out the fix? Im new to CC4

koffertje commented 5 months ago

same issue here, is there already a update on this one?

timbowicz commented 5 months ago

Any updates on this issue?

soupday commented 5 months ago

Doesn't appear to be a problem in current version: CC/iC tools 1.6.2 / Unity 2020.3.48f1

webgl2020 3

If all of your shaders are pink, even the URP standard shaders on the clothes (which should work no matter what), then there is some sort of misconfiguration in your project and/or hardware incompatibilty?

Hard to say with WebGL but it's unusual for everything to go pink. Can you connect the debugger to it to see if it's throwing any errors?

timbowicz commented 5 months ago

I've found out it only happens with the 'Amplify' version of the shaders, not with the Shader Graph versions. The thing is, we want to use the wrinkles, but only the Amplify version supports the wrinkles. Is it possible to add support for wrinkles in the Shader Graph version

timbowicz commented 4 months ago

@soupday did you encounter the same issue for webgl when using the amplify version of your shaders? We like to use that version, since that will support wrinkels. Shader graphs doesn't support wrinkles, right?

soupday commented 4 months ago

I didn't have any issues with the Amplify shaders or the Shader graph. But that was with a character without wrinkle maps:

The big problem with WebGL is that there is a 32 texture hard limit. Unity itself always uses 8 of those for lightmaps, shadow maps, etc, so that leaves 24 textures available to the user. The wrinkle system pushes the number of textures above this up to 30.

Implementing the wrinkle system in the shader graph versions is going to have exactly the same problem. I left the shader graph versions in as a fallback that would/should always work so I didn't build the wrinkle system into them.

However: If you bake the character, the baked version of the wrinkle shader only uses 22 textures. So it should work in WebGL.

soupday commented 4 months ago

IF the baked wrinkle shader does work, you may need to correct a bug in the run time WrinkleManager script as outlined here.