cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Update `IndexDatatype.createTypedArray` to create Uint8Arrays

Open j9liu opened this issue 2 years ago • 4 comments

Currently IndexDatatype.createTypedArray only outputs Uint16Array and Uint32Array. This caused a bug in #10344 because it returned a Uint16Array for uint8 indices, which was too big for the getBufferData function. The fix itself is easy but it causes a lot of unit tests to break, which will take more time to fix.

Once this function is changed to return Uint8Array, the manual check in buildDrawCommands can be removed to accommodate this.

j9liu avatar May 04 '22 16:05 j9liu

Hello, may I be assigned to work on this issue?

malitherl avatar May 10 '22 19:05 malitherl

Hi @malitherl,

Thanks for your interest in contributing! For smaller issues (like those labeled "good first issue"), there's no need to ask for permission. It's customary to comment on the issue or start a thread on our forum for larger features or code changes, but this one shouldn't be too sizeable. You can work on the issue and open a pull request for review when ready.

If you have any questions, you can comment on the issue or on the PR itself if it's far enough along to open. There's also a lot of standard documentation in the Contributors folder if you need guidance.

j9liu avatar May 10 '22 19:05 j9liu

hie @malitherl, If you are seeing this message , please reply

Harjot4698 avatar Jun 19 '22 19:06 Harjot4698

Hey @j9liu I've made the necessary changes but I need some help with the test case as I'm new to this. Please check the pull request #10505

acharyasourav avatar Jul 01 '22 10:07 acharyasourav

Hello, my team and I would like to work on the issue

rravula77 avatar Dec 02 '22 18:12 rravula77

Great @rravula77! Let us know if you have any questions or would like to discuss the approach.

ggetz avatar Dec 06 '22 17:12 ggetz

I am part of rahul's team. We are a little confused on how to change the test cases. Many of the errors are due to the expected render not matching the actual render. Should we be copying the actual render to the expected render or should we be calculating if the output is correct?

We don't really understand what is a render or a scene, so we don't understand how to calculate the correct render. Where can we learn more about this?

Charlyjcmu avatar Dec 11 '22 20:12 Charlyjcmu

Hi there, a "render" is the process by which a single frame or image is created., while the "scene" is a top-level object which generally defines what is being rendered. To understand how it's used in unit testing, check out the Rendering Tests section of our Testing Guide to learn more.

Would you also mind posting the test errors so we can help troubleshoot the specifics?

ggetz avatar Dec 12 '22 14:12 ggetz

So most of the failed render test cases are failing due the pixel not matching, We are a little confused on how to correct for this error.

Screen Shot 2022-12-14 at 11 46 18 AM

There is also a hidden GL_INVALID_OPERATION: Insufficient buffer size warning.

Screen Shot 2022-12-14 at 11 46 41 AM

Could you help us figure out where the error is coming from? .

Charlyjcmu avatar Dec 14 '22 16:12 Charlyjcmu

This is no longer a trivial issue, as found in #10955:

The problem with the unit tests comes from rendering problems with the geometry itself. The changes have caused holes in some of the geometry:

main this branch
image image

This is what happens in the 3D Tiles Terrain Classification sandcastle (which uses Vector3DTileContent). This also happens in the ArcticDEM sandcastle. image

Much of the code automatically assumes that indices can only be uint16 or uint32, so resolving this may require changes across all of CesiumJS's rendering code.

j9liu avatar Jan 25 '23 15:01 j9liu