sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] RayTrace & RaySpray

    Scheduled Pinned Locked Moved Plugins
    46 Posts 23 Posters 74.5k Views 23 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.
    • Didier BurD Offline
      Didier Bur
      last edited by

      Cool plugin TIG !
      I'll surely use it to explain to my students how light bounces when hiting objects and so on 😎
      I cannot see the usual red-green-black-blue-cyan colored dots when snapping points for postionning the start and end points. Is this normal ?

      DB

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        @didier bur said:

        Cool plugin TIG !
        I'll surely use it to explain to my students how light bounces when hitting objects and so on 😎
        I cannot see the usual red-green-black-blue-cyan colored dots when snapping points for postioning the start and end points. Is this normal ?

        I have probably not set 'inferencing' properly in the tool code !
        I did it in a rush... πŸ˜’
        I'll look at it..........

        TIG

        1 Reply Last reply Reply Quote 0
        • Didier BurD Offline
          Didier Bur
          last edited by

          I give you 1 hour to correct the problem. And please DON'T GO TO SLEEP. HEAR ME ? 🀣

          DB

          1 Reply Last reply Reply Quote 0
          • kenK Offline
            ken
            last edited by

            TIG

            Thanks for a fun plugin. I know other will need this, and I know sometime in the future I will be able to find a good use for this plugin.

            On a side note, my version just keep bouncing the ole rays until it doesn't hit anything. I was playing with it in a box. Selecting the "NO" bottom does not stop the rays.

            Just passing this on. If I am the only one with this problem, I can live with it.

            Again, thanks for plugin. Can't wait until I find some usual project for this plugin.

            Ken

            Fight like your the third monkey on Noah's Ark gangway.

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              Here's v1.2 http://forums.sketchucation.com/viewtopic.php?p=235227#p235227
              The bouncing now stops on 'No' - stupid typo πŸ˜’
              Inferencing improved.
              [Sorry it took so long - but I do have to eat etc... πŸ˜‰ ]

              TIG

              1 Reply Last reply Reply Quote 0
              • H Offline
                hebeijianke
                last edited by

                TIG
                thx
                Can you make a icon for this plugin

                1 Reply Last reply Reply Quote 0
                • L Offline
                  lbjazz
                  last edited by

                  Holy crap - THANK YOU! I've been needing something like this for a while but don't have the time to learn enough Ruby to make it happen. You ROCK!

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    lincol
                    last edited by

                    I cannot find any link to this. It would be really handy to me for roughing up mirror lenses. Where is link

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      @lincol said:

                      I cannot find any link to this. It would be really handy to me for roughing up mirror lenses. Where is link

                      First post on the first page of this thread.

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

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        lincol
                        last edited by

                        thanks - I didnt have proper access - something to do with new subscription
                        lin

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          mus257
                          last edited by

                          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

                            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

                              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

                                Thanks Tig,

                                Will be useful to me i am sure.

                                Regards

                                Sam

                                1 Reply Last reply Reply Quote 0
                                • TIGT Offline
                                  TIG Moderator
                                  last edited by

                                  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

                                    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
                                    • thomthomT Offline
                                      thomthom
                                      last edited by

                                      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

                                        @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
                                        • TIGT Offline
                                          TIG Moderator
                                          last edited by

                                          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

                                            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
                                            • 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