[Unity plugin] Add support for OBJ file import from MuJoCo scenes #2378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature handles OBJ mesh assets referenced in MJCF. It applies the scale to the OBJ mesh then saves it as a local asset in the project, after swizzling the mesh coordinates. An additional step is taken to enable read-write of mesh data from obj files. We flip around mesh faces if the scale has an odd number of negative numbers. In fact this is a missing detail from the STL parser, will add a fix for that soon in a separate PR.
A related feature included is by default now the mesh renderer is turned of Geoms with group >=3 (default function with Simulate). This will make imported scenes appear more similar to what is expected from the Simulate UI (commonly collision geoms are hidden by default using this approach).
This now enables importing many more menagerie models to Unity.
Addresses #2372