Forum Thread
  Posts  
Republic Commando modding help!! alpha channel texture black background unrealed .tga file (Forums : Support : Republic Commando modding help!! alpha channel texture black background unrealed .tga file) Locked
Thread Options
May 17 2014 Anchor

(I am awaiting admin approval at sandcrawler and have been for a two days. So I am hoping someone here may be able to help me.)

I am trying to do a somewhat simple mod for Star Wars Republic Commando. i am going to fix some, if not all, of the stretched hud issues that are caused by playing the game in a widescreen resolution.

So.. I find the texutres I want to change which are located in the "hudtextures.utx" file. I use the unrealed program to export the texture files I want changed which right now are the crosshairs or reticules. When you export you have to provide the file type so I am using .tga because there needs to be an alpha channel and it worked and made the file as a .tga. I modified the texture with Gimp2 and imported it into the hudtextures.utx file. But right away it appeared with a black background in the unrealed.

In game the crosshairs worked, changed green when i pointed at a friendly trooper, and were the right shape but they had the same black square background as when it was in the unrealed. Upon closer inspection i saw that the one of the file properties in unrealed "bAlpha channel" was set to false when it is supposed to be true. Also the mip maps were a different number. (I only partially understand what mipmaps are) I tried to again with .bmp files and playing around with settings to no avail.

I also used photoshop to edit it and make the .tga file instead but all that happened was now it shows up with a white background instead of black.

So my question is how do i properly make this .tga file so that it will have an invisible background? What do I need to do in gimp or photoshop to make that happen? And is there any special settings with mipmaps or something when I am importing it back into the hudtextures.utx file?

This seems like the solution should be fairly simple but it has halted all progress for me.
Help appreciated.

Edited by: Celidor

SinKing
SinKing bumps me thread
May 17 2014 Anchor

You say the texture needs an Alpha? Alphas are the plus 8 bits between 16 and 24 bit, so you need to export a 24bit *.tga file in order to get the alpha file in it. I hope that was the whole problem solution. Otherwise post some images, it's not too easy to figure out how the HUD looks exactly now.

--

User Posted Image

May 18 2014 Anchor

I thought that the alpha was simply the channel or layer that is read as being invisible. I only said it needed an alpha channel because I knew that the crosshair texture was supposed to be partially invisible. I was saving the file as 32 bit on photoshop and unknown on Gimp but I retried using 24 bit but there was no difference.

Photoshop had an option for 16bit targa files which seemed to still have an invisible layer which is contrary to what you said but I really don't know.

I did find a solution to the problem though. But I am not going to share. 8)

Just Kidding.

So I was messing around with the crosshair/reticule textures I had modified and were giving me problems. I realized when I went into properties for the individual textures I could switch the bAlphaTexture from false to true. Where it is supposed to be.

After that in game instead of being a totally white background for the crosshair it was a faded white that I could now partially see through.

So I was sure I was onto something. Then I remembered that when I saved the texture file .tga in gimp it had a black background instead of a white. And going on the assumption that the "b" in "bAlphaTexture" perhaps stood for black. I reimported the .tga texture I edited in gimp. Than went into properties and switched bAlphaTexture to True. And right away it looked right in unrealed. And wouldn't you know it. All good in game.

I still don't totally understand a lot of it like what mip maps do. Or why photoshop and gimp handled the alpha channel differently but it appears to work flawlessly in game.

But I'm sure I am going to come across future problems with unrealed and this game. Is there some forum somewhere on the net that someone can point me to that is specific to modding unreal powered games and republic commando specifically? Other than sandcrawler which I am still awaiting admin approval to officially join.

SinKing
SinKing bumps me thread
May 18 2014 Anchor

Thanks again for supplying some images, everything is much clearer to me now ;)

Unreal's power is in the materials, if you can edit the material/shader tree you can do all the stuff you want and more.

32bit is a linear image format, which means it interprets data completely different from 16 or 24 bit. Don't go higher than 24 bit for games, unless you need an HDRI background for lighting your scene. 16 bit images don't have Alphas, if you managed to see on it is a mask from a separate texture, not the one you are saving.

Mipmaps are simply different detail versions of the same texture. When you are a mile away from something you don't want to render it in a 2k resolution, as you only see 4 Pixels anyway. Soi, depending from the distance of an object the engine loads different tesxtures (and models) in lower or higher resolutions into the scene. You have surely experienced this as "pop-ups", especially in open world games; you can see the texture and model resolution change when you cross a threshold.

I am not sure if you are modding a game that is supposed to be moddable, but so far it seems you have success with it, despite it being a cooked version of the game. It's kinda hard to predict what changes will occur and how to mend problems you encounter with cooked/packaged versions of a game. You would need the developer version to make those changes in the right way, then cook everything again and package it for release; unfortunately that version will never be available, because of copyright.

All the tools you can use on a cooked version of a game are basically reverse-engineered hacks to extract information from the game. Idk if there are tools available that do what you need. All I know is that e.g. GTA wasn't supposed to be moddable, yet some people wrote tools to do exactly that. The most you will be able to do is exchange some textures and models and even that can provide a problem, as you have already experienced. And if you do change things you have to make sure everyone who plays your version gets the changed files and puts them in their own folders. Otherwise in, e.g. an online game only you will see the change on your own PC.

--

User Posted Image

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.