forgive me if this has been said but i try to add my own model to the example with the chair and i get
"runtime error 7032 - limb does not contain a mesh at line 873"
whats up?
All i did was replace the
chair.X with my
box.x.
And i am running 6.0 and the default IDE, for some reason BlueIDE hates it and won't run it at all...
EDIT: Just this with the lightmapping function.dba file attached, only changed the model and i can't figure out whats up...
`---------------------------
` demo to show this should works on .x objects(keep it low poly).
`---------------------------
`Set up dispaly
set window on
set display mode 800,600,32
sync on
sync rate 60
`Set up camera
set camera fov 70
autocam off
set camera range 1,5000
backdrop on
color backdrop rgb(128,128,128)
position camera 0,70,-100
`Install data
LM_SetupData()
`Set lightmap properties
LM_LightMapProperties( 256 , 3 , 2 , 1 , 40 , 40 , 40 )
`Setup lights 1 and 2
LM_AddLight( 1 )
LM_PositionLight( 1 , -50 , 50 , 50 )
LM_ColourLight( 1 , 255 , 255 , 255 , 200 )
LM_AddLight( 2 )
LM_PositionLight( 2 , 200 , 100 , 200 )
LM_ColourLight( 2 , 255 , 0 , 0 , 200 )
make object sphere 101,5:position object 101, -50 , 50 , 50:color object 101,rgb(255,255,255)
make object sphere 102,5:position object 102, 200 , 100 , 200:color object 102,rgb(255,0,0)
`Load object textures
load image "wood.jpg",1
load image "box.jpg",2
`Make floor object
make object box 1,250,10,250
texture object 1,1
LM_AddObject( 1 )
LM_SetUVmapping( 1 , (256/5) , (256/5) , 36 )
`Make x object
load object "box.X",2
` scale object 2,30,30,30
position object 2,0,22,0
texture object 2,2
LM_AddObject( 2 )
`Start loop
do
`Mouse look
cx#=cx#+mousemovey()
cy#=cy#+mousemovex()
csx#=curveangle(cx#,csx#,1.5)
csy#=curveangle(cy#,csy#,1.5)
rotate camera wrapvalue(csx#),wrapvalue(csy#),0
`Move camera
if keystate(17)=1 or upkey()=1 then move camera 2
if keystate(31)=1 or downkey()=1 then move camera -2
`Set lights 1 and 2 to camera pos
if mouseclick()=1
LM_PositionLight( 1 , camera position x() , camera position y() , camera position z() )
position object 101, camera position x() , camera position y() , camera position z()
endif
if mouseclick()=2
LM_PositionLight( 2 , camera position x() , camera position y() , camera position z() )
position object 102, camera position x() , camera position y() , camera position z()
endif
`Render lightmap
if spacekey()=1 then Pixels=LM_GenerateLightMap( 500 )
`Text calculated pixels
text 5,5,str$(Pixels)
`Paste lightmap images
if controlkey()=1
for t=500 to 505
if image exist(t)=1 then paste image t,(t-500)*256,0
next t
endif
`End loop
position mouse 400,300
sync
loop