LOD slicing, UV mapping and orthographic scale#4
Open
memo33 wants to merge 30 commits intoGoldenQubicle:masterfrom
Open
LOD slicing, UV mapping and orthographic scale#4memo33 wants to merge 30 commits intoGoldenQubicle:masterfrom
memo33 wants to merge 30 commits intoGoldenQubicle:masterfrom
Conversation
This now allows non-square output and fits better around the LOD.
This should help with finding UV-mapping coordinates for the sliced LODs, as they can be obtained from `sliced_lod.matrix_local`.
Detached parts of LOD not intersecting canvas tile frame would otherwise not be selected, which would immediately fail for zoom 1.
This could otherwise lead to conflicts if some zooms/rotations use nodes and subsequent zooms/rotations or later renders/previews do not use nodes. Depending on whether nodes are used for anything else in the future, this may need to be changed so that all zooms/rotations do use nodes, but for now there is no need for nodes.
Especially for zooms 1 to 3, the orthographic scale was quite a bit off. For zooms 4 and 5, it is more precise now as well. The general approach follows code contained in BAT4Max 5, using a 16×16 reference cell, which renders with specific widths in pixels. The results were verified using a pixel grid as UV-map, which resulted in a pixel-perfect display in game.
Author
|
This PR is based on #3. I've verified that the orthographic scale is now correct by applying a "pixel-grid" texture to an exported object. For each zoom, this displays each individual pixel without any irregularities. |
The fix is to render the full image (instead of 256×256 tiles) to avoid artifacts introduced by denoising filter at the border of 256×256 tiles when these are rendered one-by-one. This now renders the full image, applies a denoising filter to the full image if any, and cuts the image into 256×256 pieces as a final post-processing step.
Author
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.



This PR implements several things:
Conversion of exported .obj model files to S3D is implemented in fshgen 0.2.0+.