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 »Multipurpose map reflection: A pseudoscientific study

Author Topic: Multipurpose map reflection: A pseudoscientific study (22 messages, Page 1 of 1)
Moderators: Dennis

teh lag
Joined: May 6, 2008


Posted: Jul 18, 2011 07:31 PM    Msg. 1 of 22       
(tl;dr at bottom also don't quote this long post)

So following an edifying round of shader work with one Yoko/Mendicant Bias, I found myself asking a question:

"What exactly is the difference between the red and blue channels in a multipurpose map?"

Though I've been working with ce's shaders for years now and felt like I had a fairly solid grasp on them I never really took the time to definitively answer that question. Anyone with a fair bit of experience with shader_models knows that gearbox somehow screwed them up, as Bungie's documentation states the following:

Quote:
*RED: specular reflection mask (modulates reflections)
*GREEN: self-illumination mask (adds to diffuse light)
*BLUE: primary change-color mask (recolors diffuse map)
*ALPHA: auxiliary mask


...while the actual results in-game are quite different. Though the green channel is indeed the self-illumination mask, alpha is actually the change-color while blue appears to be the cubemap specular mask... but then what's red? Some, such as myself, believe(d) that it still somehow interacts with the reflection properties, as some sort of secondary specular or lighting mask. But if that's the case, how exactly does it work? Thus I set out to answer definitively the aforementioned question by running a series of experiments to see exactly how (if at all) the red/blue channels interact.

(Note: I am referring to the channels not just colors, as multimaps are designed to be composites of multiple monochrome maps into one rgba map through its color channels; the importance of this distinction will become evident at the end of this post)

And so, I first created a base sample: the stock cyborg biped with a blank multipurpose map, and some altered reflection settings in the armor shader_model - specifically, teal and blue were set as the falloff colors, in hopes of determining any effect that either channel has on them. From there I made several multipurpose maps with assorted combinations of red/blue, in hopes of determining what effect each channel has. Two screenshots were taken from a fixed point for each version: one with "normal" lighting and one with colored dynamic lighting (my apologies for the occasional shifts in light source position; look at the environment if you're not sure about what changed). This was to determine both the overall effect and any effect that either channel has on light reflection. My results are as follows...

1: Blank multi [imges provided as links to save space]
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-06-54-57.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-07-20-62.jpg
(Note the slight red coloring from the surrounding lightmaps; this was also observed to see if the channels affect lightmap reflection...)

2: Pure blue
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-26-03-99.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-26-08-06.jpg

3: Pure red
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-18-28-15.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2019-44-47-78.jpg

4: Pure blue + pure red (purple result)
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-28-31-94.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-28-34-11.jpg

5: Gradient bands of pure blue gradient
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-34-40-17.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-34-42-30.jpg

6: Gradient bands of pure red gradient
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-32-13-96.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-32-15-75.jpg

7: Pure blue + gradient bands of red gradient
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-40-53-27.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-40-58-94.jpg

8: Pure red + gradient bands of blue gradient
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-39-16-43.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-39-18-40.jpg

9: Alternating bands of combined pure blue + pure red
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-43-23-48.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-43-25-76.jpg

10: Alternating bands of blue/red gradient
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-45-06-76.jpg
http://dl.dropbox.com/u/10778064/multimaps/haloce%202011-07-18%2018-45-08-75.jpg

Across all results, alterations to the red channel appeared to have no effects at all on the shader's appearance, while the blue channel controlled reflection alone. At this point my earlier distinction becomes relevant: since these are channels not just colors, you would in fact see an effect if you took a blue multi and painted over it with red; but this would be the result of red replacing the blue (as it is painted over, removing the blue coloration of the pixels) and was shown to be identical to what would result from painting over in black (given the blue bands in figure 5 vs. the blue/red bands in figure 10).

(updated findings!!) tl;dr: the red channel doesn't affect reflection at all; it has replaced the alpha's old function of the "auxiliary mask" effectively meaning it can be used to mask your shader's detail map. Reflection is wholly controlled by the blue channel. Most likely it was swapped with the alpha to become the "auxiliary map", while alpha became change-color and blue became specular. Why might this have happened? Who knows. But anyhow, at least hopefully we'll all know that the red channel doesn't really... matter.

If this is already common knowledge (or I somehow missed something in my own results), call me a fool. If you can provide a solid counterexample (post comparison pics + the maps used) I'd be very interested to see it since I'm not quite convinced of my results...
Edited by teh lag on Jul 18, 2011 at 09:48 PM
Edited by teh lag on Jul 19, 2011 at 03:23 PM


ally
Joined: Jun 23, 2010

Aye Ready


Posted: Jul 18, 2011 07:43 PM    Msg. 2 of 22       
very interesting, but can anyone else view the image links?


Maniac1000
-Helpful Poster-
Joined: Feb 24, 2007


Posted: Jul 18, 2011 08:59 PM    Msg. 3 of 22       
i can.
Thanks for this, very helpful.
Although i do remember the red channel making my models look like they were very light and plasticy looking, i dont know the words to describe it better, maybe ill get pics.
Edited by Maniac1000 on Jul 18, 2011 at 09:02 PM


OpsY
Joined: Feb 19, 2007

Frobisher Bay


Posted: Jul 18, 2011 09:22 PM    Msg. 4 of 22       
Thanks for posting the results of your research, always appreciated. I never messed much with multi exactly because it seemed blurry to approach...


Spartan_094
Joined: Jan 8, 2008


Posted: Jul 18, 2011 09:38 PM    Msg. 5 of 22       
I always been told to make the multipurpose Blue or Purple as a final since 08. But I ignored that and made any thing non-metal RED, turned out fine.

Thanks lag for the huge advice.


teh lag
Joined: May 6, 2008


Posted: Jul 18, 2011 09:51 PM    Msg. 6 of 22       
Quote: --- Original message by: Maniac1000

i can.
Thanks for this, very helpful.
Although i do remember the red channel making my models look like they were very light and plasticy looking, i dont know the words to describe it better, maybe ill get pics.
Edited by Maniac1000 on Jul 18, 2011 at 09:02 PM


Of course, the question now is whether or not you would have had the same result had the red channel been empty (yet any consequent changes from adding to your red channel still being applied to the blue). I also remember (or think I remember) the red channel affecting stuff... who knows if we're crazy or if it's just my computer. Maybe someone could do this experiment again and compare results?

I always felt that filling in the red channel for the traditional "purple" that people usually do was a bit on the "superstitious" side given how arcane it seemed... Hopefully now people will learn to just do monochrome speculars from the get-go, dump them in just the blue channel rather than blue and red, and get it over with.
Edited by teh lag on Jul 18, 2011 at 09:53 PM


Co1t3r
Joined: Dec 13, 2008


Posted: Jul 18, 2011 10:04 PM    Msg. 7 of 22       
The alpha is for color change? Now I know why my shaders always look so screwy.


Shade117 pro
Joined: Jul 2, 2009

Yeah bro (xfire: blue117pro) I can make cubemaps


Posted: Jul 19, 2011 12:46 AM    Msg. 8 of 22       
I'm surprised that some (or maybe most) people here don't know about this already :P


Spartan_094
Joined: Jan 8, 2008


Posted: Jul 19, 2011 01:19 AM    Msg. 9 of 22       
Quote: --- Original message by: Shade117 pro
I'm surprised that some (or maybe most) people here don't know about this already :P

I knew nothing about what the red channel does. That's about it.


ally
Joined: Jun 23, 2010

Aye Ready


Posted: Jul 19, 2011 09:45 AM    Msg. 10 of 22       
Quote: --- Original message by: Maniac1000

i can.
Thanks for this, very helpful.
Although i do remember the red channel making my models look like they were very light and plasticy looking, i dont know the words to describe it better, maybe ill get pics.
Edited by Maniac1000 on Jul 18, 2011 at 09:02 PM



cheers for letting me know, my internet was being slow and that's why i couldn't load the images.
alls good now that no one is online playing games.


Jesse
Joined: Jan 18, 2009

Discord: Holy Crust#4500


Posted: Jul 19, 2011 10:05 AM    Msg. 11 of 22       
This makes one wonder why Bungie used the red channel at all. Maybe they got lazy and left the channel filled, or as Teh Lag said, it's may be his computer at fault.


teh lag
Joined: May 6, 2008


Posted: Jul 19, 2011 10:13 AM    Msg. 12 of 22       
Well like I said the original documentation is correct on the xbox. For example, here is the Cyborg's xbox multi:



As you can see, red is specular, blue is cc, green is illum and there is no alpha. I'm guessing that the multis that have a red channel in Gearbox's port are the result of someone either A) forgetting about the channel swaps, B) forgetting to update a bitmap, or C) using the red channel as the "auxiliary" mask that *used* to be stored in the alpha. I find it much, much more likely that Gearbox messed up and forgot stuff, than that they added a highly arcane secondary specular function to shader_models.

Again, if anyone isn't convinced I think we'd all benefit from you running this experiment on your machine. Old habits die hard after all, it'd be nice if there was more evidence for (or against?) this.
Edited by teh lag on Jul 19, 2011 at 10:19 AM


Fubih
Joined: Jul 19, 2011

dead


Posted: Jul 19, 2011 03:11 PM    Msg. 13 of 22       
The red channel in the multipurpose map controls how the detail map is applied. But somehow that will only work if you set the detail mask to multipurpose map alpha.

http://i284.photobucket.com/albums/ll7/Ischa_C/halo%20maps/multi_red.jpg
http://i284.photobucket.com/albums/ll7/Ischa_C/halo%20maps/cyborg-test.jpg
Edited by Fubih on Jul 19, 2011 at 03:13 PM


teh lag
Joined: May 6, 2008


Posted: Jul 19, 2011 03:14 PM    Msg. 14 of 22       
That's it then - as I suspected the red channel was switched with the alpha to become the new "auxiliary map" which can be used for detail blending. Interesting though that Gearbox didn't update the blending controls to match their redefined channels... Thanks for sharing!
Edited by teh lag on Jul 19, 2011 at 03:15 PM


SlappyThePirate
Joined: Aug 24, 2009

You are irritating, I'll release nothing


Posted: Jul 19, 2011 03:19 PM    Msg. 15 of 22       
Red is a "detail mask"
I have this topic here bookmarked: http://forum.halomaps.org/index.cfm%3Fpage=topic&topicID=36098&start=lastpage


Delicon20
Joined: Oct 3, 2008

Still here. Still loves bacon


Posted: Jul 19, 2011 03:56 PM    Msg. 16 of 22       
I feel dumb trying to comprehend any of this, I always thought to make a multipurpose map you just overlay the texture with purple, and I'll just keep on thinking that.


DarkLord0912
Joined: Jan 17, 2009

Works on bigger and better things


Posted: Jul 19, 2011 09:12 PM    Msg. 17 of 22       
When I read this topic I always thought red was for the detail,but it gets complicated.Also in your shaders when you tick detail after reflection and set it to multipurpose then the red channel becomes relevant any other time I see no real difference.


Jesse
Joined: Jan 18, 2009

Discord: Holy Crust#4500


Posted: Jul 19, 2011 11:22 PM    Msg. 18 of 22       
Quote: --- Original message by: ImBrokeRU
[20:20] Jesse: http://forum.halomaps.org/index.cfm%3Fpage=topic&topicID=38275
[20:20] Jesse: You might care
[20:20] Jesse: Well, not care but find this somewhat relevant.
[20:20] ImBrokeRU: oh
[20:20] ImBrokeRU: I found that out
[20:20] ImBrokeRU: when i was doing scenery
[20:20] ImBrokeRU: and stuff
[20:20] ImBrokeRU: the red channel
[20:20] ImBrokeRU: is completly obsolete
[20:20] ImBrokeRU: but i like to keep it in there cuz purple looks nice C:


Wesker
Joined: Jun 8, 2011

Your Future Hinges upon This Fight!!!


Posted: Jul 20, 2011 03:42 AM    Msg. 19 of 22       
i dont get most of the stuff but looking at the images reminded me of ubercharge from tf2


teh lag
Joined: May 6, 2008


Posted: Jul 22, 2011 10:15 AM    Msg. 20 of 22       
Quote: --- Original message by: goldkilla88

Epic help.

But real quick... If I were to combine colors (Like Red and Blue for Purple) would that combine channels and thus affect the shaders also?
Edited by goldkilla88 on Jul 22, 2011 at 01:26 AM


Yeah, that's exactly how it works. Like I said in the OP, the significance is the information in each individual channel not the color you end up seeing. To use your example: a 100% white red channel and 100% white blue channel indeed mix to create a 100% purple end result. (Since the intensity of each pixel in a channel translates to the intensity of red, green or blue in the corresponding pixel of the end result).

I'm not quite familiar enough with Photoshop to say how you would do this there... but in GIMP I always have my specular/self-illum/etc as separate monochrome maps, and I use GIMP's "compose" tool to assign them each to the channel components of an RGBA map which I then use as the multipurpose.
Edited by teh lag on Jul 22, 2011 at 10:17 AM


The Cereal Killer
Joined: Mar 18, 2011

Scripts, AI, cutscenes, ui_widgets, animation.


Posted: Jul 22, 2011 01:05 PM    Msg. 21 of 22       
The most visual thing I am involved with is animation... I'm glad that some problem... was solved for some people... I guess...

Screw it I'm going back to stare at my 3000 lines of LISP.


rododoonceagain
Joined: Dec 21, 2014

Left Halo because life


Posted: Jan 25, 2015 12:45 PM    Msg. 22 of 22       
LoL replied to wrong thread sorry
Edited by rododoonceagain on Jan 25, 2015 at 12:46 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 2:14 AM 157 ms.
A Halo Maps Website