makehumancommunity / mpfb2

MPFB2 is a free and open source human generator for Blender
http://static.makehumancommunity.org/mpfb.html
Other
317 stars 38 forks source link

Blood layer for Enhanced Eye Shader #121

Closed cgvirus closed 1 year ago

cgvirus commented 1 year ago

Hello, I was enhancing the enhanced eye with a blood layer. IDK how to PR it as there is no shader to replace in the script anywhere. So here is the raw blend file. The blood amount slider is at the bottom. 0 will make the pure white as before. 1-10 will make the eye bloody with veins. If it can be inserted in the enhanced eye shader, that would be great! Thanks!

Enhanced Eye With Blood.zip

Screenshot from 2023-07-15 07-35-23

joepal1976 commented 1 year ago

Thanks. I'm working on a version 2 of the eyes, which will be PR:able. This contains a blood vein layer, but I was never very satisfied with it.

I'll see to getting the sample blend file under version control, and see if we can merge the versions there. It'll take until tomorrow though.

cgvirus commented 1 year ago

Actually I was wondering what if we could make blender shader as another standard besides mhmat like make materal does. We could

I am trying to understand MPFB2 design decisions. So, this is what came to my mind. Makehuman is a little different than usual apps.

My plan for near future:

joepal1976 commented 1 year ago

I very much doubt there will ever be a superior one-size-fits-all material model. The procedural skin shader is a good fit for my own use cases atm, but is obviously a horrible fit for use cases involving exports to other applications. I have no problem supporting multiple parallel material models, each geared for their respective use case.

So I'm all for adding another standard shader that solves additional use cases.

There are several reasons for not using blend files as backend for the materials. One is that it is very cumbersome to handle blend files in version control. You can't diff them or make viable PRs. I wanted to keep tight source code control and the ability to unit test all aspects of the shader, which makes serialization to a text-based format appealing.

There must be better exchange formats than using opaque binary blobs, but so far I have not seen any kind of standard for this arising in the blender world. So best I've been able to do is JSON + images.

MHMAT is a truly ancient format, which has been around for close to two decades. It is not quite as limited as you say, but it is not far from the truth (for reference, there's a spec at https://github.com/makehumancommunity/community-plugins-makeskin/blob/master/README.md). Right now it is there as a baseline, as all available assets use it and it is the only available shared standard usable by both MakeHuman and MPFB. But it is by no means an end truth which must be followed. It is a bit too limiting to think all future assets would need to adhere to this standard.

joepal1976 commented 1 year ago

I've put my current experimental next eye shader in a git lfs repo at https://github.com/makehumancommunity/mpfb-eye-model-v2

As said, I was never very happy with my current eyewhite/blood solution there, so at some point I would take a swipe at merging your solution as a replacement.

I will be traveling a lot for the next two weeks though, so it might take some time until I get around to it. If you want to play around with the v2 model before then, you're be welcome to.

As a general note about the status of the v2 model: It is quite far from finished. The outer transparent layer is in a flux where I am trying to solve the problem with the transmission solution in the v1 model ending up way too dark, but in the v2 version I've lost Ior which isn't optimal either.

cgvirus commented 1 year ago

Got it, After experimenting the developer tool yesterday, I get the power of this pipeline. It is very good and efficient. I will start observing the patterns it takes to create a material today. I may need some suggestion later to understand the pipeline well. I think I can make a easy to digest tutorial series on mpfb2 soon. What you have made is a hidden gem. Thanks for the addon!

cgvirus commented 1 year ago

This will help to make PBR proper https://github.com/makehumancommunity/mpfb2/issues/124

cgvirus commented 1 year ago

Closing this issue as the subject is out of this issue. Created new one instead