Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. Kuroyume0161
    3. Best
    K
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 9
    • Best 1
    • Controversial 0
    • Groups 0

    Best posts made by Kuroyume0161

    • RE: Optimize Collision Detection

      The GeColliderEngine is a more finer grained approach (Narrow Phase). It is recommended to use it still, but it should be combined with some Broad Phase spatial partitioning hierarchy (KD Tree, Half-Spaces) or bounding hierarchies (AABB Tree, OBB Tree, etc.) which can quickly and easily weed out large swaths of objects that have no collisions by using either bounding boxes (thus, BB) of the objects or blocks of space between them.

      At first this may seem contradictory: more code work to do this faster? Yes. This is classic Divide and Conquer. Instead of checking EVERY object against EVERY other object EVERY time no matter what, the faster you can remove objects from consideration by checking a simple overlap/locality, the faster the collision detection algorithm gets.

      So, first do a Broad Phase to find only objects that are or may be colliding (even overlapping bounding boxes incur many false positives). Then move to a Narrow Phase to determine the type of collision (if any) and get the details of it. Personally, I found AABB hierarchies to be real-time fast if designed well.

      posted in Cinema 4D SDK
      K
      Kuroyume0161