• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

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

Scheduled Pinned Locked Moved SketchUp Bug Reporting
sketchup
26 Posts 6 Posters 6.0k 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.
  • J Offline
    jeff hammond
    last edited by 19 Dec 2009, 00:48

    i use the 'reset camera' feature in skindigo to avoid this upon a 2d export but you could also use rickw's script found here:

    favicon

    (www.smustard.com)

    if you need to export 2d views at a certain aspect ratio, try doing it via pixel size (1500x1000 for 1.5:1 etc..).. you can use the black bars to visualize the ratio but make sure to get rid of them prior to exporting.. if you do the math right for pixel ratio/aspect ratio, the exported 2D image will exactly match what you see in the SU window with the camera bars (as i do this sometimes for overlaying a 2Djpg from SU onto a render and never had a problem with mismatched ratios)

    not sure if this is a bug or not but these are the workarounds i use.

    dotdotdot

    1 Reply Last reply Reply Quote 0
    • R Offline
      red_shift
      last edited by 20 Dec 2009, 22:24

      Either I am not using it correctly or the Fix aspect ratio ruby doesn't fix the issue with the random gray blocks/bars showing up on the exported images. If I use the Maxwell plugin to show me the camera view in SU, I am unable then to export images from SU without the gray blocks/bars whether I use Fix Aspect Ratio or not.

      1 Reply Last reply Reply Quote 0
      • J Offline
        JD Hill
        last edited by 21 Dec 2009, 15:32

        @unknownuser said:

        not sure if this is a bug or not...

        I'm guessing that it is:

        su_output.jpg

        As red_shift says, it becomes a problem when using the Maxwell plugin because the plugin relies on the SU camera's aspect_ratio to allow the user to see how the film size they are using in their Maxwell camera will affect their rendered output.

        That's how this affects Maxwell users -- however, it is not Maxwell-specific; any script or plugin which relies on SU's Camera::aspect_ratio= method to accomplish its goal will bump into this issue.

        Developer - Bella Render

        1 Reply Last reply Reply Quote 0
        • G Offline
          Gaieus
          last edited by 21 Dec 2009, 15:44

          Lately I use Twilight Render and its previous version also put these grey bars onto the screen when I set a render output other than my native SU window was. But then - with a press of a button - I could get rid of them.

          True that it currently only works on Windows (and I also use XP) so it is just farther related. For me, the fix aspect ratio has always worked when I encountered such an issue (true that a bunch of plugins can cause this) however I have never used Maxwell.

          Gai...

          1 Reply Last reply Reply Quote 0
          • R Offline
            red_shift
            last edited by 22 Dec 2009, 12:41

            Do we have anyone else on a Mac that could perhaps shed some light on this problem? It greatly restricts my ability to overlay Sketchup output on Maxwell renders.

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 22 Dec 2009, 12:47

              @red_shift said:

              Either I am not using it correctly or the Fix aspect ratio ruby doesn't fix the issue with the random gray blocks/bars showing up on the exported images. If I use the Maxwell plugin to show me the camera view in SU, I am unable then to export images from SU without the gray blocks/bars whether I use Fix Aspect Ratio or not.

              After you used Fix Aspect Ratio - so the gray bars isn't visible in SU - they still export?

              My V-Ray Toys plugins has a function that exports from SU an image of only what's between the grey bars.

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

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 22 Dec 2009, 12:48

                hmm.... it was never tested for OSX... 😕 VfSU is PC only so I never tested compatibility....

                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 22 Dec 2009, 16:54

                  Yes..after Fixaspectratio bars are not visible, but what exports can be a variety of bars placed all over the image, as in post from JDhill.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jeff hammond
                    last edited by 23 Dec 2009, 03:56

                    yeah, i just tried exporting a jpg after using fixaspectratio and it's still messed up..

                    [edit] oh wait -- it does work.. earlier, i exported a messed up version then used 'fix aspect ratio' prior to exporting again using the same file name (overwriting).. the thumbnail still showed the bars but the actual file is ok.. if i don't overwrite a previously messed up file then the thumbnail appears correctly as well.

                    so yeah, clear the black bars prior to exporting using fixaspectratio.rb ...it will be placed in the camera menu titled 'Reset Aspect Ratio'.

                    i also just tried thomthom's vray toys and it worked too (on a mac)

                    [previous post continues here----]
                    like i said earlier, i use skindigo's fix camera feature and it works fine.. it might be kinda weird to use skindigo for this feature alone but that's the only workaround i know of at the moment..

                    you'd need to install the free version of indigo from here: [i think.. i'm not sure if skindigo will load without having indigo on the machine but you can try only skindigo first if you want]
                    http://www.indigorenderer.com/download

                    you can download the mac skindigo installer from this page:
                    http://www.indigorenderer.com/documentation/sketchup

                    of course, you could also put in a request to get this as a standalone ruby.. whaat obviously knows how to fix this but as far as i know, he's only published this feature in the full skindigo package..

                    dotdotdot

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      jeff hammond
                      last edited by 23 Dec 2009, 07:00

                      @jd hill said:

                      @unknownuser said:

                      not sure if this is a bug or not...

                      I'm guessing that it is:

                      [attachment=0:2xaaoj67]<!-- ia0 -->su_output.jpg<!-- ia0 -->[/attachment:2xaaoj67]

                      right, i know that 2D exports get screwy after the aspect ratio changes.. i was just saying i'm not sure if it qualifies as a SU bug since it's always ruby activated and not native SU..

                      dotdotdot

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        red_shift
                        last edited by 23 Dec 2009, 12:22

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

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          jeff hammond
                          last edited by 23 Dec 2009, 13:32

                          @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
                          • G Offline
                            Gaieus
                            last edited by 23 Dec 2009, 15:18

                            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 24 Dec 2009, 16:59

                              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
                              • J Offline
                                jeff hammond
                                last edited by 24 Dec 2009, 18:44

                                @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
                                • T Offline
                                  thomthom
                                  last edited by 25 Dec 2009, 12:48

                                  "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 25 Dec 2009, 16:57

                                    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
                                    • J Offline
                                      jeff hammond
                                      last edited by 25 Dec 2009, 18:30

                                      @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
                                      • T Offline
                                        thomthom
                                        last edited by 25 Dec 2009, 19:14

                                        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
                                        • J Offline
                                          jeff hammond
                                          last edited by 25 Dec 2009, 21:08

                                          @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
                                          • 1
                                          • 2
                                          • 1 / 2
                                          1 / 2
                                          • First post
                                            11/26
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement