Skip to content
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

I3dm updates #100

Merged
merged 50 commits into from
Aug 19, 2016
Merged

I3dm updates #100

merged 50 commits into from
Aug 19, 2016

Conversation

lasalvavida
Copy link
Contributor

@lasalvavida lasalvavida commented Jul 8, 2016

@pjcozzi these are the i3dm spec changes. Can you take a look over this and tell me what you think?

@lasalvavida
Copy link
Contributor Author

#33

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 10, 2016

@lasalvavida did you draw all the figures? If not, what is their terms of use?

**Figure 1**: Instanced 3D Model layout (dashes indicate optional fields).

![](figures/layout.png)
![header layout](figures/header-layout.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Cesium implementation span is called scale. What is the standard terminology for quantization? Let's use it in all cases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment with origin and translation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to whatever you think is best as far as naming goes.

span is a little different from scale in quantization. In quantization since we store everything in a decode matrix scale is stored as span divided by 2^16-1. However, here we can choose not do that and potentially improve precision which is what I am doing currently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it sounds like scale is the right term here. Is origin the standard quantization term used in the literature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the literature, origin should be offset and span should be scale. I'll make those changes.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 10, 2016

Add a Resources section at the bottom that links to the papers for quantization and oct-endcoding. Also link to the Cesium helper functions implementation.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 10, 2016

Just like the Cesium implementation, this needs:


### X, Y, and Z for Translation

`x`, `y`, and `z` are stored as `uint16` positions in the quantized instance region defined by the `origin` and `span` fields in the header.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The definition here for "quantized instance region" should come earlier in the spec, and how it does/doesn't relate to the bounding volume should be explicit to avoid confusion; readers may think they are the same at first glance.

Also, "quantized volume" is a better name since instance is implicit in this context and the reader won't need to wonder if there is a difference between volume and region; it is the prefix, "bounding" or "quantized", that defines that.

Copy link
Contributor Author

@lasalvavida lasalvavida Jul 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, and quantized volume is a better name.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 10, 2016

Good start here, @lasalvavida!

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 10, 2016

Also:

  • Investigate how AOS (XYZ, XYZ, XYZ) vs. SOA (XXX, YYY, ZZZ) affects gzip compression

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 10, 2016

Also, change the "Spec Status" for i3dm to "Solid base, only minor changes expected"

See https://github.com/AnalyticalGraphicsInc/3d-tiles#spec-status

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

Also explain how the transform (inverse transpose) affects normals.

@lasalvavida
Copy link
Contributor Author

Also explain how the transform (inverse transpose) affects normals.

Wouldn't that be better suited for the tileset transform specification?

Also this is updated and ready for another look.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

Also explain how the transform (inverse transpose) affects normals.
Wouldn't that be better suited for the tileset transform specification?

It should be mentioned here too; otherwise, someone writing a new tile loaded based on this spec may forget it. It can be short, just something like:

The positions and normals are defined in the tile's local coordinate system; they should be transformed as described in TODO.

Later, that will link to the section in the spec that described how to compute the matrices using the tile and its ancestors.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

Is this ready?

@lasalvavida
Copy link
Contributor Author

Yup. Everything should be addressed now.


### Examples

In these examples, the semantic values are shown as JSON arrays. This is done to make the examples more human readable, and is still a valid feature table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comment from before still holds. Please revise.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new approach with the code example is good (actually really good for those doing writers in Node.js). Update this paragraph since it is out-of-date.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

The Required column is still confusing. I would drop the "depends" part. What is the concern with:

Then under the table, include a link to the example section so readers could jump to common layouts.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

We need to define what happens if NORMAL_UP and NORMAL_RIGHT are defined, as well as NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P. Given other parts of 3D Tiles, I think it would be allowed, but we would use the uncompressed versions.

@lilleyse lilleyse mentioned this pull request Aug 19, 2016
@lasalvavida
Copy link
Contributor Author

The Required column is still confusing. I would drop the "depends" part. What is the concern with:

My issue with this is that something being required but with an optional alternative, (POSITION and POSITION_QUANTIZED) is a different idea than something that is only required if something else is defined, (NORMAL_RIGHT and NORMAL_UP QUANTIZED_VOLUME_OFFSET and POSITION_QUANTIZED).

I think applying a blanket "Sometimes, if" to both cases is confusing. If anything I think maybe:

  • Yes
  • Yes, unless
  • No
  • No, unless

@lasalvavida
Copy link
Contributor Author

Alright, updated, let me know what you think.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

I think applying a blanket "Sometimes, if" to both cases is confusing. If anything I think maybe:

Yes
Yes, unless
No
No, unless

This is pretty good, not sure that it is perfect, but let's go with it and see if we get any feedback.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

Just that one small update and this is ready to merge!

@lasalvavida
Copy link
Contributor Author

Updated

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2016

Nice!

@pjcozzi pjcozzi merged commit 5ddaaa5 into CesiumGS:i3dm-updates Aug 19, 2016
@pjcozzi pjcozzi deleted the i3dm-updates branch August 19, 2016 20:32
@pjcozzi pjcozzi mentioned this pull request Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants