Code Monkey home page Code Monkey logo

Comments (17)

jrconway3 avatar jrconway3 commented on July 19, 2024 2

I also added these checks to the list on source_index.html, too. It basically works identical to how the "sex" / "body type" option works. However, in this case it should be noted that both must be available on an asset for it to show up. By default "any" is chosen which removes the restriction entirely.

I did do a few custom restrictions, too. Muscular also hides Shoot while Pregnant/Male both hide Emotes (I intend on doing this relatively quickly, but Muscular I'm not planning on doing any time soon).

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024 1

Oh, right, I wasn't talking about changing the height of the output at all. I was only talking about using this to filter assets on the left side to show what's visible based on what assets are available for set animations. I wasn't even talking about changing the canvas size.

So, for example, right now assets disappear if there's no entry for "male", which you can see with the dress assets. Though its far more noticeable with child, where all the categories appear by default but once you open up them, barely anything actually appears.

Heads are the easiest way to see this. If you open the heads category and switch to the child model, all the "adult only" head models disappear and only show child models now. This also drops things like Jack, Skeleton, etc.

I THINK that's what Fusionette was asking for; the ability to filter assets on the left side based on what animations are currently available for each asset. That way if users are looking for specific assets, they can more easily find said assets. However, it won't change the size of the output file/canvas or anything like that. It only filters the available assets.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024 1

I've almost got this done, it wasn't as hard as I thought, but I had to shift the idea a bit. Instead of using a checkbox and telling it to be based on the preview, I'm just creating a new collapsible element near "Body" that works the same way--you choose the Animation type to filter by, and its hidden by default (unlike body).

This is the easiest way to handle it because this method:

function showOrHideElements() { 

Is handled whenever radio buttons in the filters get toggled. In addition, it will add the animation filter to the URL so users can keep that option as well if they want in the future.

The only issue right now is I'm having a hard time actually getting the toggle to take effect, but that I think will just take a bit longer to fix.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

Yes because these animations are new and aren't finished yet. There's lots and lots of stuff to add in to these assets still. You can see some assets have been updated but not all.

That being said, the sprites with "down" and above, which are the old assets, are still viable to use even without the rest of the animations.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

The first step to completing these animations is adding the bases, which has now been done. To finish the rest its a lot of work, and there's a card here if anyone's willing to help:
#88

The reason why these animations weren't added before is precisely because of all the work involved. I added them so I can use them and slowly start filling out the rest of the assets, but it'll be a long while before there's more assets without extra help.

If you check out some assets, though, you can see that some assets are mapped to all frames, such as most facial attributes including glasses, neck and bow ties, and a handful of hairstyles.

from universal-lpc-spritesheet-character-generator.

Fusionette avatar Fusionette commented on July 19, 2024

@jrconway3 Would it be possible to add a checkbox under the animation preview that says "hide assets that don't include this animation"? That way I could pick, say, the Run animation and only see assets that include it.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

"hide assets that don't include this animation"

I assume you're referring to hiding all assets that don't yet have positioning in that specific animation?

Not easily, but I suppose its not impossible. The assets are one giant sheet because its too slow to separate the assets out and load them in to one sheet. What we'd have to do instead is modify the sheet_definitions to specify what assets do support those frames. That being said, I don't know this codebase very well so its not the easiest thing in the world for me to do. Maybe someone else could do it easier.

However, another thing that I should note here--I'm not adding assets to only SOME of the remaining animations. If I add them to some additional animations I add them to all animations at once. That's because, again, these are all one giant sheet.

Another option is to simply have a quick checkbox to crop out all the extra animations. That's probably far easier to implement. So if you only want to do that this is a good idea and it probably wouldn't take too much effort for me to do.

It should be noted--NO clothing assets yet exist on all these animations, and that's because my priority goal here was to map ElizaWy's clothing first. In fact, that's already done... the problem is Eliza's assets are missing cast, down, thrust, and shoot. She has everything else. So I mapped all of Eliza's clothing assets, but I have to finish the animations for everything else.

Once those are done, then we'll finally have some clothing assets mapped to all these frames. The old clothing assets will still take a while to get mapped to the rest of the frames.

I'd rather just work on getting these assets added as quickly as possible then trying to add more viewing options, but perhaps someone else can handle it better or maybe if this is highly requested I can focus on adding restrictions to what assets show up where based on specific animations.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

Here's a hypothetical idea:
https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Generator/compare/master...jrconway3:issue-161-add-checkbox-mark-extra-animations?expand=1

I added this variable to every single asset now that has the full series of animations filled out:
"expanded_animations": true

So this var we can use to denote which assets are complete and which aren't. I don't yet know how to connect this, but I'll do some research soon and see if I can implement this. This will be a quick check to simply hide all assets that aren't yet expanded. Keep in mind, there's still NO clothing assets yet--I'm going to try and get those done ASAP but it may still be a little while before I can finish. I'm working on importing these clothing assets:
https://github.com/ElizaWy/LPC/tree/main/Characters/Clothing

These assets are on all/most of the extra animations, but they're missing a few of the older animations. I have made progress but they're not quite done yet. Once I finish these then we'll have a decent chunk of clothing assets, but other clothing assets will still take a while longer because these are lots of animations to fill out. I'll be handling it with my kimono assets first before doing more of the older clothing assets.

That said, Eliza's assets do cover a lot of ground. Its got longsleeve shirts and tshirts which cover a lot of assets, and I'll be making sleeveless assets for these, too. There's already pants and shorts as well. The main thing missing after that would be dresses and skirts which there's nothing in Eliza's assets yet, so those would need to be modified from the existing LPC assets.

from universal-lpc-spritesheet-character-generator.

sanderfrenken avatar sanderfrenken commented on July 19, 2024

@jrconway3 Would it be possible to add a checkbox under the animation preview that says "hide assets that don't include this animation"? That way I could pick, say, the Run animation and only see assets that include it.

It would be possible, but I don't like to add such logic. This repository aims to be a tool for game developers/ artists etc. The output will be the sheet, that is always consistent in size unless there are specific custom animations added. Using these sheets in any game engine will always require some postprocessing. For instance, you could cut the sheets to separate images per animation to fit the needs of your engine, or whatever else.

As such, I don't aim to facilitate all these cases in the generator you find here. This generator will just output the sheet in all its glory, and you as a user can postprocess it with whatever tool you like.

I can imagine the need to filter for the completeness of the asset, but this comes with a lot of edge cases, that a simple boolean can't cover. For instance, there could be an asset that fits all the standard animations, and also the run animation already, but not the other remaining assets. Another asset might fit all the standard animation and the climb animation, and so on and on.

Ideally, in the end all assets will cover all animations present. But new assets that might come in the future might only cover a subset of animations (for instance only the standard set. not ideal, but possible) and maybe one or more of the newly added animations (climb, sit, run, etc).

It would be up to the user to pick the assets that fit best.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

"this comes with a lot of edge cases, that a simple boolean can't cover"

Actually I think that's what Fusionette was getting at in this case. Basically, show all assets supporting that specific animation. I intend on introducing "completed" sheets, but some others may only provide certain assets at first. So it may be ideal to have a filter that filters assets in the list based on what each asset contains. However that definitely requires a modification to the list.

For example, my toggle here:
"expanded_animations": true

Is not enough. It would need to be something more akin to:

"expanded_animations": [
    "idle", "jump", "run", "sit"
]

That might solve it. With this, we could add the animation to the left filter and only show assets that have this filter included.

Would it be possible to add a checkbox under the animation preview that says "hide assets that don't include this animation"? That way I could pick, say, the Run animation and only see assets that include it.

The tool does this already when it comes to base models. If a base model asset does not find any matching assets, those assets are not shown. As such, we could have a similar toggle to restrict the animation assets, too. We just need to provide a list of supported animations in sheet_definitions. We could even include base animations as a separate option if we wish to restrict them for assets missing said animations (such as muscular body not having shoot yet, or child not having many base animations).

Its a hypothetical possibility. A decent chunk of work, but could work.

from universal-lpc-spritesheet-character-generator.

sanderfrenken avatar sanderfrenken commented on July 19, 2024

Indeed such a system could work. To some extent. Some assets might only have an animation for a specific body type. EG, that the run animation is done for asset A for body type female, but not yet for male.

The idea of using an array here would therefore not fit fully either (yes, there are solutions for that as well, but it just gets more and more complex. Also for people that like to contribute art, I prefer to keep that as simple as possible).

Moreover, the final sheet created would have a variable height, which currently also doesn't fit the logic in use, and for post processing its quite inconvenient as well.

So hypothetically, its possible (it always is ;) ) But in practice, I don't see any real benefit comparing the complexity involved (development work. now and in the future, also maintaining it consistently) with the gains.

Keeping it as simple as possible, that is my intention with the generator. It's already a decent amount of logic; not very well written and without tests atm. But as it's just a tool, that okay enough.

from universal-lpc-spritesheet-character-generator.

Fusionette avatar Fusionette commented on July 19, 2024

I THINK that's what Fusionette was asking for; the ability to filter assets on the left side based on what animations are currently available for each asset. That way if users are looking for specific assets, they can more easily find said assets. However, it won't change the size of the output file/canvas or anything like that. It only filters the available assets.

This is exactly correct. Updating all the assets for all expanded animations is a process that will take a very long time, so I believe there's value in offering this toggle in order to improve the user experience during the transition period.

from universal-lpc-spritesheet-character-generator.

sanderfrenken avatar sanderfrenken commented on July 19, 2024

Ah clear, I understand now what you aim to achieve.

It would require to add a property to all sheet_definitions (459 in total atm).
That property should be of value array, the key can be supportedAnimations.

The SupportedAnimation type would be a string, one specific for each of the currently available 17 animations (walk, slash, shoot etc).

So eg the definition for my_asset.json would now get an additional field being:

...
"supportedAnimations" : ["walk", "slash", "shoot"],
...

Then, you'll need to parse these values from the definition inside the generate_html.js, like done for the required attribute as done here:

const startHTML = `<li data-required="[REQUIRED_SEX]"><span class="condensed">${name}</span><ul>`.replace("[REQUIRED_SEX]", requiredSex);

Finally, inside chargen.js, you'll need to update this method to show/ hide the desired selectors:

And ofc you'll need to add the UI to update the animation types you are filtering for, this can be added to the source_index.html.

If you like to have a look at it @Fusionette , I am more than willing to review a PR.
It's not a trivial change though, and updating the 459 definition files is a bit tedious.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

@Fusionette If you're interesting in looking at it, that's appreciated, but otherwise I'll probably look into it soon. I'm the main one who started this push to add the remaining animations after all.

@sanderfrenken Thanks for pointing out how it works. This should make it easier to implement.

My thought process is rather than editing all 459 definition files, we can simply check for a new var and if said var exists, we go with that, but if the var doesn't exist, then we assume all default animations are present but nothing else. I think this would work and we wouldn't need to edit all 459 definition files, and only modify the ones that have been updated.

I'm pushing to get some clothing assets out ASAP so at the very least, we'll have some clothing assets soon, though these won't be any existing assets but ElizaWy's instead, because she's already got all hers mapped to all frames except for the base frames we have. So with some clothing assets in place we'll finally be able to finish a complete set of characters using the new animations.

from universal-lpc-spritesheet-character-generator.

Fusionette avatar Fusionette commented on July 19, 2024

Glad to hear you got it almost done! Thank you very much for your efforts.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

Just opened a PR. I wouldn't have been able to figure this out so easily if @sanderfrenken hadn't explained how to do it.

from universal-lpc-spritesheet-character-generator.

jrconway3 avatar jrconway3 commented on July 19, 2024

@Messij @Fusionette Please let me know how this looks, guys! I added in a filter that now shows what assets have what animations. I'm trying to get as much through as I can ASAP but it will be a while before everything is ready, so hopefully this should help in the meantime.

Please follow these issues for status updates on how other assets are going:
#141
#140

And this one is the one that will be the basis behind all of them, and probably won't be closed until all these animations are mapped:
#88

from universal-lpc-spritesheet-character-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.