-
Notifications
You must be signed in to change notification settings - Fork 473
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
Instanced 3D Model updates #33
Comments
Omitting |
Sounds good, updated the spec in 17743a0. Please update CesiumGS/cesium#3158 if you haven't already. |
All updated there. |
Thanks 👍 |
We have a lot of fields that say "This must be greater than or equal to zero" that are of type |
Good catch, #40. |
Hi all, we are now stating to implement I3DM for our vegetation datasets.
best regards, |
Thanks for the feedback @arneschilling. The i3dm format is definitely a work in progress, storing only the longitude and latitude was a temporary solution for just getting something simple to work. We have considered a lot of the points you mention and the final version of the spec should look similar to that. |
@arneschilling thanks for this input. As @lilleyse noted, it is inline with the direction In the meantime, for (4), use a composite tile to combine multiple |
@lasalvavida @lilleyse here's what I propose to finish up the
Long-term, if we need to optimize the case for instances "on the ground" with or without a rotation, we can, but let's not introduce special cases like this until truly needed. |
@lasalvavida also, I'll do the spec updates and you can focus on the implementation. |
@pjcozzi Do you think maybe we should use a quaternion here instead? It might be useful to be able to make instances face different directions. |
For example, if I have an instanced streetlamp, I want to be able to rotate the instances so that they overhang the street. Talked with @lilleyse and you should be able to do this with two vectors, which may be preferable to a quaternion. |
Sorry, I mean to stay store two normals. The third normal is just The normals are preferred over the quanterion for simplicity, which is important for making this a standard. |
With only 2 axes/normals you need an additonal vector for scaling along x/y/z. Using 3 axes would provide enough information for rotation, scaling, shearing. I am sure we can find the math for translating this into a 4x4 matrix. |
@arneschilling the third vector is just |
@pjcozzi, @lilleyse What do you think about making the gltfFormat header field an options bitmask? Like this:
Doing this has the benefit of making sure that existing i3dm models don't break with these changes. |
This is too complicated and backwards compatibility with existing i3dm is not important since it is not widely used. I would stick with what I proposed above; providing this many options makes the spec harder to implement, harder to understand, and harder to get standardized. |
Alright, will do. My only real concern here is that forcing support for oct-encoding and quantization instead of making it optional may make it difficult for other engines to implement. |
@pjcozzi For decoding the quantized coordinates, my suggestion would be to just store a |
Also do we want to store that as |
There should be a float64 Yes, the origin can be added to the end of the header along with any other decode data, mirroring the glTF extension. |
Maybe I should have been clearer. Quantization is usually a scale and a translation. I'm saying to just store the scale and use the min long/lat/height from the tile json as the translation. |
For precision, we'll want to store the translation as doubles and, to save memory, each instance as floats so I don't think we should use the min for translation. This is similar to CESIUM_RTC. |
Cesium updates by @lasalvavida are in CesiumGS/cesium#4101. I'll do spec updates after code review. |
@pjcozzi Do you mind if I put in a pull request for some rough spec updates while it's still fresh in my mind? |
Please don't make them "rough." If you want to take a shot at doing a complete and careful writeup, then please do so, but doing "rough" edits will create more work for both of us. |
The final touches are being added to #100, which I expect will be merged tomorrow. |
instance
field, e.g., positions can be quantized relative to the bounding volume (see EXT_quantized_attributes). Rotation could also be optional (part of the batchTable) and default to Y up (glTF default) in a local frame for the instance's position. Rotation could use fewer fields. RTC. Delta encoding... SOA vs. AOS... Look into point cloud compression...instance.batchId
be omitted whenheader.batchTableLength === 0
. This will complicate the client, but save memory; however, the case it saves memory for is probably rare in practice.The text was updated successfully, but these errors were encountered: