-
Notifications
You must be signed in to change notification settings - Fork 472
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
Pnts update #116
Pnts update #116
Conversation
Initial work for #22. |
Same comment about the |
Same comment about strong binary data for the feature table that I had for |
Same comment about transforms, #98, as I had for |
Made a few small tweaks. Check my commits. |
@lasalvavida do you want to give this a quick read? |
|
||
### Examples | ||
|
||
Note: these examples use JSON arrays for illustration purposes but for best performance per-point properties like `POSITIONS` and `RGB` should be stored in the `featureTableBinary`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. We need to be careful with this because, at a glance, people would criticize this as a naive approach with just JSON. Try separating each example below into JSON
and a "binary" section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we like it, maybe try what I put for i3dm. It makes this clarification and shows a json with the byteOffset
attribute. I think it is a little verbose to do a separate one for every example.
edit: We don't like it, make one for each example.
Is this ready? |
|
I'm waiting for #100 to be done. Then it should be ready soon after. |
Updated. |
For the |
Can we add an example with oct-encoded normals? |
Made some tweaks in 27bad0a. |
This is very close, thanks! |
@@ -169,7 +169,7 @@ var featureTableBinary = new Buffer(new Float32Array([ | |||
#### Quantized Positions and Oct-Encoded Normals | |||
|
|||
In this example, the 4 instances will be placed with an orientation `up` of `[0.0, 1.0, 0.0]` and `right` of `[1.0, 0.0, 0.0]` in oct-encoded format | |||
and they will be placed on the corners of a quantized volume that spans from `-250.0` to `250.0` units in the `x` and `z` directions. | |||
and they will be placed on the corners of a quantized volume that spans from `-500.0` to `0.0` units in the `x` and `z` directions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if these numbers were supposed to also take the offset into account, so I adjusted them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lasalvavida can you confirm this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this change is not correct. The offset puts the origin at (-250, 0, -250)
, then the scale makes the opposite corner -250 + 500 = 250
: (250, 0, 250)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah alright, I mistook the offset as the center. I'll need to update CesiumGS/cesium#4183 as well.
The folder name is still called |
I noticed that too. Please rename and ensure that all links inside this repo are updated. I don't think there are many external deep links. |
Looks good, please merge after renaming. |
@@ -187,21 +187,21 @@ var featureTableJSON = { | |||
} | |||
}; | |||
|
|||
var positionQuantizedBinary = new Buffer(new UInt16Array([ | |||
var positionQuantizedBinary = new Buffer(new Uint16Array([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for catching this!
Updated. |
Will follow this PR with another that includes per-point batchID and batch table.