-
Notifications
You must be signed in to change notification settings - Fork 16
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
loading and rendering optimizations #21
Merged
Merged
Conversation
This file contains 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
Owner
hyperlogic
commented
Jul 12, 2024
- added --nosh option to skip rendering spherical harmonic data, which should give an fps boost.
- ply file loading optimizations, ply files should load up to 2x faster.
- render using interleaved vertex arrays. gives a small 10-20% fps boost on some hardware.
Added an empty default constructor to the struct used in a large std::vector. This will skip the construction of each individual element in the vector.
The point here is to hide the actual structure of the point cloud data, specifically PointData and the std::vector<PointData>. The data can be accessed with an AttribData API and a raw void* ptr. This allows us to load the raw data directly into an OpenGL buffer, and contains the data we need to create interleaved vertex attributes into that buffer, while still allowing us to iterate over each element, if necessary, using ForEachAttrib(). In the case of PointCloud this is probably overkill, but I want to use this same API for GaussianCloud in the future. Because GaussianCloud can optionally have some or all spherical harmonic coefficients, we don't know the data layout at compile time. This AttribData API gives us the ability to only include what we need at run-time.
* GaussianCloud moved to AttribData style API. * Moved all cooking of data for rendering into GaussianCloud, So setting up interleaved vertex arrays in SplatRenderer is straight forward. * Overall 2x loading time improvement * ~20% fps improvement on large scenes * Still some cleanup necessary before merging into main. See AJT: comments
Also some prep work for Ply exporting, build fix for linux
* still need to fix ComputeRotScaleFromCovMat()!
Doesn't work on some covariant matrices tho... wip
Need to check determinant of matrix before converting it to a quaternion, and flip the sign of the matrix by multiplying all axes by -1, for quat convertion to be correct. GaussianClound::ExportPly() seems to work now.
… data This reduces the memory requirements for large scenes, and can give a performance boost as well. GaussianCloud will use BaseGaussianData or FullGaussianData depending on this option. This will intern reduce the gpu memory required for each vertex. The shaders also use the FULL_SH pre-processor symbol define to handle this option.
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.