Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Character Creator 2D - Editor & runtime character customization

Discussion in 'Assets and Asset Store' started by mochakingup, Feb 23, 2018.

  1. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hey everyone!
    So the newest update has been approved by the Unity Asset Store!

    The approval time is actually faster than I expected, and I haven't updated the documentation yet

    Version 1.55 is now available on Asset Store
    Changelog:

    • New Shaders: Diffuse (Affected by 3D light)
    • New Shaders: Sprite Lit Preview (Affected by 2D light)
    • New Animations:
      - Sprint
      - Climb Up
      - Climb Down
      - Attack Punch
      - Attack Kick
    UPDATE WARNING:
    Reorganized some assets and folders. It's highly recommended to remove the old version before updating. And make sure to back up first!

    Sprite Lit Shader Preview
    2d light.gif

    Why is it preview?
    Well because the 2D render pipeline itself is still in preview/experimental.
    It was tested and should works with:
    - Unity 2019.3.0
    - Lightweight RP 7.1.6
    - Shadergraph 7.1.6

    As it is still in preview, expect some bugs. And we won't be focusing our efforts on it until the 2D render pipeline is out of experimental stage.

    How to use the new shaders
    You can either change your saved prefab's materials. Or you can change the default materials used by CC2D (I wouldn't recommend this, as it'd be harder to see the actual color when creating characters). You can find the default materials in "Assets/CharacterCreator2D/Data/Materials".

    materialshaderchange.gif

    Use the 'Character Skin' shader on Face and Skin materials. And use the 'Armor Recolor' shader on the rest of the materials.

    PS.
    Don't flip characters by rotating Y axis by 180 when using the Diffuse shaders.
    As it will show the wrong normals and the lighting will looks wrong. Flip by scaling the x to negative instead.

    So that is all for now!
    Let us know what you think!

    I will soon begin to update the online documentation to the newest version.
     
  2. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    19
    would be great if integrated with unity 2d game kit
     
  3. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    98
    Thanks for the updates. But the animation for kick and punch looks very off from rest of the animations. To fix it do I just change the framerate or something? Please let me know thanks and keep on the good work.
     
  4. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    98
    Hi, is it possible to export png as sprite sheet instead of single frames?
     
  5. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    98
    I can't there are only 2 images for that. Need to add more images to look better.
     
  6. thejimbarnes

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    8
    I like what you're doing with the shaders but would adding normal maps make them better. There's a software called spriteilluminator by codeandeweb which will make normal maps for sprites so that the sprite appears to have a depth to them when hit by a spot light for example. And yes I could export all the character sprites as png and run the process myself but, tedious.
     
  7. thejimbarnes

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    8
    Just a suggestion could you explain how to use them in the engine. Okay sure I can make a character and I can export them in various forms, but the next step of making them work evades me. I am sure there are extremely experienced people who understand this, and certainly I can read all the posts and do all the unity courses but still I wont find a specific "how to use" these characters in the engine.
     
  8. thejimbarnes

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    8
    And finally I saw someone asking about flipping characters and making the weapons stay in the hand they are placed in, rather than the weapon in the front hand still be in the front hand when the character changes direction. Would a piece of code to swap the weapon in the main hand to the off hand be possible. Can I identify the weapon that is in the main hand of a character.
     
  9. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @khushalkhan
    we have no plan for that at the moment.
    Character Creator 2D is focused on creating the visual aspect of the characters. We leave the gameplay part entirely to the users.
     
    khushalkhan likes this.
  10. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @Gamingbir
    So all the animations are animated at 60 fps. It might be the effects that lacking, compared to the other attack animations.

    Not at the moment. But if you are using Unity, then you can easily pack all the generated frames into a Sprite Atlas.

    So regarding that, you are correct. We need to strike a balance between customizability, animations, and performance.
    Granted, with our current setup, we can't beat the fluidness and flexibility of frame by frame animations (you can create any pose you need for each individual frame).
    Our animations, unfortunately, are limited to allow huge customization of the character, which is the focus of this asset.
     
  11. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @thejimbarnes
    I can almost certain to say that we won't be adding normal maps.
    The main reason is, for 2D characters, normal map works wonder on a single sprite.
    But it's extremely hard to pull off on a 2D skeletal / paper doll character (character that consists of several images). Every image will look separated and the illusion will break. For example, the upper arm and lower arm will be visibly separated, like if you stack brick on top of each other.

    By "how to use" did you mean on how to equipping and customizing character at runtime?
    If so, you can refer to the documentation (http://bit.ly/CC2Ddoc) under the Runtime Customization section.

    Yes, in a way, you can swap the equipped weapons between the main and offhand. Except for two-handed weapons, bows, shield, and rifles. Their positions are fixed.
    You can retrieve what parts are currently equipped in your character using this function:
    CharacterViewer.GetAssignedPart(SlotCategory.MainHand)


    Then again, in my personal opinion, it might not worth the effort to do that. It is pretty common in 2D games that characters are simply flipped without swapping hand. Players most likely won't notice or care.
     
    thejimbarnes likes this.
  12. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi everyone,
    so here's a lil bit of preview for the feature that we are currently working on:

    skirt wip.gif

    Also, I find that combining oriental and sci-fi results in a star wars feel, kinda. :p
     
    tik_tikkers and ATeam_Production like this.
  13. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    39
    I would like to suggest a little less emphasis on the breathing animation. Humans don't breathe with that much emphasis and that animation would not go well with my survival game. If that breathing is something most people like, can you please keep the original and call it "subtle breathing" so we can still have that as the idle animation? One of the things that attracted me to this asset was the lack of "anime" animation. I am going for more realistic. Thanks.
     
  14. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @_Eyesgood_
    Both animations are already in the asset, the usual idle that you refer to is simply called 'idle' while the one I showed in the previous post is called 'idle wide'.
     
    ATeam_Production likes this.
  15. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    39
    Awesome! Thanks!
     
  16. zhepama

    zhepama

    Joined:
    Mar 12, 2015
    Posts:
    2
    Hope to add mount (horse)
     
    Last edited: Jan 13, 2020
  17. thejimbarnes

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    8
    No I meant actually use the prefab after I create and save it for instance in Corgi Engine or Unity 2D project.

    Or do I have to write all the code to make it move and respond to keystrokes.

    Plus as I understand it a prefab is not the actual source just a reference to the source materials. So do I have to install all of 2D Character Creator and the addons into assets and create a new scene to use the prefab.
     
  18. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Unfortunately, we have no plan for that at the moment.
     
  19. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @thejimbarnes
    ahh, sorry for the confusion.

    Yes, the main purpose of Character Creator 2D is to create a character.
    Character controller can vary greatly between games, so the gameplay mechanic is entirely up for the user to decide/create. For example, turn-based tactic and platformer games will need vastly different codes to control the characters.

    On top of that, if you are using an engine or template like Corgi, the character controller most likely have been handled on the engine/template.

    We are using the built-in animation system in Unity (https://docs.unity3d.com/Manual/AnimationSection.html), so it should be easy to pick up the prefab and play any animations. The thing that needs some explaining probably is the aiming animations. Which we've covered in the Documentation (http://bit.ly/CC2Ddoc) under the Animation section.

    If you are not familiar with this, I'd recommend you check out some basic tutorials for 2D games in Unity.

    Yes, kind of. You can remove the CharacterViewer component from the prefab, and the character should run just fine, but you still need all the shaders and images from the asset.

    If you want an output that completely independent from the asset, then you can export your character as frame by frame PNGs. But then you wouldn't be able to customize it at runtime.

    Of course, it all depends on the type of game you're making, and/or your workflow preference.
     
  20. burnettx

    burnettx

    Joined:
    Jan 17, 2020
    Posts:
    2
    Hello, great work on creating this product. Much appreciated. If I purchase it on the Unity Store, do I receive the standalone version and the unity package? Or should I buy it on Itch to receive both products?
    Thank you in advance, have a good day.

    Greetings, Steve
     
  21. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @burnettx
    Good question!

    You only get the unity version if you purchase from the asset store.
    If you purchase from itch, you'll get both unity package and standalone version (although at slightly higher price).
     
  22. burnettx

    burnettx

    Joined:
    Jan 17, 2020
    Posts:
    2
    Thank you very much.
    I bought it on the assets store so I can keep the product attached to my unity-ID.
    Thank you once again, great product!
     
  23. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hey everyone!
    Here's a little preview of the upcoming pack.

    daily preview 1.png

    Although in the preview above, we also used some parts from other existing packs.
     
    nixter and ATeam_Production like this.
  24. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    73
    Everyday Life pack ?

    Do you plan to propose an all in one version of Character Creator 2D, with discount prices for owners of basic version ?
    I have the original Character Creator 2D, and plan to buy perhaps the Sci-Fi package. But Orientals and this new one could be great to have too. It's only a question of price ;)
     
  25. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Yes! it's a daily life pack!
    No plan for complete collection yet, maybe once we've got all the packs we wanted to make :)
     
    ATeam_Production likes this.
  26. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    39
    Looking forward to a Survival/Zombie Apocalypse pack.
     
    ATeam_Production likes this.
  27. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    73
    Thank you for your answer. Definitely nice work!
    Daily Life Pack is a good idea!
     
  28. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    39
    May I suggest a swimming animation, a simple arm over arm or breast stroke / doggie paddle - something that would work when a player needs to traverse through water. Thanks.
     
  29. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    39
    I just upgraded to the latest version. However, I am not seeing the Sprite/Lit shaders. I deleted the CharacterCreator2D folder from my project and imported the latest version. Is there something else I need to do?
     
  30. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    we'll see what we can do

    You need to install both the LWRP/URP and Shadergraph from the package manager.
    And to setup the 2D light render pipeline, you can follow the steps in this link: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.1/manual/2d-index.html

    Keep in mind that 2D render pipeline is still in preview.
    Our light shader was tested and should work with:
    - Unity 2019.3.0
    - Lightweight RP 7.1.6
    - Shadergraph 7.1.6
     
    ATeam_Production likes this.
  31. cheesyvideogamerjp

    cheesyvideogamerjp

    Joined:
    Jan 27, 2020
    Posts:
    1
    Hey! Awesome work! I've been wondering if there is any chance to add custom sliders for the body parts. I want to add some parts to create antropomorphic characters and I want to create an additional slider for tales.
     
  32. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @cheesyvideogamerjp

    Technically, yes you can do that. It's undocumented tho.
    You'd want to take a look at 'CharacterCreator2D/Data/Resources/CC2D_SetupData'
    Then on the inspector under Body Type Data/Segments Data, this is where the sliders setup are stored

    sliderdata.png

    It's a bit of a mess, shoot us an email if you have trouble understanding it.
    Then you'd also want to create a new slider on the UI, which you can copy from the existing sliders.
     
  33. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi everyone,
    Just a quick heads up!
    Along with the upcoming updates, we'll be adjusting some of the prices so that it reflects more to the current state. The base fantasy asset will be raised from $20 to $25, and Oriental Pack will be raised from $10 to $15.
    So it might be a good time to grab it now if you haven't already!
    Current and existing users won't be affected.
     
  34. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    73
    I have bought all your packages. I really need Sci-Fi one for an adventure game but with the mix of rhe others, it could give god results.

    Could you provide us some different hands poses, not only the default hang on one. It could be useful.

    Very nice work. I am waitinf for next package.
     
  35. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Thanks!
    Daily pack is coming soon, we've already submitted it to the Asset Store, we're still waiting for it to get approved.

    ---

    In the meantime,
    here's another gif of 100 randomized characters!

    100 random chars.gif
     
    Szaruga and ATeam_Production like this.
  36. Roygon

    Roygon

    Joined:
    Apr 17, 2019
    Posts:
    5
    This is great, I purchased it yesterday and I'll be getting all of the extra packs to support development even though I don't really need them. For my game I want to have very large cartoonish heads in relation to the body. I've set the head size to 1 and the body sizes to 0 but I really wish I could make the head size about double what it is now. I tried through code but it ignores values greater than 1. Any way to allows overriding the maximum?
     
  37. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @Roygon

    Unfortunately, there isn't an easy way to override the body sliders.
    But if you are only looking to override the head size, I think we have a workaround for that!

    First save your character as a prefab.
    Then edit the resulting prefab, click the 'Show Child' in the inspector to reveal all the children in the hierarchy.
    Search for "Pos_Head" in the hierarchy. You can then scale this object to your liking.
    Or you can also scale it from code, of course.

    I hope this answers your question.

    PS. Make sure to uncheck "Initialize on Awake" on your prefab, so that your edits don't get reverted.
    PPS. Changing body type will also revert any edits that you made.
     
  38. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    39
    It's amazing what a little bit of ancillary knowledge can do. I have been struggling with an issue where I have changed the layer of my character to something other than Default. I have a camera projecting a texture of the character's face onto a little character circle in the UI. Every time I run, the character doesn't show until I manually go in and change the Layer of the player at runtime. Even though the Layer shows up as correct in the inspector when I run it, I have to manually change it. When I do this, immediately the camera renders properly. I read your post above about unchecking Initialize on Awake, and on a hunch, I checked the flag. Sure enough, it was checked. I unchecked this and now the player stays on the Layer I set and everything is working beautifully. I am so glad you posted that PS. Thanks!
     
  39. Roygon

    Roygon

    Joined:
    Apr 17, 2019
    Posts:
    5
    Thanks! I actually used this info to make an easy change in code finding the Pos_Head object and changing the scaling when he's created. I purchased the other two packs yesterday and there is a ton of great stuff there too! I'll be auto purchasing all of your new packs - this asset is already great but also has soooo much potential
     
  40. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hey, glad that you got it sorted!
    Maybe we should make the InitializeOnAwake to be unchecked by default when saving to prefab. It had its uses in the past, but for prefab in the current version, it doesn't really add anything.
    We are also exploring ways so that prefabs and their children can be safely edited!

    Glad to hear that!
    We try to always have something in every pack, so that it will benefit all users, regardless of the theme they're working on. Also, mix and matching between packs can result in amazing combinations, in my opinion.
     
  41. Moe-Mogare

    Moe-Mogare

    Joined:
    Apr 16, 2015
    Posts:
    15
    My question is after buying it is there a way to turn the faces older, and will there be a morph for children to teenagers and even babies, also any chance to increase the breast size and are you planning a way where for example if I illustrated clothing I could add it to a character creator

    @mochakingup
     
  42. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @Moe-Mogare

    You can kinda do teenagers, but children and babies and breast size are not on our plan.
    Older face is somewhat possible in the upcoming Daily Life Pack, but maybe wait to see if it matches your needs before buying.

    To see all the available parts on our packs, and what's possible with our current asset, you can try it out and play around with our web demo: https://mochakingup.itch.io/cc2d

    And yes, you can create new parts and add them to the character creator. For more details on how to do that, please refer to the documentation (http://bit.ly/CC2Ddoc) under the 'Creating Custom Part' section.
     
  43. Svoerd

    Svoerd

    Joined:
    Oct 17, 2017
    Posts:
    7
    Hello. Thanks for your asset, it looks great. But I have some troubles.
    1. Character looks not good (pixel ladders, lost details) when I low scale (for example 0.3 of standard). I need Character Viewer, not save to png. Can I low transform scale of Character Viewer, and have good looks graphics?
    2020-02-08_11-54-57.png
    2. I need to character parts on UI (canvas) with mask to crop circle shape. I Create UI Image and place armor part on it. Add Ui mask - it works, part is cropping. Want to color armor, set CC2D armor material - armor is colorful, but mask doesn't work. It will many parts on screen - use Camera and RenderTexture for every part is not good for me. Png saving is not my variant. How I can use CC2D on UI (canvas) with mask to crop some image?
    Thanks for your help.
    2020-02-08_11-56-19.png
     
  44. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @Svoerd

    We are aware of this, unfortunately, we haven't found a good solution yet.
    I might be wrong here, but I think it comes down to texture filtering and mipmapping.
    And this issue is pretty much common when creating 2D games.
    We've tried point and bilinear filter settings, but it doesn't always look good on all cases.
    We'll continue looking for best solution for this!
    Also, is there anything wrong with the character in the screenshot?
    I'm pretty sure the pants aren't supposed to look like that.

    Yeah, the shaders weren't created with UI mask in mind.
    Are you trying to create icon for parts? Or are you trying to show the whole character in UI?
    If it's icon, I think the best bet is to render it to PNG, it will save performances too.
    Can you explain why you need it runtime as opposed to save it to PNG?
    If it's a whole character you want to show in the UI,
    then the common practice would be to use RenderTexture.

    Please let me know if I misunderstood your question.
     
  45. Svoerd

    Svoerd

    Joined:
    Oct 17, 2017
    Posts:
    7
    I want ot create a gallery of character portraits. Every in wooden (other material) frame. Like picture gallery. It may be many count(for example 20-30) on screen one time. If it is RenderTexture, I must use own Camera for every portrait. Or is there any other way to use RenderTexture without Camera for every portrait?
    Thanks
     
  46. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Yeah, that is my understanding as well. You'd need a camera for each one. You can, of course, do this automatically from code. But I can see how that might become a performance issue.
    There might be a better way to do this. I'll get back to you if I found any.
     
  47. Svoerd

    Svoerd

    Joined:
    Oct 17, 2017
    Posts:
    7
    Today I go sleep, will continue experiment tomorrow. I found some way) Solution is here
    https://stackoverflow.com/questions/44264468/convert-rendertexture-to-texture2d
    1. Place Character Viewer and New Camera on same layer. Dont show it on MainCamera
    2. Need method from link
    Code (CSharp):
    1.     Texture2D toTexture2D(RenderTexture rTex) {
    2.         Texture2D tex = new Texture2D(512, 512, TextureFormat.RGB24, false);
    3.         RenderTexture.active = rTex;
    4.         tex.ReadPixels(new Rect(0, 0, rTex.width, rTex.height), 0, 0);
    5.         tex.Apply();
    6.         return tex;
    7.     }
    3. Draw Character on Viewer
    4. Redraw camera, create texture, and place it on RawImage
    Code (CSharp):
    1. public Camera NewCamera;
    2. public RawImage TargetImage2;
    3.  
    4. void DrawCharacter() {
    5.     Texture2D myTexture = toTexture2D(tex);
    6.     TargetImage2.texture = myTexture;
    7. }
    Looks horroble, but works) I don't know about performance. Mochakingup, can you improve this code? Please advises? Is this good way? Many thanks for help
     
  48. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hi @Svoerd
    I'm not sure. I'd recommend to test it on your target platform. If the performance is acceptable, then nice!
    But if it's not, you can maybe put a loading text on the UI or the portrait before the code runs.
     
  49. Svoerd

    Svoerd

    Joined:
    Oct 17, 2017
    Posts:
    7
  50. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    171
    Hey @Svoerd glad to hear that!
    I'm sorry if I wasn't much of a help, and thanks for sharing the solution here!
     
unityunity