change the canvas size without changing the image size?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

superonIII
Posts: 67
Joined: Tue Sep 27, 2011 12:31 pm
Location: london

change the canvas size without changing the image size?

Post by superonIII »

this one problem has annoyed me but i've always just dealt with it but now i need to find out how to do this to save me days of redoing work.

i have an image png which is a certain size , animating certain arts of this an the parts need to be an exact size which has been worked out. trouble is that i find the canvas need to be made slightly taller whilst keeping the image the same size.

i can change the height to be 20 px taller but this makes with width of the image change (note that i'm not constraining proportions), what i mean is after changing the height from 200px to 220 px the width stays the same 200px but the image now doesn't fit the canvas.

https://imgur.com/Ais4AMd
Image
User avatar
Greenlaw
Posts: 9534
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: change the canvas size without changing the image size?

Post by Greenlaw »

Yeah, I wish there was a project scaling mode to be able to do that. I normally want to scale a project the way it currently works, but occasionally I need to add a little overscan for certain compositing fx.

I have a formula for calculating the overscan size using render size settings and camera zoom to compensate. I've only used this formula in 3D anim and compositing programs, never in Moho, but I think it should work. I'll try it later this morning and post the steps if it works as expected.
User avatar
Greenlaw
Posts: 9534
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: change the canvas size without changing the image size?

Post by Greenlaw »

I haven't tried this in Moho yet but here's the formula for adding overscan if you'd like to try for yourself...

Multiply the height and width by the percentage you want to increase the render size. Then, divide the lens focal length by the same value.

For example:

1. First, you want to add 10% overscan to your HD 720 image. So multiple 1.1 by 1280, and 1.1 by 720. This gives you a new dimension of 1408 x 792.

2. Next, you want to divide your lens by the same value. So if your lens is 24mm, divide it by 1.1 to get 21.8mm.

I'm not sure if this applies in Moho (it should) but it works for me in other programs with an adjustable camera lens setting. Let me know if it works for you.
superonIII
Posts: 67
Joined: Tue Sep 27, 2011 12:31 pm
Location: london

Re: change the canvas size without changing the image size?

Post by superonIII »

ok, sounds like this must be a bug then
Image
superonIII
Posts: 67
Joined: Tue Sep 27, 2011 12:31 pm
Location: london

Re: change the canvas size without changing the image size?

Post by superonIII »

i was thinking about sitting down with a calc for this but i'd much rather have it just work.

changing the width changes the width fine but changing the heigh changes the width.. not fine ay
Image
superonIII
Posts: 67
Joined: Tue Sep 27, 2011 12:31 pm
Location: london

Re: change the canvas size without changing the image size?

Post by superonIII »

also if i do this with a calc the chances are that the new height will alter the image so it's not an exact pixel number anymore, it needs to be exactly 144 x 62 px for some web masked sprite sheet to fit
Image
User avatar
Greenlaw
Posts: 9534
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: change the canvas size without changing the image size?

Post by Greenlaw »

It's not a bug, Moho's Dimensions settings work the way it's designed to work. I was just saying it would be nice to have the option to calculate overscan automatically.

For example, in the 3D program I use, I used to have to figure out the overscan using the above steps, but the developers later added a checkbox in the settings specifically for overscan. It would be convenient if Moho's developers added the same option.
Last edited by Greenlaw on Tue Jun 01, 2021 7:12 pm, edited 1 time in total.
superonIII
Posts: 67
Joined: Tue Sep 27, 2011 12:31 pm
Location: london

Re: change the canvas size without changing the image size?

Post by superonIII »

hmmm, if you don't know there's a simple solution to my issue and don't think it's a bug then i think you've misunderstood me :/
Image
User avatar
Greenlaw
Posts: 9534
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: change the canvas size without changing the image size?

Post by Greenlaw »

Maybe. Can you post an example?

Basically, Moho's Dimensions is adjusting the project's resolution, not the canvas size. It's like the difference between the Image Size and Canvas Size settings in Photoshop. Unfortunately, Moho doesn't really have the latter.

The way I understood what you want is that you need to extend the canvas without changing the resolution or placement of your original image, relative to the original canvas size. (i.e., like extending the canvas in Photoshop using the Canvas Size command.) Is this correct?

If so, the formula above should do this in Moho. I use it in 3D programs when I need to extend the boundaries of a 3D render but I need to preserve an exact pixel-perfect match for the size and position of the interior pixels, which is necessary for certain fx, camera tracking, or adding a post camera shake effect during compositing.
User avatar
synthsin75
Posts: 10045
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: change the canvas size without changing the image size?

Post by synthsin75 »

If I understand your problem, you just need to do this:
1. Change your project dimensions.
2. On the Image tab of your image layer settings, Set Source Image to any other image and hit Apply.
3. Set Source Image to your original image and hit OK.

This should basically reimport your image without the change to project dimensions affecting it.
User avatar
Greenlaw
Posts: 9534
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: change the canvas size without changing the image size?

Post by Greenlaw »

Hmm....I might be over thinking this since you're using Moho only as a 2D program.

Try this:

Group all your layers inside a new Group. Let's call this the 'master' group.

Increase your 200 pixel tall project to 220 pixels. (i.e., 110% bigger.)

Now, scale the 'master' group down to X=0.9090 and Y=0.9090. (I got 0.9090 by dividing 100 (the group's default size) by 1.10 )

I think this does basically what I described but for only 2 dimensional projects with no z-depth.
Last edited by Greenlaw on Tue Jun 01, 2021 8:02 pm, edited 1 time in total.
User avatar
Greenlaw
Posts: 9534
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: change the canvas size without changing the image size?

Post by Greenlaw »

Yup, definitely overthinking this. Thanks, Wes! :)
superonIII
Posts: 67
Joined: Tue Sep 27, 2011 12:31 pm
Location: london

Re: change the canvas size without changing the image size?

Post by superonIII »

yea, well i posted what i thought was a best example image in the opening post, it does sound like what you're saying is what is happening but a fail to why why this isn't considered a bug.

here's my thinking, why does this only happen when i'm changing the height of an image?
changing the width doesn't make this nonsense happen

https://imgur.com/if71W0f

if i have a 10x10px image (canvas) and part of that image 5x5px needs to have it's size preserved how can i do this when i need to export the image at 10x11px? bit of an extreme example maybe but hopefully this thought helps to better explain my predicament

there wouldn't be an issue if i wanted it to be 11x10
Image
superonIII
Posts: 67
Joined: Tue Sep 27, 2011 12:31 pm
Location: london

Re: change the canvas size without changing the image size?

Post by superonIII »

ahahaa that thing synthsin (edited bc i did get it wrong) says works, doesn't make me think it's any less of a bug though :P
i may have got that name wrong, can'r review that atm, and my internet is restting evvery 4 minutes, awkward because it takes abour 3 and a half minutes to perform the startup process
Image
User avatar
Greenlaw
Posts: 9534
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: change the canvas size without changing the image size?

Post by Greenlaw »

Yeah, I see what you mean. Moho really needs a separate Canvas Size settings option that's independent of the image/render resolution. What's there isn't a bug, but Moho doesn't currently have the feature we need for this.

I'll submit a suggestion for it...there have been few times when I've needed this too.

(Since everything in Moho is actually rendered with a 3D camera, I'm assuming it will do something like the 'overscan' feature in the 3D program I described earlier. Curious to hear what Mike says.)
Post Reply