Lightmapping problem

Blitz3D Forums/Blitz3D Programming/Lightmapping problem

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well..I'm try code you suggest me, but thing still not working..maybe code i'm using for adding lightmap is not correct..anyway here is listing..

This is your code...

mesh = loadanimmesh( "level.3ds" )
lmesh = loadanimmesh( "lightmap.3ds" )

for i = 1 to countchildren(lmesh)
for j = 1 to countsurfaces( lmesh )
lsurf = getsurface( lmesh, j )
surf = getsurface( mesh, j )
for k = 1 to countvertices( lsurf )
u# = VertexU( lsurf, k )
v# = VertexV( lsurf, k )
VertexTexCoords surf, k, u#, v#, 1, 1
next
next
next

..and this is piece of code what I'm trying to use to put lightmap on to mesh..

EntityFX mesh,2
Lightmap=LoadTexture("lmap.tga")
TextureCoords Lightmap,1
EntityTexture mesh,Lightmap,0,1

so..result is, mesh but only with lightmapped texture...

anyone can help...