Skip to content

Commit f163ca2

Browse files
committed
Fix track sections. Improve lighting
1 parent 8ad5a41 commit f163ca2

File tree

6 files changed

+50
-41
lines changed

6 files changed

+50
-41
lines changed

rct-graphics-helper/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"name": "RCT Graphics Helper",
2323
"description": "Render tool to replicate RCT graphics",
2424
"author": "Olivier Wervers",
25-
"version": (0, 3, 3),
25+
"version": (0, 3, 4),
2626
"blender": (2, 79, 0),
2727
"location": "Render",
2828
"support": "COMMUNITY",

rct-graphics-helper/angle_sections/track.py

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,17 @@
7373
[False, 32, 0, 45, 0]
7474
],
7575
"VEHICLE_SPRITE_FLAG_INLINE_TWISTS": [
76-
[False, 4, 0, -15, 0],
77-
[False, 4, 0, 15, 0],
78-
[False, 4, 0, -30, 0],
79-
[False, 4, 0, 30, 0],
80-
[False, 4, 0, -45, 0],
81-
[False, 4, 0, 45, 0],
82-
[False, 4, 0, -60, 0],
83-
[False, 4, 0, 60, 0],
84-
[False, 4, 0, -75, 0],
85-
[False, 4, 0, 75, 0]
76+
# The banking sprites are used at the start of a twist ((180-MAX_BANK)/6*FRAME)+MAX_BANK
77+
[False, 4, 0, -67.5, 0],
78+
[False, 4, 0, 67.5, 0],
79+
[False, 4, 0, -90, 0],
80+
[False, 4, 0, 90, 0],
81+
[False, 4, 0, -112.5, 0],
82+
[False, 4, 0, 112.5, 0],
83+
[False, 4, 0, -135, 0],
84+
[False, 4, 0, 135, 0],
85+
[False, 4, 0, -157.5, 0],
86+
[False, 4, 0, 157.5, 0]
8687
],
8788
"VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS": [
8889
[False, 32, 11.1026, -22.5, 0],
@@ -115,26 +116,29 @@
115116
[False, 4, -11.1026, 45, 0]
116117
],
117118
"VEHICLE_SPRITE_FLAG_CORKSCREWS": [
118-
[False, 4, 16.4, -15.8, 2.3],
119-
[False, 4, 43.3, -34.4, 14],
120-
[False, 4, 90, -45, 45],
121-
[False, 4, 136.7, -34.4, 76],
122-
[False, 4, 163.6, -15.8, 87.7],
123-
[False, 4, -16.4, 15.8, 2.3],
124-
[False, 4, -43.3, 34.4, 14],
125-
[False, 4, -90, 45, 45],
126-
[False, 4, -136.7, 34.4, 76],
127-
[False, 4, -163.6, 15.8, 87.7],
128-
[False, 4, 16.4, 15.8, -2.3],
129-
[False, 4, 43.3, 34.4, -14],
130-
[False, 4, 90, 45, -45],
131-
[False, 4, 136.7, 34.4, -76],
132-
[False, 4, 163.6, 15.8, -87.7],
133-
[False, 4, -16.4, -15.8, -2.3],
134-
[False, 4, -43.3, -34.4, -14],
135-
[False, 4, -90, -45, -45],
136-
[False, 4, -136.7, -34.4, -76],
137-
[False, 4, -163.6, -15.8, -87.7]
119+
[False, 4, 22.21, 20.7, 4.11],
120+
[False, 4, 50.77, 37.76, 18.43],
121+
[False, 4, 90, 45, 45],
122+
[False, 4, 129.23, 37.76, 71.57],
123+
[False, 4, 157.79, 20.7, 85.89],
124+
125+
[False, 4, -22.21, -20.7, 4.11],
126+
[False, 4, -50.77, -37.76, 18.43],
127+
[False, 4, -90, -45, 45],
128+
[False, 4, -129.23, -37.76, 71.57],
129+
[False, 4, -157.79, -20.7, 85.89],
130+
131+
[False, 4, 22.21, -20.7, -4.11],
132+
[False, 4, 50.77, -37.76, -18.43],
133+
[False, 4, 90, -45, -45],
134+
[False, 4, 129.23, -37.76, -71.57],
135+
[False, 4, 157.79, -20.7, -85.89],
136+
137+
[False, 4, -22.21, 20.7, -4.11],
138+
[False, 4, -50.77, 37.76, -18.43],
139+
[False, 4, -90, 45, -45],
140+
[False, 4, -129.23, 37.76, -71.57],
141+
[False, 4, -157.79, 20.7, -85.89],
138142
],
139143
"VEHICLE_SPRITE_FLAG_RESTRAINT_ANIMATION": [
140144
[False, 4, 0, 0, 0]

rct-graphics-helper/builders/scene_builder.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ def build(self, context):
7070
scene.objects.link(dome_light_obj)
7171
dome_light_obj.parent = vertical_joint_obj
7272

73+
# Environment lighting
74+
bpy.data.worlds["World"].light_settings.use_environment_light = True
75+
bpy.data.worlds["World"].light_settings.environment_energy = 0.15
76+
bpy.data.worlds["World"].light_settings.gather_method = "RAYTRACE"
77+
bpy.data.worlds["World"].light_settings.distance = 0
78+
bpy.data.worlds["World"].light_settings.samples = 1
79+
7380
def create_camera(self, context):
7481
name = self.prefix + "Camera" + self.suffix
7582
if name in bpy.data.cameras:
@@ -124,10 +131,7 @@ def create_filler_light(self, context):
124131
lamp_data.energy = 0.5
125132
lamp_data.use_specular = False
126133
lamp_data.use_diffuse = True
127-
lamp_data.shadow_method = "RAY_SHADOW"
128-
lamp_data.shadow_ray_sample_method = "ADAPTIVE_QMC"
129-
lamp_data.shadow_ray_samples = 2
130-
lamp_data.shadow_soft_size = 0.5
134+
lamp_data.shadow_method = "NOSHADOW"
131135

132136
lamp_object = self.create_scene_object(
133137
context, 'FillerLight', lamp_data)
@@ -142,7 +146,7 @@ def create_filler_light(self, context):
142146

143147
def create_light_dome(self, context):
144148
lamp_data = self.create_lamp_data(context, "LightDome", "HEMI")
145-
lamp_data.energy = 0.3
149+
lamp_data.energy = 0.1
146150
lamp_data.use_specular = False
147151

148152
lamp_object = self.create_scene_object(context, 'LightDome', lamp_data)

rct-graphics-helper/operators/init_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def execute(self, context):
3939
# Anti-aliasing
4040
context.scene.render.use_antialiasing = True
4141
context.scene.render.pixel_filter_type = "BOX"
42-
context.scene.render.antialiasing_samples = "8"
42+
context.scene.render.antialiasing_samples = "5"
4343
context.scene.render.filter_size = 1.4
4444

4545
# Create render layers

rct-graphics-helper/operators/vehicle_render_operator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ def add_render_angles(self, context, is_inverted=False, animation_frames=1):
108108
if track_section[0]:
109109
base_view_angle = 45
110110
self.task_builder.set_rotation(
111-
base_view_angle, -track_section[3] - extra_roll, track_section[2], track_section[4])
111+
base_view_angle, -track_section[3] + extra_roll, track_section[2], track_section[4])
112112

113113
if key == "VEHICLE_SPRITE_FLAG_RESTRAINT_ANIMATION":
114114
for j in range(3):
115115
for k in range(track_section[1]):
116116
for l in range(animation_frames):
117117
self.task_builder.set_rotation(
118-
base_view_angle + k / track_section[1] * 360, -track_section[3] - extra_roll, track_section[2], track_section[4])
118+
base_view_angle + k / track_section[1] * 360, -track_section[3] + extra_roll, track_section[2], track_section[4])
119119
self.task_builder.add_viewing_angles(
120120
1, animation_frames + j, 1)
121121
else:

rct-graphics-helper/renderer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, context, palette_manager):
3838
self.context = context
3939

4040
self.magick_path = "magick"
41-
self.floyd_steinberg_diffusion = 0
41+
self.floyd_steinberg_diffusion = 5
4242

4343
self.palette_manager = palette_manager
4444

@@ -51,7 +51,8 @@ def __init__(self, context, palette_manager):
5151
if self.world_position_material == None:
5252
materials_builder = MaterialsBuilder()
5353
materials_builder.create_world_position_material(context)
54-
self.world_position_material = find_material_by_name("WorldPosition")
54+
self.world_position_material = find_material_by_name(
55+
"WorldPosition")
5556

5657
self.lens_shift_y_offset = round(bpy.data.cameras["Camera"].shift_y *
5758
context.scene.render.resolution_x)

0 commit comments

Comments
 (0)