Housecolours/Teamcolours., Applying teamcolours in generals/zero hour textures |
Housecolours/Teamcolours., Applying teamcolours in generals/zero hour textures |
26 Sep 2016, 23:33
Post
#1
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
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.)
Attached File(s)
|
|
|
27 Sep 2016, 10:02
Post
#2
|
|
Enlima Studios Group: Project Leader Posts: 757 Joined: 11 October 2009 From: Jakarta, Indonesia Member No.: 482 |
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. -------------------- |
|
|
27 Sep 2016, 21:33
Post
#3
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
Thank you! That should fix the issue!
|
|
|
28 Sep 2016, 0:37
Post
#4
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
Update:
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. This post has been edited by GearsGoAwryMan: 28 Sep 2016, 0:38 |
|
|
28 Sep 2016, 2:05
Post
#5
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
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. -------------------- |
|
|
28 Sep 2016, 16:40
Post
#6
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
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.
This post has been edited by GearsGoAwryMan: 28 Sep 2016, 16:41 |
|
|
6 Oct 2016, 0:47
Post
#7
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
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.
Attached File(s)
|
|
|
6 Oct 2016, 3:28
Post
#8
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
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: -------------------- |
|
|
8 Oct 2016, 0:28
Post
#9
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
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
|
|
|
8 Oct 2016, 0:59
Post
#10
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
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.
Attached File(s)
|
|
|
8 Oct 2016, 1:16
Post
#11
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
Got it to work. The alpha channel editing was busted.
|
|
|
Lo-Fi Version | Time is now: 25 April 2024 - 13:12 |