Skip to content

Physical Car Deformation and Destruction System#112

Merged
TECHNICANGEL merged 1 commit intomasterfrom
feature/car-deformation-destruction-4299456471065240307
Feb 23, 2026
Merged

Physical Car Deformation and Destruction System#112
TECHNICANGEL merged 1 commit intomasterfrom
feature/car-deformation-destruction-4299456471065240307

Conversation

@TECHNICANGEL
Copy link
Owner

This change implements a realistic car deformation and destruction system for the path-tracing engine.

Key features:

  1. Dynamic Mesh Management: GeometryObject now tracks CPU-side vertex data, allowing for runtime modifications.
  2. Vulkan RT Integration: The engine now supports BLAS refitting via VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR. This allows the ray-tracing geometry to update without a full rebuild, maintaining performance during collisions.
  3. Physical Damage Model: Entities now have mass, elasticity, and structuralIntegrity. The applyImpact method calculates local vertex displacement based on collision impulse and proximity to the impact point.
  4. Piercing & Breaking: High-threshold impacts simulate "piercing" by pushing vertices far away from the impact site. Entities with zero structural integrity are automatically deactivated.
  5. Collision System: Added AABB-AABB collision detection and ground collision handling to trigger deformation events.
  6. Visual Fidelity: Vertex normals are nudged during deformation to provide basic shading updates for dented surfaces.

Note: Path-tracing accumulation is automatically reset whenever a deformation occurs to prevent temporal artifacts.


PR created automatically by Jules for task 4299456471065240307 started by @TECHNICANGEL

- Added support for dynamic BLAS updates and mutable vertex buffers.
- Implemented a damage and deformation model in the `Entity` class.
- Added a basic AABB collision detection and impulse response system in `RacingEngine`.
- Integrated mesh updates into the main render loop with path-tracing accumulation reset.
- Cars now dent, puncture (break), and can be totally destroyed (deactivated) on high-impact collisions.

Co-authored-by: TECHNICANGEL <197574689+TECHNICANGEL@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@TECHNICANGEL TECHNICANGEL merged commit d624843 into master Feb 23, 2026
1 check passed
@TECHNICANGEL TECHNICANGEL deleted the feature/car-deformation-destruction-4299456471065240307 branch February 23, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant