๐ŸŽ‰ Celebrating 25 Years of GameDev.net! ๐ŸŽ‰

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

texconv source input folder?

Started by
6 comments, last by cozzie 3ย years, 1ย month ago

Hi all,

I'm working on a batch conversion tool for textures in my asset pipeline. But someone I can't get texconv.exe to fetch source textures/files from another folder then the current working directory. Which makes it very hard to fetch source textures from all subfolders in my parent folder (from where I execute the batch).

Do you know if there's a way to specify the source folder? I've tried most of the settings and variations I could think of.

Example:

texconv.lnk -y -l -w 2048 -h 2048 -o output/ -f BC5_SNORM sources/Road_Pavement_NormalMap.TGA

Where โ€˜sourcesโ€™ is the child folder of the current working directory.

Any input is appreciated, I'm hoping to prevent copying over all source textures, then convert and then remove the source files again.

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

Advertisement

try using ./ as the current dir

./sources/Road_Pavement_NormalMap.TGA

๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚<โ†The tone posse, ready for action.

BTW, I go into properties on shortcuts and remove the Start in: path so the shortcut is always relative to the directory it is in.

๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚<โ†The tone posse, ready for action.

hi @fleabay , tried that (again just now to be sure), same result );

texconv.lnk -y -l -w 2048 -h 2048 -o output/ -f BC5_SNORM ./sources/Road_Pavement_NormalMap.TGA

Texconv fails.

It looks like it's doing something weird with the output folder:

reading ./sources/x_Pavement_Diffuse.JPG (2048x2048 R8G8B8A8_UNORM_SRGB 2D ร“:Opaque) as (2048x2048,12 BC1_UNORM_SRGB 2D ร“:Opaque)

writing output-hires/\./sources/x_pavement_diffuse.dds FAILED (80070003)

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

The problem seems to be that texconv doesn't strip the folder out of the source file, so it appends output folder + source folder + filename, as the output

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

If you're comfortable with C++ you could always modify the source code to your needs. It shouldn't take much, but you know how that can go.

I assume this is the version you are using. I found a couple different ones.

https://github.com/Microsoft/DirectXTex/wiki/Texconv

๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚<โ†The tone posse, ready for action.

Thanks. Iโ€™ve decided to temp copy the source textures to the working directory, and remove them after conversion. safer to leave texconv alone ?

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

This topic is closed to new replies.

Advertisement