feat: portalisation#152
Draft
JarrodDoyle wants to merge 51 commits into
Draft
Conversation
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.
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.
No more dodgy slithers
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aims to add portalisation, ideally with results similar to those of
optimizein 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.