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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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:
    143
    Hey @Svoerd glad to hear that!
    I'm sorry if I wasn't much of a help, and thanks for sharing the solution here!
     
  2. 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.
     
  3. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    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
  4. Roygon

    Roygon

    Joined:
    Apr 17, 2019
    Posts:
    5
    That's great, I'll try that out. Ideally I need to have 50 of these head shot portaits in a scrollview so not sure how badly the performance is going to get hit but I'll give this a shot
     
  5. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hi @Roygon
    Thanks for your support!
    Unfortunately, we don't have a plan for that at the moment. If you want to give it a try, please go ahead. We'd be ecstatic to see additional add-ons from other people! And it seems like a common issue that people encounter when dealing with portraits and UI.

    Hi @_Eyesgood_
    Thanks so much for posting your solution here!
    I'm sure it will help a lot of people encountering the same issue!
     
    ATeam_Production likes this.
  6. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    67
    Any news about the new pack?
     
  7. Roygon

    Roygon

    Joined:
    Apr 17, 2019
    Posts:
    5
    EyesGood, thanks for the post. It works beautifully! Here are some updated instructions that get you there as simply as possible for anyone wanting to do this:

    • Add a RawImage component to a Canvas
    • Create a Render Texture object in your project asset folder
    • Add a Character Viewer off screen somewhere
    • right click on the Character Viewer and add a Camera with projection set to Orthographic and Target Texture set to the Render Texture you created. Set the Z position of the camera to -10
    • On the RawImage set the Texture to the Render Texture object

    When you run it you should see the characters legs - adjust the camera (the one attached to the character) position and size and adjust the Raw Image size until you get what you want. I'm not sure what performance will be like if you have 50 of these character viewers, each with their own camera and render texture but I'll be finding out!
     
    ATeam_Production and _Eyesgood_ like this.
  8. T-Dup

    T-Dup

    Joined:
    Aug 4, 2014
    Posts:
    4
    Hi,

    I bought this asset a couple of months ago and I'm really pleased with it!
    Thanks for the quality, the regular updates and the awesome communication here :)

    I'm also really interested by the Daily Pack and looking forward to it!

    I know it's not planned (and super complicated to do, since you'd have to do alternative version of all your anims) but it's too bad we don't have face/back option also, this would allow us to use this in 3d world / top down (without weird design hack :p)

    Oh well, 5 stars anyway, you guys are awesome!
     
  9. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    I picked up the Oriental Pack. Just to make sure, I deleted the base, then made sure I had latest, then reinstalled the base, then installed the Oriental. I see the assets in the folders, but they are not showing up in the creator UI. Is there something special I need to do to show the additional content? The same is a happening with the free Glasses. Thanks.
     
  10. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hi @ATeam_Production
    Sorry for the delay. It's already approved by the asset store and ready to go, we're just waiting for the current sale event from Unity to be over. It supposedly end on 16th, so it's coming real soon!

    Hi @SuryaEU
    Thanks for the support!
    Yeah, unfortunately, 4 directions/top down won't be coming to this asset. If we do make it in the future, it has to be a new asset completely. That said, there are plenty of top down games that only using 2 directions character sprite, and I'd say they can get away with it!

    Hi @_Eyesgood_
    You'd need to run the menu "Window/Character Creator 2D/Create Character" again to refresh the parts.
    Sorry for the confusion, maybe we should include this instruction somewhere.
     
  11. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Last edited: Feb 17, 2020
    BBET and ATeam_Production like this.
  12. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    Ok, I was selecting the creator scene from the Project and running it that way rather than using the menu option. Thank you for clearing that up for me.
     
  13. T-Dup

    T-Dup

    Joined:
    Aug 4, 2014
    Posts:
    4
    What games do you have in mind? All the reference I have (Stardew Valley, all the Prison Architect/Rimworld genre, etc) use 4 directions character sprite for top down games. If you can give me some reference, I'll happily check those.
    Thanks a lot :)
     
  14. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hey, looking at your list I realized something. When I said top-down, I was thinking more of top-down action/shooter games. I guess it makes sense, for simulation/management games you'd need the characters to face the tools/building they're using. In any case, here are a few examples of top-down games with only 2 direction characters:
    Nuclear Throne, Crashlands, Juicy Realm, Blazing Beaks
     
    T-Dup likes this.
  15. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    Ok, now that the Daily Life pack is done, I am sure you are drawing your attention to the Post/Apocalypse-Survival pack, right, with tons of torn, ripped, and dirty clothing? :D<hint>
     
    Last edited: Feb 23, 2020
  16. BBET

    BBET

    Joined:
    Dec 18, 2012
    Posts:
    39
    Hi,
    The daily Life pack - is really outstanding! Great Asset!
    I have bought all your 2D Character packs, all of them are high value and additionally can be perfectly combined to fit in different settings. Thanks a lot for those high quality assets with regular updates! Please keep up this really outstanding work! Thanks!
     
  17. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hey @_Eyesgood_
    For sure, there's a small pack that we wanted to try out first before we tackle that one!

    Thanks for the support @BBET ! Really appreciate it!
     
  18. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hey everyone!
    Just added a little update to Character Creator 2D!

    v1.62
    Added menu to refresh parts & Add-Ons
     
    ATeam_Production and TerryBell like this.
  19. TerryBell

    TerryBell

    Joined:
    Mar 10, 2020
    Posts:
    1
    Hey there!
    First of all this is a great asset, and I'm still trying to learn it and its limits.

    One thing i'm still trying to figure out is the best way to create custom animations.
    I've done a search on this thread and in one reply you mentioned you might write a a guide on how to create custom animations. Did you ever get around write it?

    in case you haven't maybe you can share a few pointers? best case scenario would be able to use the prefab export with something like Anima2d, but maybe you got other ideas you can share?
     
  20. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hi @TerryBell
    Thanks for stopping by!

    Unfortunately, I haven't got around to write a proper guide yet, thanks for the reminder!
    In the meantime, I can share a quick step by step to achieve that.
    • Save one character as prefab, can be just the default character
    • Drag your prefab to a new scene
    • In the inspector, click the 'Show Child' button. This will show all game objects in the hierarchy window. (you can also disable the 'Auto Hide Children' to make it easier)
    • With the character selected in the hierarchy, open the Animation Window (Window/Animation)
    • If you are not familiar with Unity Animation System, please check out the official manual from Unity: https://docs.unity3d.com/Manual/AnimationSection.html
    • You can start editing or creating new animations
    • Animate by modifying the location and rotation of any objects
    • For best results and minimizing error, it's recommended to only animate objects with 'bone_' prefix on their name
    To minimize dependencies, Character Creator 2D only uses the default Unity animation system.
    And for the same reason, we don't use any kind of IK or helper for the animations.
    You can certainly use something like Anima2D to help you animate, but you have to do some extra setups depending on the requirement of the tools you're planning to use.

    I hope this answers your question!
     
  21. jdiperla

    jdiperla

    Joined:
    Nov 2, 2013
    Posts:
    29
    May we ask what this small pack you afe working on is by any chance? ;-)
     
    ATeam_Production likes this.
  22. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hi everyone!
    How's everyone doing?

    Things have slowed down a bit due to current events. But here's a teaser for the upcoming pack:

    animal preview.png

    Nobody asked for this, lol.
    But it was something silly and fun that we want to try.

    Stay safe, everyone!
     
    jdiperla likes this.
  23. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    Can you make some fur clothes to go with it? I think the guy on the right could pass for Bigfoot if he had something appropriate to wear! lol.
     
  24. jdiperla

    jdiperla

    Joined:
    Nov 2, 2013
    Posts:
    29
    Hahaha awesome! I totally get a planet of the apes feel from the guy on the right.
     
  25. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Yes! That's exactly the plan, haha
     
  26. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    One of the surprise creatures in my game is going to be a bigfoot. You have made my day!
     
  27. jdiperla

    jdiperla

    Joined:
    Nov 2, 2013
    Posts:
    29
    yeah... Seriously... Just take my money now. Lol. This was the pack I never knew I needed so much of!
     
  28. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    I think this will go great with the Post/Apocalypse-Survival pack! Still hoping you guys make that pack.
     
  29. SaresITA

    SaresITA

    Joined:
    Feb 19, 2020
    Posts:
    8
    Hi, i need a Character Creator 2D but for isometric game, with 8 different diretion.
    Can you help me?
    Do you have a generator for this?
     
  30. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    SaresITA, I have read where the developer has stated this asset will not be providing even 4 directional sprites, much less 8. It is to be 2 direction only.
     
  31. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Honestly, I wasn't expecting this kind of response. lol
    Glad that you guys like it!

    Might do a mini pack, there doesn't seem that high of demands for that. But I can see the benefits of this, and that it will expand the themes to larger audiences. We'll keep you all updated! :)

    Hi @SaresITA
    as @_Eyesgood_ said, Character Creator 2D can only create characters for 2 directions only.
    There are some other assets in the Asset Store that provides 4 directions though, you might want to take a look at that. :)
     
  32. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    67
    I use Sci-Fi pack for my Cyberpunk Adventure Game mixed with the other themes. Your example with the Oriental Pack to have "Blade Runner" or "Star Wars" character style was a good example.

    If you create a Post/Apocalypse-Survival pack, perhaps it could interest me.

    @_Eyesgood_ What are you thinking about? Something like Fallout / Mad Max? Or something more like survivors in "Walking Dead" spirit ... then why not with zombies
     
  33. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    67
    "tons of torn, ripped, and dirty clothing" ... Ok I see.
    Nothing I can use then.
     
  34. _Eyesgood_

    _Eyesgood_

    Joined:
    Apr 19, 2013
    Posts:
    26
    My thoughts for a Post/Apocalypse-Survival pack include:

    - Clothing that is torn, ripped, dirty. These can literally be modification of some of the existing clothing in other packs.
    - Body parts that can show variations of wounds much like there are variations of tattoos now.
    - Bigfoot, just because he certainly would have survived and it would be a great easter egg in any game.

    My game is a survival game where the character starts out alone in a wilderness and must survive and eek out a living. Initially the character's clothes would be torn or tattered, but replaced over time through interactions and trade between native villages, etc. So, I am looking for clothing and character features that would compliment that scenario.
     
  35. jdiperla

    jdiperla

    Joined:
    Nov 2, 2013
    Posts:
    29
    I said take my money now! LOL. Seriously looking forward to it.
     
  36. jdiperla

    jdiperla

    Joined:
    Nov 2, 2013
    Posts:
    29
    The asset pack was released on itch. It must be coming soon here then.
     
  37. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    67
  38. jdiperla

    jdiperla

    Joined:
    Nov 2, 2013
    Posts:
    29
    Now that this seems released momentarily. Any chance of a super hero pack coming soon with super hero stances and animations?
     
  39. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    I think for cyberpunk settings, you can fit just about everything into it. As long as you have the sci-fi pack. Even daily and fantasy pack can be combined with the sci-fi pack to produce interesting cyberpunk-ish characters.

    Woah, you guys are quick!
    Itch doesn't require review or verification, so it's pretty much instant. I have submitted to Asset Store as well, might take some time before it's approved and live.

    As for what's next, we're currently experimenting with something right now. If it works, I'm sure a lot of you will benefit from it, and it will also open a lot more possibilities for the asset!
    Can't say what it is right now, but we'll keep you all updated once we have more news to share! :)

    While we can't get to them all at once, please keep the pack/theme suggestion coming!
     
  40. jdiperla

    jdiperla

    Joined:
    Nov 2, 2013
    Posts:
    29
    [QUOTE="mochakingup, post: 5708224, member: 605596]

    Woah, you guys are quick!
    Itch doesn't require review or verification, so it's pretty much instant. I have submitted to Asset Store as well, might take some time before it's approved and live.

    As for what's next, we're currently experimenting with something right now. If it works, I'm sure a lot of you will benefit from it, and it will also open a lot more possibilities for the asset!
    [/QUOTE]

    I said take my money!!! Lol, seriously cant wait. Have bought all your packs so far.
     
  41. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    67

    Really??? o_O

     
  42. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    39
    Hello there, I'm interested in your character editor, but I would like to know first if we can put our custom shaders on the character sprites ? I suppose there is already one on your own to be able to handle color swaps, but if I skip this part and use only the sprite swap system, is it enough to make my own shaders work ?
     
  43. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hi @Razouille
    You are correct! currently, it's using custom shaders to apply all the colors. You can technically do that, but please be aware that then the default parts won't be colored at all (the default sprites are all in grey).
     
  44. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    39
    Wow that was quick ! :cool:
    Indeed I checked the package content, so basically if I change directly the base sprites it should be fine for me, so I guess I have no excuse now to buy it ! Thank you for your help et keep up the good work, I will definitively stay tuned to future updates ;)
     
  45. ash47

    ash47

    Joined:
    Jan 2, 2013
    Posts:
    1
    This is very cool, and I'm excited to see more

    I've attempted to add new armour and weapons per your guide, but can't get it to work.

    Unity 2019.3.11f1

    I've tried a gun and armour, I can see them in the custom tab, when I select them, they are just blank.

    I've tried with and without a color mask, I've tried with and without the slight alpha.

    I've tried restarting unity too, and nothing.

    Here's some screenshots:

    Https://imgur.com/a/uiQ1KxK

    If you need any more info, please let me know.

    Edit: the issue is that Unity is treating my images as a regular texture instead of a Sprite, so no image is being added into the Sprite array by your script, the issue comes about because your import script is looking for a texture, while your render script is looking for a Sprite, so either make them both use Sprite, both use texture, or make it covert the texture into a Sprite.

    I'm still trying to figure out how to add a Sprite.

    Edit2: I copied the png and meta file with it into a new directory, that now imports correctly, please update your documentation to mention to copy the meta file too so that your new image will also be a Sprite.

    Edit3: I am now failing to create another Sprite :/ I don't understand what counts as a Sprite and what doesn't.
     
    Last edited: Apr 26, 2020
  46. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hi @ash47

    I wouldn't recommend copying meta files manually for any reason.
    To turn your texture into a sprite, you need to select the asset and in the inspector change the 'Texture Type' to 'Sprite (2D and UI)'. (for more reference: https://docs.unity3d.com/Manual/Sprites.html)

    Or you can switch your Unity project to 2D mode. In this mode, all textures that you put into the project will be set automatically to Sprite. To change between 2D and 3D mode, please follow the steps here: https://docs.unity3d.com/Manual/2DAnd3DModeSettings.html

    This is a fair point though, and we'll update the documentation to make sure the texture is set to sprite.
    Thanks for pointing that out!
     
  47. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
  48. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    323
    @mochakingup

    Hello.
    Are there any plans to create an "hide" weapon animation? And slots "weapons at rest"?
    When writing about slots - I mean a weapon by the belt (two slots on the sides) and one on the back (as in The Witcher;))
    Possibly two more slots next to the thighs for knives / guns, but this is probably too much I demand ...
     
  49. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    143
    Hey @Szaruga
    Hide animations should be easy enough to make, but at what stances? Idle, walk, run?
    if you want more flexibility, I think it's easier to unequip the weapons temporarily.
    Sheathed weapon slot is an interesting idea, but might not be possible right now with our current setup.
     
  50. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    323
    Idle.

    Yes, I know, but currently you have two states:

    - no visible weapon - an appearance suggesting that the character isn't a warrior
    - with a weapon held in hands - a posture suggesting aggression/combat readiness

    Definitely there is a lack of a state where the weapon is visible (so it can be seen that it's a warrior), but it's attached to the belt or on the back (two-handed), so it's a peaceful state
     
    Carpiete likes this.
unityunity