Skip to content

feat: portalisation#152

Draft
JarrodDoyle wants to merge 51 commits into
mainfrom
feature/portalising
Draft

feat: portalisation#152
JarrodDoyle wants to merge 51 commits into
mainfrom
feature/portalising

Conversation

@JarrodDoyle
Copy link
Copy Markdown
Owner

@JarrodDoyle JarrodDoyle commented Feb 28, 2026

Aims to add portalisation, ideally with results similar to those of optimize in DromEd.

Current state:
Portalisation "succeeds" for every mission I throw at it, but the results are buggy in some spots (miscategorisation of some surfaces, and holes in geo (which I think is what's leading to cell cycle and rendering errors)). Basic WorldAlign texture mapping is in. Basic optimiser (worse results than DromEd, but considerably better than a raw portalise). No lightmap sizing.

@JarrodDoyle JarrodDoyle added the enhancement New feature or request label Feb 28, 2026
Actually duplicates the poly for each side with the details flipped.
Another option would be to handle the flipping when actually building
cells (or currently just exporting the mesh). Might go that way in the
future to make tjunction fixing easier.
Also fixes a collision bug weirdly
Ideally a lot of this could be on the Cell structure itself
The rightnode of a poly doesn't necessarily point to the "head" of the
cell, so we need to make sure all bsp nodes that are part of the cell
have the cell ID not just the head.
Removes points from the merged winding if they would be colinear.
Basically allows for the poly to be merged into multiple times across a
same edge that grows.
If you merge a poly, that newly merged poly needs to be rechecked
against all other polys duh! Lower epsilon also makes the merging more
consistent.
JarrodDoyle added 22 commits May 4, 2026 20:27
Adds a lot more code, but makes it flexible to arbitrary split plane
selection rather than brush by brush. Right now I'm still just choosing
the first available split plane, but I did a proof of concept with other
split choices and the output was still valid.
Also sneaks in some refactoring to remove a redundant medium field.
This fixes collision issues, holes in geometry, and classification
issues. Feels disgusting, but it is what it is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant