germaworld.blogg.se

How to start halo custom edition maps
How to start halo custom edition maps












Half4 LightingHalfLambert(NewSurfaceOutput o, half3 lightDir, half3 viewDir, half atten) Return dot(normalize(a), normalize(b)) * 0.5f + 0.5f I will go over how this works in another post, but just add this code: Unity comes with Lambert out of the box, but I don’t particularly like it and the output struct doesn’t have everything I need. But, while we’re at it, I’m going to add in my own lighting function: Half Lambert. We still need to actually use the Multipurpose map. So at this point, it looks like a game from the 90’s. I actually added a red channel because the first-person arms for the Master Chief had a detail mask. If (multiMap.r & gt 0) mainTex.rgb *= ((2 * detailMap.rbg) * multiMap.r) But we don’t care since we don’t have a red channel. And from the beginning we know that the red channel controls the detail mask. So for this particular multipurpose map, there’s no red channel. O.Albedo = mainTex.rgb * (detailMap.rbg * 2) Also, not there is no alpha channel, even though it could be useful for something.įixed4 mainTex = tex2D(_MainTex, IN.uv_MainTex) įixed4 detailMap = tex2D(_DetailMap, IN.uv_DetailMap)

#How to start halo custom edition maps plus#

So, how did I make this masterpiece? Well, read on and I’ll explain - plus the shader is at the end! STEP 1: So first you start off with the diffuseĪ few things to note: since we want to have color modulation for the player team colors, notice that the armor areas are white and not painted the standard green-horn green like you see in the single player campaign. So, I set out to build a Unity shader that does the same thing. It turns out, this map uses different RGBA channels to control several things: Digging deeper using Guerilla tool from Halo Editing Kit (HEK) I found where the shader is made up of several components, the most notable being a “multipurpose map”. All of these things make up the material you see in Halo CE. There are several things to consider: diffuse, color modulation (team colors), detail map, detail mask, cube map (reflection), specular map (reflection power), and emission map (glow). The Master Chief material is actually quite complex, as it turns out. Unfortunately, Unity doesn’t provide many “advanced” shaders, so I decide to build my own. So after I got the Master Chief model in Unity, I decided it was time to make him look like he does in Halo CE.












How to start halo custom edition maps