2
votes

I'm trying to get dds textures to work with three.js. I have a model in json (converted from .obj + .mtl using three.js converter) using baked textures in jpg/png format. I've created a dds texture (DXT1 with mipmaps). When I load model (using JSONLoader) which uses DDS texture the UV map doesn't seems to be applied. I'm getting no mapping at all.

For example plane with jpg texture:

enter image description here

And by switching to DDS I am getting this:

enter image description here

is it expected behavior? Or maybe DDS textures doesn't support uv maps? Or maybe it is some sort of bug in three.js?

I would really use any help guys.

1
Three.js supports DDS. Search the three.js examples for the words "compressed" and/or "DDS".WestLangley
I know that. The second screenshot presents DDS texture applied. My question concerns uv mapping of DDS and why it behaves differently than JPG/PNG textures?nehvaleem

1 Answers

0
votes

As explained here https://github.com/mrdoob/three.js/issues/4316 dds textures can't be flipped like normal jpg/png images so they appear upside down. The solution would be to flip the source image and then compress it or make a shader aware of that and flip uv coords.