A similar post is on, Fully Custom Resolution for 2D Image Export - although I’m sure you can see in this post I’m describing a very simple single thing, Thea is elaborately rendering output and where this is merely an image dimensions export matter in it’s entirety.
First however, if you have ever lost data during webform entry - in a side note, please let me direct you to my 'Ctrl+R' gripe, where [e.g.] Notepad is the obvious answer, or an AHK script that makes it do something else - like maybe the intended 'Shift+R' instead, https://www.facebook.com/permalink.php?story_fbid=726599474043883&id=726585697378594
So to business, simply put;
Most succinctly, this post details a…,
‘resize width’,
‘crop width’,
‘resize height’,
…set of file operations in an image editor to match up 2D image exports with animation frames exports from a Sketchup model.
In detail.
I can perform certain animation feats in increments of adjustment like, ‘Move’, ‘Rotate’, etc., and exporting the 2D image for each change. Then for camerawork use ‘Add scene’, changing the view, adding another scene, etc., and export those frames [image set] instead of making a video file with Sketchup. Then I can collate the two sets of exports together in a single animation that has all I need showing e.g. panning/zooming to something with a before and after - with those 2D export interim steps achieving it.
There’s obviously a reasoning that says,
‘perform a video transition - use a fade or morph, it denotes the change about to occur will start, then the different size frames whether scaled to fit or positioned to preference will not seem out of place or jerk suddenly from one to the next’.
- but this is more time watching and more resources being used, the simplicity in what I desire requires only that a frame is paused, where the gif size is unaffected, the internet/email inbox is less burdened.
The [Sketchup] issue is that the pixel dimensions of each of these kinds of export are different and have to be worked on to get them matching up - I’ve accomplished this already on a few occasions, but it is a little tricky - or at least quite time consuming - and best performed with the steps written down to follow for efficiently attained consistent results [hence this post], as there’s both cropping & resizing required and unfortunately in more than just two file batch operations, where the backup of the originals and new files output folders are best created in advance [I guess ideally for most named after the stage of the process they’re at for ease of understanding]…,
…so, is there a way to ensure any image [from ‘animation frames set’] export can be made the same as any other different type of [2D graphic] export?
On my computer the 2D graphic export is 1362 x 631 [same as a PrtSc once cropped to the viewed area],
The animation ‘image set’ is 1280 x 720.
[bear in mind trying to change my system screen resolution to 1280 x 720 results in a 2D export that’s 1276 x 583 - this is not exact and therefore may as well be as far out as the images from my preferred resolution].
I figured the best way was to find the same instance of an edge’s occurence in the model as these are usually just a pixel wide, and then calculated for all frames to be one size.
Two such images are provided for your perusal - best downloaded I reckon so you can see them 1:1, tiled vertically, & manipulate them in the kind of editor required for the aforementioned file operations,
Firstly it may be pertinent to glean whether the same amount of object appears in each view and then determine what needs cropping to ensure any resize operation results in images showing the same amount of object in the same position.
In my examples, the images are of two identical components one above the other [the animation will come around to this position and then the 2D export images will be added to show them being brought together], and the lower of which has a top left corner at these coordinates;
585, 238 in the [1362 x 631] 2D Graphic export,
530, 272 in the [1280 x 720] Animation Image Set export
The overall width of the objects is, 244 pixels in the 1362 wide image
The overall width of the objects is, 279 pixels in the 1280 wide image
279 - 244 = 35
35 is 14.34% of 244
244 x 1.1434 = 279
The 2D graphic exports are initially increased by this amount so that they’re 1577 pixels wide, height remains the same.
Now if I open a 1577x631 & a 1280x720 image, perform a non-aspect ratio resize on the 720 height to bring it down to 631 [width remains the same] - the two images should have perfectly matching objects [copy and paste with background colour transparency to see this overlap] - okay, perform that 720px high resized image operation on the 1577x631 files, the aim now is to make all files the same pixels size - this requires cropping,
I have around 297 pixels to lose from the 1577 wide images.
From the right first - the top right of the upper object is at,
959 in the 1577 wide image, which is [1577 - 959] 618 in from the right &
808 in the 1280 wide image, which is [1280 - 808] 472 from the right.
618 - 472 = 147
Then from the left,
The leftmost point of the objects is at,
677 in the 1577 wide image,
530 in the 1280 wide image
677 - 530 = 147
147 x 2 = 294
…so, if I perform a crop to 1280 with the image remaining centred, it should be accurate to +/-1pixel off each side…
The image files from both exports are now all the same size
You’d therefore create a folder structure for files output something like…,
\the model\animation frames export\2D Graphics export\resize1577\resize720\crop\
…or just put the crop folder content back in the animation frames folder to append those exports and hopefully all is matched up, the animation/video can be made [pending any renaming for frame numbering] and then those subdirectories can be cleaned down off the system.
Obviously I’m leaning towards a script for either Sketchup or the image editor that does this in one fell swoop - preferably the former, just as easily the latter if it’s similarly collating all the files towards that finished animation into the same location, and where BIMP performs brilliantly but one always worries that multiple edits will change the quality of the image, blacks begin to fade to grey, or the sharpness/clarity seems reduced e.g. - where anything extraneous that’s noticeable is then a distraction - so the one shot solution [plugin] is ideal and while the uniform output from both means of export would be perfect.
Any pointers?
In any event the work in this instance is done after adding a caption and cropping the animation down to a finished size, check it out,