Obsidian Model Viewer: Embed 3D Models in Your Obsidian Vault
Summary
Obsidian Model Viewer is a powerful plugin that integrates interactive 3D models directly into your Obsidian vault. Utilizing Google's <model-viewer> component, it enables seamless viewing and embedding of glTF/GLB files within your notes. This enhances your knowledge base by allowing you to visualize complex 3D data alongside your text.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
The Obsidian Model Viewer plugin brings the power of interactive 3D models directly into your Obsidian notes. Developed by janispritzkau, this plugin leverages Google’s robust <model-viewer> component to display and embed 3D models in glTF/GLB format. It transforms your Obsidian vault into a richer environment for visualizing complex data, designs, or educational content.
Installation
To install the Obsidian Model Viewer plugin, follow these standard steps for community plugins within Obsidian:
- Open Obsidian and navigate to
Settings. - Go to
Community pluginsand ensureRestricted modeis turned off. - Click
Browseand search for 'Obsidian Model Viewer'. - Select the plugin, click
Install, and thenEnableit.
Examples
The plugin integrates seamlessly with Obsidian's native embed syntax. Here are some examples of how you can embed 3D models:
Basic Embed:
![[DamagedHelmet.glb]]
Specify Height:
![[Duck.glb#height=400]]
Specify Aspect Ratio:
![[Sponza.gltf#aspect=16:9]]
Specify Aspect Ratio and Width:
![[StainedGlassLamp.gltf#aspect=1|320]]
Multiple Models Side-by-Side:
![[A.glb|160]] ![[B.glb|160]] ![[C.glb|160]]
Using <model-viewer> Attributes:
You can also pass any attributes supported by the underlying <model-viewer> component.
![[Fox.glb#autoplay&camera-controls=false&camera-orbit=30deg+80deg+80%]]
For a full list of attributes, refer to the official <model-viewer> documentation.
Why Use Obsidian Model Viewer?
The Obsidian Model Viewer offers several compelling reasons to integrate it into your workflow:
- Rich Visualization: Directly view and interact with 3D models, making your notes more dynamic and informative.
- Extensive Format Support: It supports
.glband.gltffiles, including popular glTF extensions like Draco compression and PBR materials, ensuring high-quality rendering. - Seamless Obsidian Integration: Enjoy native Obsidian features such as file viewing, hover previews, and markdown embed syntax, all tailored for 3D models.
- Customization: Leverage the full power of
<model-viewer>attributes to customize model behavior, camera controls, and appearance directly from your notes. - Future-Proof Standard: Utilizes glTF, known as the 'JPEG of 3D', which is compact, compressible, and optimized for rapid GPU loading.
Links
Find more information and contribute to the project via the links below:
- GitHub Repository: https://github.com/janispritzkau/obsidian-model-viewer
- <model-viewer> Documentation: https://modelviewer.dev/docs/index.html