2D Net driving me mad. Distorts at Frame 1

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Easedale
Posts: 30
Joined: Sun Jan 12, 2014 2:11 pm

2D Net driving me mad. Distorts at Frame 1

Post by Easedale »

I've been experimenting with creating animation with2D nets to control image layers.
I've made quite a complex rig which seems to work okay.
But now I'm experimenting with bringing in PNGs from other programs (Rebelle and Corel Photopaint).
A put a 2D net around them and link the image but as soon as I move the timeline to frame one the image reduces drastically in size and moves.

It hasn't happened before and it's driving me crazy trying to work out what is happening.
I thought it might be something to do with the image resolution coming in so tried with a Moho image layer and the same thing happened.
I thought it was because it was in a bone group so tried some without bones and it still happened.
I'm sure that there's something simple I've changed or forgotten to do but just cannot work out what.

Hopefully here's some links to before and after images.

https://drive.google.com/file/d/1V4xZIS ... sp=sharing
https://drive.google.com/file/d/1HRS_Nk ... sp=sharing

https://drive.google.com/file/d/1lu_rzd ... sp=sharing
https://drive.google.com/file/d/1gf_BIo ... sp=sharing


Can any of you fine people help me?
User avatar
Easedale
Posts: 30
Joined: Sun Jan 12, 2014 2:11 pm

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Easedale »

So experimenting further it's definitely something to do with the PNGs coming in.
If I create a new file in Moho and make an image layer and 2D net it works fine.

If I import a PNG from Rebelle it distorts.
If I create a Moho image layer in the same file it will also distort.

???
User avatar
Easedale
Posts: 30
Joined: Sun Jan 12, 2014 2:11 pm

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Easedale »

It's something to do with the PNG coming in but it's not resolutions.
I changed the Rebelle file to the same res as Moho and it still distorts
User avatar
Easedale
Posts: 30
Joined: Sun Jan 12, 2014 2:11 pm

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Easedale »

I think I've identified the problem but unless you have any ideas I think I need to post in the Rebelle forum.

If I take the PNG saved from Rebelle, open it in Corel Photopaint, save it again.
Once that file is loaded into Moho it works.

So something in the way the file is saved?
User avatar
Easedale
Posts: 30
Joined: Sun Jan 12, 2014 2:11 pm

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Easedale »

Solved it but don't understand why.
It's the cropping.

I can crop an image layer created in Moho with no effect.

If I crop a layer brought in from outside it distorts at frame one when in a 2D net.
If I crop the PNGs down before importing them and just resize them it all works fine...

but why?
Anyone?
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: 2D Net driving me mad. Distorts at Frame 1

Post by synthsin75 »

Easedale wrote: Sun Dec 27, 2020 10:12 pm Solved it but don't understand why.
It's the cropping.

I can crop an image layer created in Moho with no effect.

If I crop a layer brought in from outside it distorts at frame one when in a 2D net.
If I crop the PNGs down before importing them and just resize them it all works fine...

but why?
Anyone?
I've never notice that before. Yeah, smart mesh on a Moho-cropped image does weird stuff.

There's really no reason to crop an image if you're using a warp mesh though, as the boundaries of the mesh automatically crop the image.
User avatar
Greenlaw
Posts: 9271
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Greenlaw »

Easedale wrote: Sun Dec 27, 2020 10:12 pm If I crop a layer brought in from outside it distorts at frame one when in a 2D net.
If I crop the PNGs down before importing them and just resize them it all works fine...

but why?
It's always behaved that way. Don't know why but maybe Moho needs to see the actual boundary of the image for the Mesh layer to maintain a correct and fixed placement?

Anyway, I just click the Reset Crop button for the the image layer before applying the mesh warp, and all is fine.
User avatar
Easedale
Posts: 30
Joined: Sun Jan 12, 2014 2:11 pm

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Easedale »

Thanks for the replies, much appreciated.
Reading what you've both said and more experimenting has made it clear now.

When you crop and then apply a 2D mesh Moho is using the original image size, it takes the original image size and then reduces it down to the size of the 'cropped' image, consequently it gets smaller and distorts as the whole image is squashed into a smaller frame with differently ratio dimensions.

The reset crop tool works even after an image has been saved and reopened and that gave the clue to what is happening.
So, I think that what is happening is that Moho does not actually crop an image, it just masks the image. The crop border acts like a mask only exposing that part of the image.
The outer margins are still there, just not visible but reappear when you reset crop.
The original image stored elsewhere does not change dimensions.
This is like video editing packages work in that you can apply effects in the program but the original video is unchanged.

However, I think this is wrong and a fault.
I have used lots of art packages over the years and this is the first time I've found one where crop does not mean crop.
This is just a mask.
Now I know what's happening I can work around it easy enough but it is irritating, that's two hours of my life I won't get back.

Thanks again for the support.
User avatar
Greenlaw
Posts: 9271
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Greenlaw »

The Crop tool is meant to crop the image layer non-destructively. I find this mostly useful when I import a multi-layer character that have the original document's full canvas size, and I want to quickly make the individual parts of the character have a smaller canvas in Moho, which makes them easier to select and work with. Moho does this without actually altering the original artwork--this behavior is by design, not a fault.

If you want to 'hard crop' an image, you'll need to do this in another program.

If you use Photoshop, my preference is to use the free Export Photoshop Layers Fast tool. This tool can export all visible layers from a Photoshop document as separate PNG files, each cropped to the visible pixel boundary. The tool even lets you define additional padding around the crop; or you can choose to export the layers without cropping, which can have benefits too. I find this tool simplifies exporting cropped images from a PSD, without altering the canvas size in the original document. I use this tool all the time for the Moho character rigs I create at my workplace.

If you're using Krita, it comes with a similar Export Layers script. Krita's version is not as fully featured but it also crops exported layers automatically and gets the job done.

As Synthsin75 mentioned, if you're using a Mesh Warp, you do not need the Crop tool. The Mesh itself will crop your image, and depending on how you create your mesh, it will crop to the shape of your image far more precisely than the Crop tool can.

Hope this helps.
User avatar
Easedale
Posts: 30
Joined: Sun Jan 12, 2014 2:11 pm

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Easedale »

Thanks for all that Greenlaw. I really do appreciate the time you've taken to reply to me.
I've got my head around it all and had found (as you pointed out) that I just need to crop before importing to Moho.

I still think it is not quite right though, I take your point that there can be advantages in a non-destructive crop but the fact is that it does not work with 2D mesh and nowhere in the manual is one alerted to this so you just waste time trying to find out what is happening.

Still, all solved now and I can look forward to importing beautifully textured images into Moho, a new venture for me.

Thanks again.
User avatar
Greenlaw
Posts: 9271
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 2D Net driving me mad. Distorts at Frame 1

Post by Greenlaw »

Easedale wrote: Tue Dec 29, 2020 9:43 pm Still, all solved now and I can look forward to importing beautifully textured images into Moho, a new venture for me.
Cool! I hope you can share some of your work here some day.

Re: 'hard cropping' in Moho, that's something I've wished Moho could do too. I think Moho 12.5 and earlier can't do this because it isn't able to alter and re-save an image layer. That said, since Moho 13 does support new Image Layer creation, editing and re-saving from within, I wonder if this is doable now with a clever script? That's beyond my skill level, but maybe a thought for a future version of Moho?

Just for kicks, this morning, I tried using the Hayasidist's Bake To PNG script to see if it would re-render the layer to the cropped region size...but no such luck, the result is always at the project's full frame size.

Update: To be more specific, Bake To PNG does bake down the Crop Tool effect, actually clearing the pixels outside of the crop area. Unfortunately, the canvas size is still a full frame, so not truly cropped. This is true for Moho 12.5 or 13.

Paul, if you're reading this, is it possible to modify Bake To PNG for Moho 13 to re-save the new layer at the cropped size? To be clear, I'm not asking you to do this for the current Moho 13 (probably a waste of time,) but maybe for the next 'post Smith Micro' version of Moho? Just a thought.
Last edited by Greenlaw on Wed Dec 30, 2020 5:54 am, edited 1 time in total.
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: 2D Net driving me mad. Distorts at Frame 1

Post by synthsin75 »

Greenlaw wrote: Wed Dec 30, 2020 3:37 am Paul, if you're reading this, is it possible to modify Bake To PNG for Moho 13 to re-save the new layer at the cropped size? To be clear, I'm not asking you to do this for the current Moho 13 (probably a waste of time,) but maybe for next 'post Smith Micro' version of Moho? Just a thought.
This should be possible using:
ImageLayer:CroppingBounds()
Perhaps with some code from my fit/fill image script:
viewtopic.php?p=186701#p186701
To resize the project, export the cropped image, restore the project dimensions and import the new image.
Post Reply