Automatically calculate normals

Hi there. Did a search, and couldn’t find this answered anywhere. But as I find it kind of basic, I appologize beforehand, should this have been answered tons of times already… :sweat_smile:

Anyways, is there a place to set some default values? I mean, I will NEVER need Unity to calculate my normals for me, as they are already set exactly as I want them, in my 3D program. And it’s kind of tedious to always having to first import an object, then go into settings, remove “Automatically calculate normals”, and then reimport. Not to talk about the times where I forget it, and suddenly realize some strange looking normals in a final build :?

But I’m sure this is easy to solve, so I want it solved now…

Thanks for the help, great forum, great engine…great…life :lol:

There isn’t any preference you can set, but you can code it from script. Put this script into Asset/Editor and it will remove the calculate normal option whenever a model is being imported.

using UnityEngine;
using UnityEditor;

public class DisableCalculateNormals : AssetPostprocessor  {
	void OnPreprocessModel() {
		ModelImporter importer = assetImporter as ModelImporter;
		if (importer) {
			importer.recalculateNormals = false;
		}
	}
}

Hey folks,

I’d like to try to implement this as well, but I’m not sure how to “put this script into Asset/Editor”.

Is there a way to access that from the Unity menu? Do I just need to create a folder called “Editor” inside of the “Assets” folder of my project?

Thanks,
Jared

The second thing. Just make a folder called Editor in your Assets folder.

Thanks Again Talzor

AC

Thank you for the solution, talzor…!

Thanks for the help everyone, this works well.

For anyone as clueless as me, that code snippet is C#.

-Jared