Hidamari wrote:
2. How do i also do transparency?
i only know that PNG has transparency as part of it? :?
Saw this covered on page one, in a different way… The previous method mentioned is what you want to do in order to make specific sections of the ship transparent by using alpha channels. This method I used actually makes the entire texture semi-transparent. Also, I used photoshop, so these instructions will be for photoshop.
Start with the image you want to make transparent, copy and paste to a new template w/ a transparent background.
Before you paste your image into this new window, add a new layer. This should give you two layers, both empty and the workspace should still be transparent.
Paste the image into the top layer, leaving the bottom layer empty.
Select the area you want to make transparent, change opacity to desired level (I used 60%) and with the area still selected, right click and “save selection”. You will have to name the selection… I typically go w/ trans or transparency to make it easy in identifying the selection for the next step.
After saving selection, you have to tie it to the image still. Go to the “Select” menu and then “Load Selection”. This is where you select the name of the selection you saved in step 4. (Note: You should still have the image selected while doing this, it may work without selecting it, but as I stick with what works, I never de-selected my image till I was ready to save.)
After loading the selection, check the channels tab to make sure your selection is below the RGB channels.
Save as 32 bit TGA file.
When importing a tga into a mat or txm file, you may have to delete the MIPS node and add a MIP0 node that you will import the TGA file to. MIPS is for DDS files, TGA files use a MIP# system where 0 is the largest image and 8 is typically the smallest. It’s not necessary to load up all 8 mipmaps, I’ve always been able to get away with just MIP0. The last thing to mention about working with TGA’s is if it was a DDS extracted from a mat or txm file, you will need to flip the image vertically otherwise the mapping will be messed up.
Edit:
You can also map textures to the glass/cockpit window if you want… of course, you will need to make an image for the glass to be mapped to.
Using UTF editor, open the .mat file for the ship and in texture, add a node and name it whatever… for this example, I’ll use “sp_glass”.
Once you have the node for “sp_glass”, you need to make a node under it for the MIPS or MIP0 (dds vs tga) and import the image.
Under Material library, you should also have a glass node there. Just to be thorough, I actually named this “sp_glass” as well.
The default for glass has the following nodes:
Type: DcDtOcOt
Dc: stores RGB? values for color of glass, the ? represents a value I have not figured out what it does, these values are also displayed on individual lines, so Red value is first line, Green value is second line, Blue value is third line… mystery value is fourth line. (These values can be found in “int array” of “Interpret data as…” section)
Oc: Never touched this when recoloring glass… don’t know what this value is, possibly the level of transparency?
You need to remove these nodes and create the following nodes:
Type: (String Value = DcDt)
Dt_name: (String Value = name of your image to map to glass)
Dt_flags: Not entirely sure what this does, I just copied the @ in string value that seems consistent with all the other mapped nodes.
Now your sp_glass in material_library should point to your dds/tga MIPS/MIP0 in the texture library for sp_glass. As long as they’re linked correctly, your glass will now be textured. You can follow the above process to make the textured glass semi-transparent.
Also should point out that if you do decide to make the entire ship transparent to any degree, you may want to change the value for pilot in the shiparch.ini… I just dropped the ‘s’ and changed mine to:
DA_archetype = equipment\models\pilot\hip_pilot.3db
This causes the game to not render a pilot… otherwise you would see a non-transarent pilot… unless you wanted to also make the pilot semi-transparent, in which case I’d use a lower opacity than the rest of the texture files…