H-uru / korman

Blender plugin for creating ages for Cyan Worlds' proprietary Plasma engine and its open source variant, CyanWorlds.com Engine.
GNU General Public License v3.0
34 stars 17 forks source link

Animating lamp energy generates invalid PotS files #78

Closed dpogue closed 6 years ago

dpogue commented 7 years ago

Animating the energy on an omni lamp will create a plOmniSqApplicator, which is correct for MOUL but that class doesn't exist in PotS. The result is that libHSPlasma writes a null creatable (0x8000) for the AGApplicator and the exported files cause other tools to crash.

We should either only generate the OmniSqApplicator for MOUL-compatible exports, or have some step in libHSPlasma to filter out unsupported classes without writing nulls.

dpogue commented 7 years ago

An addition to this (that should probably spawn a libHSPlasma bug) is that PotS exports have the wrong controllers inside the applicator for some lighting:

PotS should have plPointControllerChannel -> plSimplePosController -> plPoint3Controller MOUL should have plPointControllerChannel -> plLeafController

Korman is generating MOUL controllers and letting libHSPlasma downgrade them, but the downgrade process is producing plPointControllerChannel -> plPoint3Controller which crashes the game.

Hoikas commented 6 years ago

Note to self: for the addenum, libHSPlasma's plLeafController::ExpandToKeyController() needs to be corrected to produce the appropriate "Simple" controllers.

Hoikas commented 6 years ago

It appears that we will need to selectively remove inverse square omni light animations for PotS exports.

Deledrius commented 6 years ago

That sounds messy.

Hoikas commented 6 years ago

This can be closed when H-uru/libhsplasma#105 is merged.

Hoikas commented 6 years ago

Fixed by libHSPlasma merge