Basically what I want to achieve is this:
https://www.youtube.com/watch?v=vQdMTgfCRaQ
I know that this has been asked a thousand of times but for some reason I don't understand or I'm not able to get what is answered.
My artist gave me some .obj house models with a texture (in its .mtl). Then he has provided my with some .tga alpha files showing the windows with the lights on. The goal is to get the effect that the lights are turning on using that texture. If I could even set LIGHTING to false for this lights texture then it would be awesome.
As far as I know, for achieving this I should have 2 SMaterials attached to the node, but I have just one, so If I do this:
Code: Select all
auxNode->getMaterial(0) = someOtherMaterial;
But if I do this:
Code: Select all
auxNode->getMaterial(1) = layerOnTopMaterial;
And if I also do this after that:
Code: Select all
printf("matcount: %i\n",auxNode->getMaterialCount());
I think that the problem is that the node has just 1 material and I'm not able to append the lights material to the material list of the node.
How can this be done? Should I do this coding or should I ask the artist to make the obj models with mutliple materials?
Thank you very much!