ShadowEnvironments #120
snake-biscuits
started this conversation in
Active
Replies: 3 comments 2 replies
-
|
from before identifying patterns: // sp_skyway_v1
int[6] + char[12]
// X1 | Y1 | Z1 | X2 | Y2 | Z2 | char[12]
[( 0, 0, 0, 3818, 5890, 22, F4 67 63 BF 78 50 5E BE 93 34 CF BE),
(3818, 5890, 22, 3819, 5892, 23, DB 66 21 BF D6 39 DA 3E 5F 12 26 BF),
(3819, 5892, 23, 3931, 5985, 24, 76 8A 60 3F 30 A2 D8 3E 25 B8 68 BE),
(3931, 5985, 24, 3989, 6185, 25, 83 D1 32 3F 76 D6 03 3F 49 64 FE BE)]
// ^ " ".join([f"{i:02X}" for i in char_12])struct Abstract {
uint32_t first_[3];
uint32_t num_[3];
Vector sun_normal;
};Identifed structure: struct ShadowEnvironment {
int32_t first_unknown[2];
int32_t first_shadow_mesh;
int32_t num_unknown[2];
int32_t num_shadow_meshes;
float angle_vector[3];
}; |
Beta Was this translation helpful? Give feedback.
1 reply
-
Old video from BobTheBob: hex-editing
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Generating a # bsp_tool.extensions.convert.respawn
# ShadowEnvironment
light_env = [e for e in r1_bsp.ENTITIES if e["classname"] == "light_environment"][0] # get sun
# get angles, with defaults
pitch, yaw, roll = map(float, light_env.get("angles", "0 0 0").split())
pitch = float(light_env.get("pitch", pitch)) # pitch key overrides; TODO: unless 0 (default value)
# rotate default vector (east) in angles order
sun_vector = vec3(1, 0, 0).rotate(y=pitch)
sun_vector = sun_vector.rotate(z=yaw)
# generate a basic ShadowEnvironment
shadow_env = r2.ShadowEnvironment(
first_csm_aabb_node=0, first_csm_obj_reference=0, first_shadow_mesh=0,
last_csm_aabb_node=1, last_csm_obj_reference=0, last_shadow_mesh=len(r1_bsp.SHADOW_MESHES),
sun_normal=sun_vector)
r1_bsp.SHADOW_ENVIRONMENTS = [shadow_env]
light_env["lightEnvironmentIndex"] = "*0" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Titanfall 2 introduces the
light_environment_volumeentityBy creating a group entity out of triggers, the mapper can define a region of map which uses it's own
light_environmentsp_crashsite("BT-7274"), the first map of the campaign utilises this to have both day & night segments in the same map.Beta Was this translation helpful? Give feedback.
All reactions