Giter Club home page Giter Club logo

Comments (17)

animate1978 avatar animate1978 commented on June 1, 2024

I like this idea. I agree the directory structure is a bit of a mess. How you described the change is great and I think in the end will make editing, adding or removing files, characters etc.. easier with this new layout. This also makes it easier for users to do some editing themselves if they wanted to without having to really go through the entire directory tree just to edit one thing, for instance. For us it would make changes so much easier to work with I think.

Very nice!

from mb-lab.

slepyhed avatar slepyhed commented on June 1, 2024

I spent a little time looking into what it would take to implement this, and I'm not sure if it would be easy. However, look at the "characters_config.json" file. Each character has all of its files identified there. I wonder if it might be easier to implement some kind of "character manager" that allows users to load/unload/export and create new character types?

I'm just a little gunshy about re-arranging the file structure, because understanding how files are accessed requires a lot of jumping around amongst all the various python files (init, humanoid, algorithms, etc)and its gets real confusing real fast...

Maybe have a look at the code? Maybe its not as bad as I fear...

from mb-lab.

animate1978 avatar animate1978 commented on June 1, 2024

I just checked out the algorithms.py, which is where MB-Lab reads the data path. This is where it reads the character_config.json file and the humanoid_library.blend file. If we were to separate each character type into it's own blend file it would require some serious coding, beyond my scope I think.

def get_data_path():

I think some of the changes could be done but as far as the humanoid_library.blend file, that still would have to remain the same in order for MB-Lab to function

from mb-lab.

telnetr4 avatar telnetr4 commented on June 1, 2024

@animate1978 That's effectively just a directory check. At least, that's what it now is after I made a global variable for data_path.

I don't think it would be too hard. The way I'm going to do it is store a dictionary with the keys being valid folder names and the values being lists that have all the information for all the contents for each of these folders. Not sure if this is the most efficient way to do it, but I'll start with it. It will require some rewriting of other portions of code, but that should only require time.

from mb-lab.

NumesSanguis avatar NumesSanguis commented on June 1, 2024

Maybe a mix of 2 ways you suggest @telnetr4 would be better.
For example data/expressions_comb/human_expressions/ is for any human base model the same. Adding a facial expression would become difficult and error prone if a model is forgotten. Also, it would result in file duplication, since you'll be copy pasting the same file without modification.

It would result in something like:

data
├───hu_base
    ├───expressions_comb
    ├───female
    │   ├───anthropometry
    ├───male
    │   ├───anthropometry
├───hu_anime
    ├───expressions_comb
    ├───female
    │   ├───anthropometry
    ├───male
    │   ├───anthropometry

In this structure, all humans will have access to the same expressions (preventing data duplication), but since anthropometry is different by gender, this is in a deeper level.

from mb-lab.

animate1978 avatar animate1978 commented on June 1, 2024

Ah ok. Yeah I was actually wondering the same thing mainly with duplicating textures, which would result in the project file size growing by quite a bit. Well not really I guess once I quick looked over it again.

As you were gentlemen lol

from mb-lab.

telnetr4 avatar telnetr4 commented on June 1, 2024

That is something else we should consider later: how to deal with inheriting assets from other projects.

from mb-lab.

blaisefaint avatar blaisefaint commented on June 1, 2024

Speaking of other projects, I'm curious if anyone has looked at MakeHuman-Community v1.20a, as they have added some community features that make it easier to add clothes, hair, and other assets to characters.

from mb-lab.

NumesSanguis avatar NumesSanguis commented on June 1, 2024

Interesting, would it be possible to automatically convert MakeHuman assets to work with MBLAB? Both programmes are licensed under AGPL, so we can use best of both worlds.

from mb-lab.

animate1978 avatar animate1978 commented on June 1, 2024

makehuman_asset_vs_mblab

Just a slight problem with the assets from MakeHuman, they are not to scale with MB-Lab characters. However with some work they can be adopted.

from mb-lab.

animate1978 avatar animate1978 commented on June 1, 2024

makehuman_asset_vs_mblab002

Example of scaling, had to scale quite a bit but it works

from mb-lab.

NumesSanguis avatar NumesSanguis commented on June 1, 2024

So fast, amazing! Don't overwork yourself though.

from mb-lab.

telnetr4 avatar telnetr4 commented on June 1, 2024

I'm currently working on making 1.6.5b work with a "project-centric" system.

Should I switch to working on Blender 2.7.0 or should I just merge it after I finish it for 1.6.5?

from mb-lab.

telnetr4 avatar telnetr4 commented on June 1, 2024

This is a preview of the file organization I'm working with, with the base human and anime humans split into two separate projects (mainly so I can test out the "merging" system). ..... means I truncated some files for length.

data
├───Anime
│   │   characters_config.json
│   │   humanoid_library.blend
│   │   info.json
│   │   retarget_knowledge.json
│   │
│   ├───assets
│   │       hair01_anime_female.blend
│   │       hair01_anime_male.blend
│   │
│   ├───bboxes
│   │       anime_female_bbox.json
│   │       anime_male_bbox.json
│   │
│   ├───expressions_comb
│   │   └───anime_expressions
│   │           angry01.json
│   │           annoyed01.json
.....
│   │           very_sad01.json
│   │           wink01.json
│   │
│   ├───expressions_morphs
│   │       f_an01_exprs.json
│   │       f_an02_exprs.json
│   │       f_an03_exprs.json
│   │       m_an01_exprs.json
│   │       m_an02_exprs.json
│   │       m_an03_exprs.json
│   │
│   ├───joints
│   │       anime_female_joints.json
│   │       anime_male_joints.json
│   │
│   ├───morphs
│   │       anime_female_morphs.json
│   │       anime_male_morphs.json
│   │       m_an01_morphs.json
│   │       m_an02_morphs.json
│   │       m_an03_morphs.json
│   │       m_an03_morphs_extra.json
│   │
│   ├───pgroups
│   │       anime_female_polygs.json
│   │       anime_male_polygs.json
│   │
│   ├───phenotypes
│   │   ├───f_an01_ptypes
│   │   │       african.json
│   │   │       asian.json
│   │   │       caucasian.json
│   │   │
│   │   ├───f_an02_ptypes
│   │   │       african.json
│   │   │       asian.json
│   │   │       caucasian.json
│   │   │
│   │   ├───m_an01_ptypes
│   │   │       african.json
│   │   │       asian.json
│   │   │       caucasian.json
│   │   │
│   │   └───m_an02_ptypes
│   │           african.json
│   │           asian.json
│   │           caucasian.json
│   │
│   ├───presets
│   │   ├───anime_female_base
│   │   │       anyme_style1.json
│   │   │       anyme_style2.json
│   │   │       anyme_style3.json
│   │   │       specialtype_bodybuilder.json
│   │   │       specialtype_obese.json
│   │   │
│   │   └───anime_male_base
│   │           anyme_style1.json
│   │           anyme_style2.json
│   │           anyme_style3.json
│   │           specialtype_bodybuilder.json
│   │           specialtype_obese.json
│   │
│   ├───textures
│   │       anime_female_diffuse.png
│   │       anime_male_diffuse.png
│   │
│   ├───transformations
│   │       anime_female_base_transf.json
│   │       anime_male_base_transf.json
│   │
│   ├───vertices
│   │       f_an01_verts.json
│   │       f_an02_verts.json
│   │       f_an03_verts.json
│   │       m_an01_verts.json
│   │       m_an02_verts.json
│   │       m_an03_verts.json
│   │
│   └───vgroups
│           anime_female_vgroups_base.json
│           anime_male_vgroups_base.json
│
└───Core
    │   characters_config.json
    │   humanoid_library.blend
    │   info.json
    │   retarget_knowledge.json
    │
    ├───anthropometry
    │   ├───hu_f_anthropometry
    │   │       0000_0.json
    │   │       0000_25.json
.....
    │   │       2200_5.json
    │   │       2200_75.json
    │   │       2201_0.json
    │   │
    │   └───hu_m_anthropometry
    │           000.json
    │           001.json
.....
    │           100.json
    │           101.json
    │
    ├───assets
    │   │   hair01_human_female.blend
    │   │   hair01_human_male.blend
    │   │
    │   └───mblab_assets_textures
    │           h_f_hair01_alpha.png
    │           h_f_hair01_refl.png
    │           h_f_hair01_tone.png
    │           h_m_hair01_alpha.png
    │           h_m_hair01_refl.png
    │           h_m_hair01_tone.png
    │
    ├───bboxes
    │       human_female_bbox.json
    │       human_male_bbox.json
    │
    ├───expressions_comb
    │   └───human_expressions
    │           angry01.json
    │           annoyed01.json
.....
    │           very_sad01.json
    │           wink01.json
    │
    ├───expressions_morphs
    │       f_af01_exprs.json
    │       f_as01_exprs.json
    │       f_ca01_exprs.json
    │       f_ft01_exprs.json
    │       m_af01_exprs.json
    │       m_as01_exprs.json
    │       m_ca01_exprs.json
    │       m_ft01_exprs.json
    │       m_ft02_exprs.json
    │
    ├───joints
    │       human_female_joints.json
    │       human_female_joints_offset.json
    │       human_male_joints.json
    │       human_male_joints_offset.json
    │
    ├───measures
    │       human_female_measures.json
    │       human_male_measures.json
    │
    ├───morphs
    │       f_af01_morphs.json
    │       f_as01_morphs.json
.....
    │       m_ft02_morphs.json
    │       m_ft02_morphs_extra.json
    │
    ├───pgroups
    │       human_female_polygs.json
    │       human_male_polygs.json
    │
    ├───phenotypes
    │   ├───f_af01_ptypes
    │   │       aboriginal.json
    │   │       african.json
    │   │       afroasian.json
    │   │       afromediterranean.json
    │   │
    │   ├───f_as01_ptypes
    │   │       central_american.json
    │   │       central_asian.json
    │   │       east_asian.json
    │   │       north_american.json
    │   │       north_asian.json
    │   │       south_asian.json
    │   │
    │   ├───f_ca01_ptypes
    │   │       afrocaucasian.json
    │   │       central_european.json
    │   │       east_european.json
    │   │       euroartic.json
    │   │       euromediterranean.json
    │   │       northwest_european.json
    │   │       north_european.json
    │   │       west_asian.json
    │   │
    │   ├───m_af01_ptypes
    │   │       aboriginal.json
    │   │       african.json
    │   │       afroasian.json
    │   │       afromediterranean.json
    │   │
    │   ├───m_as01_ptypes
    │   │       central_american.json
    │   │       central_asian.json
    │   │       east_asian.json
    │   │       north_american.json
    │   │       north_asian.json
    │   │       south_asian.json
    │   │
    │   └───m_ca01_ptypes
    │           afrocaucasian.json
    │           central_european.json
    │           east_european.json
    │           euroartic.json
    │           euromediterranean.json
    │           northwest_european.json
    │           north_european.json
    │           west_asian.json
    │
    ├───poses
    │   ├───female_poses
    │   │       captured01.json
    │   │       flying01.json
.....
    │   │       standing_old_people.json
    │   │       standing_symmetric.json
    │   │
    │   ├───male_poses
    │   │       captured01.json
    │   │       evil_beast.json
.....
    │   │       standing_old_people.json
    │   │       standing_symmetric.json
    │   │
    │   └───rest_poses
    │           a-pose.json
    │           ii-pose.json
    │           lambda-pose.json
    │           star-pose.json
    │           t-pose.json
    │
    ├───presets
    │   ├───human_female_anime
    │   │       type_athletic.json
    │   │       type_extreme_bodybuilder.json
.....
    │   │       type_triangle01.json
    │   │       type_vigorous01.json
    │   │
    │   ├───human_female_base
    │   │       specialtype_hero01.json
    │   │       specialtype_hero02.json
.....
    │   │       type_triangle02.json
    │   │       type_vigorous01.json
    │   │
    │   ├───human_female_elf
    │   │       specialtype_hero01.json
    │   │       specialtype_hero02.json
......
    │   │       type_triangle02.json
    │   │       type_vigorous01.json
    │   │
    │   ├───human_male_anime
    │   │       specialtype_brute.json
    │   │       specialtype_evil_genius.json
.....
    │   │       type_stocky02.json
    │   │       type_vigorous01.json
    │   │
    │   ├───human_male_base
    │   │       specialtype_brute.json
    │   │       specialtype_evil_genius.json
.....
    │   │       type_stocky02.json
    │   │       type_vigorous01.json
    │   │
    │   ├───human_male_dwarf
    │   │       specialtype_brute.json
    │   │       specialtype_evil_genius.json
.....
    │   │       type_stocky02.json
    │   │       type_vigorous01.json
    │   │
    │   └───human_male_elf
    │           specialtype_brute.json
    │           specialtype_evil_genius.json
.....
    │           type_stocky02.json
    │           type_vigorous01.json
    │
    ├───textures
    │       human_female_diffuse.png
    │       human_female_displacement.png
.....
    │       human_male_specular.png
    │       human_male_subdermal.png
    │
    ├───transformations
    │       human_female_anime_transf.json
    │       human_female_base_transf.json
    │       human_female_elf_transf.json
    │       human_male_anime_transf.json
    │       human_male_base_transf.json
    │       human_male_dwarf_transf.json
    │       human_male_elf_transf.json
    │
    ├───vertices
    │       f_af01_verts.json
    │       f_as01_verts.json
    │       f_ca01_verts.json
    │       f_ft01_verts.json
    │       m_af01_verts.json
    │       m_as01_verts.json
    │       m_ca01_verts.json
    │       m_ft01_verts.json
    │       m_ft02_verts.json
    │
    └───vgroups
            human_female_vgroups_base.json
            human_female_vgroups_muscles.json
            human_male_vgroups_base.json
            human_male_vgroups_muscles.json

Note the added info.json which will include some extra information such as name of the project, author, description, download/documentation location and the names of any dependencies needed.

from mb-lab.

animate1978 avatar animate1978 commented on June 1, 2024

I like it. This way if / when we start making a new character model it will be easier to add, I think.

from mb-lab.

telnetr4 avatar telnetr4 commented on June 1, 2024

You may want to label this as "Help Wanted."

from mb-lab.

animate1978 avatar animate1978 commented on June 1, 2024

I am closing this issue because with the recent additions of MB-Dev, I believe this has been solved in a way...

from mb-lab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.