sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [Plugin] Align Camera Light

    Scheduled Pinned Locked Moved Plugins
    10 Posts 5 Posters 14.6k Views 5 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.
    • Al HartA Offline
      Al Hart
      last edited by Al Hart

      Our next Rendering Tip is going to suggest that you use lights attached to the camera for easier illumination as you render a scene.

      Some rendering packages do not have the ability to snap a light to the camera, so I have provided the attached ruby script to help you align a camera light.

      Download IRender_align_camera_light.rb and place it in the SketchUp Plugins folder.

      [Edit: uploaded a new version with trace replaced by printf]
      irender_align_camera_light.rb

      How to use a Camera Light

      Step1 - create camera light

      http://wiki.renderplus.com/images/d/d0/Camera_light.jpg

      Create a component with one or more lights in it.

      The origin of the component should be in the location where it will snap to the camera.

      The blue axis will be aligned to the line from the camera to the eye.

      The green axis be aligned to the cameras up vector.

      The red axis will be aligned perpendicularly to the up vector - usually left and right of the camera.

      Place any geometry or attributes in the camera_light component which will help illuminate the scene. (The construction lines will not effect the scene)

      Do not place any geometry which will obstruct the camera.

      Save the component as 'camera_light'

      Step 2 - place camera_light component in a drawing

      http://wiki.renderplus.com/images/2/26/Camera_light.jpg2.jpg

      It does not matter where you place it, it will be snapped into position when you align it.

      Step 3 - Align Camera Light to camera

      http://wiki.renderplus.com/images/8/80/Camera_light.jpg2b.jpg

      Camera light placed in the model
      (Zoomed out a bit so that we can see it).

      Select Align Camera Light from the plugins menu. ‎

      When aligned properly you will not be able to see it.

      For testing, it may be handy to zoom out to let you see how the camera has been placed.

      Step 4 - Render model with camera light

      http://wiki.renderplus.com/images/9/9e/Camera_light.jpg3.jpg

      Scene rendered with camera light.
      (Zoomed out a bit. Normally the camera light would not be visible)
      (Rendering made with IRender nXt)

      Tips

      • Two or more spotlights will usually provide the best effect.

      • Normally the camera light will not be your only light. It is intended to augment other lighting.

      Try it out
      Try this our with your renderer and let us know how it works.

      Al Hart

      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
      IRender nXt from Render Plus

      1 Reply Last reply Reply Quote 0
      • X Offline
        xrok1
        last edited by

        a very generous gesture Al, thank you.
        here's what i get:


        Capture.JPG

        “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

        http://www.Twilightrender.com try it!

        1 Reply Last reply Reply Quote 0
        • X Offline
          xrok1
          last edited by

          cool i have that plugin, i just never thought of modifying the component to include lights! 😄
          i'm going to give Al the benefit of doubt here and not assume that the 'trace' method is part of the iRender package. 😉

          “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

          http://www.Twilightrender.com try it!

          1 Reply Last reply Reply Quote 0
          • E Offline
            Ecuadorian
            last edited by

            Don't despair, Rocky. There's another way to do this: The good old Film & Stage plugin by @Last software, the creators of SketchUp itself. It was designed exactly for this kind of things. With it, you are able to create a camera component and add all the crazy light arrangements you want inside the camera component. All that stuff will follow you as you move the camera when you're looking through it:
            camera-light.gif
            stage-lights.jpg
            The Film & Stage plugin is also the easiest way to copy cameras from one model to another, among other tricks. Download the free Film & Stage Plugin for Windows, or for Mac.

            -Miguel Lescano
            Subscribe to my house plans YouTube channel! (30K+ subs)

            1 Reply Last reply Reply Quote 0
            • N Offline
              notareal
              last edited by

              Good reminder! I have used The Film & Stage plugin time to time, too. Adding lights to the component is a nice idea. 👍

              Welcome to try [Thea Render](http://www.thearender.com/), Thea support | [kerkythea.net](http://www.kerkythea.net/) -team member

              1 Reply Last reply Reply Quote 0
              • Al HartA Offline
                Al Hart
                last edited by

                @xrok1 said:

                a very generous gesture Al, thank you.
                here's what i get:

                oops - remove the trace line, put a # in front or replace it with printf. I'll upload a new copy.


                irender_align_camera_light.rb

                Al Hart

                http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                IRender nXt from Render Plus

                1 Reply Last reply Reply Quote 0
                • Al HartA Offline
                  Al Hart
                  last edited by

                  @xrok1 said:

                  i'm going to give Al the benefit of doubt here and not assume that the 'trace' method is part of the iRender package. 😉

                  trace(sformat, ...) is a routine like printf(), but it displays the file name and line number when the message is displayed. Ruby developers might find it handy.

                  Also, because it uses sprintf and puts, you don't need a \n and the end of every message:

                  something like:

                  new_value = 123
                  trace("new value: %s", new_value)

                  displays

                  new_value: 123
                  ^^^C:/Program Files/Google/Google SketchUp 7/Plugins/irender_align_camera_light.rb:92

                  This is handy when debugging ruby files.

                  
                  def trace(*args)
                  	scall = caller(1)[0].to_s # who called the routine		
                  	begin
                  		smess = sprintf(*args)	
                  		puts smess + "\n    ^^^" + scall	# always output argument	
                  	rescue
                  		warn "arg ERROR in trace called from; " + caller(1)[0].to_s
                  	end		
                  end#def
                  
                  

                  Al Hart

                  http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                  IRender nXt from Render Plus

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jim
                    last edited by

                    Al, would you mind splitting this trace code off to its own thread? It's useful, and being in its own thread would make it easier to find. Thanks.

                    Hi

                    1 Reply Last reply Reply Quote 0
                    • X Offline
                      xrok1
                      last edited by

                      Thanks Al! 😄

                      @unknownuser said:

                      oops - remove the trace line, put a # in front or replace it with printf. I'll upload a new copy.

                      that did the trick

                      “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                      http://www.Twilightrender.com try it!

                      1 Reply Last reply Reply Quote 0
                      • Al HartA Offline
                        Al Hart
                        last edited by

                        @jim said:

                        Al, would you mind splitting this trace code off to its own thread? It's useful, and being in its own thread would make it easier to find. Thanks.

                        Will do

                        Al Hart

                        http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                        IRender nXt from Render Plus

                        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