Skip to content

Commit

Permalink
mix group needed a factor
Browse files Browse the repository at this point in the history
Was defaulting to 1 and only using the top half of the stack
  • Loading branch information
Simarilius-uk authored Mar 14, 2024
1 parent 21411c8 commit 29ae77d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion i_scene_cp77_gltf/material_types/multilayered.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ def createLayerMaterial(self,LayerName,LayerCount,CurMat,mlmaskpath,normalimgpat
CurMat.links.new(CurMat.nodes[LastLayer].outputs[1],MixLayerStacks.inputs[5])
CurMat.links.new(CurMat.nodes[LastLayer].outputs[2],MixLayerStacks.inputs[6])
CurMat.links.new(CurMat.nodes[LastLayer].outputs[3],MixLayerStacks.inputs[7])
factor=CreateShaderNodeValue(CurMat, 0.5, -1100,-250, "Factor")
CurMat.links.new(factor.outputs[0],MixLayerStacks.inputs[8])

# replace the connections from the bottom of the stack with these
CurMat.links.new(MixLayerStacks.outputs[0],CurMat.nodes['Principled BSDF'].inputs['Base Color'])
Expand Down Expand Up @@ -657,4 +659,4 @@ def create(self,Data,Mat):
else:
LayerNormal=Data["GlobalNormal"]

self.createLayerMaterial(os.path.basename(Data["MultilayerSetup"])[:-8]+"_Layer_",LayerCount,CurMat,Data["MultilayerMask"],Data["GlobalNormal"])
self.createLayerMaterial(os.path.basename(Data["MultilayerSetup"])[:-8]+"_Layer_",LayerCount,CurMat,Data["MultilayerMask"],Data["GlobalNormal"])

0 comments on commit 29ae77d

Please sign in to comment.