• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

[Code] Raytest Util

Scheduled Pinned Locked Moved Developers' Forum
23 Posts 6 Posters 1.3k Views 6 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    AdamB
    last edited by 13 Jun 2014, 14:24

    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 Reply Last reply Reply Quote 0
    • O Offline
      OricAtmos
      last edited by 15 Jun 2014, 20:44

      @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 Reply Last reply Reply Quote 0
      • J Offline
        jiminy-billy-bob
        last edited by 21 Jun 2014, 09:26

        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 Reply Last reply Reply Quote 0
        • 1
        • 2
        • 2 / 2
        2 / 2
        • First post
          21/23
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement