Model disappears when adding Normal Map


I have a weird problem when assigning materials to my model ( the model is loaded from a server, so only visible when pressing play).

A have made a materialmapper so i can automatically assign new materials to the original ones. This works fine but only if I add a diffuse texture. As soon as I add a normal map the wall or element on which the material is assigned disappears.

I have no idea how to fix this or even why this happens. Maybe someone encountered a similar problem?
Much apreciate the help.


Hi @radudordea. You have not provided link to test, nor mentioned if you see anything in console and how you’ve tried to debug an issue.


Sorry I can’t provide you the link because of the project is private :s so not realy allowed to share it.
I know that this complicates the question a bit , I understand if you can’t help me.

The debugger doesn’t find anything wrong, and there are no Errors found. Tthe element just disappears as soon as i add a normal map. When i delete the normal map in the editor (material configuration ) you can watch the element reappear in Real time. So i think it has to do with the fact that i upload the model from a Json which is exported from Revit.

I was just wondering if maybe the problem was solvable within playcanvas.

If you could make simple public example that replicates an issue, then will be much easier to debug and help you.
If there is nothing extra done, and model really disappears - it looks like engine bug. But we need a test case to replicate an issue.

I have a public one available it’s called Configurator - model -
It’s on my free account. Do i need to add you to the team or can you acces it.

LINK to just he build :
You have to copy the link without https:// otherwise the model will not be loaded.
The config- model has 2 materials - as soon as you add a normal map to brick type 1 from the “new materials” - brick folder you will see that the walls disappear.

Thanks in advance.

So I’ve forked this project to test it. First thing is console straight away spawning with warning when material is changed:

[.Offscreen-For-WebGL-0x70da6e8de00]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 2

You could have mentioned this before, as this is pointing to an issue.
I will investigate further into the problem. It seems like model format you are loading is wrong. Error suggests that number of attribute elements is wrong, either you defined Vertex Buffer format wrong, or provided wrong data to the buffer.

Issue could be in Mesh.js file.

Okay thank you , im affraid i’m very new at programming with javascript so don’t always know wjere to look. Thanks for the help !