TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

[GGC] Lightmapping issue: Some entities crash the lightmapper #979

Closed AvengingEagle closed 2 years ago

AvengingEagle commented 3 years ago

I've got this tiny little (dynamic) marker entity that runs a script when the player gets close. The entity itself is extremely simple and has a single texture. It worked in previous iterations of the lightmapper.

light_tests02

Now, whenever I try to lightmap the level containing this entity, it fails during the loading phase before any maps have been created, resulting in my level disappearing (or going back to real-time lighting).

notideal

I can only conclude that the dbo is somehow being corrupted by the lightmapper. The only fix I have found so far is to remove all instances of this entity from the level, save, and then re-lightmap without the entity. I'm now experimenting with remaking the marker again by re-importing the mesh into the object importer (i.e. forcing GG to create a new dbo file) to see if that solves the problem.

Here is the fpe to the original marker entity btw:

;header
desc          = Torch recharge
;visualinfo
textured      = marker.dds
effect        = effectbank\reloaded\apbr_basic.fx
castshadow    = -1

;orientation
model         = marker.dbo
offx          = 0
offy          = 0
offz          = 0
rotx          = 0
roty          = 0
rotz          = 0
scale         = 10
defaultstatic = 0
defaultheight = 50
isimmobile    = 1
materialindex = 0
collisionmode = 11
alwaysactive  = 1

;physics shapes
physicscount     = 0
physics          = 0

;statistics
strength      = 25
explodable    = 0

;ai
aimain           = AE/recharge.lua

;spawn
spawnmax      = 0
spawndelay    = 0
spawnqty      = 0
plemsoft commented 3 years ago

@AvengingEagle Thanks for reporting this issue, this is a strange one the lightmapper will not do anything with it when you use "defaultstatic = 0" , so it must be something else ? , could you try to sent me your "Guru-MapEditor.log" file from when you get the crash , also if your able to email me the object i will be able to reproduce it and check what the problem is: plemsoft@plemsoft.com

Thanks for your help :)

plemsoft commented 3 years ago

@AvengingEagle Found the issue.

The problem is with your fpe files and the wrong way you use the physics shape commands. In your fpe file you have:

;physics shapes physicscount = 0 physics = 0

This command "physics = 0" is normally used to define the physics shape and take 10 parameters the correct way to use this command could be like this: "physics = "0,25.5290908813,2.29309940338,19.765586853,0,0,0,0,0,0"

Anyway the old lightmapper do not check if the command is valid and will expect the additional parameters, the parser will crash if they are not there. This has been fixed and it will ignore it from the next update :)

I searched all my .fpe files and only found this problem in your assets like the "Light effects" pack and some of your other models, even if this is fixed and will not crash from the next version , i suggest you remove these lines from your fpe files:

;physics shapes physicscount = 0 physics = 0

So if a user that purchased any of your packs/models and still have a older Classic version, then it will not crash the lightmapper, thanks for your help :)