|
Author
|
Message
|
|
Victor.Soupday
|
Victor.Soupday
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: 4 days ago
Posts: 569,
Visits: 9.0K
|
The error is in the Amplify shader, but yes it could be found in any shader. It causes build times to go from minutes to hours and so it needs fixing. Ultimately it is a Unity issue as pointed out in your links, but it won't be fixed anytime soon and so a lighting workaround fix is needed for shaders, like the one you provided in the link. Obviously the lighting code has been changed in the various URP versions, which is why it happens in some versions and not in others. I originally posted the error so that it can be fixed in the shader, otherwise it will most likely remain an issue until Unity 2023 LTS.
The fix suggested is to remove the very shader features you would be wanting to use Unity 2021.2+ for. I'm not going to remove these features from the URP12 shaders. That's an individual choice that I'm not going to force on everyone. But since removing these features fixes the problem, then it would seem to imply the bug in shader compilation is that internal lighting textures for URP12 (light cookies, shadow maps, light maps, directional light maps, depth normals, etc.) do not share or incorrectly share texture samplers. So the only option left is to further reduce the texture samplers used in all the shaders. The skin shader uses 10 samplers with 30 textures. The other shaders use 6-7 samplers and don't trigger this problem? So I'll try and keep the sampler count to at most 6.
|
|
|
|
|
Jbowdoin
|
Jbowdoin
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: Last Year
Posts: 123,
Visits: 795
|
"So yes, you can combine a merged mesh version of the character with a bunch of instalod exports and/or optimize and decimate exports." I been looking to go that for so long , i may need a use example though. I have a script that remaps the bones of extra clothing to the main body. so I need to know if that button leaves the resulting Avatar with the main skeleton or the LOD skeleton
|
|
|
|
|
Ryan Hayle
|
Ryan Hayle
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: Last Week
Posts: 49,
Visits: 380
|
jerome.dipietro (3/29/2023) Hi Ryan, (you'll know me as baroquedub on Messy's server)I started getting this in 2021.3.16 (URP 12.1.8) It sometimes comes from the Lit.shader but also in other custom shaders I've never had a problem with before, i.e. soupday's custom skin shaders. It only seems to affect shader graphs. I thought of filing a Unity bug report but I can't make sense of it. It's not that the shaders have too many sampler2D textures defined because in an empty project it doesn't occur. For me it seems to crop up in larger projects which would imply that the maximum is cumulative across the project, but that's not what the documentation implies, "Direct3D 11 allows using up to 128 textures in a single shader, but only up to 16 samplers" [https://docs.unity3d.com/Manual/SL-SamplerStates.html] I've learned to 'fix it' by removing shader features or any Sampler2D references I'm not using, but then I often find that another shader suddenly starts throwing the same error in a subsequent build, although previously it never did (in that same project, or in any other project) I was mostly using 2020 before and never had the problem. Also have a few projects on 2021.3.7 (URP 12.1.7) which doesn't seem to have the issue either. Workarounds for me are: TLDR I don't think it's specifically a problem caused by the Unity Auto Setup, although it's definitely prone to triggering the issue. My guess is that it's a Unity URP bug. Do let me know if you find a better workaround. It's been a total pain!
In response: The error is in the Amplify shader, but yes it could be found in any shader. It causes build times to go from minutes to hours and so it needs fixing. Ultimately it is a Unity issue as pointed out in your links, but it won't be fixed anytime soon and so a lighting workaround fix is needed for shaders, like the one you provided in the link. Obviously the lighting code has been changed in the various URP versions, which is why it happens in some versions and not in others. I originally posted the error so that it can be fixed in the shader, otherwise it will most likely remain an issue until Unity 2023 LTS.
|
|
|
|
|
Victor.Soupday
|
Victor.Soupday
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: 4 days ago
Posts: 569,
Visits: 9.0K
|
Jbowdoin (3/30/2023)
sorry if this as been asked, but I don't have a lot of time to look over 40 pages of comment's lol  are there any tutorials explaining these options I like to know if combine LOD can be used to combine a character who was exported with meagered mesh and exported again with LOD Running man: reprocesses the animations in the character fbx. It extracts and retargets (the facial expressions) the animations for the character. So may want to run this if you change the avatar definition for the character. Atom symbol: Applies or rebuilds the cloth physics for the character. LOD combiner: Chose to combine any character exports (stored in the same folder) into a new LOD group and orders the lod levels by polygon count. So yes, you can combine a merged mesh version of the character with a bunch of instalod exports and/or optimize and decimate exports.
|
|
|
|
|
Victor.Soupday
|
Victor.Soupday
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: 4 days ago
Posts: 569,
Visits: 9.0K
|
Jbowdoin (3/29/2023)
 Where has the "textures" folder gone? and where are the .json files? Without these (in the right place) it can't set up the character correctly, so doesn't detect them.
|
|
|
|
|
Jbowdoin
|
Jbowdoin
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: Last Year
Posts: 123,
Visits: 795
|
sorry if this as been asked, but I don't have a lot of time to look over 40 pages of comment's lol  are there any tutorials explaining these options I like to know if combine LOD can be used to combine a character who was exported with meagered mesh and exported again with LOD
|
|
|
|
|
Jbowdoin
|
Jbowdoin
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: Last Year
Posts: 123,
Visits: 795
|
how does this plugin detect characters ? it will not find mine
also is it comparable with unity 2019, UPR?
|
|
|
|
|
Jbowdoin
|
Jbowdoin
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: Last Year
Posts: 123,
Visits: 795
|
|
|
|
|
|
Jbowdoin
|
Jbowdoin
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: Last Year
Posts: 123,
Visits: 795
|
did not mean to double post
|
|
|
|
|
kostia.liakhov
|
kostia.liakhov
Posted 3 Years Ago
|
|
Group: Forum Members
Last Active: 2 Years Ago
Posts: 3,
Visits: 55
|
Thank you for your help, much appreciated. I may not be explaining it correctly, sorry - the issue seems to be in the hair not receiving the shadow. Everything else in the scene receives the shadow, but hair seems to ignore it. I made a quick test with an empty scene and a single light source. On the left is the character with Diffuse Strength set to 0 (diffuse colour #FFFFFF), on the right is the character with Diffuse Strength set to 1, same colour. Unless Diffuse Strength isn't supposed to be white/set to 1, it has this weird glow to it. I tried adjusting every single setting in the shader and the only one that seems to somehow fix it is the Diffuse Strength. Any advice how I can improve it? Big thanks in advance!
|
|
|
|