BrickMap | A high performance realtime CUDA voxel path tracer | GPU library

 by   stijnherfst C++ Version: Current License: MIT

kandi X-RAY | BrickMap Summary

kandi X-RAY | BrickMap Summary

BrickMap is a C++ library typically used in Hardware, GPU applications. BrickMap has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

The system is based on this paper with some adjustments to reduce memory and add LoDs. One important improvement is that the paper does one allocation per "Brick" (8x8x8 voxel block) on the GPU. Instead of using pointers we can simply use indices that index into a linear block of memory. When due to the streaming system the block of memory fills up we simply double its size (allocate a bigger memory chunk and copy the old bricks). To keep the index small and further improve data locality, we divide the world in superchunks each composed of 16x16x16 normal 8x8x8 bricks which means that the maximum index value is 4095 (16x16x16) which only takes up 12 bits. The standard size of the brick storage for a superchunk is 256 * 64 bytes which should fit one surface worth of bricks (16x16). We double the storage size every time it fills up, so 256->512->1024->etc... When a ray hits a brick that has not yet been loaded on the GPU it will add the request to a request buffer. The CPU will then upload the brick to the GPU. This way only bricks that lay on the surface of a superchunk will be loaded since rays won't penetrate into the inside of a superchunk. Since a superchunk contains 4096 bricks (16x16x16), we only need 12 bits for an index which leaves us with either 4 or 20 bits depending on whether we use a 16 bit or a 32 bit index. 3 of these bits are used for flags for the streaming system (brick_loaded, brick_unloaded, brick_requested). Since there are no hardware atomics for 16 bit integer datatypes and rolling our own would be slow, we use a 32 bit index. By using a 32 bit index we are left with 17 bits that we can use for other purposes such as a 2x2x2 LoD which uses only 8 bits. In total there are 3 LoD levels, 8x8x8, 2x2x2, 1x1x1 which is the finest. Rendering performance wise I saw no big difference in frametimes/rate, but the number of chunks requested to be streamed did decrease significantly. Unfortunately Cuda does not offer access to the hardware accelerated ASTC/DXT1 texture decompression which I could use to store colors per voxel. This would mean that I would have to write a software decompressor which would probably be a lot slower. Voxel terrain data is inherently well suited for these types of texture compression as they are often gradient like in color. Maybe some type of specialistic voxel color compression algorithm could be devised for this. 16384x16384x512 (~75 billion filled voxels) and uses ~2.2GB VRAM, 30-50 fps 1920x1080.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              BrickMap has a low active ecosystem.
              It has 45 star(s) with 7 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 2 have been closed. On average issues are closed in 394 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of BrickMap is current.

            kandi-Quality Quality

              BrickMap has 0 bugs and 0 code smells.

            kandi-Security Security

              BrickMap has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              BrickMap code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              BrickMap is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              BrickMap releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of BrickMap
            Get all kandi verified functions for this library.

            BrickMap Key Features

            No Key Features are available at this moment for BrickMap.

            BrickMap Examples and Code Snippets

            No Code Snippets are available at this moment for BrickMap.

            Community Discussions

            Trending Discussions on BrickMap

            QUESTION

            Java doesn't understand the logic of this code
            Asked 2017-Mar-26 at 04:53

            I have a code from a tutorial for a Java Breakout Game. The part of the code is the Brickmap. The problem is i don't really understand the logic behind this code and i will not just copy the code.

            I just know that creat a variable map with an array. After that i put the two variable "row" and "col" in this array. The Problem is that i dont understand the "map.lenght".

            ...

            ANSWER

            Answered 2017-Mar-25 at 21:28

            map.length returns the number of elements in the array.

            map[0].length returns the number of elements in the first array within the map array (which is two-dimensional).

            Source https://stackoverflow.com/questions/43022135

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install BrickMap

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/stijnherfst/BrickMap.git

          • CLI

            gh repo clone stijnherfst/BrickMap

          • sshUrl

            git@github.com:stijnherfst/BrickMap.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link