{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/844","labels_url":"https://api.github.com/repos/OpenMW/openmw/issues/844/labels{/name}","comments_url":"https://api.github.com/repos/OpenMW/openmw/issues/844/comments","events_url":"https://api.github.com/repos/OpenMW/openmw/issues/844/events","html_url":"https://github.com/OpenMW/openmw/pull/844","id":120603363,"number":844,"title":"First draft of serialization routines.","user":{"login":"cfcohen","id":2515512,"avatar_url":"https://avatars.githubusercontent.com/u/2515512?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcohen","html_url":"https://github.com/cfcohen","followers_url":"https://api.github.com/users/cfcohen/followers","following_url":"https://api.github.com/users/cfcohen/following{/other_user}","gists_url":"https://api.github.com/users/cfcohen/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcohen/subscriptions","organizations_url":"https://api.github.com/users/cfcohen/orgs","repos_url":"https://api.github.com/users/cfcohen/repos","events_url":"https://api.github.com/users/cfcohen/events{/privacy}","received_events_url":"https://api.github.com/users/cfcohen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenMW/openmw/labels/Discussion","name":"Discussion","color":"fbca04"},{"url":"https://api.github.com/repos/OpenMW/openmw/labels/Do%20not%20merge","name":"Do not merge","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":54,"created_at":"2015-12-06T02:44:20Z","updated_at":"2016-01-31T20:33:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenMW/openmw/pulls/844","html_url":"https://github.com/OpenMW/openmw/pull/844","diff_url":"https://github.com/OpenMW/openmw/pull/844.diff","patch_url":"https://github.com/OpenMW/openmw/pull/844.patch"},"body":"This isn't really a pull request, but rather a request for review and commentary (if you're willing).   My real goal here was to learn some more about OpenSceneGraph, the OSGB/OSGT file format, OpenMW, NIF, etc.  That has certainly happened. :-) As usual, I've reached the point where I'm in over my head, and could use your guidance regardless of whether you ever intend to accept this pull request.\r\n\r\nThe general idea is that there's a new command \"nifconv\" that initializes the engine just far enough to load meshes, and then invokes the OutputStream writer to serialize the object.   There are two new shared libraries that are loaded dynamically by OSG to both read and write the extended object types.   Long term, I'd like to be able to run completely off OSGB assets as a proof of concept.  I've successfully written most of the NIFs in standard distribution, but I don't claim that they're all working properly (just the writing completes without crashing).\r\n\r\nThere are known problems with this commit, including a memory corruption problem when serializing to OSGT format that doesn't appear to happen when serializing to OSGB format.   I continue to find the OSG serialization code fragile, and confusing. :-(  I'll comment in more detail on individual parts of the code where I have questions or specific requests for changes (some changes are just minor bug fixes in the current code)."},"comment":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/comments/177602820","html_url":"https://github.com/OpenMW/openmw/pull/844#issuecomment-177602820","issue_url":"https://api.github.com/repos/OpenMW/openmw/issues/844","id":177602820,"user":{"login":"cfcohen","id":2515512,"avatar_url":"https://avatars.githubusercontent.com/u/2515512?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcohen","html_url":"https://github.com/cfcohen","followers_url":"https://api.github.com/users/cfcohen/followers","following_url":"https://api.github.com/users/cfcohen/following{/other_user}","gists_url":"https://api.github.com/users/cfcohen/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcohen/subscriptions","organizations_url":"https://api.github.com/users/cfcohen/orgs","repos_url":"https://api.github.com/users/cfcohen/repos","events_url":"https://api.github.com/users/cfcohen/events{/privacy}","received_events_url":"https://api.github.com/users/cfcohen/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T20:33:37Z","updated_at":"2016-01-31T20:33:37Z","body":"Actually, I did mean speed.  It's approximately an order of magnitude slower than the NIF loader. :-(  One of my original goals was to see if I could load more cells with acceptable performance without having to multi-thread the resource loader (which currently seems to big for me and is on your list anyway).  I got distracted with learning and just getting it to work. When I returned to the performance issue it turned out to be a total fail. :-(\r\n\r\nAlthough I did find the OSG serializer awkward to work with, overly complicated and reliant on a couple of design decisions that I think are in very poor form (the library-based static object constructors is at the top of the list).  While it's a great general purpose serializer, I'm now convinced that it's not really appropriate for use in a performance sensitive context.   I've been thinking about an OSG protobuf based serializer, but there's nothing to show.\r\n\r\nAs an aside, I've found more than 2000 good animations at mixamo.com in BVH format that are free (royalty free use license), and I have been working on curve fitting algorithms to convert them to keyframe/channel format.  Working on the OSG resource loader helped me realize the extent to which all of the complicated bits are in the animation code, so that was very helpful.\r\n\r\nSince you suggested re-opening the pull request, I've done so.   I'd assumed that you would want to \"clean it up\" if it wasn't receiving active development.  I may return to this request at some point as well just to learn more about the physics code, bounding boxes etc."}}