Skip to content

Commit acaab81

Browse files
committed
fix
1 parent 8080a6c commit acaab81

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

skybox_blender.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def render_cubemap_face(output_dir, skyname, camera_rot, face_name):
4949
"LF": (1.5708, 0, -1.5708), # Front
5050
"RT": (1.5708, 0, 1.5708), # Left
5151
"FT": (1.5708, 0, 0), # Right
52-
"UP": (0, 3.14159, 0), # Up
53-
"DN": (0, 0, 3.14159), # Down
52+
"UP": (0, 3.14159, -1.5708), # Up
53+
"DN": (0, 0, 1.5708), # Down
5454
}
5555

5656
# Loop through each face and render it

skybox_generate_vmt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import bpy
23

34
# Function to generate a VMT file for each cubemap face
45
def generate_vmt(skybox_name, output_dir):

skybox_stiched.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
from PIL import Image
2+
import bpy
3+
import os
24

35
# Define the filenames for the six skybox textures
46
# Set your skybox name here
@@ -38,12 +40,12 @@
3840
# [Front, Left, Back, Right]
3941
# [ X, X, Down, X ]
4042

41-
output_image.paste(up, (2 * width, 0 * height)) # Up
43+
output_image.paste(up, (3 * width, 0 * height)) # Up
4244
output_image.paste(front, (0 * width, 1 * height)) # Front
4345
output_image.paste(left, (1 * width, 1 * height)) # Left
4446
output_image.paste(back, (2 * width, 1 * height)) # Back
4547
output_image.paste(right, (3 * width, 1 * height)) # Right
46-
output_image.paste(down, (2 * width, 2 * height)) # Down
48+
output_image.paste(down, (3 * width, 2 * height)) # Down
4749

4850
# Save the final composite image as a .TGA file
4951
output_image.save(f"{path}/{skyname}_stitched.tga")

0 commit comments

Comments
 (0)