what are the options for texturing custom meshes
Blitz3D Forums/Blitz3D Beginners Area/what are the options for texturing custom meshes
| ||
Im currently working on a map maker for a racing game idea it will use custom meshes as in the segment shown segment=CreateMesh() surfa=CreateSurface(segment) v1=AddVertex(surfa,-2,2,0) v2=AddVertex(surfa,0,0,0) v3=AddVertex(surfa,2,0,0) v4=AddVertex(surfa,4,2,0) v5=AddVertex(surfa,-2,2,2) v6=AddVertex(surfa,0,0,2) v7=AddVertex(surfa,2,0,2) v8=AddVertex(surfa,4,2,2) t1=AddTriangle(surfa,v1,v6,v2) t2=AddTriangle(surfa,v1,v5,v6) t3=AddTriangle(surfa,v2,v6,v7) t4=AddTriangle(surfa,v2,v7,v3) t5=AddTriangle(surfa,v3,v7,v8) t6=AddTriangle(surfa,v4,v3,v8) 1.can you load a texture and assign it to any triangle ie 6 textures in one surface also can you draw the whole texture in one triangle? 2.can you load a texture and assign it to all tris in a surface ie full image in each tri? 3.any tutorials around on how to assign textures to tri,surface,custommesh? any help would be welcome i totaly lost :( |
| ||
Textures can only be assigned to surfaces, not to Triangles. But Each Vertex has its own UV Coordinates, values between 0.0 and 1.0 that describes where on the texture the Vertex will be positioned. Check out the optional UV Parameters of the AddVertex Command. You may also use multiple textures on one Texturefile and then simply position the UVs in a way the Tris will use individual parts of the texture. |
| ||
thanks jfk me alreadly half way there never thought of using uv scaling to get move textures out of a file :)looks like thats just what i needed basicmap=1440segs eachseg=7quads eachquad=2tris eachtri=3vert totalquads=10080 totalverts=23040 first racemap almost complete its in the style of wipe out and fully 3d the bizz to be honest hope to post some pics and a demo verysoon thnks mate |