Creating 3d models and converting them into a form usable by WebGL - a beginners guide? - json

I'm looking for some simple (free!) entry level software that will allow me to create simple 3d models and export them in a format (JSON?) that can then be read into a webGL programme.
Simple geometry would be a start, then textures would be nice too... I've looked at Blender, and it's just far too advanced for me, and the tutorials I've found are hopeless.
Something simple like sketchup would be good, but afaik you can't export in JSON. I've found some converters that will do .dae to .json, but the ones I've found seem to be for advanced users.

WebGL is new enough that there aren't many packages like this built up around it just yet. That doesn't mean you don't have some options though:
Blender is a good modeler, and if you are willing to put a little bit more time into learning it you can use exporters from Three.js or some others that are around the net. This seems to be the most popular option at the moment.
Unity 3D is more of a scene builder than a modeling app, but it has a lot of ways to get content into it and both J3D and myself have implemented exporters from it.
Maya is a great modeling tool if you have a way to get access to it (it's commercial), and has Inka to get WebGL content out.
If you want to use something like SketchUp, it should be able to export to COLLADA, which can then be imported into Blender/Unity/What have you and exported from there using one of the previous methods.
As far as formats go, there's no real standards just yet. Most of the exporters will spit out JSON, mine uses a mix of JSON and Binary for speed/size, and some will actually give you Javascript code to execute. Which format to use probably depends on what you want to do with it. I encourage you to experiment with several and see what you like and what you don't.

Related

Mask R-CNN annotation tool

I’m new to deep learning and I was reading some state of art papers and I found that mask r-cnn is utterly used in segmentation and classification of images. I would like to apply it to my MSc project but I got some questions that you may be able to answer. I apologize if this isn’t the right place to do it.
First, I would like to know what are the best strategy to get the annotations. It seems kind of labor intensive and I’m not understanding if there is any easy way. Following that, I want to know if you know any annotation tool for mask r-cnn that generates the binary masks that are manually done by the user.
I hope this can turn into a productive and informative thread so any suggestion, experience would be highly appreciated.
Regards
You can use MASK-RCNN, I recommend it, is a two-stage framework, first you can scan the image and generate areas likely contain an object. And the second stage classifies the proposal drawing bounding boxes.
But the two-big question
how to train a model from scratch? And What happens when we want to
train our own dataset?
You can use annotations downloaded from the internet, or you can start creating your own annotations, this takes a lot of time!
You have tools like:
VIA GGC image annotator
http://www.robots.ox.ac.uk/~vgg/software/via/via_demo.html
it's online and you don't have to download any program. It is the one that I recommend you, save the images in a .json file, and so you can use the class of ballons that comes by default in SAMPLES in the framework MASK R-CNN, you would only have to put your json file and your images and to train your dataset.
But there are always more options, you have labellimg which is also used for annotation and is very well known but save the files in xml, you will have to make a few changes to your Class in python. You also have labelme, labelbox, etc.

Import ARIS into Rational System Architect

My basic problem is finding a way to import from an ARIS model to Rational System Architect. From what I understand from searching the IBM website and Google, it looks like it does not support loading 3rd party tools from XML (although the article is 5 years old and I cannot find anything newer). I have the export of ARIS and the DTD file to go along with it. However when I attempt to import into System Architect I get the following error...
The input contained no valid objects.
Which in my opinion makes sense - if its not setup to import from other products. But with that being said, does anyone know a way to achieve this? Searching online has yielded very little or poor results thus far.
Update - As an additional thought, I have been looking into DDL files. System architect seems to say it will work with them, however I have not been able to find out anything about how to create one using ARIS, or how they are used in general. This may end up being the solution, but sadly I am not well versed in this area yet.
The answer seems to have come down to two options.
Use a 3rd party tool to mediate the process, and convert it. Basically there is a number of other tools out there (such as ToolBus - which is the only one I found that worked for me) that convert from various applications to a single common model. From there it can be exported back to any application.
Depending on the models, the newer versions of SA can import BPMN models directly. Mind this only works for those - nothing else.

Scala libraries for a GUI with vector graphics

If I wanted to create a "good old" desktop GUI program with some basic selectable vector graphics (arrows, colored boxes, text) to show mostly text and some diagrams (no need for 3D or particles, etc.) that then can be edited by the user, which Scala library would I use, and why? I'd want to build a tool for something similar to drawing diagrams.
Mostly I don't want to use things like D3.js or other web SVG stuff because it is painfully slow and can't show the amounts of content I want it to. But if there are exceptional advantages by using, say, Scala.js, for this purpose, it could be still of interest if there are no better means.
Alternatively, someone can point me to where this had been discussed? Did not find anything on Google or here.
Scala-Swing is a wrapper for Java Swing which is quite nice. As you may know, below Swing lies Java2D, so you will most likely want to look for Java2D based libraries. There aren't that many for Scala that I'm aware of, but more for Java (which you can easily use).
JFreeChart and scala-chart - more for charting
JGraph
JUNG
Processing might have some libraries for your use case
JHotDraw - not sure it's still maintained
NetBeans - not sure it's still maintained
Prefuse
And of course, if it's simple enough, there is nothing wrong with using Java2D directly.

Weka: Limitations on what one can output as source?

I was consulting several references to discover how I may output trained Weka models into Java source code so that I may use the classifiers I am training in actual code for research applications I have been developing.
As I was playing with Weka 3.7, I noticed that while it does output Java code to its main text buffer when use simpler classification (supervised in my case this time) methods such as J48 decision tree, it removes the option (rather, it voids it by removing the ability to checkmark it and fades the text) to output Java code for RandomTree and RandomForest (which are the ones that give me the best performance in my situation).
Note: I am clicking on the "More Options" button and checking "Output source code:".
Does Weka not allow you to output RandomTree or RandomForest as Java code? If so, why? Or if it does and just doesn't put it in the output buffer (since RF is multiple decision trees which I imagine it doesn't want to waste buffer space), how does one go digging up where in the file system Weka outputs java code by default?
Are there any tricks to get Weka to give me my trained RandomForest as Java code? Or is Serialization of the output *.model files my only hope when it comes to RF and RandomTree?
Thanks in advance to those who provide help.
NOTE: (As an addendum to the answer provided below) If you run across a similar situation (requiring you to use your trained classifier/ML model in your code), I recommend following the links posted in the answer that was provided in response to my question. If you do not specifically need the Java code for the RandomForest, as an example, de-serializing the model works quite nicely and fits into Java application code, fulfilling its task as a trained model/hardened algorithm meant to predict future unlabelled instances.
RandomTree and RandomForest can't be output as Java code. I'm not sure for the reasoning why, but they don't implement the "Sourceable" interface.
This explains a little about outputting a classifier as Java code: Link 1
This shows which classifiers can be output as Java code: Link 2
Unfortunately I think the easiest route will be Serialization, although, you could maybe try implementing "Sourceable" for other classifiers on your own.
Another, but perhaps inconvenient solution, would be to use Weka to build the classifier every time you use it. You wouldn't need to load the ".model" file, but you would need to load your training data and relearn the model. Here is a starters guide to building classifiers in your own java code http://weka.wikispaces.com/Use+WEKA+in+your+Java+code.
Solved the problem for myself by turning the output of WEKA's -printTrees option of the RandomForest classifier into Java source code.
http://pielot.org/2015/06/exporting-randomforest-models-to-java-source-code/
Since I am using classifiers with Android, all of the existing options had disadvantages:
shipping Android apps with serialized models didn't reliably work across devices
computing the model on the phone took too much resources
The final code will consist of three classes only: the class with the generated model + two classes to make the classification work.

Is it possible to export a MovieClip or Graphics object to a vectorial format?

I want to export some vectorial drawings to a vectorial format (eps, svg,...) from a Flash application. Everything is vectorial in my application so it should be possible to do it, but I can't find a solution...
Is it possible? How?
this is a good question. i would love to see a custom (or eventually official) class that executes this functionality. i found this blog concerning this topic. read the comments for some interesting solutions and ideas.