SaladDais / Hippolyzer

Intercepting proxy + analysis toolkit for Second Life compatible virtual worlds
GNU Lesser General Public License v3.0
13 stars 5 forks source link

LLMesh -> Collada -> LLMesh conversion code to allow for in-proxy mesh upload #24

Open SaladDais opened 2 years ago

SaladDais commented 2 years ago

This would be a good first step to writing mesh upload code totally independent of the viewer, allowing prototyping of new importer features like glTF support (via https://github.com/SaladDais/impasse,) as well as file watchers for the local mesh feature.

Having code to allow round-tripping LLMesh -> Collada -> LLMesh is probably the easiest way to ensure we haven't gotten confused about LLMesh or Collada semantics in our import code.

We should make an example .dae that uses joint positions, vertex weights, multiple materials and multiple instances of the same mesh data, and then log the LLMesh-serialized version the viewer's uploader sends off to make sure that:

SaladDais commented 2 years ago

There's a basic version of LLMesh -> Collada in https://github.com/SaladDais/Hippolyzer/blob/master/hippolyzer/lib/base/colladatools.py, and I have a very very basic version of .fbx and .gltf -> LLMesh conversion and upload using assimp working in a local branch. Upload of basic mesh without rigging from .fbx seems to mostly work, with UVs and normals correctly handled.

Still need to figure out the exact deal with the transforms SL does on mesh data on upload, even with my mesh manually resized to fit within a 1m cubed bounding box I'm still getting slightly different results than SL's uploader. Will start to add round-tripping tests once I've figured that out.