Reading lightmap at location.

Blitz3D Forums/Blitz3D Programming/Reading lightmap at location.

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.

ok -- my bad -- you didnt store the result of GetEntityBrush(map) into its own variable.

This is how I load terrain with lightmap that I create with ALE: (dont expect it to be much different for any lightmapped mesh)

;Load Level
level = LoadMesh("default/default.b3d")
ScaleEntity level, 2, 2, 2
PositionEntity level, 0,-5,0

;Lightmap
EntityFX level, 1
Global lightmap = LoadTexture("default/default_lm.png")
TextureCoords lightmap, 1
TextureBlend lightmap, 2
EntityTexture level, lightmap, 0, 1

Note the EntityTexture command.. the lightmap is loaded into texture slot 1 (of 0-7 possible). One may presume that the mesh textures are in slot 0 -- if you replace slot 0, you get lightmap all over your models :)