Upvote Upvoted 0 Downvote Downvoted
Meaning of this byte sequence in VTF hex dump?
posted in Off Topic
1
#1
0 Frags +

I'm trying to understand the file structure of VTFs but this particular byte sequence at the 4th address (0003h) confuses me. Perhaps I'm misunderstanding, but the first 2 addresses are the header, the 3rd is the low-res (file?) thumbnail data, and then after that should be the high-res image data for the crosshair (for version 7.2 VTFs). I don't see why the 4th address would be the same across different VTFs if it is actually part of the high-res image data, since that would obviously be different. Does it mark the start of a mipmap or something?

I'm trying to understand the file structure of VTFs but [url=https://imgur.com/a/cEpZEYo]this particular byte sequence[/url] at the 4th address (0003h) confuses me. Perhaps I'm misunderstanding, but the first 2 addresses are the header, the 3rd is the low-res (file?) thumbnail data, and then after that should be the high-res image data for the crosshair (for version 7.2 VTFs). I don't see why the 4th address would be the same across different VTFs if it is actually part of the high-res image data, since that would obviously be different. Does it mark the start of a mipmap or something?
2
#2
-5 Frags +

what

what
3
#3
11 Frags +

I don't think you're posting this in the right place, try the AlliedModders discord, the Source Engine discord, or the TF2Maps discord.

I don't think you're posting this in the right place, try the [url=https://discord.gg/HUc67zN]AlliedModders discord[/url], the [url=https://discord.com/invite/sourceengine]Source Engine discord[/url], or the [url=https://discord.com/invite/YKDv6XR]TF2Maps discord[/url].
4
#4
8 Frags +

https://developer.valvesoftware.com/wiki/Valve_Texture_Format#VTF_header

valve wiki says that the header is 80 bytes (so not 32), and that bytes 48 through 51 are for the bumpmap scale

https://developer.valvesoftware.com/wiki/Valve_Texture_Format#VTF_header

valve wiki says that the header is 80 bytes (so not 32), and that bytes 48 through 51 are for the bumpmap scale
5
#5
4 Frags +
ampereI don't think you're posting this in the right place, try the AlliedModders discord, the Source Engine discord, or the TF2Maps discord.

Thanks for the links, wasn't aware of these communities.

[quote=ampere]I don't think you're posting this in the right place, try the [url=https://discord.gg/HUc67zN]AlliedModders discord[/url], the [url=https://discord.com/invite/sourceengine]Source Engine discord[/url], or the [url=https://discord.com/invite/YKDv6XR]TF2Maps discord[/url].[/quote]

Thanks for the links, wasn't aware of these communities.
6
#6
0 Frags +
turbochad69https://developer.valvesoftware.com/wiki/Valve_Texture_Format#VTF_header

valve wiki says that the header is 80 bytes (so not 32), and that bytes 48 through 51 are for the bumpmap scale

Maybe I'm just blind and/or dumb but where does it say bytes 48-51 are for bumpmap scale?

[quote=turbochad69]https://developer.valvesoftware.com/wiki/Valve_Texture_Format#VTF_header

valve wiki says that the header is 80 bytes (so not 32), and that bytes 48 through 51 are for the bumpmap scale[/quote]

Maybe I'm just blind and/or dumb but where does it say bytes 48-51 are for bumpmap scale?
7
#7
5 Frags +
swampcreatureMaybe I'm just blind and/or dumb but where does it say bytes 48-51 are for bumpmap scale?

Right in the header spec I linked. There are 48 bytes before the value for bumpmap scale, so naturally it will start at byte 48. In the file in your screenshot, the bumpmap scale is set to 1.0. It's not surprising that it's also set to that value in other textures, which was the basis of your question if I understand correctly.

[quote=swampcreature]
Maybe I'm just blind and/or dumb but where does it say bytes 48-51 are for bumpmap scale?[/quote]
Right in the header spec I linked. There are 48 bytes before the value for bumpmap scale, so naturally it will start at byte 48. In the file in your screenshot, the bumpmap scale is set to 1.0. It's not surprising that it's also set to that value in other textures, which was the basis of your question if I understand correctly.
Please sign in through STEAM to post a comment.