Search Unity

RPG Character Editor

Discussion in 'Works In Progress - Archive' started by Jaimi, Feb 6, 2012.

  1. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Update:

    Added multiple races/sexes, ability to switch clothing.



    -----

    This is an updated version of my RPG character editor. This version uses the full model, and adds hairstyles as well as skin, hair and eye coloring, as well as a new GUI (courtesy of ngui).

    Rendering uses a custom shader that takes in a diffuse texture, mask texture and bumpmap. The skin, eyes, hair and accent colors are each stored in a separate channel in the mask. The colors are mixed in based on the appropriate mask in the shader. (I may remove the bumpmap though, so I can have an extra texture for complexion). Models are not mine, used with permission.

    Comments welcome
     
    Last edited: Apr 12, 2012
  2. Schlumpfsack

    Schlumpfsack

    Joined:
    May 30, 2010
    Posts:
    608
    damn nice...great work!
     
  3. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Very nice.

    Do you have plans on adding Height and Weight?
    And any plans on ETA and price?
     
  4. kablammyman

    kablammyman

    Joined:
    Nov 22, 2010
    Posts:
    507
    PM sent
     
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I have planned to add Height, but not weight (too many models would have to be customized). I hadn't considered selling, I'm just doing it for my game - it would probably take a lot of work to make it general enough to work for everyone, right now the work to get the data into unity is quite cumbersome, have to run Max Scripts, then run a C# app in windows, then import them with special classes in unity. Not sure... I guess I'll look into the workflow and see what it might take to streamline it.
     
  6. DaneC020

    DaneC020

    Joined:
    Mar 19, 2010
    Posts:
    191
    If you don't mind me asking, how are you handling the model customization? Are you using blend shapes/morph targets, or are you using joints weighted to the verts? I read an interesting article where they discussed using a rig for customization and then through code transfer the adjusted mesh to the game rig which contained a lower bone count.

    Dane
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I do it all with morphtargets - I calculate the delta for each vertex, and then store just the delta information. In unity, I then clone the mesh for each actor, and then directly modify the vertexes using a set of classes to read and apply the morph data on the fly. Because Unity will add/reorder vertexes at import time, there is no correlation between your model and the vertex in max (besides position). So I ended up writing a set of functions to find the vertexes by position, and by face (when source vertexes had the same position).
    I didn't create the original source art myself, so I can't comment on how they did the initial face creation. But for the morphs that I did, I just modified the meshes manually.
     
  8. Balmung

    Balmung

    Joined:
    May 9, 2010
    Posts:
    40
    Nice work. I like good CEs and this one goes to the right direction.

    I really want to do such a CE for Anime Cell Shading like Characters with much "sliders".
     
  9. hellcaller

    hellcaller

    Joined:
    May 19, 2010
    Posts:
    381
    Coool !!!
     
  10. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Very nice!
     
    Last edited: Apr 8, 2012
  11. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    everything looks just perfect! the gui fits very well!
     
  12. Cdunn

    Cdunn

    Joined:
    Jan 21, 2012
    Posts:
    54
    Very nice I plan on having somthing like this in my game once I start making one....Im a beginner in coding in uniscript...How hard was it to code somthing like that?
     
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Most of the work is in external tools, creating the morphs (etc). For coding, I would say maybe 30-40 hours? But that includes additional work I've not shown yet. I'll post a new video soon.

    I didn't use Unityscript, though - it's all C#. would probably be more complicated (at least for me) in Unityscript.
     
  14. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    yes morphs are what gives you the variable shapes. We are optimizing Daz3d Genesis base for just this reason to use in unity.

    @Jaimi
    I do like your models morphs. did you make the base model yourself?
    Good work.
     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    No, I didn't - the Actor models are from Ryzom (an MMO), they are not my work. They were released under a Creative Commons license. I've done some of the morphs and textures, but most came with the models. It's been a chore to get the models into FBX and cleaned up, and writing the apps to extract the morphs and mask data, but in the end I feel it's been worth it.
     
  16. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    That does look good.

    Could I just suggest that you also include presets in the character creation for people that hate to deal with sliders?
     
  17. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    yes we are doing this with Daz3d models. they have it all built in. And exporting the animations and morphs to fbx is not that hard. In the end paying daz the license to us is worth it. If you want to see some of our main characters morphs send me PM.
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes, definitely. This part of the editor is actually for me to create the presets. In the end-user version, I'll give them a race to choose from (which will preselect the model set, plus some morphs and skin/hair colors), and then give them the face editor.
     
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Update: Added new video to the first post, showing multiple races and sexes, plus ability to swap body pieces. Each character is made from 7 pieces - hair, head, torso, arms, hands, legs, feet, which are combined on the skeletal model on the fly.
     
  20. mobbe

    mobbe

    Joined:
    Feb 16, 2009
    Posts:
    3
    Very impressive. I have been thinking about a face (human) editor myself and was just wondering if you wouldn't mind sharing how you know what vertices belongs for instance to the nose so that when that lever is affected that you move the correct vertices.

    Appreciate any insights you are able to give. If there are any book/article/code that covers some of the techniques that you have been using that would be interesting to know as well.

    Thanks,

    mobbe
     
  21. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Very nice! Looks very professional.

    Btw, Ryzom was a great game : )
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I tried a lot of different ways to figure out which vertexes are which (what faces they were on, vertexes on shared faces, etc). This is hampered by the problems with the fbx exporter in Max, and the fbx importer in Unity - they will split models into multiple meshes, add vertexes and faces, etc. And they're not consistent. In the end, really the only thing I could do was detect them based on position, so as part of my exporter (I wrote my own exporters to create the morph targets), when exporting the base face, I jogged the vertexes by a tiny amount when I detected vertexes occupying the same position.

    The morphs were relatively easy, since I did them all in max, and the vertex information was static. Each morph is just a list of vertexes and their delta movement from the base position - this lets you compound the morph information. Once I had all the information in Unity, I just updated the mesh vertexes.
     
  23. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208

    Thanks! I really appreciate that they released their models. There's enough there to give people who don't mind work a good start. :)
     
  24. maevin

    maevin

    Joined:
    Dec 3, 2010
    Posts:
    33
    I know this thread is old, however, even on the net I have found 5 tutorials for converting the .max to fbx, and i always have errors, even followed the ryzom dev tutorial for it, and still get errors. Would you release your fbx models of them?
     
  25. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Hi Maevan,

    I will not at this time be releasing the fbx models that I have converted. The reason is that it is a) a lot of work to prep the hundreds of models and thousands of animations, and b) they're nearly useless without a ton of extra code to stitch them altogether, and special shaders to colorize everything. I just don't have the time to do it all, sorry.

    As for doing it yourself, I had to use an older 32 bit version of 3dsmax, and write a bunch of scripts to fixup all the texture references, collapse transforms, reassign material names, etc. All I can suggest is to do the same - get the last supported version of max, and the max scripts to import and save them, and just start working through all the issues.

    I used this page to start. I used the nel_convert_database script as a base to start:

    http://dev.ryzom.com/projects/ryzom/wiki/ImportingMaxAssets

    I may have taken some of the texture code from this script:
    http://dev.ryzom.com/projects/ryzom/wiki/Converting_Assets_to_COLLADA

    keep at it, and you will get it figured out.