diff options
Diffstat (limited to 'doc/testplans')
-rw-r--r-- | doc/testplans/pbr_materials.md | 12 | ||||
-rw-r--r-- | doc/testplans/pbr_terrain_appearance.md | 34 | ||||
-rw-r--r-- | doc/testplans/pbr_terrain_composition.md | 30 | ||||
-rw-r--r-- | doc/testplans/pbr_terrain_paintmap.md | 48 |
4 files changed, 120 insertions, 4 deletions
diff --git a/doc/testplans/pbr_materials.md b/doc/testplans/pbr_materials.md new file mode 100644 index 0000000000..1ef7945b94 --- /dev/null +++ b/doc/testplans/pbr_materials.md @@ -0,0 +1,12 @@ +# PBR Materials + +## KHR Texture Transforms + +Texture repeats for PBR materials on prims are based on the [KHR\_texture\_transform](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_transform) spec, and thus should be expected to behave according to the spec. We currently suport offset, rotation, and scale from the spec. texCoord is not currently supported. + +PBR materials should have approximately correct lighting based on the normal texture: + +- With default texture transforms, assuming the prim or model has correct normals and tangents +- With a texture transform applied, especially rotation or negative scale +- With a texture animation applied via `llSetTextureAnim`, especially a rotation animation + - Note: Texture animations are not guaranteed to loop when a PBR texture transform is applied diff --git a/doc/testplans/pbr_terrain_appearance.md b/doc/testplans/pbr_terrain_appearance.md index f6d54029b5..eab5b8bf44 100644 --- a/doc/testplans/pbr_terrain_appearance.md +++ b/doc/testplans/pbr_terrain_appearance.md @@ -1,13 +1,14 @@ # PBR Terrain Appearance -## Tiling +## Tiling Without Texture Transforms + +This section assumes the PBR terrain of the current region and adjacent regions have the default texture transforms. The southwest corner of a region with PBR materials should exactly match up with the bottom left corner of the material texture(s). -If two adjacent regions have the same PBR terrain settings, then: +If two adjacent regions have the same PBR terrain settings, then there should not be seams between the two regions at their shared border. -- There should not be seams between the two regions at their shared border -- The ground should not suddenly slide beneath the avatar when moving between regions (except due to movement of the avatar, which is not covered by this test plan) +The ground should not suddenly slide beneath the avatar when moving between two PBR terrain regions (except due to movement of the avatar, which is not covered by this test plan) ## Feature Gating @@ -35,3 +36,28 @@ Availability of PBR textures varies by machine and graphics setting: ### PBR Alpha PBR terrain does not support materials with alpha blend or double-sided. In addition, the viewer does not make any guarantees about what will render behind the terrain if alpha is used. + +## PBR Terrain Texture Transforms + +Like PBR materials on prims, PBR terrain repeats are based on the [KHR\_texture\_transform](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_transform) spec, and thus should be expected to behave the same way. We currently suport offset, rotation, and scale from the spec. texCoord is not currently supported. + +The southwest corner of a region, at z=0, is the UV origin for all texture coordinates of the whole region. Unless an offset is also applied, scale and rotation of the terrain texture transforms are relative to that point. + +When an avatar faces north and looks down at flat ground, the textures of the materials should appear to face upright, unless a rotation is applied. + +If triplanar mapping is enabled, and an avatar faces an axially-aligned wall, the textures of the materials should appear to face upright, unless a rotation is applied. + +Textures of materials should not appear mirrored. + +When triplanar mapping is enabled, rotations on the axially aligned walls should apply in the same direction as they would on flat ground. + +## PBR Terrain Normal Textures + +This section assumes terrain normal maps are enabled at the current graphics setting. + +PBR terrain should have approximately correct lighting based on the normal texture: + +- When on flat ground +- On cliffs, when triplanar mapping is enabled. Lighting will be somewhat less accurate when the cliff face is not axially aligned. +- If no Terrain Texture Transform is applied. +- If a Terrain Texture Transform is applied, especially for rotation or negative scale. diff --git a/doc/testplans/pbr_terrain_composition.md b/doc/testplans/pbr_terrain_composition.md index aadd97a94b..bac0e8662e 100644 --- a/doc/testplans/pbr_terrain_composition.md +++ b/doc/testplans/pbr_terrain_composition.md @@ -12,6 +12,10 @@ All tests in this section assume the PBR terrain feature flag is enabled, and th ### Feature Availability +These features are related to UI, where the Region/Estate floater is opened to the terrain Tab. + +#### Feature: PBR Terrain + On the client, the advanced setting `RenderTerrainPBREnabled` is the PBR terrain feature flag. The PBR terrain feature flag should be set automatically when logging in/teleporting to a new region. @@ -29,6 +33,26 @@ When the PBR terrain feature flag is enabled: - The "PBR Metallic Roughness" checkbox should be visible - The user should be able to apply PBR terrain or textures to the region, depending on if the "PBR Metallic Roughness" checkbox is checked. +#### Feature: PBR Terrain Texture Transforms + +On the client, the advanced setting, `RenderTerrainPBRTransformsEnabled` is the PBR terrain texture transform flag. Generally, this feature should not be expected to work correctly unless the PBR terrain feature is also enabled. + +The PBR terrain texture transform flag should be set automatically when logging in/teleporting to a new region. + +- The flag should be enabled on regions where the PBR terrain texture transform feature is enabled +- Otherwise the flag should be disabled + +When the PBR terrain texture transform feature is enabled, the UI of the Terrain tab should be overhauled. Availability of features depends on the type of terrain. + +**Known issue:** The Region/Estate floater may have to be closed/reopened a second time in order for the UI overhaul to take effect, after teleporting between regions that do and do not have the feature flag set. + +When "PBR Metallic Roughness" is checked: + +- There should be a way for the user to change the texture transforms for the terrain in the current region +- For each of the four swatches, the user can change the scale, offset, and rotation of that swatch. Nonuniform scale is allowed + +When "PBR Metallic Roughness" is unchecked, the controls for texture transforms should be hidden. + ### Current Composition Type When the Region/Estate floater is opened to the terrain Tab, the current terrain should be shown in the four swatches, and the "PBR Metallic Roughness" checkbox should be checked or unchecked accordingly. @@ -65,6 +89,12 @@ If saving the terrain fails for any reason, the terrain should not be updated. Unlike a viewer without PBR terrain support, the new viewer will no longer treat textures with alpha channels as invalid. +### Saving PBR Terrain Texture Transforms + +If "PBR Metallic Roughness" checkbox is checked, a user with saving composition permissions should also be allowed to edit and save PBR texture transforms. + +One texture transform may be set for each material swatch. Setting texture transforms for each individual texture on the material is not currently supported. + ## Graphics Features Texture terrain with transparency is not permitted to be applied in the viewer. diff --git a/doc/testplans/pbr_terrain_paintmap.md b/doc/testplans/pbr_terrain_paintmap.md new file mode 100644 index 0000000000..0dab5fc2eb --- /dev/null +++ b/doc/testplans/pbr_terrain_paintmap.md @@ -0,0 +1,48 @@ +# PBR Terrain Paintmap + +## Introduction/Disclaimer + +As of 2024-08-06, PBR terrain painting is **WIP**. Currently, there is only a client-side terrain paintmap, with no way to directly edit it. This document will explain how to informally explore this feature and compare it to the existing heightmap with noise. In the future, a testing document will be added for PBR terrain painting. + +## Background + +Historically, PBR terrain in a region has several parameters for controlling its composition. These are: + +- The four materials +- The elevation of the terrain, which roughly controls the material, with some noise added on top ("heightmap with noise") +- Material Elevation Ranges, which control where the materials start and end + +This allows for some coarse control over terrain composition. For example, you can have one corner of the terrain be a sandy beach and the rest of the coastline be rocky. Or you can have the peaks of your mountains be covered with snow. However, artistic control is limited due to the gradient imposed by the material elevation ranges, and the unpredictability of the noise. + +A terrain painting option would allow for more control over the terrain composition. The first step to getting that working is the paintmap. + +## How to activate the local paintmap + +The local paintmap is a good way to assess the quality of the PBR terrain paintmap. By default, the newly created local paintmap inherits its composition (i.e. where the grass and dirt goes) from the existing terrain. This allows for a direct comparison with the terrain heightmap-with-noise shader. + +Activating the local paintmap is similar to [applying local PBR terrain via the debug settings](https://wiki.secondlife.com/wiki/PBR_Terrain#How_to_apply_PBR_Terrain), but with a couple extra steps. + +You will need: + +- Four fullperm PBR material items to copy UUIDs from +- A region with a good variation of elevations which showcase the four composition layers (no special permissions needed) + +Open the Debug Settings menu (Advanced > Show Debug Settings) and search for "terrain". The following relevant options are available: + +- LocalTerrainAsset1 +- LocalTerrainAsset1 +- LocalTerrainAsset3 +- LocalTerrainAsset4 +- LocalTerrainPaintEnabled +- TerrainPaintBitDepth +- TerrainPaintResolution + +By setting LocalTerrainAsset1, etc to valid material IDs, you will override the terrain to use those materials. + +The next step is to "bake" the terrain into a paintmap (Develop > Terrain > Create Local Paintmap). This will *automatically* set LocalTerrainPaintEnabled to true. **WARNING:** LocalTerrainPaintEnabled will *not* do anything until one of LocalTerrainAsset1, etc is set. + +You are now looking at the same terrain, but rendered as a paintmap. + +To compare the quality of the paintmap version and the heightmap-with-noise version, toggle LocalTerrainPaintEnabled in Debug Settings. + +To change the bit depth and/or resolution of the paintmap, change TerrainPaintBitDepth and TerrainPaintResolution as desired, then "re-bake" the paintmap (Develop > Terrain > Create Local Paintmap). |