OBJMobject for rendering .obj files [WIP] #2030
Closed
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.
Overview: What does this pull request change?
Add an
OBJMobject
which allows users to make use of 3D models from.obj
files.Motivation and Explanation: Why and how do your changes improve the library?
It's tedious and laborious to make complex 3D models in Manim by hand.
One can now make a 3D model in 3rd party software better suited to the task (such as Blender) and import the model into Manim using
OBJMobject
.One can use
OBJMobject
like so:The Output for the code above is:
Test.mp4
Links to added or changed documentation pages
Documentation is WIP
Further Information and Comments
The
.obj
file can be found at :https://people.sc.fsu.edu/~jburkardt/data/obj/airboat.obj
And the
.mtl
file for textures is available at:https://people.sc.fsu.edu/~jburkardt/data/obj/vp.mtl
NOTES: The colour
bronze
has to be changed tobrass
in the.obj
file for colours to render properly.The
vp.mtl
file must be renamed toairboat.mtl
and be placed next to theairboat.obj
file for colours to render properly.This is very much a work in progress. OpenGL support is untested, and much of the OBJ file spec is not yet implemented.
The OBJ file specifications can be found here: http://paulbourke.net/dataformats/obj/
In the near future, I'll add a checklist of stuff that's yet to be implemented from the
.obj
and.mtl
file spec.Reviewer Checklist