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

    Face Sun Plug-in

    Scheduled Pinned Locked Moved Plugins
    19 Posts 7 Posters 3.7k Views 7 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.
    • C Offline
      construsol
      last edited by

      Jim:

      I also think it wouldn't be hard, but I dont do Ruby, or any kind of programming. I hopping someone can help making the program or telling where I can learn to do it.

      @jim said:

      A plug-in does not exist as far as I know, but it wouldn't be hard to write.

      How's your Ruby programming?

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

        We can get the vector to the Sun's rays ( Sketchup.active_model.shadow_info["SunDirection"]). This should be equivalent to the face.normal, so we just need to make a rotation transformation to align these two vectors [say about the face.bounds.center with the axis obtained from the cross of the vectors ?] and then apply that to the face's vertices en mass (I assume it'd be a loose 'face' ??)... 🤓

        TIG

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

          Would also need a Shadow observer to update when as the Sun changes.

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

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

            @thomthom said:

            Would also need a Shadow observer to update when as the Sun changes.

            That's assuming it was to auto-update its orientation - otherwise a one-off - 'set_the_face_to_look_at_the_sun_now' tool would simply reorient the face to look direct at the current sun's position - but if the sun moved the face wouldn't ?

            TIG

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

              I got the impression live update was part of the request.

              @construsol said:

              . It would work like the existing feature "Face Camera"

              But if a one of adjustment is all that is needed then it'd simply things - avoiding pesky observers.

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

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

                With it auto-updating via 'pesky observers' you would get a weird model, with things turning to the sun as it changed between scenes like a time-lapse movie of flowers ??? Better, but much more convoluted code-wise...

                TIG

                1 Reply Last reply Reply Quote 0
                • facerF Offline
                  facer
                  last edited by

                  The SunTools plugin by Guedi Capeluto has a feature called "Sun View"
                  which gives an axonometric view from the Sun.

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    construsol
                    last edited by

                    Hi Thomthom:

                    Live update is not needed, just make a plane face to a direction in which the sun would be in a specific date and time, and keep that orientation fixed even if the sun starts to move.

                    @thomthom said:

                    I got the impression live update was part of the request.

                    @construsol said:

                    . It would work like the existing feature "Face Camera"

                    But if a one of adjustment is all that is needed then it'd simply things - avoiding pesky observers.

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

                      Made a quick plugin: http://forums.sketchucation.com/viewtopic.php?f=323&t=27499

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

                      1 Reply Last reply Reply Quote 0
                      • GaieusG Offline
                        Gaieus
                        last edited by

                        I have also seen a dynamic component of a solar panel that followed the sun.

                        Gai...

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

                          Yea - good point. Though I never manage to find it when I want to use it as an example...

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

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            construsol
                            last edited by

                            Thank you very much, this is just what I needed with the "Face Sun" Plug-in. I tested it by putting a perpendicular line to the plane that is facing the sun and it does not cast shadows, so it looks that it works great. One question, ¿How can a plane of a cube be selected and then the entire cube, not just the plane, faces the sun? Thanks again.

                            @thomthom said:

                            Made a quick plugin: http://forums.sketchucation.com/viewtopic.php?f=323&t=27499

                            1 Reply Last reply Reply Quote 0
                            • GaieusG Offline
                              Gaieus
                              last edited by

                              @thomthom said:

                              Yea - good point. Though I never manage to find it when I want to use it as an example...

                              I got it - posted here:

                              Subject: Solar panels that track the sun

                              @dsarchs said:

                              The solar panel is under the "solar panel" tab for this component

                              Gai...

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

                                @construsol said:

                                Thank you very much, this is just what I needed with the "Face Sun" Plug-in. I tested it by putting a perpendicular line to the plane that is facing the sun and it does not cast shadows, so it looks that it works great. One question, ¿How can a plane of a cube be selected and then the entire cube, not just the plane, faces the sun? Thanks again.

                                @thomthom said:

                                Made a quick plugin: http://forums.sketchucation.com/viewtopic.php?f=323&t=27499

                                I could make it orient the connected geometry to the selected faces. Doubt I have time until after the weekend though.

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

                                1 Reply Last reply Reply Quote 0
                                • C Offline
                                  construsol
                                  last edited by

                                  Thom:

                                  I would greatly appreciate it if you can do this. Thanks again for your help.

                                  @thomthom said:

                                  @construsol said:

                                  Thank you very much, this is just what I needed with the "Face Sun" Plug-in. I tested it by putting a perpendicular line to the plane that is facing the sun and it does not cast shadows, so it looks that it works great. One question, ¿How can a plane of a cube be selected and then the entire cube, not just the plane, faces the sun? Thanks again.

                                  @thomthom said:

                                  Made a quick plugin: http://forums.sketchucation.com/viewtopic.php?f=323&t=27499

                                  I could make it orient the connected geometry to the selected faces. Doubt I have time until after the weekend though.

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

                                  Advertisement