Import >4096 texture / normal maps

Seems impossible to do from the UI, any workaround for this? I’d like to import some 8 or 16K maps

Yes it is possible to do from an editor script.
I threw together a basic script that makes a window and after clicking button makes texture 8k. For many textures a different script is needed but this should get the idea across.

using UnityEngine;
using System.Collections;
using UnityEditor;

public class TexSize : EditorWindow {

    public Texture2D _tex;
    public GUILayoutOption[] par;

    [MenuItem("Tools/TexSize")]
    static void OpenWindow()
    {
        TexSize window = (TexSize)EditorWindow.GetWindow(typeof(TexSize));
    }

    void OnGUI()
    {
        GUILayout.Label("Base Settings", EditorStyles.boldLabel);
        _tex = (Texture2D)EditorGUILayout.ObjectField("L",_tex,typeof(Texture2D),false,par);
        if (GUILayout.Button("Apply", par))
        {
            string path = AssetDatabase.GetAssetPath(_tex);
            TextureImporter t = AssetImporter.GetAtPath(path) as TextureImporter;
            t.maxTextureSize = 8192;
            AssetDatabase.ImportAsset(path);
        }
    }
}

Thanks a lot, i’ll try that, very helpfull! :slight_smile:

Just tried with 16k and it failed. Why do you need such a huge texture anyway? Why not cut it up?

The question is more why cut it up? It’s additional work / more complex workflow and in this case perf doesn’t matter.

As far as I know only Shader Model 5 supports 16k. So that might be a problem. I can’t imagine what you would even want that for.

Ah i didn’t realize SM levels restricted texture size, does SM3 support 8K? if not i guess i should drop the idea untill i migrate to unity 4

Ooh. . well shader model 3… dont know if it relates to texture size exactly but I would imagine 4096 or 8192 as an upper limit that likely accompanies that kind of hardware. A 4096 texture takes up 64mb of video ram, so a single 16k texture needs a gigabyte all to itself… so the hardware has to have at least (more than) 1 gig of video ram.

Probably explains why I couldn’t import it as I only have 1GB of VRAM
Is unity doing texture import on GPU?

Wouldn’t be enough as mipmap + the display buffers need to fit in as well and if you use a 16k texture, I would assume that we talk about a screen resolution thats at least at 2560x19xx if not higher, otherwise its an absolute waste (it otherwise might be too but thats case dependent)

If you want to use it for something like mega textures, atlasing or something similar, then I would recommend to look at Amplify, at least if you target windows / osx standalones.

I’m not looking at mega textures or anything similar, i want a single (non repeating texture) on a large terrain for non-realtime, and i can easily generate 8K+ textures from world machine, even 4K looks pretty bad when “up close” so i’d love to see it at 8 or 16K.
The idea is that i can simply import diferent resolutions for realtime vs recording cinematics without resorting to additional software or changing my workflow, making it as simple as going from 4K to 16K and increasing the polycount before recording for videos.