Hi,
I have realized Unity3d does not have a shader for vertex colored models.
Since it is one of the easiest ways to color your model in Blender (Vertex Painting), you might need this shader:
Go to your assests folder - Create - Shader.
Give a name to your shader and paste the code below: (The name in code is "Vertex Colored", you can change it with your shader name).
Keep in mind, that you need create a material for your model if it is not created. Then you can choose this shader on material's shader list.
And make the ambient light white to see it properly. (Render Settings - Ambient Light)
Cheers
Vertex Color Shader Script
Source:
http://wiki.unity3d.com/index.php?title=VertexColor
I have realized Unity3d does not have a shader for vertex colored models.
Since it is one of the easiest ways to color your model in Blender (Vertex Painting), you might need this shader:
Go to your assests folder - Create - Shader.
Give a name to your shader and paste the code below: (The name in code is "Vertex Colored", you can change it with your shader name).
Keep in mind, that you need create a material for your model if it is not created. Then you can choose this shader on material's shader list.
And make the ambient light white to see it properly. (Render Settings - Ambient Light)
Cheers
Vertex Color Shader Script
Source:
http://wiki.unity3d.com/index.php?title=VertexColor
Shader " Vertex Colored" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
Material {
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
ColorMaterial AmbientAndDiffuse
Lighting On
SeperateSpecular On
SetTexture [_MainTex] {
Combine texture * primary, texture * primary
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine previous * constant DOUBLE, previous * constant
}
}
}
Fallback " VertexLit", 1
}