Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show collidable geo from Tricoll #5

Open
snake-biscuits opened this issue May 23, 2023 · 5 comments
Open

Show collidable geo from Tricoll #5

snake-biscuits opened this issue May 23, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request Navmesh feature related to navmesh generation Reverse Engineering feature related to reverse engineering .bsp Speedrunning feature related to speedrun routing Titanfall Related to Titanfall Titanfall 2 Related to Titanfall 2

Comments

@snake-biscuits
Copy link
Owner

We can get interpret TricollTriangles now!
You can filter for TextureData to find invisible collision objects (nodraw tricoll, playerclip brushes etc.)

>>> import bsp_tool
>>> bsp = bsp_tool.load_bsp("E:/Mod/Titanfall2/maps/sp_training.bsp")
>>> bsp.TRICOLL_HEADERS
<BspLump(3264 TricollHeader) at 0x000001A9157D7DC0>
>>> [i for i, h in enumerate(bsp.TRICOLL_HEADERS) if h.scale != 0][0]
1
>>> bsp.TRICOLL_HEADERS[0]
TricollHeader(flags=0, texture_flags=<MeshFlags.VERTEX_UNLIT_TS|VERTEX_UNLIT|VERTEX_LIT_BUMP|128: 1664>,
              texture_data=1, num_vertices=4, num_triangles=2, num_bevel_indices=0,
              first_vertex=1, first_triangle=0, first_node=0, first_bevel_index=0,
              origin=vec3(0.0, 0.0, 0.0), scale=0.0)
>>> bsp.TRICOLL_HEADERS[1]
TricollHeader(flags=0, texture_flags=<MeshFlags.VERTEX_UNLIT_TS|VERTEX_UNLIT|VERTEX_LIT_BUMP|128: 1664>,
              texture_data=1, num_vertices=10, num_triangles=10, num_bevel_indices=0,
              first_vertex=5, first_triangle=2, first_node=0, first_bevel_index=0,
              origin=vec3(91264.0, 9216.0, 22144.0), scale=16.0)
>>> bsp.TEXTURE_DATA_STRING_DATA[bsp.TEXTURE_DATA[1].name_index]
'TOOLS\\TOOLSNODRAW'
@snake-biscuits snake-biscuits added the enhancement New feature or request label May 23, 2023
@snake-biscuits snake-biscuits self-assigned this May 23, 2023
@snake-biscuits
Copy link
Owner Author

pretty much only useful for speedrunners, but if we can filter out decals & other non-collidable geo that'd be nice too

@snake-biscuits
Copy link
Owner Author

snake-biscuits commented May 23, 2023

tricoll might also include static prop collision? idk tho

@snake-biscuits
Copy link
Owner Author

tricoll might also include static prop collision? idk tho

Nope! static prop collision is loaded "dynamically"
Presumably so props can be edited without recompiling

@snake-biscuits
Copy link
Owner Author

pretty much only useful for speedrunners, but if we can filter out decals & other non-collidable geo that'd be nice too

I plan to group decals & godrays / glow effect shapes into their own meshes
Same with transparent meshes (can take advantage of per-mesh transparency flags)

IDK if speedrunners have been looking for specific physics info in Blender
Importing static props could save them some time with routes that look clear, but aren't
Probably worth asking what upgrades people would like to see in the TF2|SR Discord

@snake-biscuits
Copy link
Owner Author

Might make sense to make loading Tricoll a part of the "Speedrun Preset" (see #3)

@snake-biscuits snake-biscuits added Titanfall Related to Titanfall Titanfall 2 Related to Titanfall 2 labels Aug 12, 2023
@snake-biscuits snake-biscuits added Reverse Engineering feature related to reverse engineering .bsp Speedrunning feature related to speedrun routing Navmesh feature related to navmesh generation labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Navmesh feature related to navmesh generation Reverse Engineering feature related to reverse engineering .bsp Speedrunning feature related to speedrun routing Titanfall Related to Titanfall Titanfall 2 Related to Titanfall 2
Projects
Status: Todo: Research
Development

No branches or pull requests

1 participant