Repository navigation
Conversation
The PS1 can't repeat a texture across a polygon, so UVs outside [0,1] were clamped: courtyard's floor drew as one flat colour and the bricks stretched. Textured triangles spanning more than one copy are now cut along the integer U and V lines and each piece is shifted back into [0,1]. The BVH is built over the exported triangles, since the engine indexes them by Tri order. Faces that fit one copy are unchanged: anim, cutscene, light, skin and ui export byte-identical. Courtyard goes from 448 to 2248 triangles.
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.
The PS1 can't repeat a texture across a polygon, so the exporter clamped UVs outside [0,1]. Courtyard's UVs repeat up to 9 times across a face, so in game the floor was one flat colour and the bricks stretched, while the Scene view repeated them.
Textured triangles that span more than one copy are now cut along the integer U and V lines, and each piece is shifted back into [0,1]. The BVH is built over the exported triangles, because the engine indexes them in that order. Faces that already fit one copy are unchanged: anim, cutscene, light, skin and ui export byte-identical. Courtyard goes from 448 to 2248 triangles.