Topic: .3ds lighting problems
I'm using gg.irrb3d...
Meshes loaded from .3ds files are not recieving lighting from light objects in my scene. They are just displayed as though completely lit.
I also cannot adjust the object's colour using ib3d_EntityColor.
Lighting seems to work fine with md2s, such as in the irrb3d example. (Sorry, I can't find it...)
I haven't tried any other formats.
Can I fix this, or is it just normal behaviour?
Strict
Framework gg.IrrB3D
Import PUB.Newton
ib3d_Graphics3D(640,480)
Local cam:CAMERA=ib3d_CreateCamera()
ib3d_PositionEntity(cam , 0 , 0 , -10)
Local board:MESH = ib3d_LoadMesh("media/board/base.3ds")
ib3d_EntityColor(board,255,0,0)
Local LIGHT:LIGHT = ib3d_CreateLight()
ib3d_PositionEntity(LIGHT, 5 , 50 , 0)
ib3d_LightColor(LIGHT,0,255,0)
ib3d_LightRange(LIGHT,1000)
ib3d_CameraClsColor(100 , 0 , 200)
While Not ib3d_KeyDown(EKEY_ESCAPE)
' move the camera
If ib3d_KeyDown(EKEY_NUMPAD9) Then ib3d_MoveEntity(cam,0,50,0)
If ib3d_KeyDown(EKEY_NUMPAD3) Then ib3d_MoveEntity(cam,0,-50,0)
If ib3d_KeyDown(EKEY_NUMPAD6) Then ib3d_MoveEntity(cam,50,0,0)
If ib3d_KeyDown(EKEY_NUMPAD4) Then ib3d_MoveEntity(cam,-50,0,0)
If ib3d_KeyDown(EKEY_NUMPAD8) Then ib3d_MoveEntity(cam,0,0,50)
If ib3d_KeyDown(EKEY_NUMPAD2) Then ib3d_MoveEntity(cam,0,0,-50)
' turn the camera
If ib3d_KeyDown(EKEY_LEFT) Then ib3d_TurnEntity(cam,0,-50,0)
If ib3d_KeyDown(EKEY_RIGHT) Then ib3d_TurnEntity(cam,0,50,0)
If ib3d_KeyDown(EKEY_UP) Then ib3d_TurnEntity(cam,50,0,0)
If ib3d_KeyDown(EKEY_DOWN) Then ib3d_TurnEntity(cam,-50,0,0)
If ib3d_KeyDown(EKEY_SPACE) Then ib3d_TurnEntity(cam,0,0,50)
' perform collisions and reposition entities based on collisions
ib3d_UpdateWorld()
' render the current world
ib3d_RenderWorld()
Wend
ib3d_EndGraphics()