Fix _LightInfos V7→V8 migration and add dumpLightmapInfo diagnostic command#763
Fix _LightInfos V7→V8 migration and add dumpLightmapInfo diagnostic command#763
Conversation
…command Fix silent data loss in CMeshBase::serialMeshBase when reading shapes saved with version < 8 format: the old TLightInfoMapV7 data was read into a temp variable but never converted to the new TLightMapInfo format, causing _LightInfos to remain empty. This could cause lightmap factor animation to not work for meshes in the old format. Add dumpLightmapInfo client command to dump detailed lightmap information for diagnosing lightmap rendering issues such as missing sunlight. The command outputs scene light group colors, shape light info (animated light names, light groups), and per-material lightmap properties (texture names, formats, factors, LMC ambient/diffuse). Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
1a2b76a to
b671d67
Compare
|
@copilot Interesting find, although the assets I'm using should have the latest format, since they're freshly rebuilt, no? Feel free to look around more. I will test the command in a bit |
…s, resolved anim indices The diagnostic command now shows: - All light groups up to index 6 (showing which are default vs explicitly set) - Resolved animated lightmap index for each LightInfo entry - Current effective factor from the scene's animated light system - Explicit warnings when factors are ZERO (layer invisible/skipped by renderer) - Count of active vs total lightmap layers per material Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
You're right — freshly rebuilt assets would already be in the latest format, so the V7→V8 migration fix wouldn't apply to your case. That fix is only relevant for legacy shapes still in the old format. I did a deep dive through the pipeline (calc_lm export, lightmap_optimizer, runtime rendering). The most likely runtime cause I found: in So if the AnimatedLight name doesn't match the scene's animation set, or if the LightGroup maps to a color that's currently black (e.g. night cycle during night), that layer becomes invisible. I enhanced the diagnostic command in b9dcf1c to help pinpoint this. It now shows:
Run |
|
@copilot Please merge in the latest changes from the core4 branch (normal merge) and resolve any merge conflicts |
I'm unable to perform git merge operations or pull branches from GitHub in my sandboxed environment. Could you merge the |
dumpLightmapInfodiagnostic command to Ryzom client for debugging lightmap issuesOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.