Help - Search - Members - Calendar
Full Version: Housecolours/Teamcolours.
SWR Productions Forum > Game Modding and Development > Generals/Zerohour Modding
Hello everyone,

I've got some questions I ran into while messing with Zero Hour's code and art. While messing around, i managed to port one of my old models made for R A 3 into generals and realized I have no idea how the house/teamcolour is applied in generals. R A 3 uses a 3 texture system with a diffuse texture, a SPM texture to denote reflectiveness and teamcolour, and a normal map to denote relief.

When loading w3d models into renx, it seems that for generals they apply a separate texture to designate housecolour. Is that necessary, or can you somehow denote the parts that should be teamcoloured in one texture together with the diffuse texture? How would you apply teamcolour on specific parts of a diffuse texture? Attatched is a PNG version of the .tga i used. The neutral grey areas are the areas for teamcolour.

(Note that the darkgreen cockpit is in fact, not teamcoloured. the grey parts of the plane are supposed to become teamcoloured. Apart from that i also messed the propellers up, but i think i already found a thread with a similar problem in the forum.)

To put housecolors in ZH, there are two ways:

1. Make sub-object called HOUSECOLOR (you can add number suffix like HOUSECOLOR01, HOUSECOLOR13, etc.) in the model. No matter what texture you use for the object material, they will converted into the faction color in game.

2. Apply an alpha layer to the texture. The black area of the alpha layer will become the housecolor area. Then, when saving the file, put ZHCA_ before the file name and save it only in TGA format (not DDS!). Then apply the texture normally in the model. Example file names: zhca_xvplane.tga ZHCA_NIConscript.tga

Use EITHER method, not both. Each method has its own pluses and minuses, but it's up to you which method you prefer. Although most time the first method is preferred by the modders.
Thank you! That should fix the issue!

QUOTE (n5p29 @ 27 Sep 2016, 11:02) *
Use EITHER method, not both.

By this, do you mean only per singular w3d or in your entire mod? a lot of my models suddenly turned invisible without me messing with their art code or doing anything with them, and i'm pretty sure i only used one of the two methods per w3d.
You can actually use both methods on the same unit, however method 2 requires tga textures and alpha channels, the 2 things SAGE hates the most, so if you use it too much you'll get a sharp performance drop.

Method 1 is the ideal method, and you should use it as much as possible.

Did you rename the models after you exported them? w3d model names can't exceed 13 characters and will turn invisible when you do.

If you did, re-export them with a new name. Simple renaming the file doesn't work.
One of the models was renamed after the fact, but the two others were not, and to test it i re-exported a model using different textures, it did not show up either. I'll try again and if it doesn't work then i'll gather the code and assets involved and put them over here.
Well, I re-exported the models and got them working again after some time, but the teamcolour still refuses to work for some reason.

Attached in a .rar are three textures i used to try and get the teamcolour working, as well as the w3d model used. The third texture lacking the zhca_ is only used on the propeller as a try to get the propellers properly see-trough (It's applied only to the propellers). Feel free to check if i made any mistakes in the tga's, editing alpha channels in gimp is a bit iffy.

I checked the model, according to w3d viewer only the "TCBuzzarddiffuse.tga" texture is applied and nothing else, and there are no parts of the model designated as HOUSECOLORXX.

If you are trying to use method 2, the housecolor parts need to be colored red, and only the HC parts should be defined in the alpha channel:

For method 1, you have to seperate parts of the model and name them HOUSECOLORXX. The housecolor texture should be white:

For some reason, every time i move the W3d model into the W3d folder it changes back to another version of the model. Kinda annoying. Going to try reexporting it with a different name altogether
Managed to somehow fix the issue by reexporting it with a different name. teamcolour texture still doesn't seem to work. I probably messed up the alpha channel. i'll try again tomorrow.
Got it to work. The alpha channel editing was busted.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.