-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Do not merge] enable gaussian rendering based on filament #7186
base: main
Are you sure you want to change the base?
[Do not merge] enable gaussian rendering based on filament #7186
Conversation
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
cpp/open3d/t/geometry/PointCloud.cpp
Outdated
@@ -1369,6 +1369,16 @@ core::Tensor PointCloud::ComputeMetrics(const PointCloud &pcd2, | |||
metrics, params); | |||
} | |||
|
|||
bool PointCloud::IsGaussian() const { | |||
std::vector<std::string> keys_to_check = {"f_dc", "f_rest", "normals", "opacity", "rot", "scale"}; |
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 you rename to IsGaussianSplat
?
We should skip "f_rest" from this list. f_rest is optional.
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 rename this member function to IsGaussianSplat
.
And i remove "f_rest", "normals" from this list.
I also modified the logic so that the geometry is determined as a Gaussian splat only if all keys in the above list are contained in point_attr_
.
@@ -102,7 +102,8 @@ std::unordered_map<std::string, MaterialHandle> shader_mappings = { | |||
ResourceManager::kDefaultUnlitPolygonOffsetShader}, | |||
{"unlitBackground", ResourceManager::kDefaultUnlitBackgroundShader}, | |||
{"infiniteGroundPlane", ResourceManager::kInfinitePlaneShader}, | |||
{"unlitLine", ResourceManager::kDefaultLineShader}}; | |||
{"unlitLine", ResourceManager::kDefaultLineShader}, | |||
{"gaussian", ResourceManager::kGaussian}}; |
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.
Following the naming convention for the others, can we rename to {"gaussianSplat", ResourceManager::kGaussianSplatShader}
?
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.
Yes, i have renamed it.
Maybe a suggestion, the key in shader_mappings
is string constant, every time you update the key, you need to remember to update the corresponding pat in member function UpdateMaterialProperties
.
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 possible, can we reuse some functions here from the other BufferBuilder files? We can put common functions in a new file.
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.
Currently, Class TGaussianSplatBuffersBuilder
is a subclass of Class TPointCloudBuffersBuilder
so there isn't redundant code.
d45f784
to
b7c9cb5
Compare
will create a new PR for this
Co-authored-by: hanyin-intel [email protected]
We don't need to update this PR anymore, let's focus on updating #7194 |
Type
Motivation and Context
Checklist:
python util/check_style.py --apply
to apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description