- Home /
Strange Error: Shader wants normals, but the mesh doesn't have them
A 3DText using a custom font has started giving me this strange message from the editor...
Shader wants normals, but the mesh doesn't have them
The font I'm using is being used on some other 3DText prefabs and it works fine. But with one particular prefab (an XP Pop-up) this error keeps appearing and the 3D text refuses to show. What makes the problem even stranger is that it's started happening absolutely randomly for seemingly no reason...
Any ideas how I could fix this?
Answer by GesterX · May 13, 2011 at 11:40 AM
Well after an hour of fiddling it seems to be working again. I most certainly had not changed any shader settings but as Eric put it... something must have changed. The steps I took to resolve the issue:
- Reinstalled the font
- Duplicated the prefab and deleted the old one
- Set the font of the 3DText part of the prefab to "None" and then back to the custom font
- Reassigned the prefab to all of the objects that used it
That worked in the end. I'm unsure what I could have done to screw things up as I tend to stay away from shaders where I can and in this project I'm not using any special custom shaders. Hopefully this will solve the issue for anyone else who has the same problem in future.
Answer by Eric5h5 · May 12, 2011 at 10:55 PM
You're using a material with a shader that uses lighting (and therefore requires normals), but the mesh generated by 3DText doesn't have normals. Use a shader that doesn't use lighting instead.
Is there any reason why this would suddenly start happening? It seems odd that I have been using the prefab for weeks without getting an error and then all of a sudden it starts flagging it...
Something changed, or possibly you just overlooked it (it's an info text rather than a blocking error).
Thanks for the tips. I've added an answer as to how I've fixed the issue.
Answer by paulrahme · May 12, 2014 at 04:17 PM
After spending hours on this, it turns out that I was trying to create a font material to use with a TextMesh, that wouldn't draw over the top of other 3D objects in front of it.
Turns out I was using "Transparent -> Diffuse", which uses lighting (as Eric5h5 said), so I changed it to use "Unlit -> Transparent" and the message went away.
Yeah, You have to click on the 3dtext and change the shader. You probably have a bumped specular or something.
Either change the shader or get a script to add tangents to the item.
Your answer
Follow this Question
Related Questions
3DText Outline Shader 2 Answers
Outlines Defined by Shading Groups? 0 Answers
How to find a font via script? 2 Answers
Problems with two sided textured shader 3 Answers
Shader Color Bumped elements 0 Answers