Jump to content

[1.9.x] Textures Unlimited - PBR-Shader, Texture Set, and Model Loading API


Shadowmage

Recommended Posts

Ah... if only more than one percent of stock parts had a normal map...

Using a bump generator doesn't really work either because it appears that most the textures were hand drawn, so you end up with strange brush-strokes and what not with different depths, causing everything to be lumpy.

I also can't use a PBR normal because all the meshes are set to stretch and skew the texture instead of tile.

Edited by Electrocutor
Link to comment
Share on other sites

25 minutes ago, Electrocutor said:

because it appears that most the textures were hand drawn

I know, right... like hand-drawn without guides even.  So squiggly and inconsistent.

28 minutes ago, Electrocutor said:

I also can't use a PBR normal because all the meshes are set to stretch and skew the texture instead of tile

Yep.  About the only way would be to import the models into some sort of modeling program and bake some normal detail textures for them (from some extra geometry created just for the purpose).

Link to comment
Share on other sites

2 minutes ago, Shadowmage said:

Yep.  About the only way would be to import the models into some sort of modeling program and bake some normal detail textures for them (from some extra geometry created just for the purpose).

https://docs.unity3d.com/ScriptReference/Mesh.html

https://docs.unity3d.com/ScriptReference/Material-mainTextureScale.html

There are quite a few options to access Unity objects at runtime; would any of them have a property or method for changing tiling options?

Link to comment
Share on other sites

16 minutes ago, Electrocutor said:

https://docs.unity3d.com/ScriptReference/Mesh.html

https://docs.unity3d.com/ScriptReference/Material-mainTextureScale.html

There are quite a few options to access Unity objects at runtime; would any of them have a property or method for changing tiling options?

https://docs.unity3d.com/ScriptReference/Material.SetTextureScale.html

Should work for setting the tiling on an arbitrary texture.  I believe an additional method/control exists to set the texture offset.  Not currently supported in TU, but seems like something I could add-in if it were needed.

 

Edit:  Should add that I pushed an update to the dev branch last night that contains the shaders with the _Smoothness and _Metallic properties, if you wanted to play around with those at all.  Simply replace your existing shader pack with this:  https://github.com/shadowmage45/TexturesUnlimited/raw/dev/GameData/000_TexturesUnlimited/Shaders/sstushaders-universal.ssf , and the new shader properties should be accessible from the config files.

Edited by Shadowmage
Link to comment
Share on other sites

Because it seems these issues aren't SSTU specific but related to TU, I'm reporting this here.

I got a problem with Textures Unlimited, the problem being it only works with D3D for me, after testing it on two identical installs of KSP, one on Linux and the other on Windows 7 (dual-boot). On Linux, although being stuck(hopefully not for too long) with a limited open-source driver that only supports OpenGL 3.0 is probably to blame, all parts using Textures Unlimited in SSTU show up in a texture-less pitch black color. Just to be sure, I also tested it on Windows 7 with force-opengl, and this happened:

Spoiler

Initialize engine version: 5.4.0p4 (b15b5ae035b7)
Forcing GfxDevice: OpenGL Core
GfxDevice: creating device client; threaded=1
Renderer: AMD Radeon (TM) R9 380 Series
Vendor:   ATI Technologies Inc.
Version:  4.5.13491 Core Profile Forward-Compatible Context 22.19.662.4
GLES:     0
...
OPENGL LOG: Creating OpenGL 4.5 graphics device ; Context level  <OpenGL 4.5> ; Context handle 65537
Begin MonoManager ReloadAssembly

...

Load(Texture): SSTU/Assets/SC-TANK-LV-BODY-SPEC-FOAM
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Load(Texture): SSTU/Assets/SC-TANK-LV-BODY-SPEC
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Load(Texture): SSTU/Assets/SC-TANK-LV-CAP-AO
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Load(Texture): SSTU/Assets/SC-TANK-LV-CAP-DIFF
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Crash!!!
SymInit: Symbol-SearchPath: '.;C:\Kerbal Space Program;C:\Kerbal Space Program;C:\Windows;C:\Windows\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Bane'
OS-Version: 6.1.7601 (Service Pack 1) 0x100-0x1
C:\Kerbal Space Program\KSP_x64.exe:KSP_x64.exe (000000013F090000), size: 22437888 (result: 0), SymType: '-exported-', PDB: 'C:\Kerbal Space Program\KSP_x64.exe', fileVersion: 5.4.0.23386
C:\Windows\SYSTEM32\ntdll.dll:ntdll.dll (0000000077C90000), size: 1744896 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\ntdll.dll', fileVersion: 6.1.7601.23807
C:\Windows\system32\kernel32.dll:kernel32.dll (0000000077A70000), size: 1175552 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\kernel32.dll', fileVersion: 6.1.7601.23807
C:\Windows\system32\KERNELBASE.dll:KERNELBASE.dll (000007FEFDCD0000), size: 434176 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\KERNELBASE.dll', fileVersion: 6.1.7601.23807
C:\Windows\system32\HID.DLL:HID.DLL (000007FEFBF50000), size: 45056 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\HID.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\msvcrt.dll:msvcrt.dll (000007FEFDD40000), size: 651264 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\msvcrt.dll', fileVersion: 7.0.7601.17744
C:\Windows\system32\GDI32.dll:GDI32.dll (000007FEFE0D0000), size: 421888 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\GDI32.dll', fileVersion: 6.1.7601.23807
C:\Windows\system32\USER32.dll:USER32.dll (0000000077B90000), size: 1024000 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\USER32.dll', fileVersion: 6.1.7601.23594
C:\Windows\system32\LPK.dll:LPK.dll (000007FEFE140000), size: 57344 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\LPK.dll', fileVersion: 6.1.7601.23807
C:\Windows\system32\USP10.dll:USP10.dll (000007FEFF700000), size: 831488 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\USP10.dll', fileVersion: 1.626.7601.23807
C:\Windows\system32\ADVAPI32.dll:ADVAPI32.dll (000007FEFE520000), size: 897024 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\ADVAPI32.dll', fileVersion: 6.1.7601.23807
C:\Windows\SYSTEM32\sechost.dll:sechost.dll (000007FEFFB80000), size: 126976 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\sechost.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\RPCRT4.dll:RPCRT4.dll (000007FEFFBA0000), size: 1232896 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\RPCRT4.dll', fileVersion: 6.1.7601.23816
C:\Windows\system32\WS2_32.dll:WS2_32.dll (000007FEFFD30000), size: 315392 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WS2_32.dll', fileVersion: 6.1.7601.23451
C:\Windows\system32\NSI.dll:NSI.dll (000007FEFF7D0000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\NSI.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\VERSION.dll:VERSION.dll (000007FEFCA40000), size: 49152 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\VERSION.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\ole32.dll:ole32.dll (000007FEFFD80000), size: 2080768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\ole32.dll', fileVersion: 6.1.7601.23775
C:\Windows\system32\SHLWAPI.dll:SHLWAPI.dll (000007FEFF680000), size: 462848 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\SHLWAPI.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\SHELL32.dll:SHELL32.dll (000007FEFE8F0000), size: 14200832 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\SHELL32.dll', fileVersion: 6.1.7601.23806
C:\Windows\system32\OPENGL32.dll:OPENGL32.dll (000007FEF7E90000), size: 1167360 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\OPENGL32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\GLU32.dll:GLU32.dll (000007FEF8140000), size: 184320 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\GLU32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\DDRAW.dll:DDRAW.dll (000007FEEF710000), size: 987136 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DDRAW.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\DCIMAN32.dll:DCIMAN32.dll (000007FEF8130000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DCIMAN32.dll', fileVersion: 6.1.7601.23807
C:\Windows\system32\SETUPAPI.dll:SETUPAPI.dll (000007FEFDDE0000), size: 1929216 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\SETUPAPI.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\CFGMGR32.dll:CFGMGR32.dll (000007FEFD9A0000), size: 221184 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\CFGMGR32.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\OLEAUT32.dll:OLEAUT32.dll (000007FEFE600000), size: 892928 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\OLEAUT32.dll', fileVersion: 6.1.7601.23775
C:\Windows\system32\DEVOBJ.dll:DEVOBJ.dll (000007FEFDC60000), size: 106496 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DEVOBJ.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\dwmapi.dll:dwmapi.dll (000007FEFC9F0000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dwmapi.dll', fileVersion: 6.1.7601.18917
C:\Windows\system32\WINMM.dll:WINMM.dll (000007FEF9400000), size: 241664 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINMM.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\IMM32.dll:IMM32.dll (000007FEFF880000), size: 188416 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\IMM32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\MSCTF.dll:MSCTF.dll (000007FEFDFC0000), size: 1085440 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSCTF.dll', fileVersion: 6.1.7601.23572
C:\Windows\system32\DNSAPI.dll:DNSAPI.dll (000007FEFCFD0000), size: 372736 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DNSAPI.dll', fileVersion: 6.1.7601.17570
C:\Windows\system32\IPHLPAPI.DLL:IPHLPAPI.DLL (000007FEFB0B0000), size: 159744 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\IPHLPAPI.DLL', fileVersion: 6.1.7601.17514
C:\Windows\system32\WINNSI.DLL:WINNSI.DLL (000007FEFB090000), size: 45056 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINNSI.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\WINHTTP.dll:WINHTTP.dll (000007FEF76E0000), size: 462848 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINHTTP.dll', fileVersion: 6.1.7601.23451
C:\Windows\system32\webio.dll:webio.dll (000007FEF7670000), size: 413696 (result: 0), SymType: '-nosymbols-', PDB: 'C:\Windows\system32\webio.dll', fileVersion: 6.1.7601.23375
C:\Windows\system32\profapi.dll:profapi.dll (000007FEFD990000), size: 61440 (result: 0), SymType: '-nosymbols-', PDB: 'C:\Windows\system32\profapi.dll', fileVersion: 6.1.7600.16385
C:\Kerbal Space Program\KSP_x64_Data\Mono\mono.dll:mono.dll (000007FEE8550000), size: 2994176 (result: 0), SymType: '-exported-', PDB: 'C:\Kerbal Space Program\KSP_x64_Data\Mono\mono.dll', fileVersion: 1.0.0.1
C:\Windows\system32\PSAPI.DLL:PSAPI.DLL (0000000077E50000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\PSAPI.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\MSWSOCK.dll:MSWSOCK.dll (000007FEFD150000), size: 348160 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSWSOCK.dll', fileVersion: 6.1.7601.23451
C:\Windows\system32\CRYPTBASE.dll:CRYPTBASE.dll (000007FEFD820000), size: 61440 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\CRYPTBASE.dll', fileVersion: 6.1.7601.23816
C:\Windows\system32\uxtheme.dll:uxtheme.dll (000007FEFC310000), size: 352256 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\uxtheme.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\atig6pxx.dll:atig6pxx.dll (000007FEF7E60000), size: 167936 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atig6pxx.dll', fileVersion: 22.19.662.4
C:\Windows\system32\api-ms-win-core-synch-l1-2-0.DLL:api-ms-win-core-synch-l1-2-0.DLL (000007FEFC9E0000), size: 12288 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\api-ms-win-core-synch-l1-2-0.DLL', fileVersion: 10.0.10586.788
C:\Windows\system32\atio6axx.dll:atio6axx.dll (000000006FD80000), size: 36478976 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atio6axx.dll', fileVersion: 22.19.662.4
C:\Windows\system32\dxva2.dll:dxva2.dll (000007FEF77B0000), size: 135168 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dxva2.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\atig6txx.dll:atig6txx.dll (000007FEEF620000), size: 249856 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atig6txx.dll', fileVersion: 22.19.662.4
C:\Windows\system32\atiadlxx.dll:atiadlxx.dll (000007FEF67D0000), size: 1572864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atiadlxx.dll', fileVersion: 22.19.662.4
C:\Windows\system32\PROPSYS.dll:PROPSYS.dll (000007FEFC370000), size: 1228800 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\PROPSYS.dll', fileVersion: 7.0.7601.17514
C:\Windows\system32\USERENV.dll:USERENV.dll (000007FEFDA00000), size: 122880 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\USERENV.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\WTSAPI32.dll:WTSAPI32.dll (000007FEFCA50000), size: 69632 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WTSAPI32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\WINTRUST.dll:WINTRUST.dll (000007FEFDC90000), size: 241664 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINTRUST.dll', fileVersion: 6.1.7601.23769
C:\Windows\system32\CRYPT32.dll:CRYPT32.dll (000007FEFDA50000), size: 1495040 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\CRYPT32.dll', fileVersion: 6.1.7601.23769
C:\Windows\system32\MSASN1.dll:MSASN1.dll (000007FEFD980000), size: 61440 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSASN1.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\CLBCatQ.DLL:CLBCatQ.DLL (000007FEFF7E0000), size: 626688 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\CLBCatQ.DLL', fileVersion: 2001.12.8530.16385
C:\Windows\System32\MMDevApi.dll:MMDevApi.dll (000007FEFBF00000), size: 307200 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\MMDevApi.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\wdmaud.drv:wdmaud.drv (000007FEF5B80000), size: 241664 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\wdmaud.drv', fileVersion: 6.1.7601.17514
C:\Windows\system32\ksuser.dll:ksuser.dll (0000000072D50000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\ksuser.dll', fileVersion: 6.1.7601.19091
C:\Windows\system32\AVRT.dll:AVRT.dll (000007FEFB600000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\AVRT.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\AUDIOSES.DLL:AUDIOSES.DLL (000007FEF5B30000), size: 323584 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\AUDIOSES.DLL', fileVersion: 6.1.7601.23471
C:\Windows\system32\msacm32.drv:msacm32.drv (000007FEF5B20000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\msacm32.drv', fileVersion: 6.1.7600.16385
C:\Windows\system32\MSACM32.dll:MSACM32.dll (000007FEF5B00000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSACM32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\midimap.dll:midimap.dll (000007FEF5AF0000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\midimap.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\xinput1_3.dll:xinput1_3.dll (00000000053A0000), size: 122880 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\xinput1_3.dll', fileVersion: 9.18.944.0
C:\Windows\system32\CRYPTSP.dll:CRYPTSP.dll (000007FEFD1B0000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\CRYPTSP.dll', fileVersion: 6.1.7601.23471
C:\Windows\system32\rsaenh.dll:rsaenh.dll (000007FEFCEB0000), size: 290816 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\rsaenh.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\mscms.dll:mscms.dll (000007FEEF660000), size: 638976 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\mscms.dll', fileVersion: 6.1.7601.23677
C:\Windows\system32\icm32.dll:icm32.dll (000007FEEBF40000), size: 270336 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\icm32.dll', fileVersion: 6.1.7601.23677
C:\Windows\system32\RpcRtRemote.dll:RpcRtRemote.dll (000007FEFD8D0000), size: 81920 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\RpcRtRemote.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\dhcpcsvc.DLL:dhcpcsvc.DLL (000007FEFAEA0000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dhcpcsvc.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\dhcpcsvc6.DLL:dhcpcsvc6.DLL (000007FEFAE80000), size: 69632 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dhcpcsvc6.DLL', fileVersion: 6.1.7601.17970
C:\Windows\system32\SspiCli.dll:SspiCli.dll (000007FEFD790000), size: 151552 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\SspiCli.dll', fileVersion: 6.1.7601.23816
C:\Windows\system32\credssp.dll:credssp.dll (000007FEFCD80000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\credssp.dll', fileVersion: 6.1.7601.23816
C:\Kerbal Space Program\KSP_x64_Data\Plugins\lingoona.grammar.kerbal.dll:lingoona.grammar.kerbal.dll (000007FEE8460000), size: 958464 (result: 0), SymType: '-exported-', PDB: 'C:\Kerbal Space Program\KSP_x64_Data\Plugins\lingoona.grammar.kerbal.dll', fileVersion: 1.5.5.511
C:\Windows\System32\fwpuclnt.dll:fwpuclnt.dll (000007FEFAF40000), size: 339968 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\fwpuclnt.dll', fileVersion: 6.1.7601.18283
C:\Windows\system32\rasadhlp.dll:rasadhlp.dll (000007FEFA350000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\rasadhlp.dll', fileVersion: 6.1.7600.16385
C:\Windows\System32\wship6.dll:wship6.dll (000007FEFD140000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\wship6.dll', fileVersion: 6.1.7600.16385
C:\Windows\System32\wshtcpip.dll:wshtcpip.dll (000007FEFCB30000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\wshtcpip.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\dbghelp.dll:dbghelp.dll (000007FEEF270000), size: 1200128 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dbghelp.dll', fileVersion: 6.1.7601.17514

========== OUTPUTING STACK TRACE ==================

0x0000000070967559 (atio6axx) DrvPresentBuffers
0x000000007095F8B1 (atio6axx) DrvPresentBuffers
0x000000007093CF89 (atio6axx) DrvPresentBuffers
0x0000000070942A06 (atio6axx) DrvPresentBuffers
0x00000000706B555E (atio6axx) DrvPresentBuffers
0x000000013F7DE387 (KSP_x64) RectT<int>::operator!=
0x000000013F7CF043 (KSP_x64) RegisterModule_CloudWebServices
0x000000013F7CF3A8 (KSP_x64) RegisterModule_CloudWebServices
0x000000013F7C94A4 (KSP_x64) RegisterModule_CloudWebServices
0x000000013F8262C8 (KSP_x64) RectT<int>::GetYMax
0x000000013F82A6FF (KSP_x64) RectT<int>::GetYMax
0x000000013F82338A (KSP_x64) RectT<int>::GetYMax
0x000000013F399788 (KSP_x64) Thread::RunThreadWrapper
0x0000000077A859CD (kernel32) BaseThreadInitThunk

========== END OF STACKTRACE ===========

**** Crash! ****

 

From textures not showing to just crashing. I wonder if all this info could be helpful, for here on the other hand is what happens on Linux, with the limited open-source amdgpu driver which only supports OpenGL 3.0 :

Spoiler

OpenGL:
    Version:  OpenGL 3.0 [3.0 Mesa 17.2.4]
    Renderer: AMD Radeon (TM) R9 380 Series (AMD TONGA / DRM 3.8.0 / 4.9.59-1-lts, LLVM 5.0.0)
    Vendor:   X.Org
    VRAM:     4069 MB
 ...

KSPShaderLoader - Loading shader bundle: SSTUShaders :: ... ../GameData/000_TexturesUnlimited/Shaders/sstushaders-universal.ssf
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

WARNING: Shader Unsupported: 'Legacy Shaders/Specular' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Specular' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Specular' - Pass 'PREPASS' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Specular' - Pass 'PREPASS' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Specular' - Pass 'DEFERRED' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Specular' - All passes removed
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'PREPASS' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'PREPASS' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'DEFERRED' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - All passes removed
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'PREPASS' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'PREPASS' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - Pass 'DEFERRED' has no vertex shader
WARNING: Shader Unsupported: 'Legacy Shaders/Bumped Specular' - All passes removed
WARNING: Shader Unsupported: 'SSTU/Masked' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'SSTU/Masked' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'SSTU/Masked' - All passes removed
...

WARNING: Shader Unsupported: 'SSTU/MaskedIcon' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'SSTU/MaskedIcon' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'SSTU/MaskedIcon' - All passes removed
...
Attempting to load shader data for: SSTU/SolarShader :: SSTU/MaskedIcon
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Shader: SSTU/PBR/Metallic (UnityEngine.Shader) did not have property: _Shininess

 

Maybe this only happens with AMD GPUs or very specific ones, maybe not. Finally, when running on Windows with the same mods that available memory could support in previous SSTU versions, the game memory load spiked bordering 15GB even without SSTU-PBR and crashed in Windows with D3D9 rendering so I had to sacrifice several mods, and it likewise crashed due to lack of enough memory with force-d3d11 until I deleted a some mods to reduce the load. Is Textures Unlimited increasing memory load a couple of GBs normal?

Edited by NotTheRealRMS
Link to comment
Share on other sites

4 minutes ago, NotTheRealRMS said:

Is Textures Unlimited increasing memory load a couple of GBs normal?

Should not be normal;  can't say as I've paid any attention to memory use specifically, but just TU by itself should have very minimal (close to zero) impact on memory use (it is only loading a couple of shaders).  (SSTU is pretty memory heavy, but certainly shouldn't be GBs worth; possibly a few hundred megs at most, but most of that is textures that should should be loaded into gfx ram rather than system ram).

Not sure what to say on the Linux/OpenGL problems.  I know I've got OSX/Mac users who have no problems with the shaders/etc, also had someone running an integrated Intel chip that had no problems.  I also tested it explicitly with OpenGL on Win10 (GTX970).   Quite likely driver or OS implementation related?

 

@tater -- you're not having any problems with OpenGL mode are you?

 

7 minutes ago, NotTheRealRMS said:

that only supports OpenGL 3.0 is probably to blame,

Ahh, yeah, that would be a problem.  Need at least OpenGL 3.2 for the PBR shaders.

I might be able to see about including a fallback option in TU to revert to the stock shaders... but it defeats the entire purpose of the mod.

 

(Seems like I'm going to need to add some disclaimers to the OP that only specific graphics APIs are supported / might not work on older hardware).

 

15 minutes ago, NotTheRealRMS said:

Maybe this only happens with AMD GPUs or very specific ones, maybe not.

What graphics hardware are you running?  (model, ram, etc)  (just asking so that I might look up feature support for the card)

Link to comment
Share on other sites

Just now, Shadowmage said:

What graphics hardware are you running?  (model, ram, etc)  (just asking so that I might look up feature support for the card)

It was already mentioned in the posted logs: a mid-range Radeon R9 380 with 4GB VRAM, it is good for what it is. It had its share of complications which were likely caused by bad drivers rather than hardware defects given similar problems never happened again after some recent driver updates, but at least it never fried. *Edit: and everything works correctly on D3D9 or 11

Edited by NotTheRealRMS
Link to comment
Share on other sites

@NotTheRealRMS  Apologies for the duplicated request; the logs were not appearing in the spoiler tags when I first responded (but they are present now).

I'll do some research on that card to see if it is hardware limitation.  It seems like it should be new enough to have hardware support for the features, which would point towards drivers/OS.  Will also run some additional tests on OpenGL on Windows to make sure I didn't goof anything up there.

Link to comment
Share on other sites

36 minutes ago, NotTheRealRMS said:

*Edit: and everything works correctly on D3D9 or 11

Could you clarify -- are you saying that TexturesUnlimited works fine for you under DX9/11, or was that referring to EVE/SVE?

(I have no doubt that there are OpenGL problems, but the wording on the DX9/11 was a bit unclear)

Link to comment
Share on other sites

Just now, Shadowmage said:

Could you clarify -- are you saying that TexturesUnlimited works fine for you under DX9/11, or was that referring to EVE/SVE?

(I have no doubt that there are OpenGL problems, but the wording on the DX9/11 was a bit unclear)

TexturesUnlimited works fine with DX9/11. I just had to trim some "fat" from the GameData folder first. I checked the parts in the VAB with PBR and they showed up without any glitches. The crash only happens with OpenGL 4.5 rendering through -force-opengl.

Edited by NotTheRealRMS
Link to comment
Share on other sites

9 minutes ago, NotTheRealRMS said:

TexturesUnlimited works fine with DX9/11. I just had to trim some "fat" from the GameData folder first. I checked the parts in the VAB with PBR and they showed up without any glitches. The crash only happens with OpenGL 4.5 rendering through -force-opengl.

Thanks much for the confirmation and information.  I'll do some checks tonight on memory use under DX9, DX11, and OpenGL on windows to see if there is anything odd going on there.  Really shouldn't cause much/if any increase beyond the loading of additional textures (and those shouldn't be multi-GB worth).

Sadly it sounds like there might be a hardware/driver problem for that card (under OpenGL at least).  Which is kind of odd, as when I look at the specs it states it should have all of the features needed from a hardware perspective.  Might be some driver-level settings that could be tweaked, but its been many years since I've played with those.

 

Link to comment
Share on other sites

Linux user here. Can confirm the OpenGL issue is a major headache. Even worse, Mesa (the 3D library all video drivers use on Linux) on my system doesn't give KSP an OpenGL version > 3.0 , and if I force it with MESA_GL_VERSION_OVERRIDE the game crashes on start.

My GPU is an R9 290, btw.

Edited by T-10a
Link to comment
Share on other sites

Some preliminary testing on memory use and openGL compatibility (windows 10, GTX970).  All data taken from a load to main menu + 30s pause to allow the first GC to occur:

  SSTU+TU TU Only Stock-NoMods
DX9 3479 2369 2361
DX11 2376 1844 1832
OpenGL 2441 1633 1623

I'm not seeing any incompatibilities or excessive memory usage in any of the tested scenarios.  Obviously SSTU carries a lot of textures with it, but TU by itself is only increasing RAM use by ~10mb (which is reasonable considering the # of shaders it is loading and the other script-side memory use).

 

9 minutes ago, T-10a said:

Linux user here. Can confirm the OpenGL issue is a major headache. Even worse, Mesa (the 3D library all video drivers use on Linux) on my system doesn't give KSP an OpenGL version > 3.0 , and if I force it with MESA_GL_VERSION_OVERRIDE the game crashes on start.

That is quite sad to hear considering OpenGL is the only option under Linux.  I know firsthand that graphics are not the easiest thing to work on, and drivers less-so, but I'm surprised that the combined geekdom of the world hasn't found a solution.  Though, I suppose at least part of the blame would have to come from the hardware vendors -- they really should be the people that provide working and usable drivers for all modern OS's (I know the linux marketshare is low, but it is certainly >0).

Link to comment
Share on other sites

12 hours ago, Shadowmage said:

That is quite sad to hear considering OpenGL is the only option under Linux.  I know firsthand that graphics are not the easiest thing to work on, and drivers less-so, but I'm surprised that the combined geekdom of the world hasn't found a solution.  Though, I suppose at least part of the blame would have to come from the hardware vendors -- they really should be the people that provide working and usable drivers for all modern OS's (I know the linux marketshare is low, but it is certainly >0).

My guess is that the focus on graphics drivers is more on stability than new features.

Though, as I stated in my post, I am using an older GPU. Newer GPUs may in fact natively support newer OpenGL versions in AMDGPU

Link to comment
Share on other sites

Okay, so I started over from scratch on the stock part PBR stuff.

This new version is less "let's change everything" and instead keep stock exactly as it always was except if the whole part is metal or if an entire mesh is metal, then those are made metallic and everything else that contains a specular layer is set to the new shader so that the specular can make use of reflections.

There are couple of exceptions where I still set an item to be metallic even though not all of the mesh was supposed to be:

  • If there is just a small label or line on it, such as with a battery or octo probes, I went ahead and set them to metal; it causes the label to also look metallic, but that shouldn't be a big issue.
  • If there is a small area of paint that does not affect the overall color theme; for example, on the small science experiments and Twitch engine.
  • I changed the 2.5m bi, tri, and quad adapters to be metallic to match the 2.5m fuel tanks.

For now the solar panels have their bases set as metal (except the painted covered ones), and the panels themselves glossy; I haven't been able to properly figure out the new Solar Panels shader yet.

 

This should include all Stock parts, please let me know if you find any issues:

https://drive.google.com/open?id=1UDpX8xovVpL0q0RBtDMUC3FXQxbPHG5O

 

p.s. This completes pass 1 on the stock parts. Pass 2 is much more complicated and will require me to either learn graphic design or get help from someone who already does. That being the case, I will now move onto making .cfg's for popular part mod-packs.

 

[Update]
I just realized I didn't zip it at a higher level. Drop the contents into a folder at GameData\TexturesUnlimited_Stock\. In a future update, this mod will allow adjusting colors and values in the cfg and it will no longer matter where you put it, but for now I have to use a couple of 1 pixel textures.

Edited by Electrocutor
Link to comment
Share on other sites

1 hour ago, Electrocutor said:

I haven't been able to properly figure out the new Solar Panels shader yet.

Its basically the PBR/Metallic shader, that uses an added texture input as a thickness-map to simulate subsurf scattering/backlighting.  In order to make good use of it it really requires custom textures, but you might be able to use the parameter inputs to get something working.

Its actually undergoing some revisions for this weekends' update, so might be best to hold off until then on the solar panel work.

 

 

Looks like the rest of your stock conversion is working quite well to me, considering the stock textures you are working with....

DYQ0AgC.png

Note the subtle blue glow from the planet, and esp. the air intakes are picking it up.

I gotta give you credit... you even patched the struts :)   Well done.

nU0aB69.png

Those stock docking ports actually look pretty legit when they are all shiny and metal.

Link to comment
Share on other sites

Even though Val has repeatedly asked them to stop putting holes in the tarmac...

5Gh2ZKm.jpg

 

I'm curious now how planetshine, custom PQS settings, and other visual improvements will make the game look; this is all just stock so far..

6APprG3.jpg

Edited by Electrocutor
Link to comment
Share on other sites

35 minutes ago, Electrocutor said:

I'm curious now how planetshine, custom PQS settings, and other visual improvements will make the game look; this is all just stock so far..

Scatterer looks great in the reflections; really aids in the view from orbit (and orbit on other bodies).  Not sure planetshine would do much, as its function is already handled by the reflection probes; would depend on how exactly it accomplishes its effect.

Link to comment
Share on other sites

2 hours ago, Shadowmage said:

nU0aB69.png

Those stock docking ports actually look pretty legit when they are all shiny and metal.

I agree on the ports, but what is going on with the falloff on the rubber tires? They look like they're covered in a thin layer of translucent jello. But maybe it's always done that and I'm just noticing because everything else looks so much better.

Link to comment
Share on other sites

6 hours ago, vossiewulf said:

I agree on the ports, but what is going on with the falloff on the rubber tires? They look like they're covered in a thin layer of translucent jello. But maybe it's always done that and I'm just noticing because everything else looks so much better.

Those tires have a very high smoothness set by Squad in the specular map on the side-wall and the ribs. The hub and other rubber parts do not. The high specular is what causes that sheen. For the other tires (except the one with the metal wheel), I just exclude the wheel completely so the rubber is matte; in a perfect world, these tires would have the hub and ribs as their own mesh and I could just set them to metallic they should be, but that is not an option. During pass 2 is when I would be creating custom texture maps for each part to be able to more accurately set values: but that is a whole lot of work, so instead I've decided to work on some mod support first.

Link to comment
Share on other sites

5 hours ago, Electrocutor said:

During pass 2 is when I would be creating custom texture maps for each part to be able to more accurately set values:

I might have some ideas that can help out with phase-2.  I assume one of the things you'll be needing for that work will be UV maps for all of the stock parts, which I can possibly help generate through some code.  Probably a ton faster than importing the models through the blender-mu plugin, esp. when I could have it just dump 'the entire SQUAD folder'.  (The alternate I suppose would be to contact whomever has access to the Venn's revamp art sources, and try and beg some UV maps out of them).

Will poke about with implementing a application that can output .svg files for a given .mu input file; or rather, as it'll be launched from in-game, it will work from the in-memory model-data (parsing the .mu models is its own special fun).  No guarantees, and it probably won't be done for at least a few days.

Edit:  As I was bored during lunch at work, the .svg ripper has been written.  Input a game-object, and it'll spit out UV maps for each mesh in the object as .svg files.  Still need to link it into the one of the KSP mods' codebases, and then add a method to throw all the models from the GameDatabase.loadedModels list at it.

Gah, I wish I were as good (err, fast?) at modeling/texturing as I am at coding.  Give me an hour and I can accomplish -something- in code; the same hour spent on modeling/texturing usually results in me spinning the model around a bunch trying to figure out what to do... (I know the how's, its the what's that I struggle with).

Edited by Shadowmage
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...