• Login
sketchucation logo sketchucation
  • Login
🤑 30% Off | Artisan 2 on sale until April 30th Buy Now

[Plugin] RayTrace & RaySpray

Scheduled Pinned Locked Moved Plugins
46 Posts 23 Posters 74.4k Views
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.
  • M Offline
    mus257
    last edited by 10 May 2010, 18:31

    This is really interesting. I look forward to sifting through the code.

    As a sound and video designer, I can say this could be very handy. It does however have some issues for practical use as it stands.

    When using spray, all sources must be assumed as omnidirectional. It would great to be able to show just a 50 degree spray and specify the focus. As it stands you have to show spray as "flat", i.e. no tilt in the XYZ axes. This prevents you from, say, angling a speaker down. I do use more advanced sound software like EASE for this normally, but I think Sketchup could work better for showing raytracing to a client than EASE.

    In trace mode, it would be cool to be able to just show source and direction and the first reflection angle is calculated when it encounters a face. I have coverage angles I use in Sketchup and used them to illustrate. Right now, if I click on the origin, then the end of the coverage line, it calculates the reflection off the end of the line, not off the face it's aimed at.

    Just some thoughts if you keep modifying the script. Thanks for the awesome work.

    1 Reply Last reply Reply Quote 0
    • M Offline
      mus257
      last edited by 10 May 2010, 18:32

      raytrace test.skprayspray test.skpThis is really interesting. I look forward to sifting through the code.

      As a sound and video designer, I can say this could be very handy. It does however have some issues for practical use as it stands.

      When using spray, all sources must be assumed as omnidirectional. It would great to be able to show just a 50 degree spray and specify the focus. As it stands you have to show spray as "flat", i.e. no tilt in the XYZ axes. This prevents you from, say, angling a speaker down. I do use more advanced sound software like EASE for this normally, but I think Sketchup could work better for showing raytracing to a client than EASE.

      In trace mode, it would be cool to be able to just show source and direction and the first reflection angle is calculated when it encounters a face. I have coverage angles I use in Sketchup and used them to illustrate. Right now, if I click on the origin, then the end of the coverage line, it calculates the reflection off the end of the line, not off the face it's aimed at.

      Just some thoughts if you keep modifying the script. Thanks for the awesome work.

      1 Reply Last reply Reply Quote 0
      • M Offline
        mus257
        last edited by 18 May 2010, 17:31

        Hi TIG,

        I got back to playing with the rayspray last night and was using it for a noise study at my apartment. (We have a Kragen parking lot next to the patio.) 😞 Anyway, I tried using the spray and deleting coverage that wasn't helpful. Then I realized it was much easier to just put a dome over the spray and adjust that to coverage that I cared about. i.e., I'm not looking at the noise flying up into the sky. Worked pretty well, an example is attached. It's a great tool, thanks. Though if you ever figure out how to aim a controlled spray or, say, 2 rays with a specific degree spread between them, this would be even more powerful for sound and light coverage.

        Thanks again
        Joe


        Rayspray.skp

        1 Reply Last reply Reply Quote 0
        • L Offline
          Lobster
          last edited by 25 Oct 2010, 12:24

          Thanks Tig,

          Will be useful to me i am sure.

          Regards

          Sam

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 25 Oct 2010, 12:32

            In v8 the 'raytest' method is flaky and it is used by these tools... BUT a fix is promised for MR1...

            TIG

            1 Reply Last reply Reply Quote 0
            • F Offline
              flowheimer
              last edited by 10 Jan 2011, 16:25

              I just discovered RayTrace/Spray today; I was searching for a plugin with just this sort of functionality and this appears to be the only one of its kind.

              If I may offer some feedback:

              I'm using it in Sketchup 8.0.3117 and am encountering some odd behaviour.
              For some reason, using RayTrace, sometimes a ray will bounce, and sometimes it just stops short of the next plane, even within a fully enclosed volume. As far as I can tell there is no consistency to this behaviour and thus no telling how many bounces (if any) a ray will perform before abruptly terminating mid-flight.

              Any ideas?

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 10 Jan 2011, 16:28

                Does it happen in SU7?
                There is a bug in the raytracing function in SU8.

                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • F Offline
                  flowheimer
                  last edited by 10 Jan 2011, 17:04

                  @thomthom said:

                  Does it happen in SU7?
                  There is a bug in the raytracing function in SU8.

                  It seems to work in SU7.
                  Guess I'll use 7 till it works in 8.

                  Thanks!

                  fH

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 10 Jan 2011, 23:31

                    An impending maintenance release for v8 might help with ray-tracing...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mjm6x9
                      last edited by 7 Mar 2011, 05:12

                      This is just the plugin I've been looking for!
                      I work for a dedicated acoustic consultancy firm and this is incredibly useful for small room acoustics projects.
                      I've several ideas on improvements, but just want to know if you are going to be developing this further in the near future?
                      Or what would be the possibility of buying the existing code from you and looking to develop it further ourselves??

                      The things I'd like to see developed are:

                      1. Specification of number of reflections in RaySpray (1st, 2nd, 3rd order etc)
                      2. Different coloured lines to display reflection order (e.g. 1st reflection blue, 2nd reflection green)
                      3. limit RaySpray to particular rotation angle, i.e. currently it runs through 360 degrees but could it be set to only run through 90 degrees)
                      4. Would it be possibly to highlight the reflecting surface when using RayTrace in order to easily establish which surface you are reflecting off (this is difficult to visualise currently)
                      5. Possible option of setting specific reflecting surface (maybe using Layers) so that reflections only occurred off these surfaces when using RaySpray

                      Look forward to hearing from you

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        BrooksL
                        last edited by 22 May 2012, 20:29

                        Wow TIG - I've been looking all over for a tool like this for a couple weeks! [I avoided the keywords ray trace because it turns up lots of results for rendering]

                        I need such to tool to look at angles of reflection and reflected angles for laser beam vision systems with mirrors - because figuring the angles manually can get quite tedious! Thanks!

                        A few bug/issues I'm finding with V1.2 20100326 - using in SketchUp 8 Pro 8.0.11752 -
                        Sometimes a ray will not reflect; the second point selection was an intersection of guidelines on a plane, but it wasn't reflecting from that point until I deleted the existing guides and guidepoints in that area and re-drew them (the original guides and points were indeed on the plane).
                        I don't see the magenta preview ray.
                        Seems to use a lot of CPU resources to during point selection - noticeable lag in following the mouse, but maybe that's just the SketchUp api.

                        With RaySpray;
                        The cursor inference point indicator is not showing up.
                        Some of the rays do reflect -- and stop when they hit an original sprayed ray -- and original rays stop when they hit a reflected ray. (sample file attached)

                        Still, this is a REALLY helpful plugin! Thanks, TIG!

                        [to help others find these helpful plugins, some additional keywords: Reflected Angle, Reflected Ray, Angle of Reflection, Beam Reflection, Beam Reflect, Reflection Guide ]


                        RaySpray V1.2 erratic in SketchUp 8.0.11752

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          lydfa
                          last edited by 14 Dec 2016, 14:16

                          Great plugin!
                          Thank you very much.

                          Cheers,
                          Dennis

                          1 Reply Last reply Reply Quote 0
                          • Z Offline
                            zlitalien
                            last edited by 18 Mar 2019, 16:37

                            TIG, this has been a great tool to use! I'm wondering if there's a way to make the ray auto adjust in real time if you move the object its reflecting off of?

                            1 Reply Last reply Reply Quote 0
                            • 1
                            • 2
                            • 3
                            • 3 / 3
                            • First post
                              Last post
                            Buy SketchPlus
                            Buy SUbD
                            Buy WrapR
                            Buy eBook
                            Buy Modelur
                            Buy Vertex Tools
                            Buy SketchCuisine
                            Buy FormFonts

                            Advertisement