Jump to content
  • 0
Sign in to follow this  
z929669

Following CreateStaticTrees Workflow

Question

@sheson

Looking for some direction. I believe Draco's Alternative Aspen Trees does not support hybrid trees. I like the aspen models and have modified the textures. LOD tree trunks are white and pop in when close enough in game. I believe that I need to modify the models of the 'billboards' as the mod creator calls them in the downloads.

 

First: am I correct in my assumption that I must modify the models?

 

Second: I am having issues following your workflow ...

../DynDOLOD/Docs/trees.ultra/tools/DynDOLOD_CreateStaticTree.html

... and will post details on that once I determine if I am even on the right path ... or you can point me to previous Q&A on that in these forums.

 

Thanks

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

From Docs/DynDOLOD_Mod_Authors.html

 

A LOD model with the file name house_lod.nif will have LOD in level 4, 8 and 16. To assign models to specific levels use house_lod_0.nif for level 4, house_lod_1.nif for level 8 and house_lod_2.nif for level 16.

 

Applies to 3D tree LOD models as well. Typically the 3D tree LOD files have no _0/1/2, so they are used for all LOD Levels and setting Static LOD 4 is the same as Static LOD 8 or 16.

 

In any case, the log shows which LOD assets is used for which LOD level to confirm the settings.

Edited by sheson

Share this post


Link to post
Share on other sites
  • 0

Billboards are a texture and an optional txt file for tree LOD. They can also be used in object LOD to allow for more options, but will still work essentially the same as in tree LOD.

 

3D tree LOD requires object LOD models. If there aren't any, they should be created instead of simply using the full model. Object LOD models should be static 3D models with all superfluous data removed, like collision, skins, bones, etc. Optionally they should also be optimized.

Edited by sheson

Share this post


Link to post
Share on other sites
  • 0

Thanks for confirming ... I think you are saying 'yes' ... this mod probably doesn't include 3D static tree models in the 'hybrid' format necessary for 'ultra' trees.  So I need to follow your workflow to generate the passthrough nifs?
 
EDIT: So I'm moving forward assuming this^ (my aspen tree LODs have white trunks)
 
Following instructions here:

../DynDOLOD/Docs/trees.ultra/tools/DynDOLOD_CreateStaticTree.html

I assume taht I need to generate the models in the correct format (I cannot use your resources, since the models in question are a deviation from vanilla, and I need to create the 3d statics myself, which is what I'm trying to do):
 

Convert NIFs of various formats and export as simple 3D static for LOD

LODGen.exe can be used to import a tree single NIF and export a version with collision and animation removed. This is basically the same routine used to read full model trees and create the *.bto version. Use to quickly create simplier files to work with to optimize them further.
Open merge.txt in notepad.exe and below lines to point to the correct data folder and resource files. Then update the mesh file name to the full model to be imported.
 
Worldspace= name of exported NIF
DontMergeShapes= False - merge shapes with indentical shaders/textures | True - do not merge shapes with indentical shaders/textures
PassThruMeshMask= part of filename to match to keep shader, if it doesn't match the shader will get default LOD *.bto settings which is not usefull :)
PathOutput= where the NIF should be exported
PathData= path to NIF folder - requires a trailing \

Here is my edited merge.txt (I am using MO ... so maybe I should invoke merge.bat as a MO executable?)

GameMode=Merge5
Worldspace=treeaspen01_passthru_lod.nif      <-- is this correct? once created, apply DynDOLOD_CRC32Gen.pas script in xEdit to gen unique file name?
DontMergeShapes=False
PassThruMeshMask=nif
PathData=C:\meshes\landscape\trees\          <-- the path I want to use throws an error ("C:\Users\David\AppData\Local\ModOrganizer\Custom STEP SSE\mods\DynDOLOD-Source\")... invoke via MO? Not sure the path in that case.
PathOutput=.\output\
0    0    0.0  0.0  0.0  0.0  0.0  0.0  1.0  file.nif

... which produces no errors, creates 'output' folder, but no file:

C:\Modding\Tools\DynDOLOD\Docs\trees.ultra\tools\re-uv>"..\..\..\..\Edit Scripts\LODGenx64.exe" merge.txt
============================================================
Skyrim Object LOD Generator 2.7.8.0
Created by Ehamloptiran and Zilav
Updated by Sheson

Log started at 11:57:18 AM
Game Mode: MERGE5
Fix Tangents: False, False, False, False
Generate Tangents: True, True, True, True
Generate Vertex Colors: True, True, True, True
Merge Vertex Colors: False, False, False, False
Merge Meshes: True
Grouping: False
Remove Faces under Terrain: False
Remove Faces under Water: False
Use HD Flag: True
Ignore Materials: False
Alpha DoubleSided: False
Default Alpha Threshold: 128
Use Source Alpha Threshold: False
Use Backlight Power: False
Use Decal Flag: False
Specific level: No
Specific quad: No
Max Level: 32
Output: C:\Modding\Tools\DynDOLOD\Docs\trees.ultra\tools\re-uv\output\
Merging meshes
Log ended at 11:57:18 AM (0:0)

Share this post


Link to post
Share on other sites
  • 0

There are no LOD models in either archive, obviously. Just using the "Preview file contents" confirms this.

 

If you want 3D tree LOD for these trees and not use full model fallback, 3D LOD models are required.

 

"my aspen tree LODs have white trunks" Sounds like missing textures.

 

The "correct" format of an object LOD model is a basic static NIF with just NiTriShape/Data or BSTriShape and Shaders.

 

No need to use the LODGen method if there is no re-uv involved.

 

Just use NifSkope and remove all superfluous blocks from the full model. Optimize and Sanitize. Then save to a new filename. Or do the copying into a new NIF as explained in the doc. Be aware of the NIF version.

Share this post


Link to post
Share on other sites
  • 0

Yes, I want 3D tree LOD I think ... "full-model fallback" means what exactly? Use full tree model for LOD? I believe this is set in the LOD4-16 area of DynDOLOD mesh rules?

 

in mesh rules:

"full model" = use the actual mesh?

"Static LOD4" = 3D static model?

 

In my experience, missing textures yields 'purple' models in game. Not sure if same is true for LOD though. Can I set LOD4 in mesh rules to use billboards though to resolve? Still want to do 3D static, but want to understand this piece.

 

How do I know if re-uv is required? What do I need to look for in NifScope?

 

NIF version? Do you mean NifScope version or NIF 'type'?

Share this post


Link to post
Share on other sites
  • 0

Read the entire section "Generate 3D Tree Static Object LOD" in DynDOLOD-Trees.html

 

By default DynDOLOD.exe falls back to use tree LOD billboards for all trees it doesn't find a 3D static object LOD in Meshes\DynDOLOD\lod\trees\*passthru_lod.nif for.

Consider setting TreeFullFallBack=0 in '..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_[GAMEMODE].ini' to instruct it to automatically use the full model instead.
WARNING: this can create HUGE static object LOD files depending on the size and complexity of the full model version. It is advised to create optimized 3D static object LOD versions. Because source shader settings of the full models are copied, this can potentially create invalid *.bto files causing the game to CTD. This is an experiemental setting for testing and should not be used for game play.

 

It then goes on to explain how individual rules for specific trees can be set.

 

If a model does not show the desired texture in NifSkope, check that the defined textures have the correct path and are available to NifSkope.

 

Re-calculating the UV coords of a shape makes sure tcoords stay with 0 and 1 in order for ito be able to use texture on a texture atlas. Nowadays it is done on the fly while generating LOD.

So the only reason to do it manually now is, if the full texture in the LOD model is replaced by a LOD texture that is a mini atlas, like a 4x4 tiled version of the full texture. For 3D trunks for example. If the UV for leafs is just slightly outside I manually move the points in NifSkip UV editor, so the model can keep the full texture as source and not increase vertex/triangle count.

 

Skyrim Skyrim Special Editio uses a newer NIF version. If you try to copy/paste a BSTriShape into the older NIF version from Skyrim there will be an error.

Share this post


Link to post
Share on other sites
  • 0

@sheson

I followed the provided instructions with some deviations as required by sources I am working with. (e.g., I had to add "Double Sided" as a "shader effect 2" attribute).

 

Hoping that you can validate an example of a 3D static tree NIF ... I assume that this is a "hybrid tree"? I have named as "TreeAspen01_passthru_lod.nif" and will place into "DynDOLOD-Source" to generate my CRC file names. Does this look and sound correct?

 

... trunks are 2x flat planes, and leaves are copied from the full model (I found they were already optimized in the blender steps outlined by the supplemental instructions, so I guess this means that I don't need to "re-uv")

 

rKYUwttg_o.png

Share this post


Link to post
Share on other sites
  • 0

If you did that, you have an optimized 3D tree LOD model, that requires less resources than simply a static tree model, where every shape is still true 3D.

 

Not sure why you believe setting double sided to a Shader is a deviation? The leafs should just keep their original shader/texture settings (which typically includes the double sided flag) and the 2D trunk planes of the hybrid tree LOD models in DynDOLOD Resources should all use double sides flag already. Should be nothing special.

 

There are several methods to get the CRC32 of the full model files. If you just have a couple trees and if 7z is installed, Windows Explorer has a right click file context menu CRC SHA / CRC-32 to quickly get the number.

Edited by sheson

Share this post


Link to post
Share on other sites
  • 0

The source meshes didn't include "Double Sided" shader effect, but did include parallax. I thought I read somewhere that parallax and certain other settings are not valid for DynDOLOD.

 

I posted the screen so that you could tell me if you see anything that will break. Example: Texture Clamp Mode of the source was different than the 2x2.nif you provide.

 

If this mesh looks compatible with DynDOLOD, I will finish the other trees models and test.

Share this post


Link to post
Share on other sites
  • 0

Correct, LOD Does not support parallax. This has nothing to do with DynDOLOD.

 

The texture clamp mode obviously does not matter if the textures are being atlassed.

 

There is not such thing as a mesh being compatible with DynDOLOD. The mesh and more importantly the shader settings have to be compatible with what static object LOD supports.

xLODGen/DynDOLOD basically only gets the textures from the NIF to put the texture atlas.

 

I suggest to generate LOD with that one tree to check if it works.

Share this post


Link to post
Share on other sites
  • 0

Question: Hybrid trees meshes use CRC32 in the file name, but billboards seem to use the FormID instead ... is this OK, or do I need to use the CRC32 in the billboards as well?

 

If this is simply a way to get a guaranteed unique file name, then I guess it doesn't matter.

 

EDIT: Here is the result ... I did them all since there are only 6 trees. I also did the billboards from scratch. Using default DynDOLOD "High" settings for 3D trees, it seems that it worked; however, the distant trunks are very bright compared to full. Leaves seem fine. For billboards (LOD4-16), I used Tree LOD Billboard Creator to gen the DDS from NifScope (adjusted the lighting before creating the DDS) and manually created the TXT files. The hybrid trees (LOD4) were all done as in my previous post. Is this a lighting thing, or maybe I need to make adjustments to the mesh shader properties? I did create the LOD normals for the hybrid trees using Photoshop (day light setting), so it could be the lighting in the normals I suppose.

 

Any suggestions?

 

t6rgyT12_o.png

Share this post


Link to post
Share on other sites
  • 0

Billboards use the form IDs and LOD models for ultra tree LOD use the CRC32 of the full model.

 

If a model uses a normal map texture (and normals, bi/tangents), then its diffuse texture should not have (much) direct light baked in, only ambient.

That's just the how the basic lighting method of models works in the engine.

 

Either use less to no direct light in Nifskope or darken the textures in an image program. To fine tune you can use Vertex Colors. See the 2D trunk in Meshes\DynDOLOD\lod\trees\treeaspen01passthru_lod.nif in DynDOLOD Resources Core Files for example.

Share this post


Link to post
Share on other sites
  • 0

Thanks ... I am currently playing with vertex lighting, but not sure how to impact direct vs ambient lighting in NifScope. Lots of settings ... is that on the BSLightingShader blocks or the NiTriShapeData blocks?

Share this post


Link to post
Share on other sites
  • 0

In NifSkope change the scene lighting via the lightbulb icon. The "sun" is  the direct light that should be none while the "cloud" is the ambient that should be 100%.

 

That basically means the scene leaves the diffuse textures more or less alone and renders them as is, which is what you want if you have true normal maps and normal vectors later.

 

In reality, leave a bit of direct light from top, so the result doesn't look all flat. Don't matter that much for trunks, but when creating tree LOD billboard diffuse textures with "true" normal maps. (Explained in DynDOLOD-Trees.html)

Edited by sheson

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.