Miscellaneous tips and discoveries
#2
Material animations won't stop cycling?

My current Age project requires lighting changes. Since Plasma realtime lighting is expensive at game render time, and since RT lights are only applicable if the light's source or recipient is animated, lighting changes on static meshes are best done by animating values on the mesh objects' materials.

BUT doing this has plagued me for years: my materials would animate properly, but once started they would. not. stop.  - they would cycle endlessly. Didn't matter whether I'd un-ticked the material's "Loop" checkbox or not, didn't matter whether I added 'Stop Animation' or 'Set Looping Off' commands to the triggering responder.

Even Cyan had a problem with this: the KI-logo glow material in the Nexus is labeled KI-GlowStopLoopingDammit. (!)

Countless tests later (and a clue from Agebuilder Semjay), I came up with a workaround. But it was complex and tedious. More tests after that to pare down the workaround to something more efficient, and here's what I've learned - or what I've learned is true for me, at least: you may have entirely different results if you are using some other Max version.

Setting the responder's Material Animation to [Entire Animation]
   
in all cases either results in this error message when exporting
   
, or in some instances will export to a game where clickables produce a stack error when the responder executes.

However, if we 1) set the Material Animation to the material's named keys (as in your Note Track start and end points) exporting will produce the endlessly-cycling animation:
   

But NOW, that export seems to set some flag in Plasma for your Age file: if you then 2) revert to the [Entire Animation] setting(s), your export will complete without errors and your animated material will play properly, without cycling.

Weird. I think it's a bug. But it's not too difficult to get around, and this two-step process seems to work reliably.
Reply


Messages In This Thread
Material animations won't stop cycling? - by Emor D'ni Lap - 12-24-2024, 04:45 PM
A few camera tips - by Emor D'ni Lap - 12-25-2024, 10:14 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)