sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Elev45shadows.rb help

    Scheduled Pinned Locked Moved Developers' Forum
    24 Posts 4 Posters 2.8k Views 4 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.
    • brodieB Offline
      brodie
      last edited by

      Whenever I use elev45shadows.rb to try and get 45 degree shadows it basically sets the shadow settings so that my whole model is in shadow. It also causes a weird problem where the times of day along my time slider change. I can't remember the exact times but it's something like instead of say 6am-9pm it'll go to 5pm-8am.

      Anyone have this problem w/ the script? Know of a fix?

      -Brodie

      steelblue http://www.steelbluellc.com

      1 Reply Last reply Reply Quote 0
      • G Offline
        gashtan
        last edited by

        i have the same problem, but i dont have a fix πŸ˜„
        recently I stop using this plugin for that

        1 Reply Last reply Reply Quote 0
        • R Offline
          rv1974
          last edited by

          The same here. The cure is to change location degree a little bit (+-1).But If you'd fix this right state by creating a page it wouldn't remember right shadow position
          Stop using this .rb is better solution.
          Even more: I guess the shadow stuff is the most stinky part of SU: the pages don't remember shadow position,after export-import pages (exim.rb) your skp file get into twilight zone- no shadows at all,
          codec tragedy etc 🀒

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

            This script is nearly three years old and no one has reported this problem before...

            Are you using it as set out in the instructions ? Remember to set up specific pages (scenes) for these 45 degree shadowed elevations since the 'real' location/shadows are never going to give the desired angle etc at any time/day... When you've applied the 45 degree shadows to a page update that page tab so it remembers the settings for that elevation...
            ... extract from start of script...

            Usage : Set up your elevation-view page(s). Tip - Select an

            elevation face and right-click and pick Align View to

            get a non-orthogonal [non-F/B/L/R] elevation.

            Then select this tool from the menu and it will

            automatically work out camera view direction and add

            shadows as if the sun is from the top-left of the view

            at 45 degrees in elevation or in plan...

            Note aligning views to 3D sloping faces will have

            unexpected affects.

            It will realign North in each altered view so IF North

            is important in other shadow studies ensure that pages

            are kept separate.

            Shadow setting changes are NOT Undo-able...

            To toggle shadows to 'top-right' for that session open

            the Ruby Console, and type or copy-paste the following

            and press enter = $e45s=0

            to turn back it's = $e45s=1 or just restart SketchUp.

            .

            TIG

            1 Reply Last reply Reply Quote 0
            • R Offline
              rv1974
              last edited by

              Hi TIG!
              This is a typical situation after your script. Check it please.45.skp

              1 Reply Last reply Reply Quote 0
              • R Offline
                rv1974
                last edited by

                In this case restoring scene1 repairs everything but very often only tweaking location degree helps. I thought it's a video card issue but it jumps out on different PCs. πŸ˜•


                ScreenShot001.jpg

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

                  What you uploaded hasn't has 45shadows applied to it- see original location etc. If I apply 45shadows it works fine ? Your Country and Location should change to "Elevation 45 shadows" !

                  Please explain the steps you take and what goes wrong when...

                  .

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rv1974
                    last edited by

                    1/ Align view for some specific face.
                    2/ Create a scene.
                    3/ Apply script- get black hole sun.
                    4/ Update scene- darkness stays on (see attachment BEFORE clicking "scene 4")
                    5/ Closing- reopening- restoring specific scene- everything is OK (click scene 4 tab)


                    45-3.skp

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

                      Even your Scene4 tab is NOT fully 45 degrees ? I can't get this error to reproduce at all. At my end everything works as expected, when I run the script the scenes's settings are changed correctly and the updating saves it...

                      What version and OS are you on ?

                      .

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • brodieB Offline
                        brodie
                        last edited by

                        My problem is, indeed, identical to RV's problem. I'm on Windows XP w/ SU6. What seems to happen is that the degree of the sun angle will change but from what you've said the location should also change, but it does not. It simply stays at Boulder, CO. I wonder if the script looks for something that it can't find on my computer (like the location of 45 Degree Shadow)? I don't know ruby so I'm just guessing. The script would come in really helpful though if it get's fixed. Let me know if there's any more info I can provide that would help you diagnose the problem.

                        Thanks,

                        -Brodie

                        steelblue http://www.steelbluellc.com

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

                          The script forces a new place / country and north-angle, + sun=angle so that the shadows work at 45 degrees on that elevation. As I said I can't get it to reproduce here and It's fine on simialr set ups to yours... ???

                          .

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • brodieB Offline
                            brodie
                            last edited by

                            @tig said:

                            The script forces a new place / country and north-angle, + sun=angle so that the shadows work at 45 degrees on that elevation. As I said I can't get it to reproduce here and It's fine on simialr set ups to yours... ???

                            .

                            hrm...guess I'll have to settle w/ my ol' 48 degree manual shadows 😞

                            The other weird thing I've noticed is what your ruby does to the time settings in the shadow settings dialog box. Don't know if this is intentional or not. If you open the first skp file RV posted you'll see that it sets the time to go from 11:10am to 11:01pm. I'm not sure if it's always this range but it is always changed to a very odd range and as I recall this affects all other shadow settings. I'd have to go and verify but I think if you've already got a scene set up, say scene 1. and then you go into scene 2 and apply the ruby and go back to scene 1 the slider is in the same position but since the range changed what was, say 1pm, is now, say, 10pm.

                            Let me know if any of that make sense or if you need me to go and verify all that stuff. Don't know if it'll help you.

                            -Brodie

                            steelblue http://www.steelbluellc.com

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

                              The script has to (re)set the time (and where north is) to get the sun at the right place in the sky to cast the shadow at 45 degrees on the chosen elevation. If you have several pages (scenes) set up you should ensure that they are saved with the particualr location and date+time etc you desire. Make new page(s) for the 45 degree shadows and when it's done update that too...

                              You should be able to have several pages each with different times/dates etc...

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • brodieB Offline
                                brodie
                                last edited by

                                I took a quick crack at it. This file has 3 scenes. I created the first 2 w/ shadows on at different times of the day, then created the 3rd one using the ruby (which turned everything dark as it has been). Going back to my other scenes did indeed change the time range back to normal however everything was still dark, weird.

                                -Brodie


                                shadow test.skp

                                steelblue http://www.steelbluellc.com

                                1 Reply Last reply Reply Quote 0
                                • brodieB Offline
                                  brodie
                                  last edited by

                                  TIG, could you post a skp file w/ a saved scene using your ruby so I can open it and see what happens?

                                  -Brodie

                                  steelblue http://www.steelbluellc.com

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

                                    Here's an example...

                                    A normal scene plus a north and west elevation with 45 shadows. Update each tab as the scene is made and each scene has a different north, date, time, location etc to get the shadows as needed...


                                    45test.skp

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • brodieB Offline
                                      brodie
                                      last edited by

                                      Very interesting. Here's what I'm finding. Using your plugin does indeed change the location in terms of latitude and longitude. What it doesn't change is the name (still Boulder instead of Elevations 45 Shadows or whatever) or (here's the important part) the time zone. Time zone stays at -7 (Boulder's time zone) rather than switching to +0 (the time zone in the skp file you posted).

                                      Starting a new drawing, using your script and then manually changing the time zone produced results identical to the results of your sketchup file.

                                      HOWEVER, when I open your SU file the shadows aren't truely 45 degrees. Well, I take that back. They are 45 degrees, however the shadows aren't as long as I'd expect them. For example, if a block is protruding out 1 foot you'd expect the shadow to travel 45 degrees and to stop 1' down and 1' to the right. W/ your script it travels 45 degrees but not quite the full 1' down and 1' over. Check out the example below. On my screen the shadow stops just before the purple face. I'd expect it to travel to the far end of the purple face.

                                      I think we're getting close here. On your screen does the shadow cover up the purple face in my example because on mine it doesn't.

                                      -Brodie


                                      45test 1.skp

                                      steelblue http://www.steelbluellc.com

                                      1 Reply Last reply Reply Quote 0
                                      • brodieB Offline
                                        brodie
                                        last edited by

                                        an image to reiterate what I'm saying


                                        45test 1.jpg

                                        steelblue http://www.steelbluellc.com

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

                                          It always changes the location name for me...

                                          Point taken about the 45 degree accuracy. I've fixed it to within a smidge of a mm... Needed minor adjustments to time of day and long/lat to get it 'as near as damn is to swearing'. The 'Boulder' Time Zone bit was from a typo that's corrected...

                                          See updated script... http://www.sketchucation.com/forums/scf/viewtopic.php?p=98081#p98081

                                          .

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • brodieB Offline
                                            brodie
                                            last edited by

                                            Bloody wonderful. Agreed, that is much closer. That did, indeed fix the location issue (doesn't still say Boulder, CO any more). I'm still having to manually change the time zone from -7 to +0 but I can certainly live w/ that! Thanks a ton, glad we finally figured this out.

                                            Only thing I'd suggest is adding a caveat in the text of your script and maybe in that other post as well to folks, that if the screen goes dark after running the script to go to Window -> Model Info -> Location -> Custom Location button and change time zone to UTC-0

                                            Thanks again!

                                            -Brodie

                                            steelblue http://www.steelbluellc.com

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

                                            Advertisement