Page MenuHomePhabricator

Visualisation issue for a 3D file (.stl) in commons (problem with the origin of the camera)
Closed, ResolvedPublic

Description

The file https://commons.wikimedia.org/wiki/File:High_quality_skull.stl is correctly displayed with the application MeshLab (or with "Mixed Reality Viewer") when downloaded but in the wikimedia preview it is just black.
We need to zoom out to actually see the object in the browser.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This file has a related problem : https://commons.wikimedia.org/wiki/File:Wave_Deformation_Using_a_3D_Deformer.stl
The camera is located on the back of a 1-side object.

The file https://commons.wikimedia.org/wiki/File:High_quality_skull.stl is correctly displayed with the application MeshLab (or with "Mixed Reality Viewer") when downloaded but in the wikimedia preview it is just black.

The problem is the near frustum on the camera is set to 1, which is wrong for some models depending on the units used. Setting it to 0.001 works fine.

This file has a related problem : https://commons.wikimedia.org/wiki/File:Wave_Deformation_Using_a_3D_Deformer.stl
The camera is located on the back of a 1-side object.

That second file is affected by T188956, and is not the same issue.

Change 417334 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/3D@master] Use shorter near frustum on camera to fix close-up models

https://gerrit.wikimedia.org/r/417334

Change 417338 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[3d2png@master] [WIP] Use shorter near frustum on camera to fix close-up models

https://gerrit.wikimedia.org/r/417338

Ramsey-WMF triaged this task as Medium priority.
Ramsey-WMF moved this task from Untriaged to Triaged on the Multimedia board.

Change 417334 merged by jenkins-bot:
[mediawiki/extensions/3D@master] Use shorter near frustum on camera to fix close-up models

https://gerrit.wikimedia.org/r/417334

Change 417338 merged by Matthias Mullie:
[3d2png@master] Use shorter near frustum on camera to fix close-up models

https://gerrit.wikimedia.org/r/417338

Good job ! :-)

Last detail is that the preview image is still black. I guess it just need to be regenerated. How can it be done ?
https://commons.wikimedia.org/wiki/File:High_quality_skull.stl

@Jona to fix the thumbnail, an update to 3d2png is required I think. A new version released and a deploy of that new version to the wikimedia servers.

Indeed. The relevant thumbnailing code (3d2png) hasn't been deployed yet.
Some of the old thumbnailer servers got repurposed and that prevented deployment from going through. Once https://gerrit.wikimedia.org/r/#/c/421247/ is merged, I'll redeploy the 3d2png changes & purge the (now) broken thumbnails.