animate1978 / MB-Lab

MB-Lab is a character creation tool for Blender 4.0 and above, based off ManuelBastioniLAB
Other
1.76k stars 308 forks source link

How to add genitals to the base meshes #324

Open mysticfall opened 3 years ago

mysticfall commented 3 years ago

I'm trying to create an open source game framework which supports mature contents. As such, it's essential that the base character models to be anatomically correct.

Provided I have some knowledge of Blender and Python, where should I start to add genitals to the base meshes that MB-Lab provides?

animate1978 commented 3 years ago

Umm wow...

Yeah I don't know what to say about this one. I would say that you are free to do what you will, however this addon is not meant for such content out of the box. That is to say, as developers, we are trying to keep the addon free from such material because the original developer had done so in the past.

This is not meant to discourage your attempts but it is probably not going to be added by default to the addon. While there are breasts on the female models... that is about it in regards to mature content, also note there is code to remove or add in censors to sensitive content.

I am sorry if this is not the answer you were looking for. This addon was not designed for such content and staying true to the original developer's guidelines we won't allow it "out of the box" so to speak.

You are free to do such on your own copy or fork of MB-Lab... but the main build of MB-Lab won't have these added.

Sorry.

mysticfall commented 3 years ago

Thanks for the answer. Personally, I've never understood how sex is perfectly natural and essential part of human existence but it's shunned as something unethical, while mass murdering is criminal or at least something highly tragic but still became the most popular theme for video games and everyone seems to think it's something cool.

Although I'm a bit disappointed to hear that we will never see anatomically correct human features in this addon out-of-the-box, I respect your stance on this matter and understand that it's not a place to argue about morality.

However, I'd like to ask if it would still be disallowed even as an optional feature, just like how the addon currently offers censorship option for textures.

And what if I'm interested in contributing such a feature or even fork the project in case such a feature would be regarded unacceptable even as an option? Could you give me some pointers as to where to start, for I'm still unfamiliar with how the addon works internally?

mysticfall commented 3 years ago

So, not even going to tell me where should I look to do it myself? Anyone?

animate1978 commented 3 years ago

I'm sorry for the late reply, I had a lot going on in my personal life.

To add new mesh to existing mesh would require quite a lot of work actually. You see the model is composed of not only the actual mesh in the blend file, but also JSON data that represents the location of the vertices and faces in 3D space so you would need to essentially build a new model and the tools we have in MB-Lab 1.7.8 CAN do this, it just would take a lot of work on your end to do so.

https://mb-lab-docs.readthedocs.io/en/latest/developer_main.html

The above documentation provides at least a basic workflow of how to do this. I am not the author of these tools, that was done by another dev this past year, so I don't know all the internals of these tools as he does, so I can't really troubleshoot issues when they come up as he would be able to answer them more clearly.

I think what you would try to do would take an existing mesh and modify it, export the JSON data and then you should be able to work with the model, that includes the vertice count, face count and any morphs you would need to accomplish this task.

Noizirom commented 3 years ago

Fork a copy. Are aware of the license issues with making a game using these characters? Google is a good tool. I don't think anybody here is an expert on putting Male genitals on a character. You could try a forum that is geared for that kind of thing.

On Sun, Jan 17, 2021, 8:46 PM Xavier Cho notifications@github.com wrote:

So, not even going to tell me where should I look to do it myself? Anyone?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/animate1978/MB-Lab/issues/324#issuecomment-761927957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYHC3WYOYYPBEEPS3HH4KLS2OHFTANCNFSM4V6XRGBQ .

mysticfall commented 3 years ago

@animate1978 Thanks much for the information! I'll try to study the material you provided. I hope it will also make me understand the codebase better so I can contribute to the project on non-NSFW matters in future (which is something I definitely intend to do).

@Noizirom I'm not interested in making any commercial game. All I want to achieve is making a fully FOSS ecosystem which is as good for creating NSFW games as it is for "normal" ones.

And to clarify, I don't need a tutorial on how to model or attach a genital to an existing character in Blender, which I can do myself already. What I wanted to know is how to do that to the base model MB Lab provides, so that all generated characters can optionally have such a feature.

cliffnhansen42 commented 3 years ago

@mysticfall I do some work with medical designs, and as such I also find the lack of physically accurate models frustrating, especially for Character Creator which is rather expensive and still is incomplete. While the designers and coders for MB-Lab have every right to create the characters as they wish, I do find the prudishness so many people face with nudity annoying. But, of course, the potential for misuse is great as well, and so I get it.

Have you considered using MakeHuman? That system is very similar to MB-Lab (and even got its start with the same designer) and does have more options for creating genetalia, and there are some options you can opt-in to include on your models, which I think is a great way of doing it. The designs aren't particularly well-made, but for a video game I think you'd be happy enough with the appearance. If you're not, because of the open source nature of Makehuman, you can easily find opportunities for how to create your own or modify the existing targets. While I think MB-Lab is now at a place where it has better meshes, I think Makehuman would be a better option for your needs as I understand them. The geometry for the meshes aren't too different, either, so I have had a few situations where I have removed the genital region from an Makehuman mesh and attached it to a MB-Lab one. It's not incredibly difficult, just time consuming.

I am in discussion with a sex therapist for a potential commission to create multiple and varied realistic genitals for both men and women for her medical practice, so if I get that contract and time commits, I'll see if I can later adapt those models and try to release those for public use. And if I don't, maybe I could do a fundraiser or something as I think there are plenty of legitimate reasons why someone would want complete and medically accurate models.

Hope this helps!

mysticfall commented 3 years ago

@cliffnhansen42 Thanks for the suggestion. I had considered both of the options but decided to stay with MB-Lab, at least for now. As you mentioned, I found the mesh provided by MB is a bit better in quality than that from MakeHuman, which is quite an important aspect for the type of games I'm intending to create.

More importantly, I'm using UPBGE (a game engine based on Blender) and also I'm creating a FOSS framework for such games that aims to provide character customisation features. As such, MB has a significant advantage in being tightly integrated to Blender while being a FOSS project.

I've also briefly considered Character Creator, but if I make my framework based on that product, I won't be able to release required assets along with the codebase and anyone who wish to use it in their project would have to purchase the product. Also, I found that the trial version of the product doesn't install on WINE which is important to me because I do all development on Linux. So, I had to abandon the idea.

As for the models, I've found a few acceptable (for my purpose) ones under permissible license on the internet, and I also created female one myself. But it'd still be nicer if we could have more high fidelity models that can be integrated into a FOSS/CC project.

And I entirely agree that the use case related to medical designs shows how it's more beneficial to have an anatomically correct model in a project like this one. In my opinion, we shouldn't be judgemental about other people's stance on such a matter and I can totally understand and respect those who don't want to see a genital in their models for whatever reason.

But if we choose to remove a specific body part which is present in a natural human body, rather than providing an option to hide it, we are indeed making a certain statement, or a judgement on the morality of the matter. It is in effect, asserting that showing genital is something shameful, immoral, or otherwise undesirable so that nobody should do it for whatever reason.

A majority of video games have combat features, and it is usually the case that the player is encouraged to kill people or other living beings in such a game and rewarded by how many kills one makes.

While I don't intend to judge those who make or play such games as I enjoy them myself, believing fantasy is just a fantasy, I find it odd that how few people insist that either MB or MakeHuman should include a license clause to prevent the project from being used in such a context, while almost everyone seems to think that it shouldn't be used in anything that involves revealing genitals. From when sex has become illegal or immoral while mass murdering of people is not?

To me, the best approach would be to provide a base model that represents the human body as it is (which was the original vision of the project, too) and allow people to hide certain parts if they want. I can respect those who don't want to see genitals or nipples for whatever reason, but I can't if they also insist that nobody should see them either.

Declaring something to be inappropriate and preventing other people from accessing it is more judgemental and closer to pushing an agenda than providing a choice in such a matter to everyone.

I'm sorry if I started an argument. I just find it unfortunate that we have only a couple of legitimate FOSS options for generating 3D human characters and none of them provide an authentic human anatomy in a non-judgemental manner.

But I won't push this issue further as I'm not the owner of this project. And I see no point of arguing it anyway before finding a way to change the base mesh to include such a feature. So that will be my immediate task, whether it will end up in this project or in a fork of mine.

cliffnhansen42 commented 3 years ago

I agree completely, although I would offer the counterpoint that because of the way 3d works, you really don't want to design what you're not going to see, and if there's an assumption that the character is going to have clothes, it doesn't make sense at all to model the bits and pieces down south. More people are likely going to benefit from needing them without the genitals and having that complicated geometry there would actually interfere with garment design and simulation. So, with few people on the coding and design team, you really have to choose which customers to disadvantage, and so it makes since that for a general purpose tool, you'd probably go with the option with the more optimized mesh, all things being equal. So it might not have been any sort of value judgement and more just how Manuel Bastioni chose to spend his design. He also decided to make the models 18 and older, and one can imagine a list of reasons for that which also make sense. For all we know, there may have been plans to add those features in the future, since there are early posts from him working on the genitalia for an early version of Makehuman, so I know he wasn't shy about such things. But ultimately, that's the benefit of the open source community, we get to see what's out there and if it doesn't meet our needs, some option usually exists to modify it, and more times than not, there's someone else with the same needs as you! Either way, I cannot tell you just how grateful I am to Manuel Bastioni, and, especially the wonderful heroes who took over the project after he was forced to leave it. I would rather spend a little bit of extra time on my end knowing that they saved me days of work. And, when money becomes more plentiful, you'd better believe I'm going to send some money their way in response. (One final thought, send me a link to where I can follow your game's progress, I'd love to check it out!)

mysticfall commented 3 years ago

Actually, the reason why the model doesn't include the genital is stated in the documentation:

In order to be SFW, models don't include genitals.

And while I agree that most users would want their generated characters without invisible body parts, it's so much easier to remove certain vertices after the finalisation than to add something which was not included in the base mesh.

As to Manuel Bastioni's intention, I believe he actually provided an anatomically correct model but decided against it later to avoid controversy.

One final thought, send me a link to where I can follow your game's progress, I'd love to check it out!

Thanks for the interest. It's still in a very early stage so there's not much to see, especially after I decided to start over after moving to UPBGE :) All my game related works are hosted on Github, by the way, so you can follow some of those repositories to check on my progress.

I'm also trying to make a base character for my framework which looks reasonably realistic while still being suitable to be used in a game. I post my progress on the UPBGE Discord server from time to time, like this one (it is a realtime render using EEVEE/UPBGE):

image

I'd like to find a way to contribute texture or model related works that I do based on this project. Ideally, it'd be great if I can create such a character with MB Lab out-of-the-box, including all the anatomical details that I need.

econundrum commented 3 years ago

It seems Chargen intends to allow genitalia at least as proxy so I don't see why upliner wouldn't allow an anatomically correct base mesh on Chargen. You need an artist to create on though.

cliffnhansen42 commented 3 years ago

I just found this resource for my work with a sex therapist. It's a bunch of 3d-printable scans of humans of all ages above 18 and all genders (even trans!). These can be imported into Blender and are CC0 public domain. So it's a great way of getting accurate human geometry and adding them to your meshes. https://wearebeautiful.info/ So maybe thrown some thank you money as a donation to that website to support their further work! You'll need to do some cleanup work, adding details, retopologize, etc, but it'll save you a lot of time and trouble since they've already done the hard part.

econundrum commented 3 years ago

That looks like a great basis to make a model from.

animate1978 commented 3 years ago

Hmm odd there was more comments here, at least from my notifications.... anyways it was not I that downvoted anything, not sure who posted additional comments either so...

On that note, genitalia as part of the "official" addon won't be added, no offense to anyone here, however if devs want to add such features simply make a fork and using the MB-Dev tools can add their own characters in. I don't mean to be a downer on this subject and yes I understand anatomy of the natural human body is perfectly fine, but we have to factor things such as age groups using this addon, local laws that prohibit such features and the like... this is supposed to be a universal addon that anyone can and should use, so in that aspect it has been decided that these features will not be added to the official branches.

Yes sex as a whole is the reason we exist, this is not a debate as to decency, depravity, naturalism and so on and so forth. It just simply is this - in order to make the addon as accessible to the general public it is a good idea to keep it simple and "sex" free. I am sorry if this turns people away I just believe that people young and old should be able to use this addon, again if the features requested in this "issue" become a reality I have no problem with forks doing this - in fact bravo!! If requested by other users I will gladly point them in that direction of said fork. But for us, on the "official" addon.... I must strike down this feature request and move on.

Again I apologize if this angers or turns away people from MB-Lab

thelabcat commented 3 years ago

I openly dissent to this! Intercourse is for the marriage bed ONLY. "Trust the science."

Pauan commented 3 years ago

@thelabcat Why do you assume that the only purpose of genitals is for sex? We have already listed out multiple non-sexual reasons for having genitals on 3D models (including for medical or educational purposes).

Also, why do you think that banning genitals from MB-Lab will somehow stop porn? There are already thousands of 3D models used in porn, maybe you should focus on them instead?

thelabcat commented 3 years ago

1: Mysticfall's comment about how "sex is completely natural" may have meant nothing of the sort, so you do have a point; it sounded alarmingly like comments I have seen and heard where someone was attempting to justify pornography/fornication.

2: True, but this is a project I love, and it isn't pornographic, and I want it never to be pornographic.

cliffnhansen42 commented 3 years ago

As I've mentioned before in this thread, a lot of people use MBL for medical and scientific renderings which make it really frustrating that it is inaccurate in those areas. I hate how puritanical people who think the body should only be thought of in a sexual context complicate things for those of us who have a broader understanding. (Having studied this topic to some extent, I'm of the philosophy that censoring the body and hiding it actually causes MORE sexualization and problems for kiddos.) But in the end, as most characters are going to be clothed and genitalia adds complex geometry that isn't needed under the clothes, that's reason enough to keep them Ken dolls, and the maintainers of MBL are well within their right to choose what to focus on and what not to... (although it seems ridiculous to me to not just provide a switch, disabled by default, to opt-in to accurate human topology to provide universal usage to the broadest possible audience, since by claiming not to take sides, they are in fact taking sides and going for the puritanical one.) But as someone pointed out above, that's why it is great that it's open source, it provides the opportunity for people with the know-how to do their own coding and design, so people with different philosophies can all be happy without the need to get into such silly debates like this.

BTW, I stumbled across a website called "We are beautiful" which provides public domain 3d scans of human genitalia for people of all genders, ages, and body types for use in projects like this. They definitely would require some retopology, but with a little sculpting, I imagine you can combine it with a MB Lab model without much fuss. https://wearebeautiful.info/

Cliff Hansen @.***

PS. My car recently exploded with me inside. One of the most terrifying moments of my life. I need to buy a new one so I can continue to do my work with at-risk children, teens, and refugees. Please help me raise money for a down payment by donating to my gofundme here gofundme.com/f/replace-my-blown-up-car If you're unable to donate, I understand, but I'd appreciate it if you shared the link on your social networks or to friends who might be able to help. Thank you so much!

On Wed, Jun 2, 2021 at 5:36 PM Wilbur Jaywright @.***> wrote:

1: Mysticfall's comment about how "sex is completely natural" may have meant nothing of the sort, so you do have a point; it sounded alarmingly like comments I have seen and heard where someone was attempting to justify pornography/fornication.

2: True, but this is a project I love, and it isn't pornographic, and I want it never to be pornographic.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/animate1978/MB-Lab/issues/324#issuecomment-853471877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIKAWJOKRMBTJ55K7DUHILDTQ3E7XANCNFSM4V6XRGBQ .

Pauan commented 3 years ago

@thelabcat 2: True, but this is a project I love, and it isn't pornographic, and I want it never to be pornographic.

But the project will never be pornographic, even if it included genitals, because genitals are not inherently pornographic.

People can use this program for all sorts of purposes, it is just a tool. What you are saying is similar to, "some people use hammers to kill other people, therefore all hammers must be banned".

Just because some people use a tool for bad purposes doesn't mean that the tool is inherently bad. Ban the people who are using the tool improperly, don't ban the tool.

If you try to ban the tool, people will simply switch to a different tool (which they already have, which is why thousands of porn 3D models already exist).

Banning the tool does not work, has never worked, and will never work, you are simply wasting your time and being completely ineffective at achieving your goal. Change your strategy so you can actually be effective at accomplishing your goal.

thelabcat commented 3 years ago

"I'm trying to create an open source game framework which supports mature contents." -mysticfall

However, since this tool is not that framework, and medical/scientific reasons for such elements have been stated, you do have a point. I feel I have made a moot point, and I do apologize for the inconvenience to the community.

Pauan commented 3 years ago

@thelabcat Note that I actually agree with you on your moral stance, but the correct way to fix widespread social problems is to change things at the general social / cultural / education / academic / media / corporation / government levels. Trying to fight against individual tools / individual people is like trying to drain the ocean with a bucket, you need to think bigger.

thelabcat commented 3 years ago

@Pauan you're right, and I'm sorry y'all. I should've not said anything in this scenario😶.

Noizirom commented 3 years ago

Sounds like a candidate for crowd funding? And who is supposedly responsible for maintaining the code? Because I don't get paid for anything. Ijs

On Thu, Mar 25, 2021, 11:07 AM Wilbur Jaywright @.***> wrote:

If the MB-Lab development team asks me to stop, I will leave.

Somebody gave a downvote reaction, but I don't know who.  I then want to explain why I say this, and it is not because I go around in black all the time and believe that the natural positive hormones firing sex should somehow be ignored.

Sex results in the release of  oxytocin, a fun and bond creating hormone. It has been scientifically proven that being married (sex between one man with one woman "so long as ye both shall live") is as positive to a man's health as not smoking 200 packs of cigarettes a day. Sex is definitely good.

But good things can be used for bad. Someone having sex with multiple people, including virtually with people they've seen online through masturbation, create bonds with all those people, and it starts to cause problems. Eventually, they actually have become bonded to the sexual experience itself rather than a person, and they want it all the time. An officer who professionally is specifically fighting rape and sex trafficking said in an invited speech, "I can tell you how to stop rape overnight: Stop watching porn." The connection is completely manifest, even to a non-Christian officer.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/animate1978/MB-Lab/issues/324#issuecomment-806916669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYHC3U3AI5RLJGIESN3OVTTFNGT5ANCNFSM4V6XRGBQ .

animate1978 commented 3 years ago

So this became a hot topic again?

I will explain why, with the AGPL3 models at least, that by default there will not be any additions to the mesh. Simply put, it would mess up every single JSON file. You see the vertex information is saved in JSON, this is what gives the characters the ability to change shapes, the JSON files are responsible for this NOT the Blend file. In order to add pretty much ANY edits to the mesh one would HAVE to recreate the entire JSON library for each "race" such as Caucasian, Asian, Latino etc... these are all located in the Morphs directory and are quite large. Simply putting genitalia or any other type of new mesh would require a WHOLE library of morphs, essentially redoing the entire model from scratch all over again. This is because of how the vertex ID's, the position of each vertex, as well as the Min and Max location data is stored, it is stored in the JSON.

One simply cannot just add new mesh to the existing models. This is just the way it is.

Again as I have stated above if one wants to undertake this "issue" go right ahead. I am not stopping anyone but I will warn you that it is a HUGE undertaking. By all means please do so! I would applaud such an effort!

This is another reason why version 1.7.9 and 1.8.0 are taking SO LONG to complete - the amount of work one needs to do to complete a model with all the morphs, is extensive. It is not easy, it is not simple and it takes time to do this.

I am not saying this is a MORAL issue - it is a TECHNICAL issue.... again you just can't simply add mesh to the MB-Lab models and expect it to function, you really need to redo the entire project from ground up and I for one will NOT be willing to do that with the AGPL3 models.

I hope this clears up my stance on the matter.

mysticfall commented 3 years ago

Yeah, I actually made a prototype base model with anatomically correct parts and tried to incorportate it into MBLab but gave up, due to rather cryptic documentation that explains the required process. If I'm not mistaken, the project may need non-trivial additional efforts before it could allow the users to substitute the default base meshes with their own.

So I can see how it's more of a technical than moral issue for now. I gave up the idea of using MBLab for my project for now, but I'll keep my eyes open for future development that may make it feasible again.

shankarsivarajan commented 2 years ago

If you're still interested, I'd recommend CharMorph. It's a lot like MB-Lab, but designed to work with other base meshes as well.