3d models -> JSON for WebGL/Three JS - json

So I have tried to use the three.js editor to convert an .obj file to JSON. When I click export Geometry, though, it doesn't do anything...
http://mrdoob.github.io/three.js/editor/
When I export the scene, though, I get a whole bunch of numbers like so:
"2,1615,1614,1671,1672,1615,3683,3563,3682,3684,3567,57,1615,1672,1673,1616,1615,1672,1673,1616,3685,3567,3684,3686,3570,57,1616,1673,1674,1617,1616,1673,1674,1617,3687,3570,3686,3688,3573,57,1617,1674,1675,1618,1617,1674,1675,1618,3689,3573,3688,3690,3575,57,1618,1675,1676,1619,1618,1675,1676,1619,3691,3575,3690,3692,3577,57,1619,1676,1677,1620,1619,1676,1677,1620,3693,3577,3692,3694,3579,57,1620,1677,1678,1621,1620,1677,1678,1621,3695,3579,3694,3696,3581,57,1624,1679,1680,1625,1624,1679,1680,1625,3697,3587,3698,3698,3587,57,1625,1680,1681,1626,1625,1680,1681,1626,3699,3589,3700,3701,3590,57,1626,1681,1682,1627,1626,1681,1682,1627,3702,3590,3701,3703,3592,57,1627,1682,1683,1628,1627,1682,1683,1628,3704,3592,3703,3705,3594,57,1628,1683,1684,1629,1628,1683,1684,1629,3706,3594,3705,3707,3596,57,1629,1684,1685,1630,1629,1684,1685,1630,3708,3596,3707,3709,3598,57,1630,1685,1686,1631,1630,1685,1686,1631,3710,3598,3709,3711,3600,57,1631,1686,1687,1632,1631,1686,1687,1632,3712,3600,3711,3713,3602,57,1632,1687,1688,1633,1632,1687,1688,1633,3714,3602,3713,3715,3604,57,1633,1688,1689,1634,1633,1688,1689,1634,3716,3604,3715,3717,3606,57,1634,1689,1690,1635,1634,1689,1690,1635,3718,3608,3719,3720,3609,57,1635,1690,1691,1636,1635,1690,1691,1636,3721,3609,3720,3722,3611,57,1636,1691,1692,1637,1636,1691,1692,1637,3723,3611,3722,3724,3613,57,1637,1692,1693,1638,1637,1692,1693,1638,3725,3613,3724,3726,3615,57,1638,1693,1694,1639,1638,1693,1694,1639,3727,3615,3726,3728,3617,57,1639,1694,1695,1640,1639,1694,1695,1640,3729,3617,3728,3730,3619,57,1640,1695,169"
Is this the content of the JSON file I'm trying to look for? If so, do I just save it as nameofmodel.json?

Yes. That's the content of the json file. And yes, you just need to save that into a nameofmodel.json file.

Related

Update 3D Scene Programmatically to be Showed in Blend4Web WebPlayer (JSON)

I created a blender project, exported it as JSON+BIN files and showed it through the blend4web webplayer. Everything goes fine until my need to change the JSON file programmatically to add/remove a new 3D object (e.g. a cube or rectangle). I want to renderize the already showed 3D model adding or removing a 3D object. However, since the exportation of a project to blend4web generate a .bin file, if I change only the .json the model was not showed as expected. Considering this scenario, the unique way to change the model is modifing the .blend file and exports it again from Blender. But based on my need, I can't add a new 3D object in a Blender project programmatically considering the .json file. Additionally, the .json file which I am updating/using is considering data retrieved from a Database, such data indicates how and the position where the new 3D object will be displayed in the scene, which hinder me to use Blender to create a 3D Model modificated.
In this perspective, I need help to identify:
Which is the best way to change the scene and show it in blend4web programmatically and mainly considering a .json as an input for the model?
Is there any python script to user a blend4web .json file as an input to be compiled, without the Blender project and regenerate the .bin file, making it possible to show correctly my 3D model using the blend4web webplayer for JSON files?
Or, is there some (easy) way to modify a project from Blender considering data in JSON format, compile and generate the files to be shown programmatically by the blend4web webplayer (for JSON)?
Thanks in advance.

Export from Sketch App to JSON

I want to be able to export Layer Names and properties from Sketch to JSON format. I think I can figure out how to pull the info I need from Sketch, but I haven't started to code anything, because I haven't been able to find any info about this export issue.
I'm wondering if anyone can help confirm that Sketch can only export their supported formats or if export to JSON is possible. I don't want to dive into this project only to find out that I can't end up with a JSON file.
I have been trying to work with this as well, and it turns out there are a few ways to get access to a JSON file in sketch.
use the npm package sketch2json
Turns out that if you unzip the .sketch file, there is a JSON file hiding inside.
unzip sketch-header.sketch
This creates a folder called 'pages' with the .json file inside. To get the 'Layer Names', you can just read/serialize the .json file into a string, and then the path to collect the layer names is
const obj = JSON.parse(fileString);
object.layers.forEach((layer) => {
console.log(layer.name);
});
If you rename the .sketch extension file to .zip extension file you will see as many JSON files as pages your sketch document has inside a folder called "Pages". Also some BMP previews images and other JSON related to user and document information.

How do you export a .OBJ file on blender WITHOUT mtl?

I am making a 3d game with Java LWJGL. I use .obj files to load the models into my game but i dont make it read a separate .mtl file because it is really hard and im struggling to do it. So im trying to make the obj files in blender then exporting it as an obj. BUT there is an extra file which pops up called "player.mtl" and when i try to read just the obj format file my game cant process it :(
This has been on my mind for a long time.
Go to File > Export > Wavefront (.obj).
In the Export OBJ menu in the lower left uncheck Write Materials.
Choose a file name and press Export OBJ.
Now you have only the obj without the mtl file.

exporting options for fbx objects created in Blender and used in libgdx

This is the options panel for FBX export in Blender. I have no animations, just an UV unwrapped object ready for export. What checkboxes should be checked to correctly export objects for libGDX use to FBX file format.
If you're not exporting all the objects in your Scene, checking "Selected objects" will only export those that you have selected.
For certain shaders, "Tangent Space" is also needed for UV exporting, if your materials look okay after import without tangent space included, you probably don't need it. But, it does increase file size.
If the mesh is not skinned, you can uncheck "Add leaf Bones".
You'll get a better idea of everything that is exported if you convert your fbx to .g3dj rather than .g3db. .g3dj is a JSON file, which you can open in a text editor and check everything out, and/or edit if need be. Play around with the settings in the exporter, convert, and see what you get!

is it possible to export XML data from a swf file

is it possible to export XML data from a swf file
http://rickydoesit.com/actionscript-3/how-to-connect-to-php-with-actionscript-3-and-post-variables-to-php/
http://www.adobe.com/devnet/flash/articles/mysql_xml_asp_03.html
http://www.hardcode.nl/archives_9/article_442-post-request-data-in-as3.htm
let us know your server-side etc.
instead of simple variables you could put your xml data.