godot/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
arvr_nodes.cpp
arvr_nodes.h
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
baked_lightmap.h
bone_attachment.cpp
bone_attachment.h
camera.cpp Remove setting that caused is_inside_tree() errors on doppler tracking enabled. 2019-02-26 09:16:23 -03:00
camera.h
collision_object.cpp
collision_object.h
collision_polygon.cpp
collision_polygon.h
collision_shape.cpp Warn about plane shape usage, closes #26503 2019-03-04 10:12:03 -03:00
collision_shape.h
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
immediate_geometry.h
interpolated_camera.cpp
interpolated_camera.h
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
listener.h
mesh_instance.cpp
mesh_instance.h
multimesh_instance.cpp
multimesh_instance.h
navigation_mesh.cpp Add -Wshadow=local to warnings and fix reported issues. 2019-02-20 19:44:12 +01:00
navigation_mesh.h
navigation.cpp
navigation.h
particles.cpp allowing setting particles lifetime greater than 600 2019-02-18 10:46:41 -08:00
particles.h
path.cpp Remove copy and use instance material override in gizmos, fixes #23783 2019-02-23 20:20:54 -03:00
path.h
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
physics_joint.h
portal.cpp
portal.h
position_3d.cpp
position_3d.h
proximity_group.cpp
proximity_group.h
ray_cast.cpp
ray_cast.h
reflection_probe.cpp
reflection_probe.h
remote_transform.cpp
remote_transform.h
room_instance.cpp
room_instance.h
SCsub
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
soft_body.h
spatial_velocity_tracker.cpp
spatial_velocity_tracker.h
spatial.cpp No longer crash due to wrongly requesting a gizmo, fixes #26735 2019-03-07 09:26:49 -03:00
spatial.h
spring_arm.cpp
spring_arm.h
sprite_3d.cpp
sprite_3d.h
vehicle_body.cpp
vehicle_body.h
visibility_notifier.cpp
visibility_notifier.h
visual_instance.cpp
visual_instance.h
voxel_light_baker.cpp Fix -Wsign-compare warnings. 2019-02-27 07:45:57 +01:00
voxel_light_baker.h
world_environment.cpp
world_environment.h