SDK cannot locate .dds, but it's there!

I’m trying to import a .obj/.mtl which refers to 2 .dds textures. The model and one of the textures imports fine, but the other texture is listed in the window ‘Assets failed to load’. The SDK reports that it ‘cannot locate’ it. The file exists, the filename is correct and contains no spaces or high-UTF characters, and the file is valid according to both Irfanview and ImageMagick. If I change the filename to another image, it usally works, but there are other files that also exhibit this problem. This is the offending .mtl file, and blue.dds is the offending .dds :

[code]# materials : 2
newmtl material0
Ka 0.5000 0.5000 0.5000
Kd 1.0000 1.0000 1.0000
illum 1
map_Ka red.dds
map_Kd red.dds

newmtl material1
Ka 0.5000 0.5000 0.5000
Kd 1.0000 1.0000 1.0000
illum 1
map_Ka blue.dds
map_Kd blue.dds[/code]

And this is what ImageMagick’s identify.exe has to say for itself : Image: blue.dds Format: DDS (Microsoft DirectDraw Surface) Class: DirectClass Geometry: 1024x1024+0+0 Units: Undefined Type: TrueColor Endianess: LSB Colorspace: sRGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit Channel statistics: Red: min: 0 (0) max: 255 (1) mean: 31.2768 (0.122654) standard deviation: 34.7419 (0.136243) kurtosis: 5.55584 skewness: 2.05937 Green: min: 0 (0) max: 255 (1) mean: 31.0329 (0.121698) standard deviation: 33.6822 (0.132087) kurtosis: 5.85505 skewness: 2.06179 Blue: min: 0 (0) max: 255 (1) mean: 30.1348 (0.118176) standard deviation: 31.5456 (0.123708) kurtosis: 6.83487 skewness: 2.09299 Image statistics: Overall: min: 0 (0) max: 255 (1) mean: 30.8148 (0.120843) standard deviation: 33.3497 (0.130783) kurtosis: 6.069 skewness: 2.07799 Rendering intent: Perceptual Gamma: 0.454545 Chromaticity: red primary: (0.64,0.33) green primary: (0.3,0.6) blue primary: (0.15,0.06) white point: (0.3127,0.329) Interlace: None Background color: white Border color: srgb(223,223,223) Matte color: grey74 Transparent color: black Compose: Over Page geometry: 1024x1024+0+0 Dispose: Undefined Iterations: 0 Compression: DXT1 Orientation: Undefined Properties: date:create: 2013-09-12T09:22:53+01:00 date:modify: 2013-09-10T14:15:25+01:00 signature: 25aead6cd64004afb0baf636409e7438eaa29ec4e2251c881c0972cdb6c811f2 Artifacts: filename: blue.dds verbose: true Tainted: False Filesize: 699KB Number pixels: 1.049M Pixels per second: 43.69MB User time: 0.031u Elapsed time: 0:01.024 Version: ImageMagick 6.8.0-1 2012-10-15 Q16 http://www.imagemagick.org

Any idea where I might look for a solution? Have I stumbled into a gotcha?

Ta.

I think I’ve found the problem. It looks like the SDK can’t handle paths in the map command in the .mtl file - if I move the dds files into the same folder as the .mtl, it works, otherwise any use of ‘/’ or ‘’ in the filename results in the error above. I can’t seem to find a canonical reference to the .mtl format, but from what I’ve seen, paths aren’t specifically forbidden.

Ironically, the sanitized version I posted above would’ve worked if I’d moved the .dds files.

I’m not certain I’ve solved this, but it’s working for now.

1 Like

http://people.sc.fsu.edu/~jburkardt/data/mtl/mtl.html actualyl it is specified to only name! the file not the path, and normally that file should not even be a texture, but the specifiaction is long overtaken by reality, where everyone supports what is needed when he needs it.

1 Like

The import window clearly says that the image should be in the same folder as the model anyway.

@normen said: The import window clearly says that the image should be in the same folder as the model anyway.

3.0 RC2 says ‘* The model textures have to be in the same folder as the model or a subfolder’…? My textures were in a subfolder, one level down.

@Empire Phoenix said: http://people.sc.fsu.edu/~jburkardt/data/mtl/mtl.html actualyl it is specified to only name! the file not the path, and normally that file should not even be a texture, but the specifiaction is long overtaken by reality, where everyone supports what is needed when he needs it.
Ah, I see. I wasn't sure, because the .obj/.mtl files I was working with were broken anyway. Thanks for the reference.
@Vroomfondel said: 3.0 RC2 says '* The model textures have to be in the same folder as the model or a subfolder'...? My textures were in a subfolder, one level down.

And the path in the mtl file was relative? At any instance you can specify “lost” images in 3.0 Stable

@normen said: And the path in the mtl file was relative? At any instance you can specify "lost" images in 3.0 Stable

Yes. I tried ‘sub/file.dds’, ‘/sub/file.dds’, ‘./sub/file.dds’, ‘\sub\file.dds’ and ‘.\sub\file.dds’ with no luck.