Page 1 of 1

"Missing texture 2 for material Normal"

PostPosted: 11 Jan 2015, 01:37
by Anon
I was going to try to finish my Temple arena today, but as soon as I re-exported the track and tried to test it, I was hit with the error message:
{l Code}: {l Select All Code}
[fatal  ] STKMesh: Missing texture 2 for material Normal

My build, assets, and exporter are up to date. Blender doesn't complain about any missing textures, and I tried copying all relevant images (including generic ones) into my track directory. It still doesn't work.

Anyone have any idea what this error message means, and just as importantly, how to fix the problem behind it?

Re: "Missing texture 2 for material Normal"

PostPosted: 21 Jan 2015, 00:59
by Auria
Hi, this probably means a material marked as having normal maps does not actually have a second UV layer or texture. If you need more help, you can upload the file (blend and export) and I can give you more information

Re: "Missing texture 2 for material Normal"

PostPosted: 21 Jan 2015, 03:24
by Anon
Is the second UV layer actually necessary? I just re-exported cocoa/chocolate, which doesn't have a second UV layer on all its objects, and it ran and rendered fine with normal mapping.

Re: "Missing texture 2 for material Normal"

PostPosted: 21 Jan 2015, 03:38
by Anon
Upon further inspection of my track's materials.xml, it appears that a previously assigned but now deleted normal map is the culprit. I'm not sure why it keeps getting exported; the image properties panel doesn't show it anymore.

EDIT: Here's the track source, if you want to take a look. Since the issue is just with the export, I haven't bothered to include library objects/textures in the link. So let me know if they're also needed.

Re: "Missing texture 2 for material Normal"

PostPosted: 21 Jan 2015, 22:31
by vlj
Irrlicht (and thus STK) doesn't support normal map + second uv layer.
This means that if you have a material with 2 uv layer (splatting, detail map) you can't have normal map.

STK by itself would need a little work in the code to add a new vertex layout (basically all the code to upgrade is in vaomanager.cpp) but irrlicht utilities (generateTangents for instance) won't work at all.