I’m trying to import a normal map from an external location at run time.
It imports fine, but as it’s just brought in as a regular texture, Unity doesn’t know to handle it as a normal map - and therefore doesn’t display correctly when applied to the material’s bump map slot.
Any idea what the script for defining a texture as a normal map is?
Hello James, I read that you manage to load a texture from external location at runtime, right now I’m trying to do the same thing, I generate a texture from a flash app locally and then launch a small app in unity that should load that texture to them apply it to a 3d model, I would appreciate a lot any advise or code example on how I could achieve this, thanks.
you would use WWW to load it from the harddisk if you are on a standalone application (alternatively System.IO.File.ReadAllBytes and Texture2Ds LoadImage)
Webapplication can not load from anywhere but the web
Hi. Could you please share your shader with me? I’d like to achieve similar thing. Using Texture2D.LoadImage or WWW.texture is neither able to import texture as normalmap.
I’m sorry to remove old cows from the ditch, but I’m still having the same problem: loading a texture from the resources folder (either with readAllBytes / LoadImage or UnityWebRequestTexture.GetTexture) yields an albedo texture. Unity does not recognize that I want it to be a normalMap. Not even when I apply it to the “_NormalMap” texture in a shader.
The material looks like the texture was applied as a normal 2D texture.
Am I missing something? I’m guessing that I need to set the texture to a “normal” type womewhere , but I can’t find it anywhere.