I'm trying to export a model with a non-tiling texture from Cinema 4D as a .X file. Turning off tiling in the modeler and exporting leads to an identical .x file as with tiling turned on. So it looks like I either need to modify the .x file by hand to disable tiling, or force tiling to be turned off once the model is loaded into irrlicht. I tried using the following code to force the texture to clamp, but I think I must be doing something wrong. Can I do this in code once the model is loaded? If not, is there a way to disable tiling directly in the .X file?
I guess you have to change some export properties to export texture coords correctly. There is no tiling option in .x, so the texture coords must be made explicit.
In case you use Irrlicht 1.3.1 your code should be correct. But it might be that more than one mesh buffer is in the mesh, so you have to change the clamping for all of those in the mesh.
I am using 1.3.1, and there's only one mesh in the file (it's a simple plane), so I'm not sure why the code isn't working. Here's a link to the .x file:
Even with tiling on it should look ok because the UV coordinates are correct, but I can see about 1 pixel of the bottom of the texture peeking out at the top of the mesh:
I just figured out that I can get rid of the problem by offsetting the texture by a small amount, but it seems like kind of a hack.
try this: remove setMaterial() and all about set material. in irrlicht.x format loaded with their textures and texture coordinates that u set when u sreate your model on your 3d software, even if u don't use setMaterial() they sure be loaaded. so if u sure u map them correctly ?