Conversation
Integer normals that are not quantized keep the wrap transform, and below speed 4 the encoder selects MESH_PREDICTION_GEOMETRIC_NORMAL for them. MeshPredictionSchemeEncoderFactory builds that scheme over whatever transform it is given, and the scheme asks the wrap transform for quantization bits, which it answers with a stub returning -1 behind DRACO_DCHECK(false). Debug builds assert. Release builds predict from an uninitialized octahedron toolbox and write a stream that decodes to different normals, with every step reporting success. The decoder factory builds geometric normal prediction only for the normal octahedron transforms. The encoder factory now does the same and returns nullptr otherwise, so the caller falls back to delta coding as it does for any scheme that cannot be built. Quantized normals are unaffected: draco_encoder writes the same bytes as before for cube_att.obj, test_nm.obj, sphere.obj, bun_zipper.ply and a point cloud with normals at -cl 0, 1, 2, 3, 4, 7 and 10. TestIntegerNormalsAtSpeedZeroRoundTrip encodes a 5x5 grid with int32 normals in [-3, 3] at speeds 0/0 and compares the decoded normals with the input. Before this change they come back as unrelated values.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integer normals that are not quantized keep the wrap transform, and below speed 4 the encoder selects MESH_PREDICTION_GEOMETRIC_NORMAL for them. MeshPredictionSchemeEncoderFactory builds that scheme over whatever transform it is given, and the scheme asks the wrap transform for quantization bits, which it answers with a stub returning -1 behind DRACO_DCHECK(false). Debug builds assert. Release builds predict from an uninitialized octahedron toolbox and write a stream that decodes to different normals, with every step reporting success.
The decoder factory builds geometric normal prediction only for the normal octahedron transforms. The encoder factory now does the same and returns nullptr otherwise, so the caller falls back to delta coding as it does for any scheme that cannot be built. Quantized normals are unaffected: draco_encoder writes the same bytes as before for cube_att.obj, test_nm.obj, sphere.obj, bun_zipper.ply and a point cloud with normals at -cl 0, 1, 2, 3, 4, 7 and 10.
TestIntegerNormalsAtSpeedZeroRoundTrip encodes a 5x5 grid with int32 normals in [-3, 3] at speeds 0/0 and compares the decoded normals with the input. Before this change they come back as unrelated values.