-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating tilesets dynamically #90
Comments
CC #89
|
I would like to see one of two things, both of which are premised on lazy generation (the real win for generating tilesets dynamically should be not having to store the whole structure in memory at once...):
[edit] |
Thanks for the input, @elfprince13!
Agreed.
Can you provide a concrete use case? Is this purely a client-side implementation? Or does this impact the spec? |
I think it would best be done as part of the spec. Rather than specifying:
You would specify something akin to this:
To access a specific child, the callback could then be invoked by the implementation using something akin to this, and passed both the context value and the index of the desired child (and the resulting object could be memoized for efficiency). The meta-goal is simulating lazy evaluation with closures (the pattern here is essentially a generalization of this tutorial to acyclic datastructures with more than one child per node). A trivial concrete use case would be generating an oct-tree as needed without having to load the entire structure into memory. |
Thanks for the extra info.
Have you seen:
Also, are you sure there are not security concerns with something like this:
|
You could absolutely leverage external tilesets to achieve the same results, with a few caveats:
This would absolutely mesh well with explicit tiling schemes (and even provide a potential implementation).
I would say that there are security concerns, but they aren't intractable. As a baseline, you certainly should not implement this via |
Thanks for the details, I may follow up with more questions when we start to evaluate this. Please feel free to chime in on any of the other spec issues in this repo. Your feedback is appreciated. |
@KermMartian and I are approaching a point in our project where we need to make some determinations about this. One thing we've contemplated as an interim solution, while the spec is still being discussed, is the possibility of a server-side script that generates each tileset json as needed. However we're concerned about this language in the documentation for external tilesets:
What are the exact criteria applied to determine the tile format? If we have a url of the form Either way, the server-side approach is sub-optimal in the long run, but generating a tileset.json on disk for every directory in our tree would be even more sub-optimal. |
I'm curious if anyone has insight into the answer to @elfprince13's question in the previous comment, so that we can test a server-side script hack in the interim. Thanks in advance. |
Currently the criteria is based on the file extension only, but this will most likely change. If you just want to get something working in the meantime in Cesium, this would be the place to edit https://github.com/AnalyticalGraphicsInc/cesium/blob/3d-tiles/Source/Scene/Cesium3DTileset.js#L105. |
Thanks for the answer! I think you actually answered a slightly different question, but that was a helpful place to start. https://github.com/AnalyticalGraphicsInc/cesium/blob/3d-tiles/Source/Scene/Cesium3DTile.js#L199`appears to be where the behavior of |
Also see:
|
This is awesome for generating tile-sets dynamically on the server, but it would be awesome to take it a step further and support client-side generation, using, e.g. something like my suggestion above. |
Hello, Thanks |
(Note that @aymohamed is working with @KermMartian and myself on a prototype implementation for dynamically generating tile sets) |
@aymohamed by children attributes, I think you mean the batch table with per-feature attributes, check out: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/BatchTable.js Keep us posted on your progress! @elfprince13 btw, will you be at SIGGRAPH? |
Thanks @pjcozzi . I will take a look! |
@pjcozzi , I am not sure if this is what I was looking for. A quick scanning through the code lines did not lead me to see the portion that deals with tilesets, children attributes and how they are loaded. I am quite new to this terrain, and I would appreciate seeing the lines of codes which do that. Also, doing ctrl+f of "tileset" doesn't return any results. |
I'm still not sure what you mean by "children attributes." If you are looking for how HLOD tree traversal works, start with Cesium3DTileset.js and Cesium3DTilesetTraversal.js. You can also look in the history of the first file for a more simple traversal algorithm. For more discussion on the Cesium code, please use the Cesium forum so we can keep this GitHub repo a clean archive of 3D Tiles spec discussion. |
Perhaps @elfprince13 may have better wording. |
@pjcozzi , I mean for a given 3d tile, with an array of children, where is the code that determines if a child is from an "external tileset"and handles the request for that URL. |
Gotcha, please check the two files I linked above. Cesium's traversal is pretty complex so you might want to step through with the debugger. Again, please post future Cesium code questions on the forum I linked to above; I am not going to crowd this issue any further. Thanks! |
Thanks @pjcozzi ! The 2nd link seems to have my answer. Thank you. |
There aren't any immediate plans to support client side tile generation, though as mentioned above this could be handled server-side with external tilesets. |
What is the best approach for tileset.json when generating tilesets dynamically like in #22 (comment)?
The text was updated successfully, but these errors were encountered: