Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space in texture names are truncated within map_data_get_textures #6

Open
thorsummoner opened this issue Jan 30, 2022 · 0 comments
Open

Comments

@thorsummoner
Copy link

I had an artist using trenchboom generated map file, using textures with spaces and dashes.

ex 00001111 AAAA - 2222 - My Name Is.png

// brush 6
{
( -96 -80 32 ) ( -96 -78.75 32 ) ( -96 -80 33 ) __TB_empty 0 0 0 1.25 1
( -96 -80 32 ) ( -96 -80 33 ) ( -95 -80 32 ) __TB_empty 0 0 0 1 1
( -96 -80 32 ) ( -95 -80 32 ) ( -96 -78.75 32 ) __TB_empty 0 0 0 1 1.25
( -80 80 128 ) ( -80 81.25000000000001 128 ) ( -79 80 128 ) __TB_empty 0 0 0 1 1.25
( -80 80 128 ) ( -79 80 128 ) ( -80 80 129 ) __TB_empty 0 0 0 1 1
( -80 80 128 ) ( -80 80 129 ) ( -80 81.25000000000001 128 ) "texture_group/00001111 AAAA - 2222 - My Name Is" 415.5 426.66666 0 0.19253911 0.075
}

On the other end, I was having the texture list contain textures named texture_group/00001111.png which looks truncated to me. I am not sure but I think the UV data was messed up too.

I was trying to confirm this issue is in libmap, the middle ware libs appears to directly pass-through map_data_get_textures so I think it must be.

I would have liked to offer a patch, Sorry, I didin't see an obvious way to add a test case to this project or an obvious build entry point to further diagnose so I would want to get some blessed suggestions first.

I had the artist "fixup" their new textures by applying this bash oneliner

find textures/ -iwholename \*.png | while read line; do mv "$line" "$(echo "$line" | sed -e 's, ,_,g' )"; done

and then go back through their map files and re-apply textures. They were pretty grumpy about that.
But it worked, so I'm reporting back that quoted texture names seem to break if they contain white space in libmap when they don't in the os or trench boom.

(unrelated) note, the artist also had file names like foo....png (with a crude three-period ellipsis because of file name length limits elsewhere), pretty sure these were breaking qodot's name formatted but that might have been fine if the file names weren't getting truncated here first.

Thanks for the report, aside from this hurdle, everyone was very positive about qodot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant