sheson Posted September 17, 2023 Author Share Posted September 17, 2023 51 minutes ago, Mousetick said: Good thing you said the changes can be seen in NifSkope. It appears the threshold needs to be increased actually. When I save an edited 3D tree LOD mesh from DynDOLOD Resources, NifSkope tells me "One or more blocks have had their Name sanitized". Is this going to be a problem? For example, treepineforest02passthru_lod.nif: 9 BSTriShape (Name) = 'TreePineForest02_LOD_FLAT:9' 13 BSTriShape (Name) = 'TreePineForest02_LOD_FLAT:13' 17 BSTriShape (Name) = 'TreePineForest02_LOD_FLAT:17' Thanks for your help. Disable Auto Sanitize before Save in the File menu. Link to comment Share on other sites More sharing options...
Mousetick Posted September 17, 2023 Share Posted September 17, 2023 I've gotten even wiser and now I understand the 3D tree LOD textures are generated by LODgen, nothing to do with TexGen. Duh! I initially tried NiAlphaProperty Threshold 112 -> 144, which made a small difference but not enough. So I cranked it up to 176. Comparison in DynDOLOD_Tamriel.dds atlas: 112 > 176 The 3D tree LOD models from DynDOLOD Resources are quite good by themselves, but the difference in "lushiness" between full model and LOD because of the textures was jarring, especially during LOD -> full model transitions: LOD on left half, full on right half: Before (112) > After (176) This is much better, thank you. I may need to crank the threshold up even more, we'll see. I need to apply the same changes to the snowy and ashy variants. And to the aspen trees too, with which I'm using a similarly very thin, very transparent texture replacer. The other hurdle I've been facing is the brightness of the tree LODs. I'm confused by all the options: Direct & Ambient lighting settings in TexGen. Billboard brightness* setting in DynDOLOD. CrownBrightness, TrunkBrightness and FlatTrunkBrightness settings in DynDOLOD_[GAMEMODE].ini: ; Vertexcolor multipliers for tree LOD models used in object LOD, see https://dyndolod.info/Help/Ultra-Tree-LOD CrownBrightness=1 TrunkBrightness=1 FlatTrunkBrightness=1 My understanding is that the CrownBrightness, TrunkBrightness, and FlatTrunkBrightness are used exclusively with 3D tree LOD, which is not affected by Billboard brightness. I'm going to try and lower them because I think my Level0 tree LODs look too bright compared to full models. Conversely Billboard brightness only affects the brightness of Ultra Tree LODs using billboards. What to do with the TexGen settings, how do they interact/combine with the Ultra Tree LOD Billboard brightness? Should they be left alone, at default, and brightness be adjusted only in DynDOLOD? * By the way, there is small typo in the tooltip for this setting: "Adjust brighntess of tree LOD billboards [...]" Thanks. Link to comment Share on other sites More sharing options...
sheson Posted September 17, 2023 Author Share Posted September 17, 2023 14 minutes ago, Mousetick said: I've gotten even wiser and now I understand the 3D tree LOD textures are generated by LODgen, nothing to do with TexGen. Duh! https://dyndolod.info/Help/LODGen LODGen is a command line tool that generates terrain LOD and object LOD meshes. 21 minutes ago, Mousetick said: Direct & Ambient lighting settings in TexGen. Billboard brightness* setting in DynDOLOD. CrownBrightness, TrunkBrightness and FlatTrunkBrightness settings in DynDOLOD_[GAMEMODE].ini: ; Vertexcolor multipliers for tree LOD models used in object LOD, see https://dyndolod.info/Help/Ultra-Tree-LOD CrownBrightness=1 TrunkBrightness=1 FlatTrunkBrightness=1 My understanding is that the CrownBrightness, TrunkBrightness, and FlatTrunkBrightness are used exclusively with 3D tree LOD, which is not affected by Billboard brightness. I'm going to try and lower them because I think my Level0 tree LODs look too bright compared to full models. Conversely Billboard brightness only affects the brightness of Ultra Tree LODs using billboards. What to do with the TexGen settings, how do they interact/combine with the Ultra Tree LOD Billboard brightness? Should they be left alone, at default, and brightness be adjusted only in DynDOLOD? * By the way, there is small typo in the tooltip for this setting: "Adjust brighntess of tree LOD billboards [...]" Thanks. https://dyndolod.info/Help/TexGen#Grass-HD-Grass-Tree-HD-Tree-Rendered Tree LOD billboards are required for standard tree LOD generation or ultra tree LOD generation. HD Tree LOD billboards are for the optional ultra tree LOD generation. Rendered billboards are for the optional ultra tree LOD generation. They are rendered from special models in the ..\DynDOLOD\Edit Scripts\DynDOLOD\Render\Billboards\ folder. They generate trunk textures for hybrid tree LOD models for example. Use the preview buttons to see. Link to comment Share on other sites More sharing options...
Mousetick Posted September 17, 2023 Share Posted September 17, 2023 2 hours ago, sheson said: https://dyndolod.info/Help/LODGen LODGen is a command line tool that generates terrain LOD and object LOD meshes. Well this goes to show I'm still very much ignorant. The pine branches LOD textures found in the DynDOLOD object LOD atlas clearly show they are a downsampled version of the original treepineforestbranchcomp.dds texture, taking into account the NiAlphaProperty threshold of the 3D tree LOD models. I have not run TexGen since one month ago. So they must be generated by something, which is neither TexGen nor LODgen. But what exactly shall remain a mystery. Maybe Texconv during DynDOLOD generation. treepineforestbranchcomp.dds > DynDOLOD_Tamriel.dds 2 hours ago, sheson said: https://dyndolod.info/Help/TexGen#Grass-HD-Grass-Tree-HD-Tree-Rendered Tree LOD billboards are required for standard tree LOD generation or ultra tree LOD generation. HD Tree LOD billboards are for the optional ultra tree LOD generation. Rendered billboards are for the optional ultra tree LOD generation. They are rendered from special models in the ..\DynDOLOD\Edit Scripts\DynDOLOD\Render\Billboards\ folder. They generate trunk textures for hybrid tree LOD models for example. I'm sorry but this doesn't help at all. I was wondering how the Direct + Ambient lighting settings in TexGen, which indirectly affect brightness, and the Billboard brightness setting in DynDOLOD, affect each other in combination, and how/why one might be used rather than the other. https://dyndolod.info/Help/TexGen: Quote Direct, Ambient, Smoothness These settings change the direct (default from top) and ambient lighting strength for the created diffuse texture and the smoothness of the created normal map textures. Lower numbers mean less light strength = darker. https://dyndolod.info/Help/Ultra-Tree-LOD Quote Billboard Brightness Use the Billboard brightness dropdown on the advanced mode in case the tree LOD billboards are too dark or too bright. But it's ok. I appreciate the time and patience you've given me, especially during a week-end. I won't be bothering you any more and wasting your time with "stupid" questions. Link to comment Share on other sites More sharing options...
sheson Posted September 17, 2023 Author Share Posted September 17, 2023 41 minutes ago, Mousetick said: Well this goes to show I'm still very much ignorant. The pine branches LOD textures found in the DynDOLOD object LOD atlas clearly show they are a downsampled version of the original treepineforestbranchcomp.dds texture, taking into account the NiAlphaProperty threshold of the 3D tree LOD models. I have not run TexGen since one month ago. So they must be generated by something, which is neither TexGen nor LODgen. But what exactly shall remain a mystery. Maybe Texconv during DynDOLOD generation. treepineforestbranchcomp.dds > DynDOLOD_Tamriel.dds I'm sorry but this doesn't help at all. I was wondering how the Direct + Ambient lighting settings in TexGen, which indirectly affect brightness, and the Billboard brightness setting in DynDOLOD, affect each other in combination, and how/why one might be used rather than the other. https://dyndolod.info/Help/TexGen: https://dyndolod.info/Help/Ultra-Tree-LOD But it's ok. I appreciate the time and patience you've given me, especially during a week-end. I won't be bothering you any more and wasting your time with "stupid" questions. https://dyndolod.info/Help/3D-Tree-LOD-Model DynDOLOD reads the alpha threshold from the NiAlphaProperty from the models used for LOD and adjusts the textures before it is added to the atlas texture https://dyndolod.info/DynDOLOD-Reference ... xLODGen scans the world for applicable references, builds the required texture atlases ... DynDOLOD improves the texture atlas creation. https://dyndolod.info/DynDOLOD-Reference#8-Generate-object-LOD In 3D there is by default a direct light (sun) and ambient light. You can see/test this better in NifSkope but also in the TexGen preview. Ambient comes from all directions so its like brightness of the scene and direct light illuminates things from a specific direction. This controls the 3D scene for the render. Normal maps are a bump map, so the smoothness controls the max height of the rendered bump map. Again, this can be previewed in TexGen. These things are fundamental 3D stuff that you can google and then read tons and tons of papers and wikis about it. The brightness drop down for billboards is the same as the xLODGen brightness dropdown and affects the billboard textures before they are being added to the atlas. It a combination of adding (brightness) and multiplying (contrast) that Zilav originally came up with. Link to comment Share on other sites More sharing options...
Mousetick Posted September 18, 2023 Share Posted September 18, 2023 Thanks for your answers. 16 hours ago, sheson said: https://dyndolod.info/Help/3D-Tree-LOD-Model DynDOLOD reads the alpha threshold from the NiAlphaProperty from the models used for LOD and adjusts the textures before it is added to the atlas texture Is there a DynDOLOD configuration setting, like there are in TexGen for Stitched/Rendered textures, to control the size of the generated 3D tree LOD model textures before they're added to the atlas? If not, what is the fixed size? 16 hours ago, sheson said: In 3D there is by default a direct light (sun) and ambient light. You can see/test this better in NifSkope but also in the TexGen preview. Ambient comes from all directions so its like brightness of the scene and direct light illuminates things from a specific direction. This controls the 3D scene for the render. Normal maps are a bump map, so the smoothness controls the max height of the rendered bump map. Again, this can be previewed in TexGen. These things are fundamental 3D stuff that you can google and then read tons and tons of papers and wikis about it. The brightness drop down for billboards is the same as the xLODGen brightness dropdown and affects the billboard textures before they are being added to the atlas. It a combination of adding (brightness) and multiplying (contrast) that Zilav originally came up with. Yes, that's all very clear, thanks. But that still doesn't address my query Let's see if I can formulate it differently: To an uneducated outsider reading the DynDOLOD documentation, both TexGen's Direct/Ambient and DynDOLOD Billboard brightness settings have, superficially, the same effects: TexGen: "Lower numbers mean less light strength = darker." DynDOLOD: "Negative Billboard Brightness values will make the billboard tree LOD darker." Each use their own method (external illumination of 3D model before rendering vs. transformation of texture pixels), but their result is descriptively and in appearance similar. In other words, these features/settings seem redundant to an uneducated outsider, which is the source of my confusion. But they must exist and be provided for separate reasons and purposes. So I'd like you to explain, with your expertise and insight, when should one method be used rather than the other, and why, and whether it makes sense to use both at the same time. Hope this is clearer this time? Thanks for your attention. Link to comment Share on other sites More sharing options...
sheson Posted September 18, 2023 Author Share Posted September 18, 2023 2 hours ago, Mousetick said: Is there a DynDOLOD configuration setting, like there are in TexGen for Stitched/Rendered textures, to control the size of the generated 3D tree LOD model textures before they're added to the atlas? If not, what is the fixed size? https://dyndolod.info/Help/Advanced-Mode#Object-LOD Max tile size LOD sets the maximum resolution a single object LOD texture can occupy on the object LOD texture atlas. Typically set to match the vertical screen resolution, e.g 1024 for 1080p/1440p, 2048 for 2160p etc. Max tile size full sets the maximum resolution a single full texture can occupy on the object LOD texture atlas. Typically set to 1/4 of the vertical screen resolution, e.g. 256 for 1080p/1440p, 512 for 2160p etc. 2 hours ago, Mousetick said: To an uneducated outsider reading the DynDOLOD documentation, both TexGen's Direct/Ambient and DynDOLOD Billboard brightness settings have, superficially, the same effects: TexGen: "Lower numbers mean less light strength = darker." DynDOLOD: "Negative Billboard Brightness values will make the billboard tree LOD darker." Each use their own method (external illumination of 3D model before rendering vs. transformation of texture pixels), but their result is descriptively and in appearance similar. In other words, these features/settings seem redundant to an uneducated outsider, which is the source of my confusion. But they must exist and be provided for separate reasons and purposes. So I'd like you to explain, with your expertise and insight, when should one method be used rather than the other, and why, and whether it makes sense to use both at the same time. Hope this is clearer this time? Thanks for your attention. Shining light onto a 3D model that is the rendered to a texture is fundamentally different to changing the RGB values of a texture. The features are explained for anyone to use how they see fit. Similar results can be achieved if all you want is to make textures bit darker or brighter, however TexGen settings only apply to the textures it generates. Again, the brightness setting in DynDOLOD is the same as from xLODGen. It exists since years before there was TexGen. It applies to all installed billboards. Link to comment Share on other sites More sharing options...
Mousetick Posted September 18, 2023 Share Posted September 18, 2023 1 hour ago, sheson said: https://dyndolod.info/Help/Advanced-Mode#Object-LOD Max tile size LOD sets the maximum resolution a single object LOD texture can occupy on the object LOD texture atlas. Typically set to match the vertical screen resolution, e.g 1024 for 1080p/1440p, 2048 for 2160p etc. Max tile size full sets the maximum resolution a single full texture can occupy on the object LOD texture atlas. Typically set to 1/4 of the vertical screen resolution, e.g. 256 for 1080p/1440p, 512 for 2160p etc. In the case of the downsampled and alpha threshold-adjusted version of treepineforestbranchcomp[snow[l]].dds generated by DynDOLOD for the 3D tree LOD crowns, is this texture considered "a single object LOD texture" or "a single full texture" for adding it to the atlas? 1 hour ago, sheson said: Similar results can be achieved if all you want is to make textures bit darker or brighter, however TexGen settings only apply to the textures it generates. Again, the brightness setting in DynDOLOD is the same as from xLODGen. It exists since years before there was TexGen. It applies to all installed billboards. So my takeaway from all this is that, since 3rd party tree LOD billboards should never be used and tree LOD billboards should always be generated with TexGen, there is no reason to ever use DynDOLOD's brightness setting. Thanks. Link to comment Share on other sites More sharing options...
sheson Posted September 18, 2023 Author Share Posted September 18, 2023 13 minutes ago, Mousetick said: In the case of the downsampled and alpha threshold-adjusted version of treepineforestbranchcomp[snow[l]].dds generated by DynDOLOD for the 3D tree LOD crowns, is this texture considered "a single object LOD texture" or "a single full texture" for adding it to the atlas? treepineforestbranchcomp[snow[l]].dds is obviously not a LOD texture since it doesn't have LOD in the filename. Link to comment Share on other sites More sharing options...
Mousetick Posted September 18, 2023 Share Posted September 18, 2023 10 hours ago, sheson said: treepineforestbranchcomp[snow[l]].dds is obviously not a LOD texture since it doesn't have LOD in the filename. Ok. Out of curiosity, I tried Max tile size full = 512 which theoretically is overkill for my vertical resolution (1200). Even though it expectedly resulted in more details in both shape and color in the atlas, it didn't make any perceptible difference in-game (too far to see). I've increased the alpha threshold up to 224, from the initial 112. This makes the 3D tree LODs almost virtually indistinguishable in-game shape-wise from the full models with regards to skinniness, unless I really focus on them. So I'm pretty happy about the improvement. I'm now preoccupied with the overall/dominant color of the downscaled treepineforestbranchcomp[snow[l]].dds in the atlas. It seems "off" compared to the full texture, it makes the 3D tree LOD branches look "solid/flat" and "blocky" in-game. May I ask which resampling algorithm is used to generate the atlas texture? Comparison: original full 4K | paint.net Bicubic downscale to 256 | DynDOLOD downscale to 256 + alpha filtering Initially I thought DynDOLOD's version had a "brownish" bias (too much red), but the tints appear to be actually correct. It seems to me the actual issue is that the DynDOLOD version has very little gradation in saturation. Every pixel looks to be max saturated. RGB Perceptual Histogram: paint.net Bicubic downscale to 256 | DynDOLOD downscale to 256 + alpha filtering Thanks in advance for your input. Link to comment Share on other sites More sharing options...
sheson Posted September 19, 2023 Author Share Posted September 19, 2023 9 hours ago, Mousetick said: May I ask which resampling algorithm is used to generate the atlas texture? Lanczos in "myfilter" ..\DynDOLOD\Edit Scripts\DynDOLOD\Shaders\stitched.frag If you want to replicate/compare the mipmap generation, also change the alpha of the largest resolution and then of every mipmap that is used. https://dyndolod.info/Help/3D-Tree-LOD-Model Note that by default mipmaps of textures that are added to the tree LOD or object LOD texture atlas are ignored and instead are generated from the largest resolution with an alpha-to-coverage algorithm so that small details do not fade into full transparency the further away they are. To use the mipmaps of the original texture defined by the LOD model, add the term UseMipMaps to the BSTriShape/NiTriShape name. This should preferably be done for all LOD models using this texture. Use an unique filename for such textures, so there are no problems with other mods modifying the same vanilla filenames. Link to comment Share on other sites More sharing options...
Mousetick Posted September 19, 2023 Share Posted September 19, 2023 5 hours ago, sheson said: If you want to replicate/compare the mipmap generation, also change the alpha of the largest resolution and then of every mipmap that is used. I didn't understand, sorry. Why would I need to change the alpha of the original texture, and what would I need to change it to? I don't have the tools to view/compare mipmaps, so this may be moot anyway. 5 hours ago, sheson said: Note that by default mipmaps of textures that are added to the tree LOD or object LOD texture atlas are ignored and instead are generated from the largest resolution with an alpha-to-coverage algorithm so that small details do not fade into full transparency the further away they are. To use the mipmaps of the original texture defined by the LOD model, add the term UseMipMaps to the BSTriShape/NiTriShape name. This should preferably be done for all LOD models using this texture. Use an unique filename for such textures, so there are no problems with other mods modifying the same vanilla filenames. I'd read that before and thought it looked important and relevant to my situation, but most of it flew right over my head. I think it makes more sense now. So the full-on/full-off pixels in DynDOLOD's generated atlas texture are the results of alpha-to-coverage? The mipmaps of the original texture look ok to me in-game at roughly the same viewing distance as LOD Level 4: the branches of the full models are opaque and don't look "decimated". But perhaps the game itself uses alpha-to-coverage for compositing vegetation at small resolution? If that's the case, I'm screwed. Let me give the UseMipMaps a try. Back to NifSkope... So for example, in treepineforest01passthru_lod.nif, I would add UseMipMaps to the crown BSTriShape name: TreePineForest01_1:1 ScaleXY Crown UseMipMaps Does it look right? Thanks. Link to comment Share on other sites More sharing options...
sheson Posted September 19, 2023 Author Share Posted September 19, 2023 25 minutes ago, Mousetick said: I didn't understand, sorry. Why would I need to change the alpha of the original texture, and what would I need to change it to? I don't have the tools to view/compare mipmaps, so this may be moot anyway. You are comparing a resize without alpha change to a resize with alpha change. 25 minutes ago, Mousetick said: I'd read that before and thought it looked important and relevant to my situation, but most of it flew right over my head. I think it makes more sense now. So the full-on/full-off pixels in DynDOLOD's generated atlas texture are the results of alpha-to-coverage? The mipmaps of the original texture look ok to me in-game at roughly the same viewing distance as LOD Level 4: the branches of the full models are opaque and don't look "decimated". But perhaps the game itself uses alpha-to-coverage for compositing vegetation at small resolution? If that's the case, I'm screwed. https://dyndolod.info/Help/3D-Tree-LOD-Model Note that LOD only has binary alpha with a fixed threshold of 128. It does not really matter how nice an alpha channel looks when looking at a texture in program. In LOD a pixel either shows 100% or not. If mipmaps do not fade into full transparency it is because they have been generated with alpha-to-coverage. 25 minutes ago, Mousetick said: So for example, in treepineforest01passthru_lod.nif, I would add UseMipMaps to the crown BSTriShape name: TreePineForest01_1:1 ScaleXY Crown UseMipMaps Does it look right? Yes, you added the term UseMipMaps to a shape name as explained by the instructions. Link to comment Share on other sites More sharing options...
IskanderStep Posted September 19, 2023 Share Posted September 19, 2023 On 8/27/2023 at 12:04 AM, IskanderStep said: Hi, i downloaded the testversion, made a clean save, generated the whole bunch etc. Whatever you did, it works ! The bridge is there and the ...Glow.Lod.. is gone. Thx ! If you need further information etc. just let me know. Iskander Hi, i am really sorry to bring this topic up again, but the bridge in whiterun is gone again . The ingame datetime: Turdas 1850 0611 4E202 I hope you remember what you did to fix it in the first place and have an idea why the fix was not as complete as we both thought. I assume it had something to do with "seasons" or "simplicity of snow" ? I did'nt do screens etc. as i did that in the first place. If i can help you nonethless, please let me know. With best regards Iskander Link to comment Share on other sites More sharing options...
Mousetick Posted September 19, 2023 Share Posted September 19, 2023 9 minutes ago, sheson said: It does not really matter how nice an alpha channel looks when looking at a texture in program. In LOD a pixel either shows 100% or not. Yes that's true and I agree. But since LOD uses binary alpha and we don't care about transparency, we can remove the alpha by compositing the texture with a solid background. Before with Alpha > After compositing Anything that is not white background is 100 alpha (full opaque). Background is 0 alpha (full transparent). This can be combined with alpha threshold filtering, applied before compositing with the background. The gradation in shades and saturation is retained. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now