UV mapping problem
Blitz3D Forums/Blitz3D Programming/UV mapping problem
| ||
I bought ultimate unwrap today and I made a texture file for a character, but when I apply the texture I cant see the character any more. The code is [Code] guy=loadmesh("wingman.3ds") guy_tex=loadtexture(wing_map.bmp") entitytexture guy,guy_tex [/Code] Works fine without the texture. ext: .bmp or tga file size: 1024,1024 the mesh was created in wings |
| ||
you forgot a " in the filename ... but i don't think it's the error, however it would return an error while compile the program. Maybe you specify a mesh that have no UV Coordinates => result is all uv are setted to 0,0 , and generally corner of textures are black. If you have a black background viewport, you won't see your model. |
| ||
Fuller, did you texture it in Unwrap? If so just export from UU3d as a B3d and load that mesh instead. Check all textures are in the same folder as the mesh and the filenames have to be 8.3 btw. Also move the camera back a forwards incase something has happend with the scale of your model. IPete2. |
| ||
This will draw the UV map on screen, use it to see if there is a correct UV map or not. Replace CreateSphere() with LoadMesh("yourmesh.x") e.t.cGraphics3D 1024,768,32,2 mesh=CreateSphere(16) drawUVs mesh,512,0 WaitKey End Function drawUVs(mesh,scale,uvset) surfCount = CountSurfaces(mesh) For i = 1 To surfCount surf = GetSurface(mesh,i) triCount = CountTriangles(surf) For j = 0 To triCount-1 u0# = VertexU(surf,TriangleVertex(surf,j,0),uvset) * scale v0# = VertexV(surf,TriangleVertex(surf,j,0),uvset) * scale u1# = VertexU(surf,TriangleVertex(surf,j,1),uvset) * scale v1# = VertexV(surf,TriangleVertex(surf,j,1),uvset) * scale u2# = VertexU(surf,TriangleVertex(surf,j,2),uvset) * scale v2# = VertexV(surf,TriangleVertex(surf,j,2),uvset) * scale Line u0,v0,u1,v2 Line u1,v1,u2,v2 Line u0,v0,u2,v2 Next Next End Function |