sheson Posted May 9, 2023 Author Posted May 9, 2023 4 minutes ago, godescalcus said: So, considering your dire warning about setting TreeFullFallBack=0, I might set it to 4 and ensure that any fallback billboards will use the 4x2 model. As a follow-up question, I noticed my billboard textures were a bit fuzzy, even for large pines... I had texgen units per pixel using the recommended for 1080p (my panel and game resolution are actually 1440p). Would it be absurd to use an even higher density, such as the 5.5 units per pixel recommended for 4k, to ensure the best possible looking LOD4 when I know for starters that most of my trees don't have hybrids? Or are your recommendations already the limit, considering the height of the tree and the closest distance at which LOD4 would be rendered? And would "oversampling" like this have a benefit in alpha channel generation for very finely cut tree models? See https://dyndolod.info/Help/Texture-Resolution#Determine-Sensible-Texture-Resolutions LOD is either transparent or opaque with a fixed threshold of 128, e.g. there is no alpha blending only alpha testing.
godescalcus Posted May 9, 2023 Posted May 9, 2023 (edited) When creating trunk and crown meshes, are there any steps you recommend doing in NifSkope to "tidy things up"? Do we need to remove animations from crown meshes, or sanitize, or remove invalid stuff or any other "spell" - or does LodGEN perform all the necessary steps when combining them into hybrids? I mean, other than what you describe regarding editing UVs. In the same vein, should we do anything about trunks prior to render with texgen, like removing collision object when present, or simply remove the crown and save, since texgen only takes "snapshots" of the rendered mesh, and lodgen uses the chosen mesh template for trunks? Edited May 10, 2023 by godescalcus
sheson Posted May 10, 2023 Author Posted May 10, 2023 7 hours ago, godescalcus said: When creating trunk and crown meshes, are there any steps you recommend doing in NifSkope to "tidy things up"? Do we need to remove animations from crown meshes, or sanitize, or remove invalid stuff or any other "spell" - or does LodGEN perform all the necessary steps when combining them into hybrids? I mean, other than what you describe regarding editing UVs. In the same vein, should we do anything about trunks prior to render with texgen, like removing collision object when present, or simply remove the crown and save, since texgen only takes "snapshots" of the rendered mesh, and lodgen uses the chosen mesh template for trunks? https://dyndolod.info/Help/3D-Tree-LOD-Model The basic idea is to split a full model into two static (collision, animation, skin, bone data etc. removed) files. See any of the crowns ..\DynDOLOD\docs\trees.ultra\tools\hybrids\input\*passthru_lod.nif and trunks ..\DynDOLOD\Edit Scripts\DynDOLOD\Render\Skyrim\Billboards\DynDOLOD\lod\trees\*_trunk.nif included in the DynDOLOD Standalone download archive. Everything else that is not needed is properly removed to avoid issues or errors. The separated crowns for the 3D tree LOD model creation is irrelevant for TexGen. It just creates the billboards textures and text files from the trunks.
godescalcus Posted May 10, 2023 Posted May 10, 2023 (edited) I made the separate trunk and crown meshes for 187 of Ulvenwald's 350 tree models (which, by my estimation, correspond to 99% of the trees referenced) and combined them with lodgen, then installed the hybrids as a new mod. Ran texgen and dyndolod and the result is (as expected) much better than before, but ran into an issue where the hybrid models seem to be more then 2x the size of the full model (adding 2 in-game screenshots to illustrate). In no moment did I manually edit anything about the meshes, simply followed instructions to produce the hybrids. Used as tree rules: Lod4=Level0; Lod8=Lod16=Billboard4; Lod32=Billboard6; VWD on; grid=FarLOD. In texgen I used texture sizes and bit density as recommended for 1440p, then ticked both Tree and HD Tree (not Rendered, since I had already built the hybrids). Do I need additional steps to make the hybrid lods match the full model in scale? Example screenshots (second screenshot taken past the first small pine, but the ruins are good for scale) I also noticed the hybrids seem to react to light differently than the full models (brighter), but I could probably live with that for now, one problem at a time Appreciate your help in getting this far, and would be happy if I could fix the issue with scale. Edited May 10, 2023 by godescalcus
sheson Posted May 10, 2023 Author Posted May 10, 2023 1 hour ago, godescalcus said: I made the separate trunk and crown meshes for 187 of Ulvenwald's 350 tree models (which, by my estimation, correspond to 99% of the trees referenced) and combined them with lodgen, then installed the hybrids as a new mod. Ran texgen and dyndolod and the result is (as expected) much better than before, but ran into an issue where the hybrid models seem to be more then 2x the size of the full model (adding 2 in-game screenshots to illustrate). In no moment did I manually edit anything about the meshes, simply followed instructions to produce the hybrids. Used as tree rules: Lod4=Level0; Lod8=Lod16=Billboard4; Lod32=Billboard6; VWD on; grid=FarLOD. In texgen I used texture sizes and bit density as recommended for 1440p, then ticked both Tree and HD Tree (not Rendered, since I had already built the hybrids). Do I need additional steps to make the hybrid lods match the full model in scale? Example screenshots (second screenshot taken past the first small pine, but the ruins are good for scale) I also noticed the hybrids seem to react to light differently than the full models (brighter), but I could probably live with that for now, one problem at a time Appreciate your help in getting this far, and would be happy if I could fix the issue with scale. https://stepmodifications.org/forum/topic/18689-tree-lod-scale-troubleshooting/ If a 3D tree LOD model does not match the size of the full model tree, then there is a problem with the 3D tree LOD model. As explained before, while the game typically ignores translation, rotation, scale on the root node when placing references, LOD generation does not. Remove any translation, rotation and scale from the root of the 3D tree LOD model. https://dyndolod.info/Help/Ultra-Tree-LOD#3D-Tree-LOD-Brightness
godescalcus Posted May 10, 2023 Posted May 10, 2023 (edited) 8 hours ago, sheson said: https://dyndolod.info/Help/3D-Tree-LOD-Model The basic idea is to split a full model into two static (collision, animation, skin, bone data etc. removed) files. See any of the crowns ..\DynDOLOD\docs\trees.ultra\tools\hybrids\input\*passthru_lod.nif and trunks ..\DynDOLOD\Edit Scripts\DynDOLOD\Render\Skyrim\Billboards\DynDOLOD\lod\trees\*_trunk.nif included in the DynDOLOD Standalone download archive. Everything else that is not needed is properly removed to avoid issues or errors. The separated crowns for the 3D tree LOD model creation is irrelevant for TexGen. It just creates the billboards textures and text files from the trunks. I compared my crowns with those shipped with DynDOLOD as you suggested, and there are differences you can notice on the node tree. I also didn't perform any special steps to remove animation, skin and bone data (I did remove collision meshes, if that's enough for removing collision). I've seen your instructions to remove skin, also about UV editing - and I checked a few of these meshes at random and saw their UVs were ok, so I skipped checking all of them, for the purpose of what is still just an experiment. I'm aware of the need to remove animations, I think, because you told me so years ago on discord - but I can't find the relevant instructions there, or in the manual. I'll look around. I also remember your suggestion to use a couple of "spells" on nifskope as "general good practice", but fail to recall which. One other issue is that I noticed how the original meshes have a huge number of vertices - is there a good "hack" to batch optimise them? Another of zilav's magic wands? Or does it have to be done one by one - and in such case, can Nifskope handle it? I've read the post you linked in your later answer about tree scale and noticed that 3DS Max can be used for this (optimisation, assuming that includes reducing vertex count), but considering I don't have the program (and Blender is free) - can Blender be used (productively) for the whole workflow of optimising crown meshes? Edited May 10, 2023 by godescalcus
z929669 Posted May 10, 2023 Posted May 10, 2023 8 hours ago, sheson said: The separated crowns for the 3D tree LOD model creation is irrelevant for TexGen. It just creates the billboards textures and text files from the trunks. It seems like you are saying here that if the full model is used as the treeModel_CRC32_trunk.nif, one would still get trunk billboards when using Render option. I've never tried that and always have removed crown/collision. I've also found that leaving the Tree_Anim shader flag doesn't hurt anything, and not messing with removing this flag is a big time saver. 6 hours ago, godescalcus said: I made the separate trunk and crown meshes for 187 of Ulvenwald's 350 tree models (which, by my estimation, correspond to 99% of the trees referenced) and combined them with lodgen, then installed the hybrids as a new mod. Ran texgen and dyndolod and the result is (as expected) much better than before, but ran into an issue where the hybrid models seem to be more then 2x the size of the full model (adding 2 in-game screenshots to illustrate). In no moment did I manually edit anything about the meshes, simply followed instructions to produce the hybrids. Used as tree rules: Lod4=Level0; Lod8=Lod16=Billboard4; Lod32=Billboard6; VWD on; grid=FarLOD. In texgen I used texture sizes and bit density as recommended for 1440p, then ticked both Tree and HD Tree (not Rendered, since I had already built the hybrids). Do I need additional steps to make the hybrid lods match the full model in scale? Example screenshots (second screenshot taken past the first small pine, but the ruins are good for scale) I also noticed the hybrids seem to react to light differently than the full models (brighter), but I could probably live with that for now, one problem at a time Appreciate your help in getting this far, and would be happy if I could fix the issue with scale. Scale and relative positioning of crown/trunk will be off if you copy the crown/trunk with 1.0 scaling and 0.0 transform/rotation when it's a child of a parent/grandparent node that has scaling != 1.0 or transform/rotation != 0.0. You must extrapolate that info from all parents, summing the transforms/rotations and multiplying the scales from all parents. You can optimize the crowns using a 3D app like Blender, Maya, or 3Ds Max. That's a whole other ball of wax though. There's also things like InstaLOD, but that's not free or easy to get a trial
heheloveer Posted May 10, 2023 Posted May 10, 2023 Quick question: what do fMeshLODFadeBoundDefault and fMeshLODFadePercentDefault actually do? Is there any merit in adjusting them? All the information I could find comes from https://stepmodifications.org/wiki/Guide:SkyrimPrefs_INI/Display and the page doesn't really tell us much.
godescalcus Posted May 10, 2023 Posted May 10, 2023 8 minutes ago, z929669 said: It seems like you are saying here that if the full model is used as the treeModel_CRC32_trunk.nif, one would still get trunk billboards when using Render option. I've never tried that and always have removed crown/collision. I've also found that leaving the Tree_Anim shader flag doesn't hurt anything, and not messing with removing this flag is a big time saver. Scale and relative positioning of crown/trunk will be off if you copy the crown/trunk with 1.0 scaling and 0.0 transform/rotation when it's a child of a parent/grandparent node that has scaling != 1.0 or transform/rotation != 0.0. You must extrapolate that info from all parents, summing the transforms/rotations and multiplying the scales from all parents. You can optimize the crowns using a 3D app like Blender, Maya, or 3Ds Max. That's a whole other ball of wax though. There's also things like InstaLOD, but that's not free or easy to get a trial Thanks. For trunks, I "painstakingly" removed crowns from each tree full model individually, before rendering. Considering the trunks are only meant to be used to render billboards, I didn't do any further tweaks there. For crowns, I deleted every branch pertaining to the trunk. Then I've been able to use Sniff to - convert root node from BSFLeafAnimNode to BSFadeNode - remove node BSXFlags - remove unused nodes (for good measure - no changes resulted from this step) Still trying to find a quick way to automatically remove all rigging/skinning in meshes that may have them, without going through them 1 by 1. BSFadeNode does seem to have a scale that is not 1.0 - and in some models, child nodes also. Do I need to manually scale the mesh (somehow), or is it enough to set the scale to 1 in all nodes? And perhaps I should have done this to the full mesh before splitting it into crown and trunk, to save having to edit double the amount of meshes? Regarding optimization, it seems important in this case since some crowns have over 10000 triangles, but maybe I should tackle one problem at a time... I understand that vertex manipulation requires a full fledged 3d app. Maybe it's time to start with Blender?
sheson Posted May 10, 2023 Author Posted May 10, 2023 2 hours ago, godescalcus said: I compared my crowns with those shipped with DynDOLOD as you suggested, and there are differences you can notice on the node tree. I also didn't perform any special steps to remove animation, skin and bone data (I did remove collision meshes, if that's enough for removing collision). I've seen your instructions to remove skin, also about UV editing - and I checked a few of these meshes at random and saw their UVs were ok, so I skipped checking all of them, for the purpose of what is still just an experiment. I'm aware of the need to remove animations, I think, because you told me so years ago on discord - but I can't find the relevant instructions there, or in the manual. I'll look around. I also remember your suggestion to use a couple of "spells" on nifskope as "general good practice", but fail to recall which. One other issue is that I noticed how the original meshes have a huge number of vertices - is there a good "hack" to batch optimise them? Another of zilav's magic wands? Or does it have to be done one by one - and in such case, can Nifskope handle it? I've read the post you linked in your later answer about tree scale and noticed that 3DS Max can be used for this (optimisation, assuming that includes reducing vertex count), but considering I don't have the program (and Blender is free) - can Blender be used (productively) for the whole workflow of optimising crown meshes? You should create proper static NIFs with collision, animation, skin, bone data etc. removed. They should be simple NiTriShape/NiTriShapeData or BSTriShapes. Copy/paste the relevant Shapes blocks from the full model tree NIF to an empty one. However, I am also pretty quick removing blocks with the keyboard combinations. To optimize meshes you need to use Blender/3DSMax native optimize/decimation features or use a 3rd party plugin like Simplygon, which is free for our use. I do not use Blender, so I can not help with steps there.
sheson Posted May 10, 2023 Author Posted May 10, 2023 42 minutes ago, z929669 said: It seems like you are saying here that if the full model is used as the treeModel_CRC32_trunk.nif, one would still get trunk billboards when using Render option. I've never tried that and always have removed crown/collision. I've also found that leaving the Tree_Anim shader flag doesn't hurt anything, and not messing with removing this flag is a big time saver. Scale and relative positioning of crown/trunk will be off if you copy the crown/trunk with 1.0 scaling and 0.0 transform/rotation when it's a child of a parent/grandparent node that has scaling != 1.0 or transform/rotation != 0.0. You must extrapolate that info from all parents, summing the transforms/rotations and multiplying the scales from all parents. You can optimize the crowns using a 3D app like Blender, Maya, or 3Ds Max. That's a whole other ball of wax though. There's also things like InstaLOD, but that's not free or easy to get a trial What I mean is the separated crown into its own input NIF for LODGen is not used by TexGen in this process. https://dyndolod.info/Help/3D-Tree-LOD-Model#Crowns-Leaves-and-Branches The trunk billboard texture/text is rendered by TexGen from the separated trunk NIF. https://dyndolod.info/Help/3D-Tree-LOD-Model#Trunks LODGen then combines the two for the 3D tree LOD model. https://dyndolod.info/Help/3D-Tree-LOD-Model Translation from NiNodes can be applied to child blocks and then also to vertices from The NiTriShape/BSTriShape in NifSkope with a right click, Transform, Apply. That would be similar to the "Zero Transforms" from the 3DSMax NIF import/export plugin. 1
sheson Posted May 10, 2023 Author Posted May 10, 2023 25 minutes ago, heheloveer said: Quick question: what do fMeshLODFadeBoundDefault and fMeshLODFadePercentDefault actually do? Is there any merit in adjusting them? All the information I could find comes from https://stepmodifications.org/wiki/Guide:SkyrimPrefs_INI/Display and the page doesn't really tell us much. All fMeshLOD* settings apply to full models. Typically they control fade behavior of BSLODTriShape (and maybe others) blocks 1
sheson Posted May 10, 2023 Author Posted May 10, 2023 28 minutes ago, godescalcus said: Thanks. For trunks, I "painstakingly" removed crowns from each tree full model individually, before rendering. Considering the trunks are only meant to be used to render billboards, I didn't do any further tweaks there. For crowns, I deleted every branch pertaining to the trunk. Then I've been able to use Sniff to - convert root node from BSFLeafAnimNode to BSFadeNode - remove node BSXFlags - remove unused nodes (for good measure - no changes resulted from this step) Still trying to find a quick way to automatically remove all rigging/skinning in meshes that may have them, without going through them 1 by 1. BSFadeNode does seem to have a scale that is not 1.0 - and in some models, child nodes also. Do I need to manually scale the mesh (somehow), or is it enough to set the scale to 1 in all nodes? And perhaps I should have done this to the full mesh before splitting it into crown and trunk, to save having to edit double the amount of meshes? Regarding optimization, it seems important in this case since some crowns have over 10000 triangles, but maybe I should tackle one problem at a time... I understand that vertex manipulation requires a full fledged 3d app. Maybe it's time to start with Blender? You only would need change the scale of the root BSFadeNode to 1 and typically leave other transformation alone unless you flatten the hierarchy. For example if there are NiNode with transformation in the full model and you end up with copying a BSTriShape out of it directly under the root BSFadeNode, the NiNode transformation should be applied to the BSTriShape first. As I just mentioned in the other post, in NifSkope, right click, Transformation, Apply. While I typically would suggest to address these things in full models to make things easier for everybody, such changes should only be done by the original tree mod, since it will change the CRC32 of the full model...
godescalcus Posted May 10, 2023 Posted May 10, 2023 5 minutes ago, sheson said: You only would need change the scale of the root BSFadeNode to 1 and typically leave other transformation alone unless you flatten the hierarchy. Would it harm if I had already set the scale in the child nodes to 1 as well? Here's a sample of my crowns and trunks https://ufile.io/f/rd2uo would further tweaking be necessary - other than optimisation of the absurdly high number of vertices in the case of crowns?
z929669 Posted May 10, 2023 Posted May 10, 2023 37 minutes ago, sheson said: What I mean is the separated crown into its own input NIF for LODGen is not used by TexGen in this process. https://dyndolod.info/Help/3D-Tree-LOD-Model#Crowns-Leaves-and-Branches The trunk billboard texture/text is rendered by TexGen from the separated trunk NIF. https://dyndolod.info/Help/3D-Tree-LOD-Model#Trunks LODGen then combines the two for the 3D tree LOD model. https://dyndolod.info/Help/3D-Tree-LOD-Model Translation from NiNodes can be applied to child blocks and then also to vertices from The NiTriShape/BSTriShape in NifSkope with a right click, Transform, Apply. That would be similar to the "Zero Transforms" from the 3DSMax NIF import/export plugin. That's a real time saver, and I never discovered or tried it. Will do so next time. 54 minutes ago, godescalcus said: Thanks. For trunks, I "painstakingly" removed crowns from each tree full model individually, before rendering. Considering the trunks are only meant to be used to render billboards, I didn't do any further tweaks there. For crowns, I deleted every branch pertaining to the trunk. Then I've been able to use Sniff to - convert root node from BSFLeafAnimNode to BSFadeNode - remove node BSXFlags - remove unused nodes (for good measure - no changes resulted from this step) Still trying to find a quick way to automatically remove all rigging/skinning in meshes that may have them, without going through them 1 by 1. BSFadeNode does seem to have a scale that is not 1.0 - and in some models, child nodes also. Do I need to manually scale the mesh (somehow), or is it enough to set the scale to 1 in all nodes? And perhaps I should have done this to the full mesh before splitting it into crown and trunk, to save having to edit double the amount of meshes? Regarding optimization, it seems important in this case since some crowns have over 10000 triangles, but maybe I should tackle one problem at a time... I understand that vertex manipulation requires a full fledged 3d app. Maybe it's time to start with Blender? I also use Sniff for this work. Note that you don't need to alter the root node: BsLeafAnimNode is fine, for example. Just ignore nodes with skinning. There is always a non-skinned corresponding node you can use (but sometimes the skinning node has info that I want on the unskinned node, but I'm not sure how to add it to the corresponding node). As sheson mentioned just previous, I now use Sniff to set root node scaling to 1.0 after separating the crown. So based on what he said above, my new workflow will be: Get all relevant tree CRC values into the file names using DynDOLOD_CRC32Gen.pas This yields the "WIP LOD Crown NIFs" and helps to sort out NIFs under meshes/landscape/trees/ that don't have LOD in addition to adding the CRC32 Use Sniff to set all root node scales to 1.0 (I've only seen this issue on about 5 of hundreds/thousands? of trees I've done) Use this principle: "Translation from NiNodes can be applied to child blocks and then also to vertices from The NiTriShape/BSTriShape in NifSkope with a right click, Transform, Apply" on all WIP files. Maybe Sniff can help, IDK Copy these to 'trunks' folder under \DynDOLOD\Render\Billboards\DynDOLOD\lod\trees\ in the WIP tree LOD mod and strip them down to just the trunks Might be able to simply remove the crowns only, since they are rendered, but full stripping reduces file sizes a tad. Sniff helps Strip all but crowns in the crowns WIP Sniff helps Optimize the crowns using SSE NIF Optimizer Manually optimize crowns larger than ~500 Kb using a 3D app # triangles is a better cutoff reference (≥ 15,000 tris), but file size seems to be a good-enough indicator. Run TexGen Render mode Construct hybrids using hybrid.bat/txt I will also experiment with "Flatten Hierarchy" for skinned trees or those having nesting. Maybe Sniff can help. Question: I always convert BSLODTriShape to BsTrishape in the full model before making hybrids. Is this advised or even necessary?
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