A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Color change,shader help,H2 Elites

Author Topic: Color change,shader help,H2 Elites (2 messages, Page 1 of 1)
Moderators: Dennis

teh lag
Joined: May 6, 2008


Posted: Apr 18, 2011 02:03 AM    Msg. 1 of 2       
Halo CE only supports one change-color channel per shader_model so no, this cannot be done directly. You can "fake" the effect of multiple CC channels, however, in a few different ways.

Perhaps the easiest is to make multiple versions of the base diffuse bitmap(s), each with the desired secondary change-color attributes. These can then be combined into one .tif and compiled into one tag with multiple permutations (using the same method as with making sprites - the blue background and 1px separation between each component); you can then set the desired secondary color versopm by using the "forced shader permutation index" field in the object or actor_variant tag.

It is also be possible to do this by once again compiling several bitmaps into one tag with permutations, but this time have different colors masked with the secondary change-color channel. (Take the secondary CC, make a white background, and use the CC as a layer mask for the desired secondary color in Photoshop or GIMP or whatever you use). You may then use this as the detail map for the desired shader(s) and set the detail to "multiply", so you in essence get the same color-multiplication effect as normal CC. Once again, you would use the "forced shader permutation index" field to specify which permutation you want. However, this method comes at the cost of being able to use a "normal" detail map, as you sacrifice that slot for the faked secondary CC.

If it is absolutely necessary to have CC more flexible than pre-defined colors that you place straight into the bitmaps, there is another way that *should* work, though I have not tested it. You would, as in the first method, make a copy of the base diffuse bitmap(s) of your shader. This time, however, you set the copy's alpha channel to the the secondary CC map, so all parts that should be affected by the secondary CC are opaque while all others are transparent. Use this bitmap as the diffuse in a copy of your base shader. Then, use the checkbox at the top of the tag to make it an "alpha-blended decal", and have it use a different change-color channel which will be set in your biped/whatever. Lastly, duplicate your model's geometry (in 3ds or straight in the "parts" blocks of the .gbxmodel with Kornman's hacked Guerilla if you know your way around it) and assign the modified shader to the new geometry. The end result of this method is your base shader with one change-color channel, and another identical shader overlayed on top of it with a second independent channel. The downside of this more flexible system is that it effectively doubles the amount of geometry that is rendered for the model unless you want to get super-crafty and do some manual optimization in 3ds.

I'm sure there are other ways to do this besides these, but they're what came to mind (and in the first two cases are things that I've done in the past).


DarkLord0912
Joined: Jan 17, 2009

Works on bigger and better things


Posted: Apr 18, 2011 02:39 AM    Msg. 2 of 2       
Thank you for helping him teh lag..

I recommend his method above as I see this would be the only way^^

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 9:48 PM 188 ms.
A Halo Maps Website