View 3D objects in MediaWiki?

I recently discovered WebGL and especially Three.js, which is the best API I've found so far for this. Right now, I'm just coding simple demos to display 3D models of starships from my main project, which is the Sci-Fi universe.

My medium-term goal is to improve the Wiki MediaWiki with a three-dimensional display of objects described on pages with an orbit camera. I see this as a tool for presenting the contents of the universe that we are developing.

I don’t want to do anything unusual or difficult on my own, I know how to do it with the standard Wavefront.OBJ and .MTL files, and this is quite enough for me. But I'm worried about wiki integration.

The main idea would be to first download the various files (models, materials, textures) as wiki files typed by their extension, and then add the wikicode extension or template to use them as you wish from your wiki URLs.

If we stay with the .OBJ / .MTL example:
-.MTL will be displayed as materials applied on the sphere, with some deviations bouncing around to see mirror effects, with adjustable external / background contrast,
-.OBJ will be displayed blank using its materials, as well as with an adjustable environment / background.

Is there such an extension, or at least a framework that could be used and expanded in it, or is it up to me to know that I probably will have neither skill nor time?

+6
source share
2 answers

If you just want to display models, you can take a look at x3dom . I don’t know what steps you would need to include in the media.

On the other hand, in the Khronos WebGL Wiki, we use an iframe plugin so that we can put arbitrary WebGL samples on the wiki.

+1
source

You should take a look at Sketchfab . This is a web application where you can upload your models, it will display it directly in WebGL. In the link above you will see their embed functions. There is no special MediaWiki code, but there is an API if you want.

NB: They work like Freemium, the first 500 million is free after you have to pay a few dollars every month.

+1
source

All Articles