Implement buoyancy sampling from FFT ocean surface in BuoyancySystem#395
Implement buoyancy sampling from FFT ocean surface in BuoyancySystem#395drsnuggles8 wants to merge 2 commits into
Conversation
- Added OceanFFTField support to BuoyancySystem for accurate buoyancy calculations. - Introduced SampleHeightFFT method in WaterSurface for FFT-based height sampling. - Updated WaterBuoyancyTest to validate buoyancy behavior with FFT water. - Enhanced WaterSurfaceSamplerTest to ensure consistency between CPU and GPU height calculations. - Documented changes in WATER_FUTURE_IMPROVEMENTS.md to reflect new buoyancy sampling capabilities.
|
Warning Review limit reached
More reviews will be available in 43 minutes and 24 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBuoyancy now samples FFT-based ocean heights when an FFT field is available. A new CPU FFT height sampler was added, buoyancy tiles select and scale FFT fields at update time, and renderer and physics tests cover the new sampling path. Documentation was updated to mark the FFT buoyancy path as shipped. ChangesFFT water height and buoyancy
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@OloEngine/tests/Functional/AnimationPhysics/WaterBuoyancyTest.cpp`:
- Around line 235-258: The FFT-vs-flat-plane discriminator in WaterBuoyancyTest
is too weak because the sampled height threshold in the candidate search is
lower than the final near-equality tolerance, so a body resting at y=0 can still
pass. Update the test around the SampleHeightFFT loop and the EXPECT_NEAR/Y(box)
check so the selected FFT displacement is guaranteed to exceed the rest
tolerance with margin, or add an explicit assertion that the final buoyant box
height is not near 0.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: a28af123-bc3b-4c2b-b75a-7f43ca7ce4f3
📒 Files selected for processing (6)
OloEngine/src/OloEngine/Physics3D/BuoyancySystem.cppOloEngine/src/OloEngine/Renderer/WaterSurface.cppOloEngine/src/OloEngine/Renderer/WaterSurface.hOloEngine/tests/Functional/AnimationPhysics/WaterBuoyancyTest.cppOloEngine/tests/Rendering/PropertyTests/WaterSurfaceSamplerTest.cppdocs/WATER_FUTURE_IMPROVEMENTS.md
CodeRabbit (PR #395) correctly flagged that RestsAtTheFFTSurfaceHeight's search threshold (|h| > 0.3) was smaller than the rest-height tolerance (0.6), so the EXPECT_NEAR band around expectedSurfaceY could include y=0 — a body that fell back to the flat Gerstner plane would still pass, making the FFT-vs-plane discriminator vacuous. Now scan the whole patch for the most-displaced column (a crest/trough, where the box also tracks best since an extremum is a local gradient zero) and assert the displacement clears 2x the tolerance, so the EXPECT_NEAR band provably excludes y=0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🤖 Self-review (finish-pr) @
|
|




Summary by CodeRabbit
New Features
Bug Fixes
Tests