• frezik@midwest.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Ray tracing speed primary depends on the number of pixels, not the complexity of the scene.

      • pixeltree@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        8 months ago

        The complexity of your scene makes a huge difference. If your scene has fewer things for light to bounce off of, doing the ray tracing is much faster

        (Source: I do blender renders with cycles)

        • frezik@midwest.social
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          So I’m not exactly sure how Blender implements this. There can be a few details that can make a huge difference. Just for starters, is Blender rendering 100% ray tracing here, or is it a hybrid model with a rasterizer. Rasterizers tend to scale with the number of objects, while ray tracing scales with the number of pixels. A hybrid will be, obviously, something in between.

          Then there is how it calculates collisions. There is a way to very quickly detect collisions of AABB boxes (basically rectangles that surround your more complicated object), but it takes a little effort to implement this and get the data structures right. You can actually do Good Enough sometimes by matching every ray to every AABB, and then you do more complex collision checking against what’s left, but there’s a certain scale where that breaks down.

          Blender is generally very well done from what little I know of it, but I’m not sure how it handles all these tradeoffs.