1
Support / Texturing Object3D objects made using addTriangle() method
« on: January 07, 2008, 05:35:55 am »
In the map editor we're working on, the terrain is loaded via heightmaps (binary file) and inserted into an instance of Object3D called terrain via the addTriangle method. Now in order to texture it, I've followed exactly how the 3ds terrain was textured in the car benchmark demo source (Cartest.java). The texture itself is a 128x128 jpg, and it's being loaded fine. I've added it to the texture manager, then added the texture to the terrain via setTexture method. Still nothing is happening.
My guess is that it has something to do with texture coordinates? Is it even possible to texture a mesh created with addTriangles? Thanks for the help in advance.
http://pastebin.com/m849de17 <-- HeightMap.java
http://pastebin.com/m1d208e45 <-- MapEditor.java (contains main method)
ps- I deleted my other thread by accident, the one about camera vectors, is it possible to bring it back?
My guess is that it has something to do with texture coordinates? Is it even possible to texture a mesh created with addTriangles? Thanks for the help in advance.
http://pastebin.com/m849de17 <-- HeightMap.java
http://pastebin.com/m1d208e45 <-- MapEditor.java (contains main method)
ps- I deleted my other thread by accident, the one about camera vectors, is it possible to bring it back?