- 已编辑
Scrip PhotoshoptoSpine Doubts
Hi there,
I´m currently using the V.3 of the script (which I think is awesome by the way, really useful the tags and all that). I was wondering one thing though regarding the possibility to use some tool like Slice tool to mark png sizes of each layer or maybe something else...Don´t think this is possible but let me elaborate a bit more:
So I have a character design splited perfectly to work within Spine. I already have the character´group and layer within Photoshop organised to work with the script. I export it, everything works fine. I plan to use meshes on this character (at least in the most part of the pieces) but also I may need to change the design later a bit, modify some other attributes or clothings, accessories, colours, etc. Whatever I want to add on over this same design to later in Spine apply it as part of the skins system...
Now, we all now that if I have meshes animated with specific pngs, and then let´s say I modify something in the design that change the size of the png for some other skins...well, is not gonna work obviously due to the difference of sizes between the assets. So to avoid this we need to always keep the same size of png, and simply be sure that any new design or alteration we create for new skins, are done and export on the same size of png than original. So well, if we use this incredible script to export the assets from photoshop to spine, and I add new layers on the skin group with new designs...is any way to force the same dimension size when you export this assets. i mean something like, everything inside this [skin] group in photoshop is always export in this size?
I mean, other wise, each time I create a new assets and export it is gonna have different sizes than the original default design...and I guess I would need to go piece to piece, import it back to photoshop to create the boundaries of the size design, and then I would not able to use the script anyway, so I would need to export individually each assets to be sure are exported in the same size?
Is any way to improve this workflow, something as I suggested would be awesome. A way to tell the script that export me the layers within a [skin] group always on the same png sizes? Or what I did before to use the script was simply use the slice tool in Photoshop to marked the limits of each layer within I can create new designs. then I export the slices individually with its respective layer to be sure always is export in the same size. Was wondering if somehow a way to work with this on the script or if maybe I´m missing some other good advice on this workflow.
Any help or suggestion would be great! thanks!
Hello!
Solution 1: repaint the skin piece from a copy of the original
The safest way to export a new skin at the same size of another is to lock the transparency of a duplicate of the original skin, then repaint it/modify it, paying attention not to go outside those boundaries.
If the piece you're creating is supposed to be smaller, then the script would have a hard time telling it needs to leave more space, for the way it works now.
I suppose you'd need to be able to tell inside the script that one skin should be the preset, and all other skins should copy it, or something similar. But then again, if you're not creating a repaint, you're bound to modify the mesh anyway, so it's probably not that useful after all.
Solution 2: copy and paste the vertices
If you're using the latest version of Spine, you should be able to create a brand new mesh, then copy and paste the vertices position for the vertices that share the same setup to match the old mesh, while being able to add/remove vertices for the parts that have nothing in common. See Tools - Spine User Guide: Transform copy
You will still have to reapply the weights, but if you keep the wireframe
option in the meshes properties, you'll be able to see the weights for both meshes at the same time.
Solution 3: add tiny markers, then remove them later
Another "dirty" solution is to add two pixels at opposite corners (e.g. top-left and bottom-right) to mark how big your final image should be, then clean them out after export. if you make them 0.1 opaque they might even be almost invisible.
I don't particularly like this option as it wastes space and requires additional clean up afterward, but it would ensure that a smaller image can fit in a bigger mesh.
Hi, thank you so much for the reply!
Solution 1: yes! I´m agreed that´s the best way to do it if i plan just to repaint the piece, just change the material or colour of the piece. This is something that I´m already doing and It´s true that is really straight forward, quick and safe.
My problem though is more related to the point that on fact I´m creating pieces which design is a bit different. It´s not a major difference, and due to the way I have the mesh design and animated, actually we can replace the assets over the same mesh and it works across the animations. I mean, as an example maybe I doing an ear which shape I change slightly from the original, maybe I make it more pointy and a bit more big or wonky. If i apply this as a skin over the same mesh than the original, everything looks more or less fine, no problem. So in my experience, depending of the changes, I don´t really need to do again the mesh, weight and all that for all this kind of changes. I just need to be sure the new design is within the size boundaries from the original when I´m drawing the new pieces... and of course I need to have exactly the same dimension size than the original png. Using the script as it is obviously the size is gonna be different, so even if the changes are small tweaks, that is gonna modify the output size dimesnion of the layer when is exported as a png. Where i would like to have within the photoshop or control it through the script is exactly that, be able to define the dimension of the pngs for different layers that are inside the same skin group (or something similar)
Solution 2: this could be kind of an option but well, would required to go for a creation of new meshes for each skin or modification, and copy paste from the original one by one. Beyond than that i would need to make the weight process again. So I don´t think would be ideal for time consuming I guess? The idea would be to be able to create a master mesh and just create link meshes to it for new skins, so the only thing I would need to do pretty much is replace the assets for other pngs that keep the same size dimensions (if the design of new pieces is not too off from the original and the mesh setup is done for this purpose, is proven this work just fine) So I´m looking to keep this step, the only thing I try to improve in the workflow is the step of design and exportation from photoshop to Spine through the script I guess?
For now what I´m doing is use the script, export all the pieces and then open the pieces individually and make the redesign over each one of them separately to keep the same png size...but is not ideal either so I cannot see the pieces over the full character design, and I cannot also have everything on the same psd to be exported with the script again. I always could import back the pngs exported previously from the script into the full character psd, an use the dimension size of each png asset to create or draw a border line or use the slice tool to marked the limits for further designs (this is basically similar to your solution 3) All this is posible but is somehow time consuming again.
Solution 3: So well yeh, this is kind what I´m doing at the moment without the use of the script. the only different is that I use the trim tool on photoshop to mark each layer and the export each layer one by one (which is really annoying, but like that I´m always sure they always been export in the same size). Using the scrip yes, i could draw in each layer to pixel marks on the diagonals so then the script would export the layer up to that marker, but yeh then i would need to import it again into Photoshop (or wherever) and trigger an action to trim 1-2 pixels to clean up that...and do that with every single image required each time I create a new asset as well. Also not ideal...I guess I cannot do as i wish, ha!
Seems there are not a perfect solution for this problem in relation of looking for a bit more of automatisation and time consuming reductions. Solution 2 and 3 both has negatives points I guess, at least in my case. We are looking for a way where once the rig and mesh are done for the character, if we follow some design rules when we create new skin parts, we should be able of not touch again the setup of the character, simply just to create the new skin with the mes linked to the original and put the path to the new asset and that´s all. Not touching again the mesh, change vertex, copy and paste between meshes, etc. So for this I guess Solution 3 could be the one to go...at least until the script could do something similar to what I asked for? (Define dimension of PNGs somehow....like if I have a group called "torso [skin] [200.200]" all the layers within that skin group would be exported with a size of 200x200) Although probably this I´m telling is just a crazy idea?! Ha
Anyway, thank you so much for the help. And if you have some other thoughts I would be really happy to hear them!