Closed jingyangking closed 6 months ago
There are two functionalities of the 3D Tiles Tools that are related to each other. (And I'm always mixing them up...)
These functions are merge
and combine
:
merge
creates a tileset, that still refers to the input tilesets (as external tilesets)combine
creates a tileset where external tilesets have been "inlined"It might be that you expected the merge
function to do something else.
For example: When you call something like
npx 3d-tiles-tools merge -i ./input/one -i ./input/two -i ./input/three -o ./output/merged
Then it will create a tileset that refers to the input tilesets as external tilesets. The resulting directory structure and JSON are shown here:
Note that this still refers to the tileset.json
files from the inputs.
If you want to create a tileset that does no longer refer to the input tileset.json
files, then you can use the following:
npx 3d-tiles-tools combine -i ./output/merged -o ./output/combined
It will create a tileset with this structure:
Note that this now refers directly to the content of these input tilesets (and no longer to the tileset.json
files of the input)
If this does not answer your question, then I'd have to ask for clarification what you mean by...
the result shows that tileset.json cannot be found.
If this is part of an error message, then it may be necessary to provide more information about where this error appears.
Yes, what I want to implement is the first example you provided, but unfortunately, as I mentioned before, the corresponding tileset.json cannot be found. I'm not sure why this happened. Is it because I input too many files that caused this situation? Thank you!
I have to nitpick about two things:
npx 3d files tools merge - i/ Specs/data/mergeTilesets/Tilesetone
^- there is a slash followed by a space...
You should ensure that the path is given properly.
tileset.json
file, or you must give the name of the tileset JSON file as the input. For example, if the name of the tileset JSON file for the first input is
/Specs/data/mergeTilesets/Tilesetone/theNameOfThisFileIsDifferent.json
then you have to pass this full file name to the command line, as in
npx 3d files tools merge -i /Specs/data/mergeTilesets/Tilesetone/theNameOfThisFileIsDifferent.json ...
(When you only pass in the name of a directory, then it assumes that the tileset JSON file is called tileset.json
. Otherwise, there could be many different JSON files in this directory, and the tools do not know which one is the tileset JSON)
You're right, I provided a specific file path as follows:"E:\3Dmodelfile\3dtiles\ifctileset\one_ifctileset"
,其中的文件内容如下:
The other tileset.json files are the same except for their names,
but entering such a command resulted in an error message
I hope this can clarify what I want to express,thank you!
Right now, I cannot imagine what could be the reason for this error.
When each input directory contains a file that is called tileset.json
, then this should be picked up automatically.
If this does not work: Could you try to merge only two tilesets (as a test), and give the full path to the tileset.json
files, like this:
... -i E:\3Dmodelfile\3dtiles\ifctileset\one_ifctileset\tileset.json ...
^--file name here
I tried out the merge
function with some example tilesets, and could not yet reproduce this error message, except for cases where the input directory did not contain a tileset.json
file...
Okay, I'll give it a try. Thank you for your reply!
If it doesn't work, I'd even go so far to create a branch with additional logging information, with details about where exactly it is trying to find that tileset.json
file, and which files it does find there instead. We should be able to figure out what's wrong here.
Thank you for your reply! I found an issue: the input path must be accurate, including uppercase and lowercase letters, while the output path does not have such strict requirements.
To some extent, this may depend on the operating system, but I'd have to verify that.
But in general, one should assume that the paths are case-sensitive.
There are two functionalities of the 3D Tiles Tools that are related to each other. (And I'm always mixing them up...)
These functions are
merge
andcombine
:
merge
creates a tileset, that still refers to the input tilesets (as external tilesets)combine
creates a tileset where external tilesets have been "inlined"
Sorry for commenting on a closed thread, but a warm thanks for this detailed comparison of merge
vs combine
. It explains really simply the difference between both methods and probably could be added some place more permanent - maybe in the 3d-tiles-tools readme as-is, or as a link to this comment
@jo-chemla I agree that this could be clarified.
On the one hand, my comment only added a little detail compared the the current documentation of combine
, but probably an important detail - namely, that the external tilesets are "inlined". (In fact, inline
might have been a better name for combine
, and merge
could then have been called combine
, but ... all this is subjective, to some extent...)
There are a few pending updates/clarifications for the README, and I'll probably add them (including this one) in the next days.
Understood, thanks for the details! Indeed, also in favor of this naming, but probably cannot be done as a somewhat aggressive breaking change.
I want to combine multiple tiles into one tile set, so I used this command
npx 3d files tools merge - i/ Specs/data/mergeTilesets/Tilesetone - i/ Spec/data/mergeTilesets/sub/Tilesettwo - i/ Spec/data/mergeTilesets/sub/Tilesetthree - o/ Spec/data/mergeTilesets/output
, where tiles one, tiles two, and tiles three all have tiles set.json and multiple b3dms, but the result shows that tileset.json cannot be found. I am not sure why? I hope you can give me a reply, thank you!