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

    SU7.1 OSX camera aspect ratio vs. export 2D

    Scheduled Pinned Locked Moved SketchUp Bug Reporting
    sketchup
    26 Posts 6 Posters 6.0k 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.
    • jeff hammondJ Offline
      jeff hammond
      last edited by

      @red_shift said:

      Do you expect Twilight will have this issue if it ports to the Mac?

      i'm sure it will.. anything that changes the camera aspect ratio will do this.. as far as right now, the plugin writers for these external apps should probably offer an option to reset the camera.. fwiw, i think it's very simple to implement

      yet another way to fix this is using the same line from JD's original post:

      @unknownuser said:

      1. open ruby console
      2. type 'Sketchup.active_model.active_view.camera.aspect_ratio=1.5'
      3. hit enter

      execpt.. enter 0.0 as the ratio.. that will reset the camera to it's default and the jpg export will be okay.

      so that's 4 ways listed in the thread to take care of the issue. are you still unable to export a proper jpg after changing the aspect ratio?

      dotdotdot

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

        Twilight used to have these grey bars (along with an easy way to reset the camera9 but in the latest version, it was replaced by a more advanced feature (where you can move and target a red, frame-like net of lines that indicate the render window).

        Gai...

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

          The last solution (typing 'Sketchup.active_model.active_view.camera.aspect_ratio=0.0' into Ruby console is a workaround that seems to work, although overlaying SU output over the render requires some tweaking, it's good enough for now. Thanks.

          1 Reply Last reply Reply Quote 0
          • jeff hammondJ Offline
            jeff hammond
            last edited by

            @red_shift said:

            The last solution (typing 'Sketchup.active_model.active_view.camera.aspect_ratio=0.0' into Ruby console is a workarond that seems to work, although overlaying SU output over the render requires some tweaking, it's good enough for now. Thanks.

            yeah, that's why I like the skindigo method. It doesn't rezoom the window upon clearing the bars so it's a lot easier to export for overlays because the prerender and 2D jpg are identical.
            Whatever whaat did for skindigo could be made as a stand alone ruby but I personally don't have a clue how to write a plugin.

            dotdotdot

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

              "rezoom"?

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

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

                Well, I tried to add the skindigo render plugin, got the following message on SU startup

                Library/Application Support/Google SketchUp 7/SketchUp/Plugins/SkIndigo.rb:1887: parse error, unexpected ',', expecting kEND
                Sketchup::set_status_text ("Focus Distance"), SB_VCB_LABEL

                May I scream now? πŸŽ‰

                1 Reply Last reply Reply Quote 0
                • jeff hammondJ Offline
                  jeff hammond
                  last edited by

                  @thomthom said:

                  "rezoom"?

                  This would be a lot easier to explain eith a video but I'm not set up for that right now so....

                  With skindigo, the grey bars simply disappear when using the reset camera feature.
                  With the other methods, this doesn't happen. The space between the bars become the outer edges of the SU window upon fixing the aspect ratio hence zooming. If you were to change the aspect ratio then fix it a few times in a row, this 'rezooming' would be even more noticeable.

                  [EDIT] oops 😳
                  i got a chance to use a computer and i have the above explanation backwards.. the zooming happens with the "Sketchup.active_model.active_view.camera.aspect_ratio=1.5" method then setting it to 0.0 unzooms it.. (re my last sentence: you can't keep zooming in on the drawing like i described)..
                  regardless, with skindigo, the model stays put and no zooming/unzooming occurs.

                  dotdotdot

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

                    Ah yea, I've noticed that when you set camera's aspect ratio to be greater than the aspect ratio of the SU viewport, the camera zooms, or shifts. I've reported this as a bug in SU.

                    With VfSU, I found that setting the V-Ray camera's zoom ratio to be the same as the SU vewport ratio - then the output matches. Odd - but works.

                    But the camera doesn't shift if you set the aspect ratio to be less than the viewport ratio. If you set it to 1.0 for instance.

                    What I wonder SKindigo do is that it might not properly reset the aspect ratio - but instead matches the camera aspect ratio tot he SU viewport ratio. After you use SKindigo to reset, what happens if you resize the SU window?

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

                    1 Reply Last reply Reply Quote 0
                    • jeff hammondJ Offline
                      jeff hammond
                      last edited by

                      @thomthom said:

                      What I wonder SKindigo do is that it might not properly reset the aspect ratio - but instead matches the camera aspect ratio tot he SU viewport ratio. After you use SKindigo to reset, what happens if you resize the SU window?

                      everything works as expected afterwards..

                      i think whaat did something with setting the aspect ratio and not the resetting of it?

                      if i use skindigo to set the aspect ratio then reset via the ruby line using 'Sketchup.active_model.active_view.camera.aspect_ratio=0.0', the model will then zoom out.. i can set the aspect ratio via skindgo then reset using a method other than skindigo and the SU view will infact continue to zoom out

                      fwiw, in skindigo, it's not asking for an aspect ratio per se.. it's asking for render output dimensions in pixel size (1024x768 etc.).. the grey bars do appear however and resetting with rick's ruby etc does clear the bars.

                      dotdotdot

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

                        I think I'll have to have a look at Skindigo. sounds like it's correcting SU's odd behaviour. I'm qurious to study the other camera properties to see what's going on.

                        @unknownuser said:

                        fwiw, in skindigo, it's not asking for an aspect ratio per se.. it's asking for render output dimensions in pixel size (1024x768 etc.)
                        So when you set SKindigo's render output to 1024x768, then Sketchup.active_model.active_view.camera.aspect_ratio returns 1.3333, right?

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

                        1 Reply Last reply Reply Quote 0
                        • jeff hammondJ Offline
                          jeff hammond
                          last edited by

                          @thomthom said:

                          So when you set SKindigo's render output to 1024x768, then Sketchup.active_model.active_view.camera.aspect_ratio returns 1.3333, right?

                          correct

                          dotdotdot

                          1 Reply Last reply Reply Quote 0
                          • JD HillJ Offline
                            JD Hill
                            last edited by

                            Update: this bug is still present in SketchUp 8.

                            Developer - Bella Render

                            1 Reply Last reply Reply Quote 0
                            • jeff hammondJ Offline
                              jeff hammond
                              last edited by

                              @jd hill said:

                              Update: this bug is still present in SketchUp 8.

                              but not in 8.0.481 πŸ˜„
                              update

                              dotdotdot

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                driven
                                last edited by

                                yes it works...

                                One down,

                                but it handles, xray oddly when exporting tiff.... with transparency on...

                                john

                                learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                                Advertisement