-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add support for point clouds (pnts) #591
Conversation
Happy to announce this is ready for review whenever you get a chance @kring ! |
I tried this branch with the Melbourne Point Cloud and vsgCs and triggered an assertion:
The problem is that the batch table in this tile is of length 0.
The tileUrl is "https://assets.ion.cesium.com/43978/0/0.pnts?v=1". |
Thanks for the catch @timoore. I just pushed a commit to fix it, but let me know if the issue persists. |
Unfortunately the MemberCount() call fails with the same problem. My stab at fixing the issue is timoore@6fbffd2 . With that, I can see points in Melbourne. I don't know if vsgCs is doing the right thing with the lighting and point rendering. |
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.
} | ||
|
||
template <typename Type> | ||
static void checkBufferContents( |
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.
Can these two checkBufferContents
functions be merged into one, with a default value for the epsilon parameter, and the epsilon value is ignored for integer comparisons? Seems like it would eliminate a lot of duplication.
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.
When I do this, Windows + VS2017 and Linux + GCC are throwing compile errors in Travis because the epsilon
parameter isn't used in all branches of the function. Do you know how to address that without code duplication?
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.
You can add an attribute to the parameter:
https://en.cppreference.com/w/cpp/language/attributes/maybe_unused
You can also use specialization rather than if constexpr, but that's a bigger change.
@timoore thanks for letting me know your fix. I moved the
It seems like the geometry is there but the colors are missing. Or they may just be faded. I have to add a correction that converts the |
I had a bug where I wasn't doing anything with normals for points, so they were only being lit by ambient lighting. They are looking better now. That's interesting about sRGB colors in points. I followed the comment chain from cesium-unity to cesium. I don't see in the point clouds spec where that's specified, but obviously I would take @lilleyse 's word for it! |
Thanks @j9liu! |
WIP, but I'm opening it now to track the tasks involved. This builds off of #334 and will finally close #333 when finished.
TODO
CONSTANT_RGBA
to a PBR material