Commons:Textured 3D
Wikimedia Commons doesn't support textured 3D models at the moment, this page is here to track the progress to change that. It will also contain a list of resources and links to get involved, as well as some example 3D models, that would fit on Commons in the future.
Significant urgency due to current developments
[edit]The current issues surrounding Sketchfab show how important a non-commercial platform for sharing and visualising textured 3D models would be. Tens of thousands of 3D models under free licences are under threat, and in a petition to Sketchfab it is said that "this is the virtual equivalent of burning the Library of Alexandria". Here is a petition with lots of background information.
Technical progress
[edit]- Support full colour 3D models on Wikimedia projects: Main bug on Phabricator
- Support for GLTF Similar bugs on Phabricator
Discussions
[edit]Technical realisation
[edit]Formats
[edit]There are several open standards for textured 3D models. Concrete wishes for integration exist for the following formats:
The glTF (Graphics Library Transmission Format) file format is an open standard for textured three-dimensional scenes and models (ISO/IEC 12113:2022). The extension .glb is the binary version of this format. Work has already been carried out for this format to extend the MediaWiki Extension:3D.
Data preprocessing
[edit]- model orientation (which direction is up, forward)
- GLB: should be Y-Up
- STL: not defined, but most models in WikiMedia are Z-Up, that's why we should stick with it
- file size
- performance
- materials, textures, lighting, and appearance
- maybe here? https://commons.wikimedia.org/wiki/Commons:3D_models
Technical realisation to date
[edit]The following components would need to be revised for .glb support:
- System change: core's mime.info
- Update Extension:3D
- Update 3d2png thumbnail generator
Preliminary considerations for the update: Three.js v163 removed support for WebGL 1, but 3d2png depends on headless-gl, which only supports WebGL 1. For consistency we should stick with three.js v162.
- Update Extension 3D - Status of the work
- A prototype for a viewer was developed based on three.js 162. This also supports KTX2 compression. STL & GLB models can be selected, and own models can be uploaded.
- Patch of current Extension 3D on base of three.js 162, only for STL: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/3D/+/1098815
- Functional, but final adjustments to the lighting system are missing.ki/extensions/3D/+/1098815
- Test with GLB Support: https://github.com/OpenDEM/MediaWiki_Extension_3D_GLB/
- Update 3d2png thumbnail generator - Status of the work
- Patch for only STL based on three.js 162: https://github.com/OpenDEM/3d2png
- Light system does not work properly, because RoomEnvironment does not work with headless GL. Help wanted! Have a look at GitHub for more information.
- Basic GLB Support - https://github.com/OpenDEM/3D2PNG_GLB_Support
- Only very basis support yet. Many things don't work out of the box with headless gl.
- GLB files for testing:
- The images of the textures were extracted here and later used as DataTexture. There are probably better ways.
- TODOs:
- support image format WebP
- support of other image formats?
- support KTX2
- support multiple images (e.g. https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/Avocado/glTF-Binary)
- support multiple textures
- support multiple meshes
- fitting the model better into the picture
- code clean up and review
- The lights need to be revised. RoomEnvironment is not working with headless rendering.
- Alternative thumbnail generators
- https://github.com/Shopify/screenshot-glb - The module relies on using puppeteer to spawn a headless instance of Chrome to render Google's web component with the GLB model loaded.
- https://github.com/f3d-app/f3d - C++
- What are the MediaWiki system requirements?
- Patch for only STL based on three.js 162: https://github.com/OpenDEM/3d2png
- Update mime.info - Status of the work
- GLB: Realised with magic number.
- STL: Mime type sniffing could possibly be improved here with PHP 8.
- Data preprocessing information - Status of the work
- Maybe on a special page?
Future Requirements Viewer/Thumbnail generator
[edit]- Security concerns: The three.js version could be upgraded past v162 after either
- headless-gl supports WebGL 2
- three.js WebGPU support is stable and a stable Node.js WebGPU implementation exists.
- It'd be good to rotate the camera around the object, instead of rotating the object itself. The current behaviour is unintuitive GitHub Issue.
Content to better integrate in this article:
[edit]Featuring 3D renderings of notable objects and places offers great opportunities for improving Wikipedia articles by making them both more engaging for readers whilst also helping them better comprehend the subject.
Support for featuring 3D renderings of objects has become increasingly common and better supported on the internet generally; however this support is not currently matched on Wikimedia Commons thereby limiting Wikipedia's ability to feature 3D objects.
As stated in a blog post on the publication of the original basic 3D support in Commons (source below):
In the future, after feedback from our community of volunteer editors, we’ll consider adding support for even more complex file types that support features like textures.
The time to add support for these features is now. Most modern smartphones are able to create 3D-Scans of smaller objects or even complete buildings rights now and there is no way to upload and display them in Wikimedia projects! There are several large sources of free textured 3D models.
Possible use cases of colorful, interactive and complex 3d models in Wikipedia articles:
- models of extinct species like dinosaur reconstructions
- the inside of historical rooms (example)
- all kinds of smaller interesting objects
Resources:
- Upcoming presentation at Wikimania about this topic
- Commons page describing the support at the moment
- Old Discussion: Hosting files for 3D models and a user page proposal
- Wishlist Survey 2016, where support for STL was added and related blog post
- Task to track the new implementation
- Poster for Wikimania by Discott
Wikimania poster and meetup
[edit]I have a number of photogrametric 3D models on Commons, all of which would benefit from texturing: even in simple cases, texturing gives indications of materials (is a statue made of bronze, marble, clay...?), and conveys verisimilitude through little details such as weathering or ambient occlusion.
More importantly, some models suffer greatly from being only clay models: for instance polychrome archaeological artefacts are improperly represented by clay models.
-
polychrome archaeological artefact improperly represented by an untextured model: 3D clay model gives volumes but misrepresents colours
-
polychrome archaeological artefact improperly represented by an untextured model: photograph gives colours but not volumes
-
Model looks damaged (nose)
-
Texture gives information that the damage is on the object rather than on the 3D model.
Finally, on the technical side, not having textures forces us to upload high polygon models. The possibility to embed bump maps and displacement maps would allow conveying the same amount of detail with much smaller models (one order of magnitude fewer polygons at least).