6

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

My mid-term goal is to enhance a MediaWiki wiki with 3D display of objects described in pages, with orbit camera. I see it as a tool for presenting the contents of the universe we're developping.

I want nothing fancy or difficult to do per se, I know how to do that with standard Wavefront .OBJ and .MTL files, and it's quite enough for me. But it's the wiki integration that worries me.

The base idea would be to first upload the various files (models, materials, textures) as wiki files typed by their extension, then having the extension add a wikicode item or a template to use them at will from their wiki URLs.

If we stay with the .OBJ/.MTL example :
- .MTL would be displayed as materials applied on a sphere with some obejcts bouncing around to see mirror effects, with adjustable ambient/background for contrast,
- .OBJ would be displayed by blankly applying its materials, also with adjustable ambient/background.

Is there already such an extension or at least a framework that could be used and expanded into it, or is it up to me to develop, knowing I probably'll have neither the skill nor the time?

2
  • For what it's worth, there's JMOL, which shows 3d objects, but not using WebGL. mediawiki.org/wiki/Extension:Jmol Commented Nov 27, 2012 at 13:08
  • Interesting, but too specialized for me, I wanna display starships ^-^
    – Mutos
    Commented Nov 29, 2012 at 12:29

2 Answers 2

1

If you just want to display models you might want to take a look at x3dom. I don't know what steps you'd need tointegrate it into mediawiki though.

On the other hand, on the Khronos WebGL Wiki we use some iframe plugin to let us put random WebGL samples on the wiki.

5
  • Thanks gman for the answer, I'll go and see what features these softs give !
    – Mutos
    Commented Nov 28, 2012 at 8:02
  • Hi gman, I'm testing the iframe plugin and it should be fit for what I want !
    – Mutos
    Commented Nov 28, 2012 at 9:49
  • This way, we'll just upload our models/materials/textures into an area of our site, wrap them into a Three.js page for display, using the same script with parameters for displaying all models, and just include this page into a widget inside the wiki...
    – Mutos
    Commented Nov 28, 2012 at 10:32
  • And gman, I ike your site and the way you explain WebGL, it's simple and understandable !
    – Mutos
    Commented Nov 28, 2012 at 11:17
  • Hi all, I've explored the iframe plugin and devised a specific plugin for my obj/mtl models viewer, which is shown in the following page : test.hoshikaze.net/hk-wiki/index.php?title=TestWidgetWebGL, of course it's a test page so it can disappear without warning, but it shows a small example of what can be done with using Three.js in a wiki. It will still evolve, particularly to take into account non-existent files or non-webGL-enabled browsers.
    – Mutos
    Commented Dec 5, 2012 at 7:37
1

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

NB : They works as 'Freemium', the first 500Mo are free after that you have to pay some dollars every month.

1
  • Hi @x4vier Tanks for the hint, I've seen that, it's just that it's not 500Mo, but 10 x 50Mo models, and I may have more than 10 models of each less than 50Mo, so it won't do for me.
    – Mutos
    Commented Nov 28, 2012 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.