From 3379a32b9efba057b6107eb8036ddc8d40b1709e Mon Sep 17 00:00:00 2001 From: orange Date: Tue, 7 May 2024 13:55:20 +0900 Subject: [PATCH] =?UTF-8?q?Emission=E3=83=86=E3=82=AF=E3=82=B9=E3=83=81?= =?UTF-8?q?=E3=83=A3=E3=81=8C=E5=AD=98=E5=9C=A8=E3=81=99=E3=82=8B=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=AB=E5=A4=89=E6=8F=9B=E3=81=8C=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vrmconv.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vrmconv.py b/vrmconv.py index cd93a95..a8a1172 100644 --- a/vrmconv.py +++ b/vrmconv.py @@ -18,6 +18,7 @@ def mtoon_to_bsdf(): main_texture = None normalmap_texture = None emission_texture = None + emission_strength = 0.0 mtoon = None for node in nodes: @@ -29,6 +30,7 @@ def mtoon_to_bsdf(): emission_texture = node if node.name == 'Mtoon1Material.Mtoon1Output': mtoon = node + emission_strength = mtoon.inputs['Emissive Strength'].default_value if (not main_texture == None and not mtoon == None): @@ -48,7 +50,8 @@ def mtoon_to_bsdf(): links.new(normalmap_texture.outputs['Color'], normal.inputs['Color']) links.new(normal.outputs['Normal'], bsdf.inputs['Normal']) if(not emission_texture == None): - links.new(emission_texture.outputs['Color'], bsdf.inputs['Emission']) + links.new(emission_texture.outputs['Color'], bsdf.inputs['Emission Color']) + bsdf.inputs['Emission Strength'].default_value = emission_strength def remove_trashes(): bpy.ops.object.mode_set(mode='OBJECT')