Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

procedural character generation

Discussion in 'Works In Progress' started by FernandoRibeiro, Oct 5, 2012.

Thread Status:
Not open for further replies.
  1. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    I'm not sure that would work, but I'm up for easy solutions. :)

    I'll take a stab at getting you the numbers you need.

    So far as I can see, there are no rigid standards for proportion, even for realistic portrayals of the human body. There's a lot of natural variation. Even for realistic figures, a designer might want slightly different proportions, so if the proportions can be left fluid, that might be best. Also, I'm sure many UMA users would want characters with non-standard proportions, like dwarves, anime figures, and so on.

    One source gives the following measures:


    • Adult = 8 heads tall, with a head size of 9 inches (top of head to chin)
    • 15 year old = 7 1/2 heads tall with a head size of 9 inches
    • 10 year old = 7 heads tall with a head size of 7 1/2 inches
    • 5 years old = 6 heads tall with a head size of 7 inches
    • 3 years old = 5 heads tall with a head size of 6 1/2 inches
    • 1 year old = 4 heads tall with a head size of 6 inches

    Another source asserts that anywhere from 5 to 8 heads is normal for adults, and 4 to 5 heads is good for children (with 4 heads being more for younger children), and 3 heads height for infants.

    Note that 3 heads height is probably also what might be preferred for some cartoon / anime styled characters. The infant-sized proportions is probably what makes them seem cute.

    A third source thinks 7.5 heads x 2 heads makes for a weak looking adult specimen, even though it is a commonly used set of proportions. They think 8 heads x 2.33 heads is normal, 8.5 x 2.5 heads is fine for an idealized male fashion figure, and 9 x 2.66 heads would be heroic proportions.

    A fourth source likes the idea of 8 x 2.33 as ideal adult proportions.

    Leonardo da Vinci gives 8 heads high as an ideal proportion.

    So those are some good standards of proportion for realistic humans. But many game characters are exaggerated, not realistic.

    Drawing Comics the Marvel Way suggests using proportions of 6.5 heads high for normal people and 8.75 heads high for typical heroes like Mr. Fantastic of the Fantastic Four (p. 37). To me it looks more like he is 8.33 heads high, but they say 8.75 at least 3 times, so ... maybe I'm not seeing it right. An exception to this rule would be the monstrous Thing, who has a head height of 6 (and no neck), and another would be the villain Kingpin, who has a height of 5 heads (and no neck).

    IIRC, Marvel has historically used a standard where mighty gods like Odin are rendered with a proportion in the 4-6 range to make them look more massive.

    While I've never read anything about the proportions for AD&D style fantasy figures, I'd assume that the tendency would be to make adult orcs of heroic proportion but tending toward the grotesque (8 x 2.66), humans of mixed proportions, adult elves of slender proportions (so probably 8 heads high but 1.8-2 heads wide), adult dwarves would be short and stocky (maybe 4-6 heads high, 2.33-2.66 heads wide), adult gnomes might be of more normal proportion though short and slender (maybe 6 heads high and 1.5 wide), and adult halflings / hobbits would be of childlike proportions (say, 4-5 heads high and 2 wide). A designer would probably want to mess around with it a bit to get the right proportions for their concepts.

    I hope that helps! :)
     
    twobob and siblingrivalry like this.
  2. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177

    Those are OK but it sounds like they are using an old imperial system. I will like to try and find a good reference using percentages after I finish this UI system. That way I don't have to do ratio calculations with those numbers. This would be a cool thing to add if I can make the textures. I'm not a digital artist.

    Fernando's male and female avatars, when you apply a 0.5 multiplier across all their DNA look like healthy 30 year olds.

    We want numbers that say a typical baby has a (I'm making these up):

    female baby head size 0.65% of average adult female
    male baby head size 0.65% of average adult male
    female hands 0.25% of average adult female
    male hands 0.20% of average adult male

    and so on...

    For body fat / musculature on the face you'd have to shrink the chin, enlarge the cheeks as appropriate as body fat / body muscles DNA attributes in Fernando's models I don't believe have DNA adjustments for those in the face or probably hands or feet.

    ...and so on and after all the percentages are multiplied into the avatar the well known baby 'look with a huge head, big chest, and small hips, small arms, and small legs would appear.

    Same applies for the elderly. Of course you'd want to make textures to increase the effectiveness but don't go overboard like these 'How will I Look when I'm Old Apps' and think that simulating an aged look is simply a matter of applying an ugly, overly darkened, and poorly made texture with an overabundance of lines drawn in for wrinkles. It's really more a matter of atrophy of muscle and fat in the proper places and a few well placed creases that is most effective in portraying age.
     
    Last edited: Dec 21, 2013
  3. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    The info I've been looking at is for artists, so it's geared toward resolving issues like, "Well, I made the oval for the head this big in my drawing, so now I need to make 7 more ovals of the same size to block out the proportional length of the body for a head that size."

    Like this:


    If an adult has a head size of 9 inches, and a child has a head size of 6 inches, that gives you a ratio. According to this guide, the toddler has a head 66% the length of the adult head.

    The adult body would have a height of 8 heads @ 9 inches, or 6 feet tall.

    The young toddler's body would have a height of 4 heads @ 6 inches, or 2 feet tall. I suspect the toddler would also have a smaller neck, by proportion, than the adult, and a more narrow body, perhaps only 1 head wide.

    Here's some rules on proportion for an adult body. Note that this source sets the width of the body at 2 head lengths for a male and 2 head widths for a female. The description should match the figures above.

    A perfect body is 8 heads high, total.
    The neck space is 1/4 of one head length, under the chin of the top first head.
    The second head starts under this neck space.
    One quarter of one head down on this second head is the shoulder line and clavicle. This leaves space for the for the neck support muscles.

    The shoulder line is two head lengths (two widths on a female) wide and is the top line of the torso triangle that extends down to the top of the hip triangle.
    The chin to the shoulder line is 1/4 of one heads length. That is 1/4 of a head for the neck space also.
    The nipple line equals one head length starting at the chin, at the bottom of the second head, the younger the higher. Males stay higher.
    The nipples to the belly button equals one head length also.
    Adjust the torso for the 1/4 neck space, from the belly button to the space between the legs is one head length, that's the bottom of the adjusted third trunk head. This between the leg space is actually 4 1/4 heads down from the top, including the 1/4 head neck space. It's 3 and 3/4 heads up from the bottom of the feet, for a total of 8 heads high. The two center heads overlap by 1/4 head, the top of the bend line triangle is 4 heads up from the base. The top three torso heads were lowered 1/4 head because of the empty neck space.
    The width of the waist at the belly button is one head length wide.
    From the top line of the hip/trunk triangle to the space between the legs is 3/4's of one head, and is two head widths wide. Not more.
    The center of the body is the bend line, which forms the top line of this small, third, bend line triangle. Its top line is 1/4 head above the space between the legs and two head widths wide. Not more.
    This bend line can also be measured as four heads up from the base, which has no added 1/4 head space for the neck as happened in the top 4 heads.
    In other words..
    The big torso triangle is from the shoulder line to the top of the hip/trunk triangle. The second triangle is the trunk triangle, the hip bones down to the space between the legs. The third triangle, the bend line triangle is a quarter head high, within the trunk triangle, starting at the space between the legs.
    The rib cage can be represented by an oval two heads high, starting at the top of the (lowered) second head to the bottom of the third head.
    The bottom of the forth head from the top plus the neck space is the space between the legs.
    The upper arm, from the shoulder triangles outside edge, is one and one half heads long.
    The lower arm is one and one quarter heads long.
    The hand is 3/4 of a head long, equal to the average face up to the hair line.
    The chest side view is one head, width wide, at the nipples.
    The upper arm, which is one and one half head lengths long, connects from the center of the shoulder ball which is a quarter head circle.
    Just below the leg space, the legs and the body are the widest.
    Two egg shaped heads, side by side, upside down, will fit in the trunk area.
    From the outside point of the bend line triangle down to the bottom of the knee cap is two head lengths.
    The bend line is always the center of the body.
    The knee cap is a 1/4 head length circle.
    The calf muscle is higher on the outside.
    From the center of the knee cap to the ground is two head lengths.
    The ankle is 1/4 head high off the ground.
    The foot is one head length long.
    The ankle bone is higher on the inside.
     
    twobob likes this.
  4. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    twobob likes this.
  5. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    I guess it would make sense to add edit avatar buttons that had presets for common cartoon proportions too although they only be most effective once you made your own textures and clothing meshes (called overlays and slots as far as UMA is concerned). You're not going to get something that flat and square but with the right clothing and textures added you could get the similarly suggested 3D toon characters. UMA can't handle the exaggeration in noses and eyes like cartoon characters though, maybe in the future.
     
    Last edited: Dec 21, 2013
  6. GD.Darren

    GD.Darren

    Joined:
    Jan 12, 2013
    Posts:
    53
    I have a question guys,

    I am creating a character for a Character Creation screen, basically I click create character and new GUI to create character appears.

    This works, however I am having a problem when clicking create new character and quickly canceling (and deleting the gameobjects) that the character was being created on. UMAGenerator tries to access the gameobject but it was deleted so it returns a null exception. So I was wondering if there is some kind of condition like HasFinishedGenerating that i can check before canceling the character creation GUI.

    Thanks in advance.

    EDIT: Fixed by checking there were no dirty elements in the UMAGenerator dirty list.
     
    Last edited: Dec 23, 2013
    twobob likes this.
  7. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    Check if the dynamicAvatar or the umaData variable reference aren't null...
     
  8. cookimage

    cookimage

    Joined:
    Sep 10, 2012
    Posts:
    727
    Congratz to UMA being added to the asset store, we will be releasing the armor set you see in the images to the asset store very soon!!
     
  9. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    "
    AssetStore link: https://www.assetstore.unity3d.com/#/content/13930

    UMA - Unity Multipurpose Avatar, is an open source avatar creation framework, it provides both base code and example content to create avatars. Using the UMA pack, it´s possible to customize the code and content for your own projects, and share or sell your creations through Unity Asset Store.

    With UMA, it´s easy to populate a huge area with random characters, create and customize an unique NPC or even generate mains characters with full customization. In all those cases, UMA makes it possible to share content as clothes and accessories between avatars, simplifying the process of content creation.

    UMA has been under development for more than a year now, it started as a personal project and after 4 months Unity Asset Store sponsored this project so it could be open source and available for everyone. Joen has been contributing since then, and for the last 6 we started receiving both help and amazing feedback from the beta test group.

    Today is December 25, and Unity couldn´t be giving a better present to me and it´s amazing community, UMA is available at AssetStore =)

    Cheers,
    Fernando R.
    "

    =DDDDDDDDDDDDDDD

     
  10. Brainswitch

    Brainswitch

    Joined:
    Apr 24, 2013
    Posts:
    270
    Congratulations, that is awesome!

    I am trying to resist the urge to add this to my current project, since it is not really needed, but...
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    Upgrading Unity and downloading UMA now ... :)
     
  12. JMab

    JMab

    Joined:
    Nov 29, 2013
    Posts:
    14
    Edit: OK, I got it, you set your animation controller in the UMADynamicAvatar instance before you call UpdateNewRace(). Now got to figure out why it's trying to find a state called GotoState...

    Hi Fernando and friends,

    I'll add the universal "thanks a lot for this, it's great", before asking my question!

    In the latest version of UMA (from the Asset Store), what's the right way to set your own animator controller (rather than the provided Locomotion one)?

    Thanks in advance.
     
    Last edited: Dec 26, 2013
  13. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    203
    Very excited about implementing this on mobile to reduce download size. I've searched all through the forums and watched many of the video tutorials…and have finally decided it's time to just ask ;-)

    I want to use a base character mesh that only has about 2000 poly's. How would I go about using this already existing mesh within UMA? Do I need to study slots more? Will I need to rebind, rig and bone weight my character? Thanks for the info! BTW It's already broken out into separate meshes.
     
  14. testuser2

    testuser2

    Joined:
    Dec 10, 2013
    Posts:
    5
    Hello,


    As a unity beginner I need help with setting up the UMA package.
    Here is what i have done so far:
    Using unity 4.3.1f1 (free version) i created a new project in unity.

    Then i imported the UMA project from the given link (asset store).
    When i open one of the two example scenes (1 or 2) i get the error:
    "Assets/UMA/Editor/UMADNAHelperTools.cs(14,20): error CS0246: The type or namespace name `DictionaryCustomFormatter' could not be found."
    There is no menu item in the unity menu.

    Second i tried it with the zip file from GitHub. After unzipping i got a UMA-master folder with the two folders UMADLL and UMAProject inside. I opened the UMAProject folder with unity and got the same result as above. Do i have to copy the dll folder to another place ?

    help is appreciated
    greetings
     
  15. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    Before Unity 4.3 we couldn´t resume animation after avatar changes, so after any change animation started from the beginning. This became possible on 4.3 using this solution.
    The easiest way is to change the animator controller directly on the prefab, simply exchange with yours. I recommend saving as a new prefab, to avoid being overwritten when you update UMA. Prefabs can be found on UMA_Assets/Race folder. If you save as an extra prefab, you need to update the male/female assets as well (same folder), as those are the assets referenced to create the avatars.
    Today I´ll start recording video tutorials, hope those help you :)
     
  16. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    I´m already working on my free time on a optimized mesh with less than 2k vertices (same UV), I´ll probably be able to provide it next week.
    If you still want to use yours, I recommend it to match the same volume of base meshes, to keep clothes working for you. You need rig it using UMA base mesh bones and ideally project the skinning data, to avoid a huge work of skinning from scratch.

    Cheers =D
     
  17. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Humm, if I understand correctly, this might happend once if you don´t give time for all scripts to be updated before hitting play. If this keeps hapenning all time, let me know. Both the version on Git and AS example scenes should work out of the box.
    Cheers
     
  18. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
  19. testuser2

    testuser2

    Joined:
    Dec 10, 2013
    Posts:
    5
    Hello Fernando,

    problem persists
    I updated unity to 4.3.2f1 (free) and tested with:
    UMA 1.0.0.6b (ca. 307 MB) --> project ok, but only sliders are created and shown, no characters
    UMA 1.0.1.0 RC1 (ca. 127 MB) --> GotoState-error in UMAGenerator.cs, uncomment line --> sliders and characters are created (scene01)
    UMA 1.0.1.0 R (ca. 108 MB as zip and 200 MB unzipped from GitHub) --> UMAEditor.dll was identified as virus ?

    UMAEditor.dll (in UMA-master\Assets\UMA\UMA_Project\DLL\Editor): Gen:Variant.Kazy.161344 by GData InternetSecurity 2014
    moved to Quarantäne, so missing UMAEditor.dll seems to be the reason for "DictionaryCustomFormatter not found" error message.
    same with asset store version.

    i can not say, if it is true or if it is false negative by GData - maybe you can ?
    greetings
    testuser2
     
  20. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    In case GData moves the DLL to quarantine, there´s no way the project can actually work, as the DLL provides all UMA core functionality.
    Old versions were created before Unity 4.3, this explain for example the GotoState error you get on UMA 1.0.1.0 RC1. I don´t recommend using any of the old versions, as those won´t be supported and are not expected to work on latest Unity version.
    I´ve delayed the video recording until tomorrow, so I can handle a known bug, but I´ll provide a tutorial how to get UMA from AssetStore.
    I believe the problem you´re getting is actually your antivirus removing UMA key DLL.
    Cheers
     
  21. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
  22. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,317
    @Uma Team,

    Big Congratulation on UMA being launched on the Asset Store at Christmas Day. After so many months of hard work, it's now live for the entire 2 million developers to use.

    I'm mainly working on mobile and would be very interested in any mobile solutions that you guys come up.

    Questions :

    1. Don't know if this has been asked before but does Marmoset Skyshop Shaders work with UMA ?
    2. Does UMA work with Unity Flash ?

    Cheers.
     
    Last edited: Dec 27, 2013
  23. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    All answers are now available at http://forum.unity3d.com/threads/219175-UMA-Unity-Multipurpose-Avatar-on-the-Asset-Store! , including yours =D
     
  24. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,618
    twobob likes this.
Thread Status:
Not open for further replies.