Trying to figure out the name of this style and how to write a shader for it

Screenshot of my asset <— Image attachement not working for me…

I’ve made a couple of test assets in Blender that I’d really like to import into Unity. They’re purposely very low poly, but I don’t know what this style is called so I can’t do an appropriate search on Google or these forums. I took several interesting tutorials at Unity Cookie on learning the basics of writing shaders (I’m new writing them). There’s even one tutorial that teaches you how to write a shader specifically for this style, but unfortunately it’s not working and they don’t mention the name of this style.

Can anybody tell me what this style is called and perhaps point me towards the right direction on where I can read on how to accomplish this?

What I’ve tried:

  • I’ve already included the vertex color channel into my mesh
  • I’ve UV Mapped the mesh as well
  • I’ve changed the Mesh tangent and normal settings in Unity to none.
  • I’ve already written a script that gets the mesh data, makes a vertex color array, loops through vertices, and applies a new color.
  • I’ve looked on the Unify Community for similar shaders and nothing.

Stuck on the shader part :frowning:

Looks like flat shading to me. It’s not a matter of a shader. Your model needs to have a duplicate vertex for every polygon that shares that vertex.

ilya, I think you’re about the style name being “Flat Shaded”. In fact, I might have found the tutorial I need by googling flat shaded unity3d. If anybody needs it, here it is. I’ll try it out and post my results. Thanks ilya, hope this works.

In your model’s inspector, set Normals to Calculate and set the Smoothing Angle to 0.

Thanks Farfarer, that tutorial I posted explained that as well. This was definitely what I was looking for :slight_smile:

if you have mesh inside unity that you want to rewrite three vertices per triangle, I think this code is about right:

		var mesh : Mesh = pl.GetComponent(MeshFilter).mesh;
		var myvertices : Vector3[]= mesh.vertices;
		var mytriangles : int[] = mesh.triangles;
		var newvertices = new Vector3[mytriangles.Length];
		
		for (var DD:int = 0; DD < mytriangles.length ; DD ++){	
			newvertices[DD] = myvertices[mytriangles[DD]];
			mytriangles[DD] = DD;
		}
		mesh.vertices = newvertices;
		mesh.triangles = mytriangles;

For some beautiful examples of the genre, check out http://dribbble.com/turnislefthome/projects/25438-Isometric by Timothy J Reynolds.
Like this one: