virtualx-engine/scene/3d
Daniel Rakos 6dd65c0d67 KinematicBody performance and quality improvements
With this change finally one can use compound collisions (like those created
by Gridmaps) without serious performance issues. The previous KinematicBody
code for Bullet was practically doing a whole bunch of unnecessary
calculations. Gridmaps with fairly large octant sizes (in my case 32) can get
up to 10000x speedup with this change (literally!). I expect the FPS demo to
get a fair speedup as well.

List of fixes and improvements:

- Fixed a general bug in move_and_slide that affects both GodotPhysics and
  Bullet, where ray shapes would be ignored unless the stop_on_slope parameter
  is disabled. Not sure where that came from, but looking at the 2D physics
  code it was obvious there's a difference.
- Enabled the dynamic AABB tree that Bullet uses to allow broadphase collision
  tests against individual shapes of compound shapes. This is crucial to get
  good performance with Gridmaps and in general improves the performance
  whenever a KinematicBody collides with compound collision shapes.
- Added code to the broadphase collision detection code used by the Bullet
  module for KinematicBodies to also do broadphase on the sub-shapes of
  compound collision shapes. This is possible thanks to the dynamic AABB
  tree that was previously disabled and it's the change that provides the
  biggest performance boost.
- Now broadphase test is only done once per KinematicBody in Bullet instead of
  once per each of its shapes which was completely unnecessary.
- Fixed the way how the ray separation results are populated in Bullet which
  was completely broken previously, overwriting previous results and similar
  non-sense.
- Fixed ray shapes for good now. Previously the margin set in the editor was
  not respected at all, and the KinematicBody code for ray separation was
  complete bogus, thus all previous attempts to fix it were mislead.
- Fixed an obvious bug also in GodotPhysics where an out-of-bounds index was
  used in the ray result array.

There are a whole set of other problems with the KinematicBody code of Bullet
which cost performance and may cause unexpected behavior, but those are not
addressed in this change (need to keep it "simple").

Not sure whether this fixes any outstanding Github issues but I wouldn't be
surprised.
2019-03-27 00:39:47 +01:00
..
area.cpp Make query checks less agressive, fixes #24694 2019-03-02 08:48:47 -03:00
area.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
arvr_nodes.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
arvr_nodes.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
audio_stream_player_3d.cpp Remove setting that caused is_inside_tree() errors on doppler tracking enabled. 2019-02-26 09:16:23 -03:00
audio_stream_player_3d.h Fix AudioStreams::stop possibly causing a small noise 2019-02-17 11:20:10 -03:00
baked_lightmap.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
baked_lightmap.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
bone_attachment.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
bone_attachment.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
camera.cpp Remove setting that caused is_inside_tree() errors on doppler tracking enabled. 2019-02-26 09:16:23 -03:00
camera.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
collision_object.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
collision_object.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
collision_polygon.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
collision_polygon.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
collision_shape.cpp Warn about plane shape usage, closes #26503 2019-03-04 10:12:03 -03:00
collision_shape.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
cpu_particles.cpp Fix resetting of CPUParticles (2D and 3D) 2019-03-10 00:33:08 +01:00
cpu_particles.h Prevent invisible/inactive cpuparticles to redraw(3d) 2019-03-09 10:50:44 +09:00
gi_probe.cpp add warning to GIProbe when using GLES2 2019-03-03 11:26:08 -08:00
gi_probe.h add warning to GIProbe when using GLES2 2019-03-03 11:26:08 -08:00
immediate_geometry.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
immediate_geometry.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
interpolated_camera.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
interpolated_camera.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
light.cpp hide hdr and shadow_contact in gles2 2019-03-02 19:01:26 -08:00
light.h hide hdr and shadow_contact in gles2 2019-03-02 19:01:26 -08:00
listener.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
listener.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
mesh_instance.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
mesh_instance.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
multimesh_instance.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
multimesh_instance.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
navigation.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
navigation.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
navigation_mesh.cpp Add -Wshadow=local to warnings and fix reported issues. 2019-02-20 19:44:12 +01:00
navigation_mesh.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
particles.cpp allowing setting particles lifetime greater than 600 2019-02-18 10:46:41 -08:00
particles.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
path.cpp Remove copy and use instance material override in gizmos, fixes #23783 2019-02-23 20:20:54 -03:00
path.h Rename OrientedPathFollow to PathFollowOriented 2019-01-16 14:32:18 -02:00
physics_body.cpp KinematicBody performance and quality improvements 2019-03-27 00:39:47 +01:00
physics_body.h KinematicBody performance and quality improvements 2019-03-27 00:39:47 +01:00
physics_joint.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
physics_joint.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
portal.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
portal.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
position_3d.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
position_3d.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
proximity_group.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
proximity_group.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
ray_cast.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
ray_cast.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
reflection_probe.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
reflection_probe.h Scene: Ensure classes match their header filename 2019-02-12 17:21:48 +01:00
remote_transform.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
remote_transform.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
room_instance.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
room_instance.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
SCsub Scene: Ensure classes match their header filename 2019-02-12 17:21:48 +01:00
skeleton.cpp Skeletons can now choose between using local or world coords for processing, fixes #26468 2019-03-03 12:24:00 -03:00
skeleton.h Skeletons can now choose between using local or world coords for processing, fixes #26468 2019-03-03 12:24:00 -03:00
soft_body.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
soft_body.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
spatial.cpp No longer crash due to wrongly requesting a gizmo, fixes #26735 2019-03-07 09:26:49 -03:00
spatial.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
spatial_velocity_tracker.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
spatial_velocity_tracker.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
spring_arm.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
spring_arm.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
sprite_3d.cpp Add frame support for Sprite3D with region enabled 2019-02-04 20:31:45 -02:00
sprite_3d.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
vehicle_body.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
vehicle_body.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
visibility_notifier.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
visibility_notifier.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
visual_instance.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
visual_instance.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
voxel_light_baker.cpp Fix -Wsign-compare warnings. 2019-02-27 07:45:57 +01:00
voxel_light_baker.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
world_environment.cpp Scene: Ensure classes match their header filename 2019-02-12 17:21:48 +01:00
world_environment.h Scene: Ensure classes match their header filename 2019-02-12 17:21:48 +01:00