Hello,
I simply need to load a mesh ".x" file, then apply a base texture (supertexture for the whole terrain) then I want to apply a detail-texture over. This is a similar approach used for advance terrains, but I want to work with meshes (objects).
I found several topics, but I cannot manage correctly blending, stages, supertexture (stage 0?) and detail textures (to be tiled over the mesh, and should NOT be stretched).
I made many tests but I got no valid result.
Now I'm using this code:
dbLoadObject("geo_2048\terrenoA2.x", terrainId, 4)
dbScaleObject(terrainId, 50, 50, 50 )
dbPositionObject(terrainId, 0, 0, 0)
dbLoadImage("geo_2048\terrenoA.bmp", 100001)
dbLoadImage("detail.tga", 100002)
dbTextureObject(terrainId, 100001, 0)
dbSetBlendMappingOn(terrainId, 100002, 5, 1, 0)
This is only a test, but I tried a lot of combinations for blending, set texture, etc...
Please help me!
--Alessandro