PrincessGod / objTo3d-tiles

Convert obj model file to 3d tiles
https://princessgod.github.io/objTo3d-tiles
Apache License 2.0
781 stars 233 forks source link

Custom BatchTable #6

Open klars3000 opened 6 years ago

klars3000 commented 6 years ago

Hi, I'm trying to test your library using a custom batch table and a custom tileset options file, but I'm getting an error message (see below). I followed your instructions to the letter:

I am then running the following line in terminal: obj23dtiles -i "./myOBJFile.obj" --tileset -p "./customTilesetOptions.json" -c "./customBatchTable.json" .... followed by the error message: Custom BatchTable properties's length should be equals to default BatchTable 'batchId' length.

What am I doing wrong here? Thanks for any pointers. Regards,

PrincessGod commented 6 years ago

OK, maybe I know what happened.

I don't know how many objects will be parsed from your obj file. So you can output default BatchTable by

obj23dtiles -i ./myOBJFile.obj --b3dm --outputBatchTable

and you will get a myOBJFile_batchTable.json file in your model folder. then you can checkout how many objects has been parsed. For example by checkout batchId array's length.

Then you can make your own BatchTable follow the default batchTable, add your own property correspondence name property which present your object name.

Hopes that will be helpful.