Running tests on Linux I got DLLNotFoundException for nvtt (NVidia Texture Tools) because it depends on libpng 1.2. I had libpng installed, but not 1.2. Installing it on Arch Linux from the official repositories was easy and fixed the issue. We should probably include libpng 1.2 as a dependency.
cc @cra0zy
Which is nuts because we don't use any PNG functionality in NVTT. I would
really like to get a more specialised DXT encoder that doesn't have the
bloat or inefficiencies of NVTT.
@rds1983, maybe you are interested in porting stb_dxt using Sichem like you have done for stb_image?
That would be a great alternative, giving us a fast, fully managed encoder.
The thing to watch with other implementations is the quality of the
encoding. The choice of the high and low color values for each block is
paramount to getting good quality out of DXT.
Alternatively we could port the relevant parts from NVTT since it's MIT licensed.
The choice of the high and low color values for each block is paramount to getting good quality out of DXT.
That's not in the spec?
Hey, @Jjagg.
Yes, I am interested. stb_vorbis turned out too hard for me(3 dimensional arrays dont like being converted). But stb_dxt is easy one.
So it's already in the StbSharp in those two files:
https://github.com/rds1983/StbSharp/blob/master/StbSharp/Stb.Dxt.Generated.cs
https://github.com/rds1983/StbSharp/blob/master/StbSharp/Stb.Dxt.cs
It should be easy to include that code into MG as StbSharp environment is already there: https://github.com/MonoGame/MonoGame/tree/develop/MonoGame.Framework/Utilities/Imaging
Besides stb_dxt I've also converted method stbgl__compress from there: https://github.com/nothings/stb/blob/9d9f75eb682dd98b34de08bb5c489c6c561c9fa6/tests/caveview/stb_gl.h#L527
As it's only sample of using stb_dxt I've found.
Now my version of that method is there:
https://github.com/rds1983/StbSharp/blob/7787428f684469082fea70e883c6c63c4198ddfb/StbSharp/Stb.Dxt.cs#L42
I've used it to make sure that StbSharp's DXT compressor makes same result byte-wise as original stb_dxt.
Good luck!
Didn't even realize there was a dependency ¯_(ツ)_/¯, mostly because I found Linux graphics drivers to be a bit buggy with compressed textures so I avoided using them.
isnt this first of all related to
sudo apt-get install libnvtt-dev
??
The MG installer ships with the nvtt lib. The error message is confusing and incorrect in this case because the issue is not with nvtt itself, but a missing dependency.
Mono has a nice page about debugging the issue here: https://www.mono-project.com/docs/advanced/pinvoke/dllnotfoundexception/#troubleshooting-dllnotfoundexceptions
You can use the instructions on that page to diagnose if you are running into the same issue or if it's something else.
Add catch blocks or something for proper errors handling :)
Also makes no sense that I can install program without dependencies
Who has a problem in ubuntu 18.04 or 18.10
download libpng1.2 from here:
https://packages.ubuntu.com/xenial/amd64/libpng12-0/download
install,
apt-get update
and restart pc :)
if it didn't work, try again or I don't know, rage, go to smoke and brake couple of keyboards until it works.
Add catch blocks or something for proper errors handling :)
We can't distinguish DllNotFound due to lib not found or one of its dependencies not found.
Also makes no sense that I can install program without dependencies
Ideally we'd have a custom binary that statically links to all dependencies, but that's not always very straightforward to set up.
Screw all these fbx x bugs with textures compressions and porting to fbx from blender when you have to change scale to 0.01 to get everything from 0 to 1 scale and hopeing that all stuff will compile.
Going to draw simple meshes in code.
Its unusable for now.
Btw can someone make fbx viewer ?? Before building models in linux??