How to fit an object to camera view?

I made a character in 3D and I want to draw it with grease pencil in blender 2.8. I need this character to fit the camera exactly so that I can export the png and use it in a game engine like contruct2 or godot.

So, my question is: how can can I render my character to fit the camera like in a 2D drawing app?

Thanks!

This link probably will help accomplishing what you need: https://blender.stackexchange.com/questions/42511/how-do-i-make-front-ortho-the-active-camera

Not really :frowning: , I need the character to fit the camera bounds like in a vector/2D drawing program. For example when you get a square primitive (let’s say in inkscape) and resize it to exactly the canvas size.

You may have to do this manually by changing the Dimensions of your Resolution and Aspect settings

Again, not sure how precise you need you object to fit the bounds of your camera/image, but some combination of “Numpad .” and “Ctrl + Alt + Numpad 0” should get you close. Understandably, in a 2D program where your objects are on the same plane as your canvas, you can use the same units to scale a square primitive to match the height of the canvas exactly. It isn’t the same in 3D, and you may be asking Blender to do something it was not designed to do.

Try this:

  1. Add a camera and move it along the y axis (x rotation 90) and a cube (2x2x2) to the origin
  2. set the camera to orthographic
  3. set the orthographic scale to 2 and the sensor size to 1

The fov should exactly encompass the cube. (At least I belive it does.

  1. Add you model
  2. set the origin to the highest vertex and snap it (the object) to the top face of the cube
  3. Now you should be able to calculate the factor by which you have to scale the object to make it exactly the size of the cube along one axis.
  4. to fit it on the other axis, align the cube and the object by their bounding boxes.
  5. measure the width of the object and the cube
  6. scale the cube to exactly fit the object
  7. now take the height and width of the cube down to the last decimal and use it as the pixel dimensions of the camera and scale the dimensions down proportionally, untill you get the resolution you want.

Will this work?
Idk, I haven’t tested it. Perhaps I made a mistake.

Is it worth it?
No, but it answers you question. I don’t really think fitting the camera to the object is really worth it to begin with, so I’d just eyeball it…