Jump to content
  • 0

[WiP] Community shader PBR support


Exist

Question

Hi, writing about support for the new Community Shaders PBR assets. Hopefully not much would be needed from your side. I will mention some facts I believe are causing issues with LODs. Because the PBR textures are incompatible with vanilla, we use unique paths (textures/pbr/ prefix) to avoid unintended meshes from using one of them and looking wrong. Meshes that use PBR can be distinguished by the Unused01 property in Shader Flags 2. PBR albedo is brighter than vanilla diffuse and is saved in dds with the sRGB flag, which converts it to linear on the gpu. Now the problems:

  1. Some object LODs seem to be using regular textures, for example mountains. Because LODs won't use the PBR shader, using unmodified PBR textures makes it look wrong. This is our issue and I think authors can just generate lower res textures in the vanilla paths that will only be used for these LODs. I don't know how many LODs actually use regular textures but hope not many.
  2. TexGen seems to ignore PBR textures. I suppose TexGen always uses vanilla paths and ignores Texture Set records, otherwise I don't know why this would happen. In this case it would be nice to take texture set paths into account, or check if a PBR path exists before vanilla one. For landscapes we could also have authors generate low res versions at vanilla paths, but it's not viable to do this for everything.
  3. DynDOLOD uses PBR textures, but probably because of the sRGB flag (which converts them to linear) the LODs are too dark. This happens to tree LODs, objects such as farmhouses and nordic ruins seem good, but not sure. This would probably happen in the textures in the previous point too if they weren't ignored. From our experiments vanilla diffuse is roughly halfway between usual PBR albedo brightness in linear and sRGB. So it would be best to do something like apply power of 1/1.5 to make the brightness consistent with vanilla. Ideally it could be multiplied with ambient occlusion and adjusted based on metalness which are in another texture, but that's not needed.

Hopefully I got the reasons for why it doesn't work right, I will include some comparison screenshots and links to PBR assets so you can try it yourself. Thank you for taking the time to read this and I hope this can be supported. Oh and feel free to ping me or others on CS or Cathedral discord, I might forget to check back here for some time.

https://imgsli.com/Mjg5ODQ5
https://imgsli.com/Mjg5ODUy
https://imgsli.com/Mjg5ODU0
https://imgsli.com/Mjg5ODU1

More info about our PBR implementation: https://github.com/doodlum/skyrim-community-shaders/wiki/True-PBR

Some assets to try:

Trees - https://mega.nz/file/dqdzGLwY#jBJFwPIWv7iX314UEKZnHCRvlITLbXI7saLY-4oV6Nw

Farmhouses - https://mega.nz/file/duUxDKiA#mnzDzjBFXEIDq-MFoucOHRJT55wOmbUNHOLZ5JxG3lY

Lots of other stuff - https://onedrive.live.com/?authkey=!AB5oYH6iqIMDkHM&id=C23FB01B59FA671C!2427&cid=C23FB01B59FA671C

Link to comment
Share on other sites

  • Answers 31
  • Created
  • Last Reply

Top Posters For This Question

Recommended Posts

  • 0

This warrants its own thread.

I will have a look at this and see what we can do.

Just to make sure, there is currently no plan to add PBR shader support to object LOD, right? We just want LOD to work as is by just "adjusting" the textures.
This only is about the diffuse texture.

2. TexGen works of config text files to stitched textures and special NIFs to render stuff.
3. DynDOLOD uses info from TexGen config files to support and create stitched textures based for TextureSets on the fly as needed.

Link to comment
Share on other sites

  • 0
On 8/21/2024 at 10:14 PM, Exist said:

Thank you.

Yes, there are no plans for PBR LOD shader. I will look at the config files.

You will not need to do anything about that right now, if ever.

For now I will have this for the next alpha release for you to test:

The tools now support using signed DXT1 (BC1), DXT3 (BC2), DXT5 (BC3) textures. BC7 signed was already supported, in case there was a bug that caused them to have wrong brightness, it should be resolved. ATM, there is no additional brightness changes. The textures will look the same as the game shows the sRGB textures natively without community shaders.

TexGen will automatically generate pbr versions for stitched and rendered object LOD textures if any of the used full textures have a pbr version.
Since billboards are rendered from full models there should be nothing else needed to be done.

DynDOLOD will automatically use the pbr textures for the LOD models in case the full model uses pbr textures.
DynDOLOD should also properly create any of the on-demand pbr versions for texture sets.

Will have too see if we can do something automatic about 3D tree LOD assets.

Link to comment
Share on other sites

  • 0

Please test with Alpha-179 that object LOD is matching better now.

If there are issues, post screenshot of LOD and full model with more informative console information showing and upload the TexGen/DynDOLOD log and debug log.

It is possible that texture-set replacements may not yet be recognized properly. Still testing.

I'll look into updating xLODGen support next.

Link to comment
Share on other sites

  • 0

Hi Sheson, I was trying to generate texgen using the PBR trees but I can't tell if this means its not picking up the pbr? Or if it means its just ignoring the regular textures?

file:///D:/Forge/Tools/DynDOLOD/Summary/TexGen_Index.html

 

Specifically the error says it is occurring with this file path 

Quote
Error: File not found textures\landscape\trees\northern hemispheres\aspenbark.dds. Used by dyndolod\render\billboards\dyndolod\lod\trees\dlc1treewinteraspensnow01_4eaf2dff_trunk.nif

 

Edited by Bottle
Link to comment
Share on other sites

  • 0
7 hours ago, Bottle said:

Hi Sheson, I was trying to generate texgen using the PBR trees but I can't tell if this means its not picking up the pbr? Or if it means its just ignoring the regular textures?

file:///D:/Forge/Tools/DynDOLOD/Summary/TexGen_Index.html

Specifically the error says it is occurring with this file path 

See https://dyndolod.info/Messages/File-Not-Found-Textures

dlc1treewinteraspensnow01_4eaf2dff_trunk.nif ships with Happy Little Trees Add-On - DynDOLOD 3. It requires Happy Little Trees to be installed.
landscape\trees\northern hemispheres\aspenbark.dds ships with Happy Little Trees. Make sure the mod with all its assets is installed.

The texture needs to be installed, so the trunk for the LOD assets using them can be rendered.
Do not modify the LOD assets included Happy Little Trees Add-On - DynDOLOD 3.

For future reference see https://dyndolod.info/Official-DynDOLOD-Support-Forum#Post-Logs
You can not link local files, you would need to upload them.

Link to comment
Share on other sites

  • 0

xLODGen terrain LOD beta 117 should now convert sRGB textures to linear.

It is using Texconv for that which is hardcoded to 2.2. In case that is not good enough we can check for alternative methods or adding an option to Texconv. Post screenshots of terrain LOD in that case.

Link to comment
Share on other sites

  • 0

Test version of TexGen/DynDOLOD https://mega.nz/file/hNJ2ULbB#CUl8Eu_8TzRwZWj7x31SqMgwQ-BwMR8JwawWRyevKJ

added sRGB to linear conversion to (hopefully) all texture paths
OpenGL shader gamma value set with sRGBGamma in TexGen/DynDOLOD INIs
use specular channel from _rmaos.dds for rendered textures, todo for stitched
added the texture set automatic replacements that were missing

Link to comment
Share on other sites

  • 0
On 8/26/2024 at 10:27 PM, sheson said:

Test version of TexGen/DynDOLOD https://mega.nz/file/hNJ2ULbB#CUl8Eu_8TzRwZWj7x31SqMgwQ-BwMR8JwawWRyevKJ

added sRGB to linear conversion to (hopefully) all texture paths
OpenGL shader gamma value set with sRGBGamma in TexGen/DynDOLOD INIs
use specular channel from _rmaos.dds for rendered textures, todo for stitched
added the texture set automatic replacements that were missing

Are these expecting a sideloaded debugger? ("Debug Waiting for ESC")

Link to comment
Share on other sites

  • 0


Got repeatable crash.

Currently re-trying without Freak's Floral Fields.

[03:21] Access violation at address 0000000000410070 in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\terrain\lodgen\freak's floral fields.esp\buttercupdrj_000009a7
[03:21] [WriteSummaries] <Debug: "File Not Found Textures;https://dyndolod.info/Messages/File-Not-Found-Textures">
[03:21] 00000000 ???                                         
010b6bce TexGenx64.exe DynDOLODResourceStrings   957 dynMessageDialog
010acb8e TexGenx64.exe xeMainForm              21934 TLODGenThread.Execute
005e0120 TexGenx64.exe System.Classes          15711 ThreadProc
0042b845 TexGenx64.exe BrainMM                  2540 BrainMMThreadProxy
0041336a TexGenx64.exe System                  25343 ThreadWrapper
00512e99 TexGenx64.exe madExcept                     ThreadExceptFrame
7ff961f4 KERNEL32.DLL                                BaseThreadInitThunk
7ff96370 ntdll.dll                                   RtlUserThreadStart
[03:21] [TMessageDialog.Dialog] <Debug: Creating TTaskDialog>
[03:21] [TMessageDialog.Dialog] <Debug: [TMessageDialog.Dialog] Executing TTaskDialog>
[03:21] TexGen completed successfully
[03:21] Created a summary of log messages D:\opt\DynDOLOD\Summary\TexGen_Index.html.
Access violation at address 0000000000410070 in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\terrain\lodgen\freak's floral fields.esp\buttercupdrj_000009a7
Error: Access violation at address 0000000000410070 in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\terrain\lodgen\freak's floral fields.esp\buttercupdrj_000009a7.


https://ufile.io/q2cfvmzx

Link to comment
Share on other sites

  • 0
7 minutes ago, Dowser said:


Got repeatable crash.

Currently re-trying without Freak's Floral Fields.

[03:21] Access violation at address 0000000000410070 in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\terrain\lodgen\freak's floral fields.esp\buttercupdrj_000009a7
[03:21] [WriteSummaries] <Debug: "File Not Found Textures;https://dyndolod.info/Messages/File-Not-Found-Textures">
[03:21] 00000000 ???                                         
010b6bce TexGenx64.exe DynDOLODResourceStrings   957 dynMessageDialog
010acb8e TexGenx64.exe xeMainForm              21934 TLODGenThread.Execute
005e0120 TexGenx64.exe System.Classes          15711 ThreadProc
0042b845 TexGenx64.exe BrainMM                  2540 BrainMMThreadProxy
0041336a TexGenx64.exe System                  25343 ThreadWrapper
00512e99 TexGenx64.exe madExcept                     ThreadExceptFrame
7ff961f4 KERNEL32.DLL                                BaseThreadInitThunk
7ff96370 ntdll.dll                                   RtlUserThreadStart
[03:21] [TMessageDialog.Dialog] <Debug: Creating TTaskDialog>
[03:21] [TMessageDialog.Dialog] <Debug: [TMessageDialog.Dialog] Executing TTaskDialog>
[03:21] TexGen completed successfully
[03:21] Created a summary of log messages D:\opt\DynDOLOD\Summary\TexGen_Index.html.
Access violation at address 0000000000410070 in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\terrain\lodgen\freak's floral fields.esp\buttercupdrj_000009a7
Error: Access violation at address 0000000000410070 in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\terrain\lodgen\freak's floral fields.esp\buttercupdrj_000009a7.


https://ufile.io/q2cfvmzx

Also upload bugreport.txt and the normal TexGen log. See https://dyndolod.info/Official-DynDOLOD-Support-Forum#Post-Logs

Link to comment
Share on other sites

  • 0


And another. 

https://ufile.io/779ev0b4

[05:54] Access violation at address 0000000000411C1C in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\lod\windhelmlod
[05:54] TexGen completed successfully
[05:54] Created a summary of log messages D:\opt\DynDOLOD\Summary\TexGen_Index.html.
Access violation at address 0000000000411C1C in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\lod\windhelmlod
tError: Access violation at address 0000000000411C1C in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\lod\windhelmlod.

Link to comment
Share on other sites

  • 0
3 minutes ago, Dowser said:


And another. 

https://ufile.io/779ev0b4

[05:54] Access violation at address 0000000000411C1C in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\lod\windhelmlod
[05:54] TexGen completed successfully
[05:54] Created a summary of log messages D:\opt\DynDOLOD\Summary\TexGen_Index.html.
Access violation at address 0000000000411C1C in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\lod\windhelmlod
tError: Access violation at address 0000000000411C1C in module 'TexGenx64.exe'. Read of address FFFFFFFFFFFFFFFF while processing D:\opt\DynDOLOD\TexGen_Output\textures\lod\windhelmlod.

Also upload bugreport.txt and the normal TexGen log. See https://dyndolod.info/Official-DynDOLOD-Support-Forum#Post-Logs

Did you change the load order or is the texture random?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.