-
Notifications
You must be signed in to change notification settings - Fork 373
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
Improve the depth backprojection feature #1690
Conversation
1cf0f56
to
8594073
Compare
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.
lgtm overall!
With a scale of one, diagonally adjacent pixels at the same depth are sized so that they are just touching, leaving no gaps.\ | ||
\nDouble-click to reset.", | ||
); | ||
if response.double_clicked() { |
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.
huh. yeah! I like that. Goes on the growing pile of "how to deal with defaults in a uniform manner everywhere" :)
crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs
Outdated
Show resolved
Hide resolved
crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andreas Reich <[email protected]>
Co-authored-by: Andreas Reich <[email protected]>
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.
real good fixes but separate PRs would have been appreciated as this is super hard to discover for our release notes this way
The normalization logic gets a bit confusing. But I reckon the principle now is that from the outside it is supposed to look like the Renderer always works with UNorm?
All tested again on web?
|
||
// TODO(cmc): albedo textures | ||
let color = Vec4(colormap_srgb(depth_cloud_info.colormap, norm_linear_depth), 1.0); | ||
let color = Vec4(colormap_linear(depth_cloud_info.colormap, world_space_depth / depth_cloud_info.max_depth), 1.0); |
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.
max_depth
being in world units catches me by surprise here
// Add half a pixel of margin for the feathering we do for antialiasing the spheres. | ||
// It's fairly subtle but if we don't do this our spheres look slightly squarish | ||
modified_radius += frame.pixel_world_size_from_camera_distance * camera_distance; | ||
modified_radius += 0.5 * frame.pixel_world_size_from_camera_distance * camera_distance; |
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.
thanks for following up on this. Given the previous change this should be safe, but have you checked if the point cloud in the multiview demo looks the exact same before after? (you can stop the movement with space and then take zoomed in screenshots if needed)
crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andreas Reich <[email protected]>
Closes #1587
A bunch of fixes:
1.0
means that the radius is the same as a pixel projected at that distance. This means a value of0.5
creates balls that just touch horizontally and diagonally. The default is2.0
to avoid Moiré patterns.The colors of the 2D depth visualization and the 3D backprojected depth now line up perfectly both for
u16
andf32
depth maps:Checklist