Closed econundrum closed 4 years ago
Adding something like that would require quite a bit of code, not even sure where to begin with that one.
Instead I propose something like this? Same principle as before but less of it is the generic diffuse black.
I thought you would just need to assign the skin2 datablock to the mb-generic material, that's what I do manually. Can it not be done programaticly? For now I've gone into the mb-lab base blend file and changed it in my add in folder. Just means I'll have to do that everytime I get a new version of the lab.
I'm trying to structure the node_ops so that it can be used for more than just hair. I'm also working on a script to grab all of the nodes used and links in a selected object's material and copy the settings. The new hairengine will lay out the different nodes, link them, and set the node values. I think that this could be used to switch materials in other areas.
On Tue, Nov 26, 2019, 4:10 AM econundrum notifications@github.com wrote:
I thought you would just need to assign the skin2 datablock to the mb-generic material, that's what I do manually. Can it not be done programaticly? For now I've gone into the mb-lab base blend file and changed it in my add in folder. Just means I'll have to do that everytime I get a new version of the lab.
— 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/204?email_source=notifications&email_token=AKYHC3SMNPHOE7OEJA4PDCDQVTRY3A5CNFSM4JRICJM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFFI7GI#issuecomment-558534553, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYHC3T7EVQ3CJUUP5QHSHDQVTRY3ANCNFSM4JRICJMQ .
Guys, would you like another contributor? I have some programming experience with java and vb and a bit with a few other languages. I'm new to python, but have read up on it and the blender api.
I got stuck on a train on the way home tonight and managed to look through and understand a lot of the mb-lab code. I think I could implement this myself in code relatively easily and I might be able to make other contributions too though I'm generally not enjoying much spare time at the moment. I'd love to help develop the lab it's a great project.
@animate1978 I created this script tonight that programmatically changes the Material to the MBlab_generic material slot to the MBLab_skin2 material in the text editor. Will need to get the name of the object from the lab in practice and would encapsulate in a function taking two material names. Found the basis for this code on stack exchange.
It doesn't display the code indentation for some reason in the comments here.
obj = bpy.data.objects['f_af01'] mat_generic = bpy.data.materials['MBlab_generic'] mat_skin = bpy.data.materials['MBLab_skin2']
materialslength = len(obj.data.materials) for i in range(0,materialslength): if obj.data.materials[i] == mat_generic: obj.data.materials[i] = mat_skin
Incidentally you used a capital "L" in MBLab_skin2 naming where the old material naming convention was lower case.
I've managed to implement the code in my local copy to disable when a character is created though it won't currently work on the anime models because of the different skin material name, should be easy to fix.
Haven't implemented the switch yet, just a test.
Instead I propose something like this? Same principle as before but less of it is the generic diffuse black.
Noo, that would be way worse, I think.... The current censor regions look like simplified undergarments - which I think is perfectly fine for the cases where you are concerned about avoiding the impression of nudity. This proposal however looks like stylised pubic hair and areolas. This completely defeats the purpose of having the censor regions in the first place IMHO.
As I see it, the gist of this request was not really about the look or shape of the censor regions but rather about having an option whether to generate them at all or not. That said, if such an option gets introduced I would also vote for the default being "no censor regions". It may be debatable whether enabling the censor option would merely assign the skin material to the current "decency slot" (thus allowing for easy after-the-fact "censoring") or whether that slot would not be created at all.
Don't get me wrong I am all for this, just offering an "alternative" to programming.
I have implemented a a basic prototype locally that adds a function to switch the material in one material slot to the material of another and I call it after the creation passing MBlab_generic and MBLab_skin2 This removes the censors.
In terms of the option i was going to default it to keep the censors just to provide consistent behaviour for those who are offended by seeing blank abdominal areas and nipples.
In general do people think it should go in the addon options or in the creation UI as a toggle.
I need to find my way around git a bit more as well haven't used git or git hub much before.
I'm still learning myself. I have to look at the nodes used. I still need to add nodes to the node_ops because right now it only contains those necessary for the hairengine.
On Sat, Nov 30, 2019, 12:56 PM econundrum notifications@github.com wrote:
I have implemented a a basic prototype locally that adds a function to switch the material in one material slot to the material of another and I call it after the creation passing MBlab_generic and MBLab_skin2 This removes the censors.
In terms of the option i was going to default it to keep the censors just to provide consistent behaviour for those who are offended by seeing blank abdominal areas and nipples.
In general do people think it should go in the addon options or in the creation UI as a toggle.
I need to find my way around git a bit more as well haven't used git or git hub much before.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/animate1978/MB-Lab/issues/204?email_source=notifications&email_token=AKYHC3QQ2EDAPDK6AQ2P4L3QWKSNXA5CNFSM4JRICJM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFQP7QQ#issuecomment-560005058, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYHC3SNELKAXYLSFGU2VCDQWKSNXANCNFSM4JRICJMQ .
I have implemented this locally on my system with a Censor option in the user preferences, it defaults to true so you have to untick it, to avoid causing offense to anyone with the change, but as a preference you only need to do this once when you install.
Output on default model
Output on default model
I need to do a bit more work on it to make it also work with animee models because these use a different material name for the skin and a bit of code tidying.
At present though I've used an old development branch clone to work against as currently the development branch is not working. So at the moment I'm not sure of a route to both be able to submit a tested version.
I've now got it working for all current character bases.
@animate1978 I currently have this code developed on an older working dev branch. I have a fork but since I only forked recently the dev branch is broken.
I think we need to sort out the dev flow a bit as you have suggested. The code I have is pretty tidy so I can easily reapply it to the dev branch once it's fixed.
@econundrum Very cool.
I am still in contact with GitHub support regarding the LFS, it should be relatively easy to "fix" and I am still studying docs to ensure that this reversal will not have unintended issues afterwards.
Sorry for the issues over LFS
@ogiesen The slot for the material is part of the base blend file, you can remove it there if you like I suppose. I'm kind of lazy it would be more work I think to remover them altogether programmatically or at least require more research. If I just delete the slot it leaves those vertices with no material applied.
I'm guessing I could get the vertices it applies too from the material slot on the object and then add them to the other material slot. But I haven't researched it properly. Since I have a solution that works I'm not sure if I would expend the effort especially as the current method gives you an easy way to change the "underwear" texture again if you wish.
@econundrum Very cool.
I am still in contact with GitHub support regarding the LFS, it should be relatively easy to "fix" and I am still studying docs to ensure that this reversal will not have unintended issues afterwards.
Sorry for the issues over LFS
I appreciate all your doing to keep this addon alive and the amount of effort your putting in.
Tested and it works well
Is your feature request related to a problem? Please describe.
Black censor bands are ugly and largely unnecessary.
Describe the solution you'd like A clear and concise description of what you want to happen.
Could we have the option either in the main generation panel or in the add on panel to turn off the black censor bands so they don't appear when we generate characters.
I recognise some people will want to keep them on, but frankly they are ugly and mostly redundant since MB-Lab characters are not anatomically correct.
The first thing I do on a new character every time is go to the materials and switch them to the skin data block to remove them.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Alternatively could they be replaced with something a bit less ugly.
Additional context Add any other context or screenshots about the feature request here.
I'd be entirely happy for the option to be on by default, but it would be great to be able to switch them off if you don't want them.