{YOURS_SPEEDTREE_DIR}/texture_packing
Then you can select Unreal's UE4.fx and UE4.xml and duplicate that (rename also to fit yours packaging method name). Open it in some code editor (e.g. VS Code or Notepad++).
<div><?xml version="1.0" encoding="UTF-8"?></div><div><SpeedTreeTexturePacker Shader="PACKAGE_NAME.fx" ForceTextures="false" ></div><div> <Texture0 Suffix="_Color" MipGenerationFlag="AlphaIsOpacity" /></div><div> <Texture1 Suffix="_Normal" /></div><div> <Texture2 Suffix="_Subsurface" /></div><div> <Texture3 Suffix="_AO_Roughness_Height" /></div><div> <Texture4 Skip="true" /></div><div></SpeedTreeTexturePacker></div>
Here I just changed package method name and added one more texture to setup and updated Shader , which is name of your new preset.
From:
To:
This is just declaration and naming convention of your output file. I picked here something similar to Quixel's packing method. Actual packing is handled by second file - .fx
sOutput.m_vTexture3 = float4(sInput.m_fAmbientOcclusion, 1 - sInput.m_fGloss, sInput.m_fHeight, 1);Ofc. outside of if instructions