Jump to content
OGXbox.com

Python Script Function Inverter


Felipe_Desenvolver
 Share

Recommended Posts

1. I looked at the script, it loads a provided Half Life material (XTF) and adds it to a texture list. (presume NOESIS does the rest but its not in this script)

Clarify:
a) the XTF you're asking for is material/texture format which the game Half Life uses?
b) not the XTF xbox truetype font format ?

2. noting the script file you linked does not convert XTF to PNG nor convert PNG to XTF. 

Confirm, you want to:
a. convert from PNG to XTF?
b. convert from XTF to PNG?
c. convert both ways? 

3. What is your goal? are you trying to make a plugin for NOESIS?

Link to comment
Share on other sites

2 hours ago, corona2222 said:

1. Eu olhei para o script, ele carrega um material Half Life fornecido (XTF) e o adiciona a uma lista de texturas. (presumimos que NOESIS faz o resto mas não está neste script)

Esclareça:
a) o XTF que você está pedindo é o formato de material/textura que o jogo Half Life usa?
b) não é o formato de fonte XTF xbox truetype?

2. Observe que o arquivo de script que você vinculou não converte XTF em PNG nem converte PNG em XTF. 

Confirme, você deseja:
a. converter de PNG para XTF?
b. converter de XTF para PNG?
c. converter as duas formas? 

3. Qual é o seu objetivo? estás a tentar fazer um plugin para o NOESIS?

1 - a - I want XTF For HL2 Material, NOT XBOX FONT

2 - Yes, It Converts XTF Textures Into Any Other File, I Believe By Help From Noesis As You Said

2 - b - WISH PNG TO XTF

3 - I'm modifying HL2 XBOX and I need a tool that does this conversion, and I'm asking for help for someone who understands more about Python, because I don't understand much. But it doesn't necessarily have to be Python, any kind of tool that does the conversion is welcome!

Edited by Felipe_Desenvolver
Link to comment
Share on other sites

just an update looking more into this:

FYI the python scrip only extracts a bit of header and the main texture data. Theres more data after the file header, and also after the main image data section, which may be mipmaps and some time/date/crc, this needs to be figured out in order to create a valid XTF file.

I found a good description of the XTF header, and S3 compression used (DX1/5 etc) for the main image data, but rest of the format is a mystery I could not find information, so it needs some guess work.

Link to comment
Share on other sites

12 hours ago, corona2222 said:

apenas uma atualização olhando mais para isso:

Para sua informação, o script python extrai apenas um pouco do cabeçalho e os principais dados de textura. Há mais dados após o cabeçalho do arquivo e também após a seção de dados da imagem principal, que podem ser mipmaps e alguma hora/data/crc, isso precisa ser descoberto para criar um arquivo XTF válido.

Encontrei uma boa descrição do cabeçalho XTF e da compactação S3 usada (DX1/5, etc.) para os dados da imagem principal, mas o restante do formato é um mistério.

there is bone

  • Like 1
Link to comment
Share on other sites

18 minutes ago, Bowlsnapper said:

Indeed. There IS bone... Giggity.

Felipe, is this to help assist in your attempt to run HL2 in 720P?

Let's say yes and no, because that would help a lot too, Today we have methods of compressing files without as much loss of quality as in the past, in this way we would have much better textures running in the game without the RAM overloading with 720p. But I'm more focused at the moment on some EP1 textures that I want to add so that the port can run the maps

Link to comment
Share on other sites

5 minutes ago, Felipe_Desenvolver said:

Let's say yes and no, because that would help a lot too, Today we have methods of compressing files without as much loss of quality as in the past, in this way we would have much better textures running in the game without the RAM overloading with 720p. But I'm more focused at the moment on some EP1 textures that I want to add so that the port can run the maps

I see. Yes, the textures in that game ARE very highly compressed and were always extremely ugly and unsightly. So if you manage to improve them, that would be pretty cool. :)

Link to comment
Share on other sites

5 hours ago, Bowlsnapper said:

I see. Yes, the textures in that game ARE very highly compressed and were always extremely ugly and unsightly. So if you manage to improve them, that would be pretty cool. :)

Yes definitely! But I need someone to help me with this tool, don't you know someone who has good experience in C? Another thing, do you think HL2 on Xbox would gain more respect with improved textures and a slightly higher FPS?

Edited by Felipe_Desenvolver
Link to comment
Share on other sites

50 minutes ago, Felipe_Desenvolver said:

Yes definitely! But I need someone to help me with this tool, don't you know someone who has good experience in C? Another thing, do you think HL2 on Xbox would gain more respect with improved textures and a slightly higher FPS?

If it can be accomplished, sure. As long as the console can keep up with a stock CPU and RAM.

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, Felipe_Desenvolver said:

I need someone to help me with this tool, don't you know someone who has good experience in C?

🖐️😉 

"Today we have methods of compressing files without as much loss of quality as in the past"

We still use the same compression algorithm for og xbox textures today (BC). Why do you think the texture compression can be less lossy today?

Edited by corona2222
Link to comment
Share on other sites

21 minutes ago, corona2222 said:

🖐️😉 

"Today we have methods of compressing files without as much loss of quality as in the past"

We still use the same compression algorithm for og xbox textures today (BC). Why do you think the texture compression can be less lossy today?

because if there isn't a convertor I'll have to find a method in the grabber and that way you can take a high resolution file and compress the quality and then render it with the same aspects of the original, that's how I edited LOADER.XPR the files have 22mb and mine were giving 94mb. To solve it I had to use this method, and the textures there are DDS and TGA. Perhaps the same theory is repeated with the game's textures. No final file ended up being 24mb!

Edited by Felipe_Desenvolver
Link to comment
Share on other sites

1 hour ago, Felipe_Desenvolver said:

because if there isn't a convertor I'll have to find a method in the grabber and that way you can take a high resolution file and compress the quality and then render it with the same aspects of the original, that's how I edited LOADER.XPR the files have 22mb and mine were giving 94mb. To solve it I had to use this method, and the textures there are DDS and TGA. Perhaps the same theory is repeated with the game's textures. No final file ended up being 24mb!

I wish Google Translate worked better. I'm truly interested in what Felipe has to say.

Link to comment
Share on other sites

4 hours ago, Bowlsnapper said:

I wish Google Translate worked better. I'm truly interested in what Felipe has to say.

google translator sucks. But in short, I don't compress a DDS file, but the brute PNG file and then convert it to DDS which will already be weighing much less. This way the images are much lighter and with high definition as I did in LOADER.XPR

Edited by Felipe_Desenvolver
Link to comment
Share on other sites

50 minutes ago, Felipe_Desenvolver said:

google translator sucks. But in short, I don't compress a DDS file, but the brute PNG file and then convert it to DDS which will already be weighing much less. This way the images are much lighter and with high definition as I did in LOADER.XPR

Okay, I understand. :) Hopefully you can find a capable coder who can give you some help!

Link to comment
Share on other sites

50 minutes ago, Bowlsnapper said:

Okay, I understand. :) Hopefully you can find a capable coder who can give you some help!

Yes, hopefully.... Can you please help me understand what this guy means by "convert .dds to .xtf by hex by editing the .dds, replacing the first few bytes of an original .xtf file. This obviously has problems , as there is no room for changes (like resolution and such)" https://github.com/NeilJed/VTFLib/issues/9

Link to comment
Share on other sites

2 minutes ago, Felipe_Desenvolver said:

Yes, hopefully.... Can you please help me understand what this guy means by "convert .dds to .xtf by hex by editing the .dds, replacing the first few bytes of an original .xtf file. This obviously has problems , as there is no room for changes (like resolution and such)" https://github.com/NeilJed/VTFLib/issues/9

I tried to do this conversion that he said in DDS and it got the yellow image scrambled, Now with TGA it got scrambled green. I'm trying with XBX

 

Link to comment
Share on other sites

27 minutes ago, Felipe_Desenvolver said:

I tried to do this conversion that he said in DDS and it got the yellow image scrambled, Now with TGA it got scrambled green. I'm trying with XBX

 

I'm assuming the wrong data is being modified, so the address would be incorect. But I honestly know nohing of hte process. I wish I could help. :(

Link to comment
Share on other sites

On 2/10/2023 at 4:01 AM, Felipe_Desenvolver said:

can you please help me understand what this guy means by "convert .dds to .xtf by hex by editing the .dds, replacing the first few bytes of an original .xtf file. 

On 2/10/2023 at 4:03 AM, Felipe_Desenvolver said:

I tried to do this conversion that he said in DDS and it got the yellow image scrambled, Now with TGA it got scrambled green. I'm trying with XBX

 

Yellow and green because data is not in right place in the file or wrong data.

need to know exactly what to modify, otherwise it is like throwing a basketball blindfolded and pure luck to get a hoop. 😆

what is XBX?

who advise you hex editing? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

Board Life Status


Board startup date: April 23, 2017 12:45:48
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.