I’m currently using AnyPortrait to create a character model. However, after I clicked Bake, the model shows up in my Unity scene, but only the mesh is visible, and the texture is missing.
unity3d vresion:unity6(6000.031f1)
add Mesh
add Mesh Group
add Root
Bake
Mesh visible but texture missing after Bake AnyPortrait
I’m currently working on a project using AnyPortrait, and I’ve encountered an issue with the default AlphaBlend Shader. Whenever I use AlphaBlend, the texture on my model disappears. However, when I switch to a different Shader, the texture reappears and displays correctly.
Thank you so much for the detailed explanation and guidance!
After following your steps, the issue has been completely resolved. The mesh and textures are now rendering correctly, even with URP enabled.
Hi!
After checking the attached screenshots, it seems that you created the project with the "Universal 2D" template.
Since the template uses "URP 2D", the existing Built-in Shaders do not work.
As AnyPortrait's basic materials are also composed of Built-in Shaders, projects using URP require separate work related to Shaders.
After creating a new project with the Universal 2D template in Unity 6, here is the screen where we created the slime character.
As you described, the mesh is not being rendered in the Unity Scene.
Let's check the rendering settings of the current project.
Open the "Project Settings" window and select the "Graphics" menu.
You can see that the "Default Render Pipeline" has the "UniversalRP (URP for short)" asset assigned to it.
When you select this URP asset, you can see the Renderers, and here, "Renderer 2D" is added.
In other words, you can see that the rendering of this project is set to "URP 2D".
The easiest way to fix this rendering issue is to not use URP.
If you don't absolutely need to use URP, freeing the allocated URP assets and reverting to the Built-in Render Pipeline should fix the issue.
In this case, you should un-assign all "Render Pipeline Assets" in "Project Settings > Graphics" as well as in "Project Settings > Quality".
If you want to solve the rendering problem while maintaining URP 2D, you should use the "Material Library" described below.
(1) Open AnyPortrait editor and select "Root Unit".
(2) Press the "Material Library" button.
(3) You need to install the material presets for URP. Select "URP (2023) Presets" from the package list.
(1) Press the "Unpack Preset" button with the preset to be installed selected.
(2) A message related to installation will appear. Press the "Okay" button to close the "Material Library" and install the package.
Once the installation is complete, open "Material Library" again.
(1) You can see that presets supporting URP are installed.
(2) Let's create a new material set to apply to the character by pressing the "Make Material Set" button.
(3) Select the preset to apply to the new material set. Since this project is "URP 2D", the following presets can be selected:
URP (2023) Unlit: This material is not affected by light.
URP (2023) 2D Lit: This material is affected by 2D Light.
URP (2023) 2D Bumped Lit: This material can set a Bump Map.
URP (2023) Mergeable 2D Lit: This material is automatically merged with other materials for rendering optimization. This is not recommended as URP's optimization function is already excellent.
(4) Since we want to make it unaffected by light here, first select “URP (2023) Unlit” and press the “Select” button.
(1) Select the added material set.
(2) Click the "Default Material" button to turn it "ON".
If you bake and go back to the Unity Scene, you can see that the mesh is rendered normally, as shown above.
However, you can see that the color is a little strange.
The textures included in the AnyPortrait package are set to render properly when the Color Space is "Gamma".
Also, AnyPortrait's characters use different Shaders depending on the Color Space, and the default is "Gamma".
However, the default Color Space of the URP project is "Linear".
This can be checked in "Project Settings > Player > Color Space".
To fix this issue, either change the project's Color Space back to "Gamma" or change the AnyPortrait character's setting to "Linear".
(1) Open AnyPortrait editor and press the "Bake" button.
(2) Select the "Setting" tab.
(3) Change the value of "Color Space" to "Linear".
(1) Select the "Bake" tab.
(2) Click the "Bake" button.
(3) A message will appear saying that the Color Space of the texture will be changed. Click "Okay".
When we return to the Unity Scene, we can see that it is rendering normally even in the "Linear" Color Space.
The following manuals related to this answer may also be helpful to you:
Material Library : https://rainyrizzle.github.io/en/AdvancedManual/AD_MaterialLibrary.html
Universal Render Pipeline : https://rainyrizzle.github.io/en/AdvancedManual/AD_URP.html
Linear Color Space and Asset Settings : https://rainyrizzle.github.io/en/AdvancedManual/AD_LinearSpace.html
If your problem persists, please leave a comment!
Thank you.