I am getting problem with the convertion of the 3D object to the Javascript file, I have tried convert 3D object to the json, but there is getting problem with my three.js project. I have also surf the web about convert json to js file but same it is not working.
I want to have the data of Geomatrics, Faces, Vertices, UV shell count/UVs, Material, Edges. I got improper data in the json file, like i got Geomatrices, Vertices, UVs, Materials, but i can’t find get the arrays of the edges, Faces.
So if anyone have any idea or any converter for the same which is usefull for me.
The mentioned three.js JSON format does not support any kind of edge data structure. Even the deprecated JSON model 3 did not support edges. Similar, faces are only represented implicitly by the order of vertices (position attribute) or by separate index buffer data.
I am converting objrct from Obj to Three.js converter which is included in three.js package file. Here is the file which i get from the converter. And i don’t have get the whole data which required, Like Counts of Geomatrics, Faces, Vertices, UV shell count/UVs, Material, Edges etc.
Your JSON is based on three.js JSON Object/Scene format. Your statement is unfortunately wrong since vertices (position attribute) and materials are defined in your JSON file. As I said before faces, edges or count properties are not explicitly defined. You have to derive these data by yourself.
FYI: Since r124 the mentioned OBJ to three.js JSON converter does not exist anymore. It’s best if OBJ assets are drag’n’dropped into the three.js editor and then exported to JSON via File / Export Object.