Announcement

Collapse
No announcement yet.

Need relationship between units and rendered pixels!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need relationship between units and rendered pixels!

    Hi all,

    I have a special project where I am rendering a lot of images in a orthographic view. The problem is I need a method to make sure that one unit (one cm in this case) in the scene renders as exactly one pixel in the image. I guess I need a script for this... Any hints would be very appreciated.

  • #2
    Have you tried scaling it down in Photoshop after rendering?
    - Geoff

    Comment


    • #3
      Well, that won´t give me EXACT one pixel per cm, and I need it unfortunately.

      Comment


      • #4
        Sure it will. If you know the length of the longest distance on the screen, measure how many pixels it is with the ruler in Photoshop, then divide that by how many units it should be, and scale your image down by that percentage.
        - Geoff

        Comment


        • #5
          Oops: you want to divide what you want it to be by what it is, not the other way around.
          - Geoff

          Comment


          • #6
            Ok, that´s a workaround that might work, but due to scaling artifacts/antialiasing it won´t be perfect. Also, it is a extra step, and we need to avoid those steps since we are talking about probably thousands of single images.

            Comment


            • #7
              Then you can scale the images down in AfterEffects.
              - Geoff

              Comment


              • #8
                Ok, thanks.

                But another reason I need solve this is that we are developing a method for rendering those thousands of products, and it won´t be me that does it in the end. If we had a script or any other solution for this, we could put it in the hands of anybody later on, and the production of these images and the implementation in Flash (which is the end use, Flash uses the pixels to measure products automatically) will be very smooth.

                Comment


                • #9
                  Come to think of it, you don't need to scale all the images down afterward. Just the first one to figure out what the final render size should be.
                  - Geoff

                  Comment


                  • #10
                    That´s true!

                    Another thing that I came to think about is that if there is a way to let the "zoom extents" zoom exactly to the width of a selected object (by default it zooms with maybee 20% space on all sides). If I then make a box 100cm wide, hit zoom extents and render with a resolution 100 pixels wide, then it is solved.

                    Comment


                    • #11
                      Not too complicated actually....

                      Lets say you want to have a 500x400px render, and each pixel is to represent 1cm. All you need to do is create a plane that's 500cm x 400cm (check your unit setup) and then position over the area you want to render, you've then got to make a orthographic camera, match it's frustrum to your box (that's not that easy but it is possible), then set your render to 500x400.
                      Maxscript made easy....
                      davewortley.wordpress.com
                      Follow me here:
                      facebook.com/MaxMadeEasy

                      If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.

                      Comment

                      Working...
                      X