Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

[Free] NativeTrees - Burst compatible generic octree and quadtree

Discussion in 'Assets and Asset Store' started by bartofzo, Nov 24, 2022.

  1. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    130


    Hi everybody,

    I needed a fast octree for a project of mine that was compatible with burst and DOTS.
    Went totally overboard with it and released it as a free package for everybody to use.

    Supported queries:
    • Raycast
    • Range (AABB overlap)
    • K-Nearest neighbours
    Other features:
    • Implemented as a sparse tree, so only stores nodes that are occupied. Memory usage is therefore relatively low. The octree has a max depth of 10 and the quad tree a max depth of 15.
    • Supports insertion of AABB's
    • Fast insertion path for points
    • Optimized with SIMD instructions so greatly benefits from burst compilation


    Instructions are at the github page:

    https://github.com/bartofzo/NativeTrees

    Hope any of you find this useful!
     
    Kobix likes this.
  2. Kobix

    Kobix

    Joined:
    Jan 23, 2014
    Posts:
    111
    Thank you, that will be useful! :D