animate1978 / MB-Lab

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

Skin color and eye shader changes after finalizing #269

Open vincurekf opened 4 years ago

vincurekf commented 4 years ago

Describe the bug After finalizing the character (Caucasian female) the skin color gets slightly unsaturated and eyes are darker, under the same light conditions (default portrait studio lights)

To Reproduce Steps to reproduce the behavior:

  1. Open new empty project
  2. Create new MB-Lab character
  3. Make render before finalizing
  4. Finalize character
  5. Re-render scene

Expected behavior Skin and eye shader should stay the same after finalizing.

Screenshots skin-comparsion-face

Additional context Some tweaking in skin shader can bring the expected result back. The skin_complexion and skin_veins seems to be responsible for this change in color. I could not check with older versions of MB-Lab because all installations were throwing an error when creating new character.

Logs Logs after pressing Finalize

bpy.context.area.ui_type = 'CONSOLE'
bpy.ops.mbast.button_finalize_on()
bpy.context.space_data.recent_folders_active = 0
bpy.context.space_data.params.filename = "skin-preview.png"
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="mbastlab_armature")
bpy.ops.object.posemode_toggle()
bpy.ops.pose.armature_apply()
bpy.ops.object.posemode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.modifier_move_up(modifier="mbastlab_armature")
bpy.ops.object.modifier_move_up(modifier="mbastlab_armature")
bpy.ops.object.modifier_move_up(modifier="mbastlab_armature")
bpy.ops.object.modifier_move_up(modifier="mbastlab_armature")
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.mbast.finalize_character_and_images(filepath="/home/vincurekf/_500GB/Blender_Assets/Models/MBLab/SkinPreview/final/skin-preview.png")

Running Blender 2.82.7

animate1978 commented 4 years ago

I will look into this as soon as I can.

animate1978 commented 4 years ago

I did manage to see this effect, only after comparing images.

before_final_01 Before Final

after_final_01 After Final

I am still not sure exactly WHY this is happening I will look at your logs though and see what the heck is going on

thelabcat commented 3 years ago

I confirm this report. When I finalize female models, they turn greyer.

animate1978 commented 3 years ago

Testing out more recent builds of Blender to see if this bug still exists...

skin_shader_bug_prefinal_01 Pre-Final

skin_shader_bug_postfinal_01 Post-Final

It is hard to tell now... there is a slight change I think but I think that it's not as bad as before?? I need to go into GIMP and do some image analysis.

For the record I am using Blender 2.91.0 and MB-Lab 1.7.8.50... with a modified shader still yet to commit to GitHub.

animate1978 commented 3 years ago

subtract_skin_shader_bug_02 subtract_skin_shader_bug_01

Using GIMP to do some image analysis... the above are composited together, old renders and new renders... using the Subtract blending method. The smaller image of the two are older, while the larger image was just rendered this morning.

I think that the "bug" has been "fixed" somehow... not exactly sure what I changed in the shader, or if this was a Blender bug that has been resolved?

thelabcat commented 3 years ago

Hey! Check this out on Stack Exchange. It looks similar, and has to do with anime characters coming out dull colors in renders

animate1978 commented 3 years ago

That actually makes a lot of sense.... Now I have to do some tests to see if there is any differences between the renders again but that shouldn't take too long