Bonsai: A Voxel Engine, from scratch

(github.com)

104 points | by jesse__ 7 hours ago

7 comments

  • xyzsparetimexyz 2 hours ago
    It's really not that hard to ray trace the voxels instead of using rasterization and allows for way higher voxel counts.

    https://dubiousconst282.github.io/2024/10/03/voxel-ray-traci...

    • ghc 53 minutes ago
      I've always wondered why voxel engines tend to produce output that looks so blocky. I didn't realize it was a performance issue.

      Still, games like "C&C: Red Alert" used voxels, but with a normal mapping that resulted in a much less blocky appearance. Are normal maps also a performance bottleneck?

      • codeflo 22 minutes ago
        Before Minecraft, basically all voxel engines used some form of non-axis-aligned normals to hide the sharp blocks. Those engines did this either through explicit normal mapping, or at the very least, by deriving intermediate angles from the Marching Cubes algorithm. Nowadays, the blocky look has become stylish, and I don't think it really even occurs to people that they could try to make the voxels smooth.
        • wongarsu 3 minutes ago
          I think marching cubes is still decently popular in games with modifiable terrain, we just stopped referring to it as voxels
  • tyleo 49 minutes ago
    I’ve been using Voxel Max for the last couple weeks to draw voxel art for a game and it’s incredible.

    I’ll have to try some of my assets out in this engine.

  • another_twist 4 hours ago
    The author mentions simplicity in their Readme. I would be very interested to read their journey and some of the decisions they made where they preferred simplicity. More of this please !
  • wiz21c 5 hours ago
  • Joel_Mckay 3 hours ago
    Nice project, this tutorial was also helpful for a hobby volumetric data display routine. Cheers =3

    "I Optimised My Game Engine Up To 12000 FPS" ( https://www.youtube.com/watch?v=40JzyaOYJeY )

    https://github.com/vercidium-patreon/meshing

  • javantanna 4 hours ago
    btw the license is nuts
    • nonoesp 4 hours ago
      WTFPL (Do What The F*k You Want To Public License) https://en.wikipedia.org/wiki/WTFPL
      • andersa 57 minutes ago
        This seems like a bad idea. Surely the warranty and liability disclaimer found in licenses like MIT exists for a reason.
        • swiftcoder 30 minutes ago
          > Surely the warranty and liability disclaimer found in licenses like MIT exists for a reason

          Obviously IANAL, but I entirely don't see how the WTFPL (which does not ask the consumer to accept any restrictions) would create an implied contract (which would seem to be a necessary precondition for a warranty obligation)?

          • codeflo 12 minutes ago
            IANAL either, so my own legal theories are as creative as yours, but I'd like to offer the following data point: All unrestricted open-source licenses that were written by actual lawyers, from MIT to CC0, have found it necessary to include such a liability clause.
        • gorgoiler 20 minutes ago
          Off the top of my head the CAPITALIZED WARRANTY DISCLAIMER is specific to a subset of states in the US. If you’re outside those jurisdictions (or any other where it is required) then for aesthetic or principled reasons I can see why you wouldn’t kowtow to the legalese spiral.
    • Zambyte 3 hours ago
      To be fair, most are.
    • nurettin 1 hour ago
      Better than LGPL which prevents you from static linking even if you give attribution.