Can anyone please help me that i have made a single cube in maya and export it as a pod … in the coding when i fetch the info regarding pod, i got that there is single mesh and 492 nNumFaces.
i upload one texture and expecting that to visible on all sides, which happens but textures is straight on two sides only, on other sides, somewhere upside down, flipped, there is only one frag n vert shader, if i flip the texcoord by multiplyng them to -1 in vsh, some of them get straight and some other get flipped. now i want to load six texture on six sides. if there were six meshesn then i know how to differtiate the sides but now how can i differentiate the sides of cube having one mesh and load six textures and straight textures, not flipped, please help me asap… i need that thing to be done.
i am not sure to understand fully the problem but allow me to try to help you.
if you have 6 differents texture to apply ,i usually use a multi sub texture ,use UNWRAP UV with the FLIP V coordinante activated in the exporter.i did complex mapping with it , it s working very well.
sure you can assign texture from scratch as well in this case , the sdk is full of sample.
Thanks for reply DAVID, but i didnt get you… I am very new to this thing.
problem is straight, i know how to apply different textures on different meshes by using nNumMesh but i dont know how to apply different textures on one mesh. i can easily apply six textures on six sides with different meshes, but how can i apply six textures on sides with one mesh only.
what i mean is from your design tools you can assign material ID that are link to each of your textures
so you will have 6 material Ids.you need UV as well correctly calculated, so unwrap uv does it for you ,then export the POD with the v flip and your done .
If you do it manually it can be more complicated because you have to calculate the UV yourself and create your VEXTEX BUFFER OBJECT from :
the OGLES2Shaders.cpp demo show that very well in the ParametricSurface building ( and many other places ).
ok Thank you david. i can try this method, but one question, when i get the texture IDs , is it possible to change the textures dynamically afterwards using the same texture IDS. ?
sure it is !!!
have a look to the shader demo or skybox2 for instance, superbe example
thnk you david, it sorts out
Super cool Man !!!