Skip to content

Commit

Permalink
Forgot to include normal map in hull-window material.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawrence D'Oliveiro committed Apr 25, 2020
1 parent 502550e commit a2d669c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spaceship_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,13 @@ def set_hull_mat_emissive(mat, color, strength) :
# Build the hull texture
set_hull_mat_basics(materials[MATERIAL.HULL], hull_base_color)

ctx = NodeContext(materials[MATERIAL.HULL_LIGHTS].node_tree, (-400, 0))
ctx = NodeContext(materials[MATERIAL.HULL_LIGHTS].node_tree, (-600, 0))
for node in ctx.graph.nodes :
# clear out default nodes
ctx.graph.nodes.remove(node)
#end for
normal_map = ctx.node("ShaderNodeGroup", ctx.step_down(200))
normal_map.node_tree = normals_common
save_pos = ctx.pos
# Add a diffuse layer that sets the window color
base_window = create_texture \
Expand Down Expand Up @@ -364,6 +366,7 @@ def set_hull_mat_emissive(mat, color, strength) :
)
color_shader = ctx.node("ShaderNodeBsdfDiffuse", ctx.step_across(200))
ctx.link(mixer.outputs[0], color_shader.inputs["Color"])
ctx.link(normal_map.outputs[0], color_shader.inputs["Normal"])
add_shader = ctx.node("ShaderNodeAddShader", ctx.step_across(200))
ctx.link(color_shader.outputs[0], add_shader.inputs[0])
material_output = ctx.node("ShaderNodeOutputMaterial", ctx.step_across(200))
Expand Down

0 comments on commit a2d669c

Please sign in to comment.