Page MenuHomePhabricator

Uploading and Displaying 3D files with Fallback
Closed, DuplicatePublic

Description

My name Is Mostafa Mohamed currently a student in Ain Shams University in Egypt.
Contact Information:
Email: snhkicker@hotmail.com

Reasons for proposal:
I've been a fan of WikiBooks for a long time i learned from them a great deal and have been learning from them for past 2-3+ Years when Most of the books were still incomplete and i fallback to them alot to remember things till now.
Allowing Users to get 3D objects and view them in Blender book Noob to Pro will give the Readers a huge push allowing them to download the files and even looking at them will provide great hands on experience.
The rise in 3D printers and 3D in general will require wikipedia to work for a better implementation and having a good start will prove to be of value to the overall picture.

Benifits to Wikipedia Community:
3D elements will be displayed in Games related pages , 3D tools pages , 3D printers related,Books etc..

Deliverables:
(Pre Start) Finalizing the Required and optional formats:

(required) X3d
(optional) blend ,collada

(Mid term evaluations) A working upload mechanism to upload 3D files and a basic working Display of files

(required) Partial Documentation,Full upload Mechanism, Partial Display
(optional) Test Cases,Full Display

(Final evaluations) A fully working upload mechanism and Displaying

(required) Test Cases, Full Documentation of work, 100% tested and working Implementation
(optional) Extra Formats

Implementation Details:
The task is split in 2 parts {Uploading , Viewing} that i will adress:
Uploading:

  1. Uploading a 3D file in X3d format to wiki by user will send him to a special page similar to the one in https://www.mediawiki.org/wiki/Extension:Form .
  2. The user is then prompted to upload a X3D or any other optional formats and a fall back picture and text.(and maybe a .blend file but unlikely as we will need to check this too(maybe a different file than x3d intended as spam??))
  3. The changes are saved normally like all other uploads
  4. The uploads are reviewed by wikipedia members by using display extension

Displaying: clicking on a 3D asset will fire this
X3d Dom is the standard implementation in displaying 3D files and will likely be the same in long future as other solutions are alot harder.

  1. My understanding of wikipedia content delivery is that the related content to a certian page will be batched together by mediawiki in a module in this case we will add the x3d Dom facilitities needed to display x3d code
  2. we will use this content to embed it in an iframe with a download button next to it (through a JS file )
  3. The user closes the page and he returns to a normal working wikipedia page

Notes:

  1. the reason i choose this is to minimize any possible regression to normal user experience in case something goes wrong only 3D page will be affected which requires users clicking it which embeds it in an iframe making it very hard to corrupt
  2. having a special page will allow for better control over it in future as your not bound to the usual user experience viewing an html page

Why me:
I'm Very motivated for this project as i love open source software and have been using blender now for about a half a year.
I'm good in many Programming languages and frameworks:
PHP/Pyhon/JS/C/C++/Lua/Java/C#/SQL
I'm self driven and i'm confident i can do this project.

Event Timeline

@Snhkicker Hello!
While you have mentioned what you plan to do, you haven't mentioned *how* you plan to do it. We have an application template here: https://m.mediawiki.org/wiki/Outreach_programs/Application_template that students are expected to follow.
Thank you!

Niharika raised the priority of this task from Low to Medium.
Niharika removed a project: Possible-Tech-Projects.
Niharika set Security to None.

Implementation Details:
The task is split in 2 parts {Uploading , Viewing} that i will adress:
Uploading:

  1. Uploading a 3D file in X3d format to wiki by user will send him to a special page similar to the one in https://www.mediawiki.org/wiki/Extension:Form .
  2. The user is then prompted to upload a X3D or any other optional formats and a fall back picture and text.(and maybe a .blend file but unlikely as we will need to check this too(maybe a different file than x3d intended as spam??))
  3. The changes are saved normally like all other uploads
  4. The uploads are reviewed by wikipedia members by using display extension

Displaying: clicking on a 3D asset will fire this
X3d Dom is the standard implementation in displaying 3D files and will likely be the same in long future as other solutions are alot harder.

  1. My understanding of wikipedia content delivery is that the related content to a certian page will be batched together by mediawiki in a module in this case we will add the x3d Dom facilitities needed to display x3d code
  2. we will use this content to embed it in an iframe with a download button next to it (through a JS file )
  3. The user closes the page and he returns to a normal working wikipedia page

Notes:

  1. the reason i choose this is to minimize any possible regression to normal user experience in case something goes wrong only 3D page will be affected which requires users clicking it which embeds it in an iframe making it very hard to corrupt
  2. having a special page will allow for better control over it in future as your not bound to the usual user experience viewing an html page

@Snhkicker, you should add this information to the task Description above. Click on "Edit Task" on the right and then add this text in the Description box.

Im not super familar with the x3d format, but i believe it allows arbitrary scripts and loading network resources. Sanitizing it so it is safe may be a significant part of the project. Security of x3dom could also be a potential rough spot (if somebody has to review it, its probably really big)

I believe x3d usually requires external resources (e.g. textures). Our current upload pipeline assumes that every media file is self contained. Dealing with this may be non trivial unless restricting to data uris is an option. I believe there is discussion on either wikitech-l or multimedia mailing lists from about this time last year discussing that issue.

@Snhkicker , can you provide links to any other software related activities you have been involved with. e.g. github account, stackexchange account, etc, etc.

Have you created an account in Gerrit (https://gerrit.wikimedia.org/) and fixed some bugs?

http://www.x3dom.org/?page_id=1101 is what i mean by x3d format it can be done for maya too but not for 3dmax without a paid extension(or something like that).

wont having a separate page fix the "external resources" needed as it can be put in automatically and my basic understanding of resource loader from here
https://www.mediawiki.org/w/index.php?title=File:ResourceLoader_Wikimania_2011.pdf&page=12
is that i can group the data required? i'm not sure of details but i looked at php code and thought it wasn't that hard(but maybe i'm wrong).

for review part i think this is either not a concern or a big 1 the review is done through the same special page as the normal viewing so i think only the reviewer is affected and max thing that could happen is closing that page? or is it about having an x3d file on server without review the risk you mean? @Bawolff

That is what i understood or are we talking about reviewing https://github.com/x3dom/x3dom ?

I think you misunderstand me. By external resources i mean extra media
assets that go along with the x3d file. Im given to understand that x3d
files are often not self contained but also need texture files, etc. But im
not too familar with the format so i may be mistaken. Im not concerned
about loading the data but about the interface for users to upload
dependent files (if that is truly needed).

For review, i mean we might not want to use the x3dom library without
giving it a security review first, and the logistics of that might be
hairy, maybe. But there is not much you can do about that and it would be
more a concern of your mentors should your project get selected (imo)

Qgil added a subscriber: csteipp.

For the security review part, if we have candidate(s), mentors, and community excited about this project, we don't need to require the pass through a security review as part of the GSoC project BUT we should now in advance whether @csteipp thinks that this is a feasible idea or just a crazy one that will never make it to Wikimedia servers.

I'm adding Application Security Reviews just as a formal way to request this security pre-assessment. No need to commit to a security review at this point.

If the script is going to be loaded in an off-domain iframe, we can be fairly lax about security. (The capability to do that in a generalized, reusable way could be an interesting goal in itself - see e.g. T31242 or T27854.)

In T93679#1148227, @Tgr wrote:

If the script is going to be loaded in an off-domain iframe, we can be fairly lax about security. (The capability to do that in a generalized, reusable way could be an interesting goal in itself - see e.g. T31242 or T27854.)

Thats a good point. Id love to see that approach taken for media things.

This link is to a heroku site i made to prove what i'm thinking and to show you the possible problems associated
https://obscure-bastion-1916.herokuapp.com/
this is the idea i'm currently thinking of:
the users can click image to go to the Special page containing 3D display just so we are on same baseline ofcourse this isn't mediawiki website but this is just how i think workflow should go
1-Is the default blender startup scene
2-Is 3 Random models from internet that i got as 3DS and turned to X3D using blender
3-Is a Random ready X3D that i download with the normal plane as a mirror preventing looking from below

This isn't even close to final intended result but this is just an overview

for the micro-task i'm currently working on that i cant find anything similar to this project in phabricator , i'm going to do any micro-task i can find
is there anything else required from me?

This comment was removed by Snhkicker.

Some potential microtasks (these might not be perfectly on topic but hopefully kind of relavent. I havent looked at them in detail, so possible difficulty is different then what i expect and they might be much harder than a microtask should be. If you have different tasks you want to do/or are working on, feel free to do those instead): T91075 , T88219, T75935 (in thumb.php), T58064

Other things you can do is try to convince two mentors to commit to mentoring your project. This will significantly increase your chances (note: just to be clear i am not participating as a mentor in gsoc)

Maybe @Rillke or @Gilles can suggest a microtask (or just give advice in general)? The #chemical-markup project is fairly similar to this one.

  • Creating thumbnails is essentially for getting media handling extensions installed at any Wikimedia Wiki. Making different smart proposals how one could resolve T68852 could be a beginning.
  • Since file type verification will play an important role, T48921 could be interesting to have a look at and eventually fixing it should be possible, although I wouldn't call it a micro-task.
  • Given this project will deal with JavaScript T56012 should be relatively easy to squash and I'd volunteer doing code review on that. It's currently assigned to me, so if you're going to start coding on it, take it over.

Please don't take the above notes too serious, @Bawolff has much more experience and probably a better sense of what could be achieved with T93679#1150788.

Ok, I removed Application Security Reviews for now. But the most important part now: we need mentors!

@MarkTraceur, are you in? Who else?

This comment was removed by JeanFred.
In T93679#1152649, @NiharikaKohli wrote:

@JeanFred volunteered as a co-mentor.

I certainly don’t recall doing so :-D Sorry for the misunderstanding, not sure I’d be able to commit to this.

In T93679#1152649, @NiharikaKohli wrote:

@JeanFred volunteered as a co-mentor.

I certainly don’t recall doing so :-D Sorry for the misunderstanding, not sure I’d be able to commit to this.

Whoops. Sorry. I misunderstood. It'd be great if you could consider being a co-mentor anyway. :)

@Snhkicker, have you completed any or are you working on any microtasks for this project? I see quite a few came up in the comments.

isn't it too late to submit a microtask for GSOC?
can i do it in next 2 days?

@Snhkicker, you can still submit a microtask. But I'm afraid it might not be counted towards the evaluation of the application since mentors have begun evaluating proposals already. We are not considering any further changes in student proposals towards their evaluation. Thank you.

@Snhkicker If you need any help resolving the microtask, please e-mail me or write on my talk page at Commons. In IRC ( MediaWiki-General and #wikimedia-dev ) there are usually incredibly helpful people in case of urgent matters.