Don't use LegacyBlendShapeNormals when AutoFixing with BlendShapeNormals warning
interested
whiteflare
In VRCSDK3 Avatars, if BlendShapeNormals in FBX is Calculate, the validation is displayed.
If I press AutoFix here, LegacyBlendShapeNormals will be enabled.
But I think LegacyBlendShapeNormals is an old method as it is named Legacy.
Since relying on AutoFix in VRCSDK is not a way to get out of the old method, we would like to change it to use the new method.
Instead of enabling LegacyBlendShapeNormals, I would like to change BlendShapeNormals to None.
Incidentally, depending on the new Blender FBX export settings, LegacyBlendShapeNormals may break mesh normals.
So I am trying to find a way to avoid using LegacyBlendShapeNormals.
I am using VRCSDK3Avatars 3.6.0.
Thanks.
Log In
ShingenPizza
ever since i saw the autofix tooltip, i've wondered why does VRC recommend a "legacy" option, and in some minor test years ago i've had subjectively better shading on the blendshaped fur spikes with the "import" option, so that's what i've been using in other places, until recently i noticed a case where it seems to have actually made breathing blendshape look worse with Warren's Fur Shader, when compared to legacy.
This canny has inspired me to check various combinations:
Blender versions: 3.0.1 (newest 3.0.x), 3.6.12 (newest 3.x), 4.0.2 (newest 4.0.x) or the infamous 4.1.1 (newest 4.1.x),
"smooth", "flat", or "auto" shading,
exporting with "normals only", "face", or "edge",
importing with normals set to "import", "calculate", or "none",
and finally importing with blendshape normals set to "import", "calculate", "none", or "legacy".
so that's 4
3
33
4 = 432 total combinations, however:- 'auto'-shaded model in Blender 4.1.1 was, of course, unavailable.
- setting the import setting of normals to "none" made it possible to pick blendshape normals only between "none" and "legacy".
leaving, i believe, 330 viable combinations.
i've created a model from 4 subdivided quads, 2 of which had blendshapes: 1 with a smooth bulge, and the other with some random vertex transform for some rough edges. the remaining 2 quads had the same shapes, but were 'baked in'.
i've also created "reference" models, which were exported with all quads 'baked in'.
I've created a simple shader in Amplify to 'see' the normals in Unity ("vertex normals" node into "debug" output after appropriate range mapping).
IMO, ideally, the models with their blendshape at 100% should look the same on both of their sides, and also they should look identical to the reference models.
my notes are:
- i could not see any difference between any of face and edge export results, so i'm treating them as a single category onwards.
- i could not see any difference between results exported from blenders 3.0.1 - 4.0.2, so i'm treating them as a single version.
- none of the export/import setting combinations give always good results
- setting import setting of normals to "none" essentially breaks the shading on the whole model, so it shouldn't be used.
- in addition to effectively removing auto-smoothing (for models with blendshapes, i.e. like 99% of VRC avatars), Blender 4.1.1 can't even export a fully smooth model properly.
- using bledshapes in the default import mode of import/calc can affect normals even on the parts of the mesh that are not 'animated' by a blendshape.
- the problem with the fur shader that i mentioned at the beginning, came from importing an auto-shaded model that has normals copied over from another mesh using "data transfer" modifier (segments of a divided mesh have normals copied over from the joined mesh to avoid visible seams). import/legacy will cause those blendshape normals to be effectively none, so it works "good enough".
- i could not recreate either of whiteflare's "breaking" cases in those specific states with Blender 4.1, because they're nearly ALL severely broken.
- blendshape normals of "none" will not break normals, but also they will not cause them when they're expected.
and my results/conclusions are:
- a flat-shaded model with bs should be exported from any Blender with edge/face smoothing and imported with calc/calc, calc/import, or import/calc
- a smooth-shaded model with bs doesn't have a perfect way to be exported/imported, but the closest results are exporting from Blender 3.0.1-4.0.2 with edge/face smoothing and imported with calc/calc, calc/import, import/calc, or import/legacy.
- an auto-shaded model with bs doesn't have a perfect way to be exported/imported, but the closest effect seems to be achieved by exporting with "normals only", importing calc/calc, calc/import, calc/legacy, import/calc, or exported with faces/edges and imported with calc/legacy
- just don't update to Blender 4.1.
ShingenPizza
idk when did they add formatting to these comments (and why the hell can't i escape an asterisk to print one out), but i can't edit the currently mis-formatted line to
"so that's 4 × 3 × 3 × 3 × 4 = 432 total combinations"
because of exceeding the 2500 character limit.
Scarlett Puppy
tbh I'm really confused what this fixes or like what better results this will yield.
Fax
interested
Thank you for your request! Would you mind explaining the benefits of using
None
by default? Is this your personal preference, or is it generally superior to LegacyBlendShapeNormals
?whiteflare
Fax Thanks for your comment!
Most of the reasons are based on my own research, but I recommend BlendShapeNormals=None because I found examples where it only breaks with LegacyBlendShapeNormals.
In many cases BlendShapeNormals=None has been considered to have the same behavior as LegacyBlendShapeNormals.
Therefore, the Japanese community has been advised to use BlendShapeNormals=None instead of LegacyBlendShapeNormals.
This is still a valid idea and BlendShapeNormals=None can be used instead of LegacyBlendShapeNormals.
However, LegacyBlendShapeNormals seems to break the normals of FBXs exported from the latest Blender. In this case it is required to use BlendShapeNormals=None.
Some consider this event to be a degrade of Blender, but if it can be avoided without using Unity's Legacy, so much the better.
I often use BlendShapeNormals=Import to control normals. Even then, LegacyBlendShapeNormals is undesirable because it hides the BlendShapeNormals property.
Fax
whiteflare: Thanks for providing more details!
Blender 4 changed how the auto-smooth modifier works. Do you know if that's related to your issue?
For example: If your models use the auto-smooth modifier, can you please try applying it before exporting the FBX?
Scarlett Puppy
whiteflare do you know if this is the case with Blender 4.0.2 after blender removed alot of the legacy versions from steam thats the version I ended up having to use and now I'm curious if its screwing with my normals, also what did you use to test the normals?
whiteflare
Fax
I tried without the auto-smooth modifier and the modifier seems to be not related to my issue.
If a BlendShape is present, the modifier is not applicable, and therefore cannot be applied before exporting.
There is an option to apply the modifier in the export settings, but that would remove the BlendShape, so it is not an alternative.
This change seems like a degradation of Blender; the flow of mesh editing while using auto-smooth may need to be considered as a different issue.
whiteflare
Scarlett Puppy Sorry, I have not been able to check the detailed differences between Blender versions.
I am using Blender 3.0 and 4.1. I too would be interested to know where the problem occurred between the two.
BluWizard
If you set BOTH
Normals
and Blend Shape Normals
to Import
on your Mesh Import settings, the SDK will not warn you about it whatsoever. Many Avatar Creators I know use this method instead of Legacy these days.whiteflare
BluWizard
In the FBX export settings for Blender 4.1, when Smoothing is set to Normals Only, the normals do not move correctly when BlendShapeNormals in Unity is Import.
If BlendShapeNormals is set to Import, Smoothing must be set to Face.
However, if Smoothing is set to Face, the FBX normal will not work correctly when LegacyBlendShapeNormals is enabled.
Therefore, my recommendation is,
When exporting from Blender, set Smoothing to Face
When importing into Unity, disable LegacyBlendShapeNormals and set BlendShapeNormals to None or Import
I think it would be a good way to do this.
Maybe Blender's version upgrade will improve this, but either way, LegacyBlendShapeNormals is an old method.