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?
Not really , 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.
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.
Add a camera and move it along the y axis (x rotation 90) and a cube (2x2x2) to the origin
set the camera to orthographic
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.
Add you model
set the origin to the highest vertex and snap it (the object) to the top face of the cube
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.
to fit it on the other axis, align the cube and the object by their bounding boxes.
measure the width of the object and the cube
scale the cube to exactly fit the object
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…