Skip to content

Commit a2d669c

Browse files
author
Lawrence D'Oliveiro
committed
Forgot to include normal map in hull-window material.
1 parent 502550e commit a2d669c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spaceship_generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,13 @@ def set_hull_mat_emissive(mat, color, strength) :
332332
# Build the hull texture
333333
set_hull_mat_basics(materials[MATERIAL.HULL], hull_base_color)
334334

335-
ctx = NodeContext(materials[MATERIAL.HULL_LIGHTS].node_tree, (-400, 0))
335+
ctx = NodeContext(materials[MATERIAL.HULL_LIGHTS].node_tree, (-600, 0))
336336
for node in ctx.graph.nodes :
337337
# clear out default nodes
338338
ctx.graph.nodes.remove(node)
339339
#end for
340+
normal_map = ctx.node("ShaderNodeGroup", ctx.step_down(200))
341+
normal_map.node_tree = normals_common
340342
save_pos = ctx.pos
341343
# Add a diffuse layer that sets the window color
342344
base_window = create_texture \
@@ -364,6 +366,7 @@ def set_hull_mat_emissive(mat, color, strength) :
364366
)
365367
color_shader = ctx.node("ShaderNodeBsdfDiffuse", ctx.step_across(200))
366368
ctx.link(mixer.outputs[0], color_shader.inputs["Color"])
369+
ctx.link(normal_map.outputs[0], color_shader.inputs["Normal"])
367370
add_shader = ctx.node("ShaderNodeAddShader", ctx.step_across(200))
368371
ctx.link(color_shader.outputs[0], add_shader.inputs[0])
369372
material_output = ctx.node("ShaderNodeOutputMaterial", ctx.step_across(200))

0 commit comments

Comments
 (0)