sketchucation logo sketchucation
    • 登入
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    [Code] Raytest Util

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    23 貼文 6 Posters 1.4k 瀏覽 6 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • AdamBA 離線
      AdamB
      最後由 編輯

      Another way of thinking about it is that Arrays are actually Hash tables using a really simple hashing algorithm that is:

      hash(N) => N

      Have a good weekend!

      Developer of LightUp Click for website

      1 條回覆 最後回覆 回覆 引用 0
      • OricAtmosO 離線
        OricAtmos
        最後由 編輯

        @adamb said:

        The wavelength of light is small so mostly you can ignore diffraction effects and treat light as moving in straight lines. Audio wavelengths are much longer and have significant diffraction around corners (hence you can hear round corners!), so how does using (straight line) raytracing help here?

        Good observation! Raytracing is essentially just an approximation of how sound travels. Diffraction can't be modeled that way. As far as I know, simulating diffraction is still a hot topic in the field of acoustics and there's no catch-all automatic solution yet. (I'm not an expert in acoustics, I'm just a Computer Science student doing some coding at an acoustics chair/institute)

        1 條回覆 最後回覆 回覆 引用 0
        • jiminy-billy-bobJ 離線
          jiminy-billy-bob
          最後由 編輯

          I've been playing with raytest a bit. From my understanding, it works like this:

          • It checks ALL entities in the model root context
          • If something is hit and it's a face/edge/etc, the raytest returns the entity
          • If the hit entity is a group or component, it again checks ALL entities in that group/comp
          • And so forth until it hits a face/edge/etc

          So if you have a lot of loose geometry in one of the hit contexts, it will be damn slow. But you can have a shitload of geometry in a group/comp not on the path of the ray, and you'll have decent performances.

          To check if a group/comp is hit, the raytest doesn't look at the geometry inside it, but rather at its bounding box.
          This is really important because you could have a lot of geometry away from the ray, but if the bounding box of the containing group is on the ray path, all of that geometry will be checked. Resulting in a slow raytest.

          I hope it's clear?

          25% off Skatter for SketchUcation Premium Members

          1 條回覆 最後回覆 回覆 引用 0
          • 1
          • 2
          • 2 / 2
          • 第一個貼文
            最後的貼文
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement