I have uploaded the individual images, offsets/masks, and palettes I used for all hair in the generator to this branch and specifically this folder. I'll hold off on a pull request to the main repo until we are satisfied with the structure of the build process. Check out _build/hair/build.sh , which is the simple script that's used to build all the hair sheets and recolors. I didn't include too many comments or instructions since it should be straightforward, but check out the discussion in the pirates submission build download for more exposition.
_build/hair/palettes.json defines the color ramps I used for the hair. They are based on a combination of the different ramps that were in the old generator previously, plus Eliza's ramps (not the Liberated palette, but ones she had created in the interim). I put some thought into choosing a good, coehsive set of palettes that provided lots of options but didn't overlap too much (and also naming them clearly), so I'd suggest starting there for hair palettes if you like. (By the way, the source palette I used for hair is different than that for clothing, it's defined in that palettes.json file and is kinda orange. This was chosen to have good contrast but be kind of race-neutral and to look reasonable on different skin colors).
To reiterate, the named destination color ramps I have used for clothing are in the pirates build download, and are based on Eliza's older palettes (for instance used in the jump or women's shirt submissions) but with some edits to remove very similar colors and to increase the contrast for many palettes (so they look good with 4- and 5-color objects in addition to 6-color). So if doing clothing I'd humbly suggest you start there.
I haven't done anything similar for skin, Eliza's palettes are probably the way to go there. Let me know if you need help converting them into a format that lpctools can understand.
A few other points:
I'm going to cut up the universal spritesheet and split it out again in individual animations. I love the convenience of a single big spritesheet to work with, but it engenders some stagnation as well, because...
(You can use any image, male.png is just an example included with the distribution) In general --from and --to can be names of any layouts understood by lpctools (use lpctools arrange repack --help to see which layouts it knows about). There's not currently a way to specify a new layout in a file, but I can add one. By the way, the layouts can be arbitrary 2D arrangements of animation frames; they don't have to be stacked like the universal layout. For instance, you'll notice a layout called "evert", which includes the animations you proposed a while ago with push and a few other things over on the right side.
Assemble things like eyes, noses, expressions and the like. Some of these are in the generator, some aren't, but they should all be constructable from a few source images, just as the hairpieces are.
Wrap that up in a nice build system where you run some configure/make and it all automagically works (on *nix systems anyway; no clue about Windows).
Amazing! Would be awesome if the target (or one possible target) of this build process would be assets for the generator. Even if not, I'm sure we'll benefit from your work on this. And yeah I wouldn't worry about Windows if I were you; Windows users can use WSL to run the same scripts as *nix if need be. lpctools does run on Windows, but via WSL is my recommended method anyway.
Once I have the recolouring and assembling of the character bases, facial features and hair in place, I'll worry about handling the clothing. Hopefully that will be relatively straightforward once these are done (and I can probably just re-use what's already in the generator anyway).
The straightforward but tedious part will be putting the existing assets into a consistent source color palette. The straightforward and easy part will be making the automatic recolors. The not straightforward part will be adapting any existing clothing to new bases and/or animations :p
To that end, now seems like a good time for me to revisit the headless bases/heads on this page. There are a few obvious outstanding issues but I think they are close to good. Once we are satisfied with those, I can begin the work I described above of bringing the updated bases (and separate heads) into the generator, and adapting the existing clothing to the updated female bases.
Auto-generating character is not an esoteric use-case at all, and we should endeavor to make the assets easy to use for that purpose. This is one reason why Sander and I have re-organized the generator to try and have a more consistent file structure and added those JSON definition files to keep track of things like the indended Z-order and which assets are mutually-exclusive, so if you wanted to use that data while re-implementing the algorithm for your engine, you wouldn't have to re-invent the wheel. It's not perfect but that is the goal. (I'd argue that you are more in need of duplicating the re-color functionality than duplicating the place-and-mask (`distribute` in lpctools) functionality, but whatever floats your boat, neither are all that complicated.)
Perhaps the generator should include 3 levels of assets: "source" images (e.g. for hair: n/s/e/w, and the 4 hurt frames)---obviously not all assets would have these, just the repetitive ones amenable to auto-placement; "spritesheets" (the full set of animated frames, but only in one palette per-material); and "recolors" (recolors of spritesheets in a standard set of palettes per-material). "spritesheets" is obviously a subset of "recolors", but having it separated out might make it easier for someone like you who wants to incorporate their own in-engine recolors to just take what they want.
Anyway, I uploaded the scripts, palettes, and source images I used to build the pirate clothing, along with pretty detailed instructions/explanation, to that submission: https://opengameart.org/content/lpc-pirates . I can do the same for hair after work or tomorrow, but the principle is exactly the same as for the pirate hats.
Ideally the generator repo would be a place to converge on a set of assets in a standard palette, as well as a build process for generating the repetitive ones (hats, hair, neckwear, etc., plus re-colors). If you find/make other offset/mask images, palettes, etc. that are not useful for that purpose but seem useful for something else, I would suggest to post them on OGA.
That type of Makefile incantation is exactly why I have been putting this off. I can infer from context what it does but would not have been able to write it out :p If you would help translate build.sh in that pirate directory to a Makefile, it would be very helpful for the sake of the generator.
There are two separate issue for color palettes: 1) are the assets you want to recolor in a consistent palette to start with, and 2) what palettes do you recolor to. It doesn't much matter to me what Evert or Eliza or anyone choose to do for (2), however it would benefit us all to us the same palette(s) for (1). FWIW, I've generally been using this one for fabrics: ["#1d131e", "#411e05", "#4b2b13", "#62351c", "#744b30", "#996b4a"]. All the clothing I have added to the generator recently should have that palette as the "brown" variant (e.g. collared jacket, santa hat, etc.), so if you wanted to choose a diffferent set of destination palettes (2), you could start with the "brown" version and recolor from there.
I will share the offset and mask files and scripts I have used. The offsets for lpctools are specified as images, but it would be trivial to export them to some other format; if you need, I can easily add that functionality to lpctools. The masks, it's worth noting, are sort of situational like Ben said. For instance, the masks I have which identify the arms are really meant to cut out anything that would obscure the torso/chest. The hair masks are different, because they are only meant to remove parts of the arm that would obscure the hair.
It's late now, but I'll figure out how to upload the files and scripts this weekend.
- AFAIK, nothing more has been done on these bases since my last comment (I certainly haven't had a chance to revisit; I've been busy with other less thankless work :p)
- I do have the minimal set of images, offsets/masks, palettes, and the scripts I used to generate the hair in my submission (and actually all hair in the spritesheet generator https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Gene...). I can upload them later to that submission. The same tools can be used for hats; I used them for the pirates and santa hat. I also have another set of masks and offsets, which is useful for placing things on the torso that go under the arms (e.g. I used it to make the cravat/jabot, belts, and sashes for the pirate, and for making the modified santa coat for Santa claus). However, the generated images are usually not perfect and have to be manually edited somewhat, so it's more an intermediate tool.
- Much of the clothing in the generator is not in a well-definted palette; I have been slowly working on converting it (e.g. pants, shoes, the pirate jackets, hats more or less use a standard palette). I have a standard set of color palettes in lpctools format that I have been applying to all clothes (derived from Eliza's earlier clothing palette, but with some simplifications or changes for consistency). With lpctools, the palettes are encoded as a mapping from a standard palette to several alternative palettes. Colors that aren't in the given palette are left as-is. There is also an option to give multiple such mappings for different materials and create all combinations (e.g. for the pirate hats, I used one set of palettes for the fabric and another to generate the trim). This generates a huge number of images though, so it's kinda unwieldy... probably better to separate those objects out into separate sheets in the future where possible. I'd suggest having a few sets of palettes for different objects, e.g. cloth, metal, maybe wood? And also not every object needs to have infinite recolors... idk that anyone is really asking for a green/blue/pink peg-leg :p
- I don't have any kind of palette for skin. Eliza has proposed several, and there are a few overlapping styles in the generator right now.
- Finally, none of the art in the generator has been updated to use the bases on this page. All of my offsets, masks, etc. also use the old bases (those in the generator right now). It would not be hard to update these tools, but I have been delaying doing so until the existing assets in the generator are updated, since I don't want to create two parallel sets of assets that can't be used together (Eliza is already doing that with her projects...). Updating the existing assets in the generator to use the new bases, especially the female bases, is somewhat daunting because anything that touches the legs or arms will need a few frames to be re-drawn. The male assets will need to be updated too, but those are just 1px pixel shifts which can be easily accomplished by lpctools.
- As a logical set of next steps and to minimize duplication of work, personally I would propose the following order: 1) finish the headless bases and separate heads I posed above posted here, working out any remaining bugs around the neck etc.; 2) automatically update the male and most female assets to the new bases 3) manually update the relevant female bases to the new bases, 4) adapt all assets (if possible) to one of the standard palettes mentioned above, then introduce a set of scripts to the generator to build the full set of spritesheets and re-colors from those source images. (The scripts would be straightforward, since lpctools provides all the necessary functionality; I've mostly delayed because I'd like to make the scripts use GNU make or similar, because running shell script to generates EVERYTHING, even if unchanged, takes a long time---even the ones I wrote for the pirates and hair were getting really unwieldy... but I'm not too familiar with make and it's kind of a confusing tool).
- However, if you don't care about updating the bases and are going to re-color things to a standard palette, please share your work :p. Using the same standard source palette as me (even if you choose different one(s) for your recolors) would be appreciated obviously. Ideally, make a PR against the generator repository. The credits are all worked out there, everything is pretty nicely organized, and we'll all benefit from the tedious work.
To elaborate on what MedicineStorm said, you should have some recourse against people selling your assets in violation of the license (e.g. without crediting you, noting the license, and linking to the original).
If they are selling thru a marketplace (e.g. itch.io, Unity Asset Store, ArtStation, etc.), you can first report them through the platform. That is fairly likely to be successful. If that does not work and either you or the website owner are located in the United States, you can send a DMCA takedown notice to the platform holder or the ISP hosting the website. Wikipedia provides an overview of the process, with examples (which refer to Wikipedia, but you can adapt to your purposes) https://en.wikipedia.org/wiki/Wikipedia:Mirrors_and_forks#Non-compliance... .
If that fails, your final recourse is to sue to have the item taken down, although the details of that depend on the jurisdiction where you reside, where the website is hosted, and obviously that is expensive, a lot of work, and not guaranteed to be successful.
What platform are you using? It sounds like you are launching the Miniconda installer, rather than a terminal/command prompt.
On Windows, open the Start menu > Run > type "cmd", then navigate within the command prompt to the folder where you unzipped lpctools and follow the remaining instructions in the tutorial. If you have never used the command prompt before, see here https://www.cs.princeton.edu/courses/archive/spr05/cos126/cmd-prompt.html for information about how to navigate to different directories, etc. I haven't used Windows in years so I can't provide a ton of support but I can try to help.
On Mac, search for Terminal in Spotlight or Launchpad. On Linux, open a terminal. Follow directions in the tutorial.
Yeah my idea was originally to do an advent calendar where I added something each day until Christmas :p I didn't really have that many ideas though so it would have been a bit of a stretch... christmas-themed pillows on the couch? Snowmen?
To run lpctools, you need to install its dependencies (follow instructions on the GitHub page, let me know if you have trouble), download and install lpctools, then invoke lpctools itself, either directly from the command line, or via a shell script. The shell script I used to build the pirate assets is build.sh in the zip I sent you, but that's just an example of how to use lpctools to arrange and recolor some assets.
There are lots more examples on the github page; something like this is probably what you want:
Just put palettes.json in a folder along with skirt.png, then run this command which will create a folder called "skirt" and assets within that folder, one for each palette defined in palettes.json.
palettes.json defines a "palette mapping," i.e. a mapping from one color palette to several others. Open palettes.json in a text editor, you'll see that it contains several keys, each of which is the name of the palette, then each palette is a list of colors in hex format (RRGGBBAA, where A = alpha). There is one special palette called "source", that defines the palette that it expects for the source image (e.g. skirt.png). For each palette, a recolored image will be created where the first color in the "source" palette is replaced with the first color in the destination palette, the second color in source replaced by the second palette in the destination, and so on. Colors in the input image that don't appear in the source palette will be left unchanged.
Ah I love this! Thought about doing something like this last year but never got around to it. Looks great!! Now just needs some christmas cookies... maybe a gingerbread house? ;-)
Great! I'm glad you are going to work on this!
I have uploaded the individual images, offsets/masks, and palettes I used for all hair in the generator to this branch and specifically this folder. I'll hold off on a pull request to the main repo until we are satisfied with the structure of the build process. Check out _build/hair/build.sh , which is the simple script that's used to build all the hair sheets and recolors. I didn't include too many comments or instructions since it should be straightforward, but check out the discussion in the pirates submission build download for more exposition.
_build/hair/palettes.json defines the color ramps I used for the hair. They are based on a combination of the different ramps that were in the old generator previously, plus Eliza's ramps (not the Liberated palette, but ones she had created in the interim). I put some thought into choosing a good, coehsive set of palettes that provided lots of options but didn't overlap too much (and also naming them clearly), so I'd suggest starting there for hair palettes if you like. (By the way, the source palette I used for hair is different than that for clothing, it's defined in that palettes.json file and is kinda orange. This was chosen to have good contrast but be kind of race-neutral and to look reasonable on different skin colors).
To reiterate, the named destination color ramps I have used for clothing are in the pirates build download, and are based on Eliza's older palettes (for instance used in the jump or women's shirt submissions) but with some edits to remove very similar colors and to increase the contrast for many palettes (so they look good with 4- and 5-color objects in addition to 6-color). So if doing clothing I'd humbly suggest you start there.
I haven't done anything similar for skin, Eliza's palettes are probably the way to go there. Let me know if you need help converting them into a format that lpctools can understand.
A few other points:
lpctools can do this for you:
(You can use any image, male.png is just an example included with the distribution) In general --from and --to can be names of any layouts understood by lpctools (use lpctools arrange repack --help to see which layouts it knows about). There's not currently a way to specify a new layout in a file, but I can add one. By the way, the layouts can be arbitrary 2D arrangements of animation frames; they don't have to be stacked like the universal layout. For instance, you'll notice a layout called "evert", which includes the animations you proposed a while ago with push and a few other things over on the right side.
Eyes, Ears (with one exception), and Noses are in the generator already, as far as the assets I'm aware of, see e.g.: https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Gene...
Here are the available face-related assets that are not in the generator (that I'm aware of)
Amazing! Would be awesome if the target (or one possible target) of this build process would be assets for the generator. Even if not, I'm sure we'll benefit from your work on this. And yeah I wouldn't worry about Windows if I were you; Windows users can use WSL to run the same scripts as *nix if need be. lpctools does run on Windows, but via WSL is my recommended method anyway.
The straightforward but tedious part will be putting the existing assets into a consistent source color palette. The straightforward and easy part will be making the automatic recolors. The not straightforward part will be adapting any existing clothing to new bases and/or animations :p
To that end, now seems like a good time for me to revisit the headless bases/heads on this page. There are a few obvious outstanding issues but I think they are close to good. Once we are satisfied with those, I can begin the work I described above of bringing the updated bases (and separate heads) into the generator, and adapting the existing clothing to the updated female bases.
Auto-generating character is not an esoteric use-case at all, and we should endeavor to make the assets easy to use for that purpose. This is one reason why Sander and I have re-organized the generator to try and have a more consistent file structure and added those JSON definition files to keep track of things like the indended Z-order and which assets are mutually-exclusive, so if you wanted to use that data while re-implementing the algorithm for your engine, you wouldn't have to re-invent the wheel. It's not perfect but that is the goal. (I'd argue that you are more in need of duplicating the re-color functionality than duplicating the place-and-mask (`distribute` in lpctools) functionality, but whatever floats your boat, neither are all that complicated.)
Perhaps the generator should include 3 levels of assets: "source" images (e.g. for hair: n/s/e/w, and the 4 hurt frames)---obviously not all assets would have these, just the repetitive ones amenable to auto-placement; "spritesheets" (the full set of animated frames, but only in one palette per-material); and "recolors" (recolors of spritesheets in a standard set of palettes per-material). "spritesheets" is obviously a subset of "recolors", but having it separated out might make it easier for someone like you who wants to incorporate their own in-engine recolors to just take what they want.
Anyway, I uploaded the scripts, palettes, and source images I used to build the pirate clothing, along with pretty detailed instructions/explanation, to that submission: https://opengameart.org/content/lpc-pirates . I can do the same for hair after work or tomorrow, but the principle is exactly the same as for the pirate hats.
Ideally the generator repo would be a place to converge on a set of assets in a standard palette, as well as a build process for generating the repetitive ones (hats, hair, neckwear, etc., plus re-colors). If you find/make other offset/mask images, palettes, etc. that are not useful for that purpose but seem useful for something else, I would suggest to post them on OGA.
That type of Makefile incantation is exactly why I have been putting this off. I can infer from context what it does but would not have been able to write it out :p If you would help translate build.sh in that pirate directory to a Makefile, it would be very helpful for the sake of the generator.
re: weapons, we have been trying to implement a system where there is a "behind" and a foreground layer for weapon walk animations, see e.g. https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Gen..., so that no cut-outs are needed. Someone asked about that and I added it to all the weapons here https://opengameart.org/content/lpc-extended-weapon-animations . But point taken, it's another place to think about how to not-repeat-ourselves.
There are two separate issue for color palettes: 1) are the assets you want to recolor in a consistent palette to start with, and 2) what palettes do you recolor to. It doesn't much matter to me what Evert or Eliza or anyone choose to do for (2), however it would benefit us all to us the same palette(s) for (1). FWIW, I've generally been using this one for fabrics: ["#1d131e", "#411e05", "#4b2b13", "#62351c", "#744b30", "#996b4a"]. All the clothing I have added to the generator recently should have that palette as the "brown" variant (e.g. collared jacket, santa hat, etc.), so if you wanted to choose a diffferent set of destination palettes (2), you could start with the "brown" version and recolor from there.
I will share the offset and mask files and scripts I have used. The offsets for lpctools are specified as images, but it would be trivial to export them to some other format; if you need, I can easily add that functionality to lpctools. The masks, it's worth noting, are sort of situational like Ben said. For instance, the masks I have which identify the arms are really meant to cut out anything that would obscure the torso/chest. The hair masks are different, because they are only meant to remove parts of the arm that would obscure the hair.
It's late now, but I'll figure out how to upload the files and scripts this weekend.
I can give more details, but basically:
- AFAIK, nothing more has been done on these bases since my last comment (I certainly haven't had a chance to revisit; I've been busy with other less thankless work :p)
- I do have the minimal set of images, offsets/masks, palettes, and the scripts I used to generate the hair in my submission (and actually all hair in the spritesheet generator https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Gene...). I can upload them later to that submission. The same tools can be used for hats; I used them for the pirates and santa hat. I also have another set of masks and offsets, which is useful for placing things on the torso that go under the arms (e.g. I used it to make the cravat/jabot, belts, and sashes for the pirate, and for making the modified santa coat for Santa claus). However, the generated images are usually not perfect and have to be manually edited somewhat, so it's more an intermediate tool.
- Much of the clothing in the generator is not in a well-definted palette; I have been slowly working on converting it (e.g. pants, shoes, the pirate jackets, hats more or less use a standard palette). I have a standard set of color palettes in lpctools format that I have been applying to all clothes (derived from Eliza's earlier clothing palette, but with some simplifications or changes for consistency). With lpctools, the palettes are encoded as a mapping from a standard palette to several alternative palettes. Colors that aren't in the given palette are left as-is. There is also an option to give multiple such mappings for different materials and create all combinations (e.g. for the pirate hats, I used one set of palettes for the fabric and another to generate the trim). This generates a huge number of images though, so it's kinda unwieldy... probably better to separate those objects out into separate sheets in the future where possible. I'd suggest having a few sets of palettes for different objects, e.g. cloth, metal, maybe wood? And also not every object needs to have infinite recolors... idk that anyone is really asking for a green/blue/pink peg-leg :p
- I don't have any kind of palette for skin. Eliza has proposed several, and there are a few overlapping styles in the generator right now.
- Finally, none of the art in the generator has been updated to use the bases on this page. All of my offsets, masks, etc. also use the old bases (those in the generator right now). It would not be hard to update these tools, but I have been delaying doing so until the existing assets in the generator are updated, since I don't want to create two parallel sets of assets that can't be used together (Eliza is already doing that with her projects...). Updating the existing assets in the generator to use the new bases, especially the female bases, is somewhat daunting because anything that touches the legs or arms will need a few frames to be re-drawn. The male assets will need to be updated too, but those are just 1px pixel shifts which can be easily accomplished by lpctools.
- As a logical set of next steps and to minimize duplication of work, personally I would propose the following order: 1) finish the headless bases and separate heads I posed above posted here, working out any remaining bugs around the neck etc.; 2) automatically update the male and most female assets to the new bases 3) manually update the relevant female bases to the new bases, 4) adapt all assets (if possible) to one of the standard palettes mentioned above, then introduce a set of scripts to the generator to build the full set of spritesheets and re-colors from those source images. (The scripts would be straightforward, since lpctools provides all the necessary functionality; I've mostly delayed because I'd like to make the scripts use GNU make or similar, because running shell script to generates EVERYTHING, even if unchanged, takes a long time---even the ones I wrote for the pirates and hair were getting really unwieldy... but I'm not too familiar with make and it's kind of a confusing tool).
- However, if you don't care about updating the bases and are going to re-color things to a standard palette, please share your work :p. Using the same standard source palette as me (even if you choose different one(s) for your recolors) would be appreciated obviously. Ideally, make a PR against the generator repository. The credits are all worked out there, everything is pretty nicely organized, and we'll all benefit from the tedious work.
To elaborate on what MedicineStorm said, you should have some recourse against people selling your assets in violation of the license (e.g. without crediting you, noting the license, and linking to the original).
If they are selling thru a marketplace (e.g. itch.io, Unity Asset Store, ArtStation, etc.), you can first report them through the platform. That is fairly likely to be successful. If that does not work and either you or the website owner are located in the United States, you can send a DMCA takedown notice to the platform holder or the ISP hosting the website. Wikipedia provides an overview of the process, with examples (which refer to Wikipedia, but you can adapt to your purposes) https://en.wikipedia.org/wiki/Wikipedia:Mirrors_and_forks#Non-compliance... .
If that fails, your final recourse is to sue to have the item taken down, although the details of that depend on the jurisdiction where you reside, where the website is hosted, and obviously that is expensive, a lot of work, and not guaranteed to be successful.
What platform are you using? It sounds like you are launching the Miniconda installer, rather than a terminal/command prompt.
On Windows, open the Start menu > Run > type "cmd", then navigate within the command prompt to the folder where you unzipped lpctools and follow the remaining instructions in the tutorial. If you have never used the command prompt before, see here https://www.cs.princeton.edu/courses/archive/spr05/cos126/cmd-prompt.html for information about how to navigate to different directories, etc. I haven't used Windows in years so I can't provide a ton of support but I can try to help.
On Mac, search for Terminal in Spotlight or Launchpad. On Linux, open a terminal. Follow directions in the tutorial.
Yeah my idea was originally to do an advent calendar where I added something each day until Christmas :p I didn't really have that many ideas though so it would have been a bit of a stretch... christmas-themed pillows on the couch? Snowmen?
To run lpctools, you need to install its dependencies (follow instructions on the GitHub page, let me know if you have trouble), download and install lpctools, then invoke lpctools itself, either directly from the command line, or via a shell script. The shell script I used to build the pirate assets is build.sh in the zip I sent you, but that's just an example of how to use lpctools to arrange and recolor some assets.
There are lots more examples on the github page; something like this is probably what you want:
lpctools colors recolor \
--input skirt.png \
--mapping palettes.json
Just put palettes.json in a folder along with skirt.png, then run this command which will create a folder called "skirt" and assets within that folder, one for each palette defined in palettes.json.
palettes.json defines a "palette mapping," i.e. a mapping from one color palette to several others. Open palettes.json in a text editor, you'll see that it contains several keys, each of which is the name of the palette, then each palette is a list of colors in hex format (RRGGBBAA, where A = alpha). There is one special palette called "source", that defines the palette that it expects for the source image (e.g. skirt.png). For each palette, a recolored image will be created where the first color in the "source" palette is replaced with the first color in the destination palette, the second color in source replaced by the second palette in the destination, and so on. Colors in the input image that don't appear in the source palette will be left unchanged.
Ah I love this! Thought about doing something like this last year but never got around to it. Looks great!! Now just needs some christmas cookies... maybe a gingerbread house? ;-)
Not an adobe plugin, its a Python command line tool: https://github.com/bluecarrot16/lpctools
Pages