PSD file in Moho 14

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: PSD file in Moho 14

Post by mmmaarten »

Yosemite Sam wrote: Wed Dec 20, 2023 11:23 pm So I renamed all the images in Photoshop, exported them with the script, but when I use Moho Spine Importer, and pick any image it says "Only Spine files with extension .json are allowed'
Just to be clear, all I want to do is export layers as pngs from photoshop, then import the PNGs while maintaining scale and relationship to one another so I don't have to adjust everything.
Good to see the export succeeded!

About that message in the importer that looks pretty self explanatory I would think. As also shown in the three tutorial videos (one for krita, one for affinity and one for spine, all working the exact same way with the importer), and in the info on the mohoscript page and also as written above here you should select the JSON file the exporter created, not one of the images. Your Photoshop script created a file with extension .json and all the images that go with it. But you only need to select the json file in the importer and it will find all the images.

I'm sure it will work if you select the right file! Good luck! Let me know if the import was successful or if you have another question!
Adults should play more often
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: PSD file in Moho 14

Post by Greenlaw »

Hi Yosemite Sam,

Here's a trick that might work for you.

1. import the layered PSD file as normal. This will place the art trimmed and in position.
2. Run Hayasidists' Bake To PNG on each PSD layer. This will create a trimmed PNG file of each layer and maintain its position and scale in the workspace.
3. Optional: Delete the PSD layers.

Now you should have a Moho project with trimmed PNG layers that match the trimmed PSD import.

I just tried it, and it seems to work, but there is a catch:

The way Bake To PNG works is it renders the layer at 2x res and then imports that layer on top of the original (which is now hidden.) So, the potential problem is that the image isn't exactly the same as the original image. (FYI, Bake To PNG is meant to work with vector layers but I found it works fine with bitmap layers too.)

Heres a thought: I wonder if running Export-Layers-To-Files-Fast and overwriting the Baked To PNG versions will give you the original images. I have a feeling that if the image doesn't share the exact aspect ration or the resolution is grossly different, it will fail...or...it might work. Never tried this before, so don't know. TBD.

I don't have time to test that (I'm at work right now,) but maybe you can check it out and let me know how it works. If I have time tonight, I might play around with this idea a little more.

Of course, if you're not hung up on making future paint edits to the original PSD file, you can edit the Bake To PNG versions instead.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: PSD file in Moho 14

Post by Greenlaw »

Ugh! Never mind.

I took a fresh look at my test and it did not do what I thought I did. The baked images have the full 'canvas' and are not trimmed.

It's been a few years since I ran this script, and I must have misremembered that it trimmed images. In reality, I probably used the Crop Tool on the images when I needed to bind them to bones and didn't want the excessive boundary. Actually, using the Crop tool isn't necessary if you use Mesh Warp because it will automatically trim the images when you enable it.

Soooo....maybe this is an okay trick, just not a great one. :D

Update #1
Oh, well shoot...in that case, use ELTFF to save images with Trimmed disabled. This will bring all the images positioned and scaled 'in place'. Then, enable a mesh for each layer and the image will be trimmed by the mesh. (Tip: if you're in a hurry, try Create Mesh Layer to automatically generate the mesh.) Because what gets trimmed is just empty space in the PNG, the memory overhead should be minimal.

I haven't tried this yet, but I think it should work. I will give it a try tonight after work.

Update #2
I ran a simple test and it works. I'll try this with actual character art when I get home tonight and post the results.

Update #3
Took a quick look at Krita on my laptop. It works with Krita too. Just use the native Export Layers script, and do not enable Adjust Export Size To Layer Content (this is the script's trimming option). I'd forgotten how dumb this script is: it doesn't remember previous settings so you need to set it each time. If you save the layers to a specific folder, make a shortcut to speed up the process. Actually, Krita's script isn't bad: it's still faster than exporting layers individually. I'll do a proper walk-through for both programs. It's not as smart as ELTFF but it's smarter than Adobe's native Export To Layers script.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: PSD file in Moho 14

Post by Greenlaw »

Final update before I leave work: If you don't want to generate a custom mesh, you can use the Crop tool to trim the images. I still wish Moho had an Auto Crop button option in this tool, but it's really simple and quick to use: just click and drag.

When you don't create a custom mesh, Moho generates one internally when you bind the image. It's an adequate mesh if the art isn't too skinny and you don't need specific interior deformations.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: PSD file in Moho 14

Post by Greenlaw »

I played around with my ideas last night using the Photoshop and Krita scripts I mentioned, and yeah, this should work fine. Also, the issues I ran into in the past no longer seem to be a problem in Moho. I'm not sure how long this has been the case, but...yay!

I'll demo my workflow in a video. The workflow isn't complicated or especially tedious, but users looking for an alternative to Layered PSD for performance reasons may find the info helpful. I planned to knock out a handful of tutorial videos during my holiday vacation, and I'll put this one near the top of my list. I will let everyone know when it's up.
User avatar
Yosemite Sam
Posts: 501
Joined: Thu May 05, 2011 2:05 am
Location: Las Vegas, NV

Re: PSD file in Moho 14

Post by Yosemite Sam »

Greenlaw wrote: Thu Dec 21, 2023 7:33 pm I played around with my ideas last night using the Photoshop and Krita scripts I mentioned, and yeah, this should work fine. Also, the issues I ran into in the past no longer seem to be a problem in Moho. I'm not sure how long this has been the case, but...yay!

I'll demo my workflow in a video. The workflow isn't complicated or especially tedious, but users looking for an alternative to Layered PSD for performance reasons may find the info helpful. I planned to knock out a handful of tutorial videos during my holiday vacation, and I'll put this one near the top of my list. I will let everyone know when it's up.
Thank you SO much! I'm going to try it out myself, but a video demonstration would be fantastic!
Jimmy Mills

Some of my Moho Pro work.
My Demo Reel: https://youtu.be/_kSCno4Wd3c?si=gNT7d27R7sM4jjqq
Buddies Ep 4: https://youtu.be/f8Zbzo2mpHA?si=4EyxhBOrgOxkDoSO
Steve Matthew
Posts: 11
Joined: Sat Dec 23, 2023 1:15 pm
Location: USA

Re: PSD file in Moho 14

Post by Steve Matthew »

Yosemite Sam wrote: Tue Dec 19, 2023 2:18 am Hey guys!

So I've taken on a new client who already has characters designed in PSD files. They imported fine into Moho, but my question is what happens when I start renaming and rearranging these?

If no updates will be done in PS is it best for me just to bring everything in as PNGs to avoid any potential nightmares?

Thanks!
Hey there! If you're not planning on making updates in Photoshop, bringing the characters in as PNGs could be a smooth route to avoid any complications when renaming and rearranging in Moho. It keeps things tidy without worrying about PSD dependencies.
User avatar
Yosemite Sam
Posts: 501
Joined: Thu May 05, 2011 2:05 am
Location: Las Vegas, NV

Re: PSD file in Moho 14

Post by Yosemite Sam »

Steve Matthew wrote: Fri Jan 12, 2024 10:26 am
Yosemite Sam wrote: Tue Dec 19, 2023 2:18 am Hey guys!

So I've taken on a new client who already has characters designed in PSD files. They imported fine into Moho, but my question is what happens when I start renaming and rearranging these?

If no updates will be done in PS is it best for me just to bring everything in as PNGs to avoid any potential nightmares?

Thanks!
Hey there! If you're not planning on making updates in Photoshop, bringing the characters in as PNGs could be a smooth route to avoid any complications when renaming and rearranging in Moho. It keeps things tidy without worrying about PSD dependencies.
Thanks!

Yeah I'm using a script that converts imported PSD files into png images. That way I import the PSD, convert it, and everything remains in place. Pretty handy.
Jimmy Mills

Some of my Moho Pro work.
My Demo Reel: https://youtu.be/_kSCno4Wd3c?si=gNT7d27R7sM4jjqq
Buddies Ep 4: https://youtu.be/f8Zbzo2mpHA?si=4EyxhBOrgOxkDoSO
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: PSD file in Moho 14

Post by slowtiger »

Photoshop does a good enough job itself to export layers as single image files (in any format). See under File > Script.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
Post Reply