Search Unity

Character Creator 2D - Editor & runtime character customization

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

  1. khushalkhan

    khushalkhan

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

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    197
    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.
     
  3. Gamingbir

    Gamingbir

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

    Gamingbir

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

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    15
    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.
     
  6. thejimbarnes

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    15
    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.
     
  7. thejimbarnes

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    15
    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.
     
  8. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
  9. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  10. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
  11. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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
     
  12. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    55
    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.
     
  13. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
  14. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    55
    Awesome! Thanks!
     
  15. thejimbarnes

    thejimbarnes

    Joined:
    Jun 16, 2017
    Posts:
    15
    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.
     
  16. mochakingup

    mochakingup

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

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  18. 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
     
  19. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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).
     
  20. 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!
     
  21. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
  22. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    82
    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 ;)
     
  23. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
  24. _Eyesgood_

    _Eyesgood_

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

    ATeam_Production

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

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    55
    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.
     
  27. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    55
    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?
     
  28. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
  29. 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.
     
  30. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  31. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  32. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    82
    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.
     
  33. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
  34. 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?
     
  35. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  36. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    55
    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!
     
  37. 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
     
  38. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  39. Moe-Mogare

    Moe-Mogare

    Joined:
    Apr 16, 2015
    Posts:
    19
    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
     
  40. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  41. 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
     
  42. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  43. 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
     
  44. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  45. 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
     
  46. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    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.
     
  47. Svoerd

    Svoerd

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

    mochakingup

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

    Roygon

    Joined:
    Apr 17, 2019
    Posts:
    5
    A second prefab "HeadshotViewer" would be amazing even if it was an additional purchase. Just a way to render only the head possibly with animation disabled to make the performance better. An easy option to have the render be usable in a UI Image on a canvas would be a great bonus. If you have no plans to do this let me know and I'll try to make it myself

    The potential of the Character Creator 2D component is huge. As you add more packs and features and more people start realizing that it exists you'll carve out a nice business with this. Don't be afraid to increase the price or have additional paid components that work with it - you obviously know how much it costs to have an artist render a bunch of characters.
     
  50. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    55
    Ok, so I thought I would jump in and offer the solution I did for my game. If I am understanding Roygon correctly, you want to be able to see your character's head in a UI element, like this:


    (see attachment)

    I purchased the Emerald Treasure UI asset, which comes with a prefab called Unitframe. It was very easy to add a camera to this prefab and just set it up. It already has a mask.

    The GameObject heirarchy will look like this:

    Game Object (#2 below)
    Camera component
    Game Object (#3)
    Mask Image
    Game Object (#5)
    Raw Image

    1. Set your player object up with its own layer. Mine is just "Player".
    2. Create a new game object and attach a camera to it. That game object should be an object on your canvas. Set your camera to RenderMode = Base, Projection = Orthographic, Size to .28. Set the Renderer to New 2D Renderer Data. Set the Culling Mask of the camera to your layer name, i.e. "Player". Set the Post Processing and Dithering to Checked. Add a Pixel Perfect Camera (Experimental) component to your camera and set the Reference Resolution to 230 x 230.
    3. Create a mask image as a child of the new game object. Select the mask you want to use over the character
    4. Create a 2D render texture (Assets -> Create -> RenderTexture). I set mine to 2D with a size of 230 x 230.
    5. Create a new Raw Image object as a child of your character mask image object and set the Texture to the RenderTecture you created.
    6. Set the camera Output Target to Texture and drag the RenderTexture on the Texure component of the camera (for the latest 2D render modes, it is under Output -> Texture. Your RenderTexture will be referenced by the child RawImage object under your Character Mask object and also on your camera.
    7. Create a c# script and attach the script to the camera component. Here is my code:

    public class CameraPlayerPortrait : MonoBehaviour
    {
    [SerializeField]
    private Transform _cameraTransform;

    private void Awake()
    {
    _cameraTransform = this.gameObject.transform;
    }

    private void Update()
    {
    Vector3 playerTransform = STGameManager.Instance.PlayerObject.transform.position;
    _cameraTransform.position = new Vector3(playerTransform.x, playerTransform.y + 1.5f, -1f);
    }

    }

    8. You will have to add a Serialized field for your player object transform. Mine is in my GameManager singleton, so change that part of the code to meet your needs.
    9. Drop your camera transform onto the private _cameraTransform in the Inspector. If you created a field for your player, drop the player transform onto that field. The Update() method simply gets the player transform and sets the position of the camera to the x, y + 1.5. The y + 1.5 is key to align the players head with the camera. You will need to modify that value based on how large your character is. My characters are scaled at x = .15, and y = .15. Even that small, it looks really great!

    Unless I have missed something, that is all I had to do. My character portrait animates exactly with the character. It works well and it is very crisp with no issues.

    Hope this helps.
     

    Attached Files:

    Last edited: Feb 13, 2020