WolvenKit / WolvenKit

Community Mod editor/creator for REDengine games.
http://redmodding.org/
GNU General Public License v3.0
928 stars 168 forks source link

Anims: Export/Import Events #1446

Open effs opened 11 months ago

effs commented 11 months ago

Each animation can have event definitions attached to them (maybe used by animgraphs?) See if these can be exported in some reasonable way alongside the GLTF rather than having to rely on external linkage. NB: there are several event types.

kmirea commented 11 months ago

There is one or 2 Events of particular importance, AnimEvent_WorkSpotItem / AnimEvent_SceneItem. either or both responsible for spawning of props. one example being teh guitar playing anim, it would reference the actual GUITAR PICK prop (Entity and/or Mesh/Rig) as a TweakDB hash (can we look these up now ? back then would have to hash all strings in props tweak entries, and find a match).

With regards to phased events, u have a start/end frame etc. Could we not maybe assign them to an NLA track or some such, or even a temp armature with bones representing their values (whether step or linear) viewable in graph view (?) - Or what about an unparented bone within existing armature ?. Just a thought, most of these, or at least the walk related ones, are built in , and wouldnt really change in any way unless one was modifying default locomotion anims, eg making a stride longer or shorter, affecting frame count for each footPhase

-Loomy/Jono

effs commented 11 months ago

Doc Presto's working on the animgraph on the Blender plugin side — not sure if all this is figured out already, but I think ideally we'll be able to maintain the red4 division so that .anims include the events the animations emit (?) and .animgraphs (exported as .json) contains the graph.

Might need to start exporting these together?

Simarilius-uk commented 11 months ago

2 files rather than 1 sounds like a bad idea to me.

DoctorPresto commented 11 months ago

The animgraphs need to stay separate from the animations. Some of them are absolutely giant, even bigger than many questphases. they're basically the connections between multiple rigs/anims. They're not needed for everyone so we definitely shouldn't include them in the gltf.

"Events" is a property you'll see in wolvenkit right now that relates to specific moments in the anim. We already have all the key frame information for them and are only lacking the names. If you take a look at how they get serialized to Json when you convert .anims to .json right now, that would be perfect for me

kmirea commented 11 months ago

the animEvents, afaik have a really small footprint (no pun intended :P), while they would more than likely not be needed or used, could one just store it in gltf extradata in some serialized or flattened/non-prettified json ?

DoctorPresto commented 11 months ago

That's exactly what I'd like yup

DoctorPresto commented 11 months ago

They're not necessary but I've got all the info to add them as poses so having names is nice