VertexTexCoords with 2 textures
Blitz3D Forums/Blitz3D Programming/VertexTexCoords with 2 textures
| ||
This is the problem: I have a mesh with 2 textures in 2 different "layers", but I have to change the "VertexTexCoords" in only one of those layers! Plese help me! |
| ||
Every texture has a parameter for determining which set of texture coordinates it uses. Just set that flag when loading the texture or use the TextureCoords command. |
| ||
In vertextexcoords, their is an optional coordset parameter. to modify your first uv layer, use 0. to modify the second uv layer, use 1. |
| ||
Mmh! I used EntityTexture mesh,tex,0,0 EntityTexture mesh,tex2,0,1 VertexTexCoords surf,tria,u,v,w,0 but it changes the coords of both the textures! Precisely: If I use a coord_set within the range 0 - 0.5 both the textures change, if I use a coord_set greater than 0.5 nothing happens...Why? |
| ||
"tria" must be the Vertex Index. Other than that I don't know why this should not work. Maybe your Hardware don't supports multiple Textures. Maybe try to turn on Software Multitexturing: HWMultiTex 0 to check this out. |
| ||
Ok, now it works! I used TextureCoords 0 for the 1st tex and TextureCoords 1 for the 2nd tex, and then it works well! Thanks boys! |