"b3d files are export with hierachy fully intact, so it shouldn't be nescessary to split the models up again after export."
It's not that it has to be split up. The way my level files work. I have a number of premade level objects that
I use to build a level. They are currently .x models. They are loaded at run time and based on whether the player has
selected lightmaps or not the objects are either cloned if no light map and loaded individualy if there are light maps. There are also objects that cast shadows yet have no
light maps on their mesh. What would be nice is if I could load all the objects and position them based on where they are in the level then export the light map either for each object or one lightmap texture for several objects. right now I've built a level loader for YAL and I can set light positions in my level editor. I run the YAL tool against the level and it generates the light maps for each object but I admit gile[s] capabilities are a hundred times better.
What I'm using works for what I'm doing but for a higher
graphic edge it would be nice to be able to lightmap the
level with giles
That's the load function
Function LoadData(file$)
ClearAll()
file=ReadFile(file$)
ResourceDir$=ReadLine(file)
NextLevel$=ReadLine(file)
For x=0 To 300
For z=0 To 10
Path(x,z)\Y#=ReadLine(file)
Path(x,z)\start#=ReadLine(file)
Path(x,z)\mEnd#=ReadLine(file)
Path(x,z)\speed#=ReadLine(file)
Path(x,z)\jump#=ReadLine(file)
Path(x,z)\friction#=ReadLine(file)
Path(x,z)\X#=ReadLine(file)
Path(x,z)\Z#=ReadLine(file)
Path(x,z)\entity=ReadLine(file)
Path(x,z)\obstacle#=ReadLine(file)
Path(x,z)\PathType=ReadLine(file)
Path(x,z)\DecoType=ReadLine(file)
Path(x,z)\LifeType=ReadLine(file)
Path(x,z)\ItemType=ReadLine(file)
Path(x,z)\Decoentity=ReadLine(file)
Path(x,z)\Lifeentity=ReadLine(file)
Path(x,z)\ItemEntity=ReadLine(file)
Path(x,z)\LifeStart#=ReadLine(file)
Path(x,z)\LifeEnd#=ReadLine(file)
Path(x,z)\LifeHealth=ReadLine(file)
Path(x,z)\PathResource$=ReadLine(file)
Path(x,z)\DecoResource$=ReadLine(file)
Path(x,z)\Liferesource$=ReadLine(file)
Path(x,z)\ItemResource$=ReadLine(file)
Path(x,z)\BlockType=ReadLine(file)
Path(x,z)\DecoX#=ReadLine(file)
Path(x,z)\DecoY#=ReadLine(file)
Path(x,z)\DecoZ#=ReadLine(file)
Path(x,z)\ItemX#=ReadLine(file)
Path(x,z)\ItemY#=ReadLine(file)
Path(x,z)\ItemZ#=ReadLine(file)
Path(x,z)\ItemValue=ReadLine(file)
Path(x,z)\DropItem=ReadLine(file)
Path(x,z)\TriggerEntity=ReadLine(file)
Path(x,z)\TriggerType=ReadLine(file)
Path(x,z)\TriggerActive=ReadLine(file)
Path(x,z)\TriggerMessage$=ReadLine(file)
Path(x,z)\TriggerValue=ReadLine(file)
Path(x,z)\TriggerTarget1X=ReadLine(file)
Path(x,z)\TriggerTarget1Y=ReadLine(file)
Path(x,z)\TriggerTarget2X=ReadLine(file)
Path(x,z)\TriggerTarget2Y=ReadLine(file)
Path(x,z)\TriggerTarget3X=ReadLine(file)
Path(x,z)\TriggerTarget3Y=ReadLine(file)
Path(x,z)\TriggerTarget4X=ReadLine(file)
Path(x,z)\TriggerTarget4Y=ReadLine(file)
EntName$=Path(x,z)\Entity
DecoName$=Path(x,z)\Decoentity
LifeEntity$=Path(x,z)\Lifeentity
ItemEntity$=Path(x,z)\ItemEntity
If Path(x,z)\PathResource$<>""
If Path(x,z)\PathType<17 Or Path(x,z)\PathType>24
PPP$=Path(x,z)\PathResource$
Path(x,z)\entity=LoadMesh(PPP$)
UnWeld(Path(x,z)\entity)
EntityFX(Path(x,z)\entity, 1+16)
ScaleEntity path(x,z)\entity,0.05,0.05,0.05
PositionEntity path(x,z)\entity,Path(x,z)\X#*0.05,Path(x,z)\Y#*0.05,Path(x,z)\Z#*0.05
EntityPickMode(Path(x,z)\entity, 2)
NameEntity(Path(x,z)\entity, ("path"+EntName$))
TotalMesh=TotalMesh+1
Else
path(x,z)\Entity=0
EndIf
EndIf
If Path(x,z)\DecoResource$<>""
DDD$=Path(x,z)\DecoResource$
Path(x,z)\Decoentity=LoadMesh(DDD$)
UnWeld(Path(x,z)\Decoentity)
EntityFX(Path(x,z)\Decoentity, 1+16)
ScaleEntity path(x,z)\Decoentity,0.05,0.05,0.05
PositionEntity path(x,z)\Decoentity,Path(x,z)\DecoX#*0.05,Path(x,z)\DecoY#*0.05,Path(x,z)\DecoZ#*0.05
EntityPickMode(Path(x,z)\decoentity, 2)
NameEntity(Path(x,z)\decoentity, ("deco"+DecoName$))
TotalMesh=TotalMesh+1
EndIf
Next
Next
CloseFile file
End Function
I then hide all meshes except those immediately in range of the mesh that needs to be lightmapped and generate the lightmap for the mesh.