Main Site | Forum | Rules | Downloads | Wiki | Features | Podcast

NLSC Forum

Patchmaking tutorials for NBA 2K12.
Post a reply

Hex Editing: Uniform Lighting/Shading

Fri Dec 16, 2011 4:11 am

Image

Preview #2
Preview #3


Click to Download
Complete Uniform Lighting Update
:new:





---------------------------------------------


Some of you might remember this little initiative I started right before I started my semester. If you don't want to read that terrible rant, I criticized johndoe22 and his alter personalities for doing all this advanced Hex Editing and not sharing how he did them. Specifically the "Shadow Mods" that edited the global.iff and the "Miracle Jerseys" that added this shadow effect to uniforms.


Help Me with the "Miracle Jerseys"


Uniforms files contain a lighting section with a bunch of labels.....unfortunately the ones that JD22 edited last year do not work this year. In fact only 3 values I've found actually do anything to the jerseys. One adds the old sweat pattern to the uniform, and the other two control the lighting intensity on the uniform . The last two are particularly interesting, as my subscribers found out yesterday.

phpBB [video]


Basically the MainLightIntensity controls the main stadium lighting on the uniform, while the AmbientIntensity controls the court colors on the uniform. I can manipulate the 2nd value to increase the shadowing on the uniform. It isn't perfect, and it doesn't completely replicate what JD22 did last year, but it works.

This is how it looks....

Original 2K Uniform Files
Image

After my Hex Edits
Image
Image
Image

So it looks OK, but I need help making it look better. By editing these two intensity values we can try and replicate the edited uniforms from last year.



Open a decompressed uniform file in your Hex Editor and search for "00000000B82DF3F6"

I cannot give offsets since this position will change based on what uniform you are editing.

Image

#1 is the AmbientIntensity
#2 is the MainLightIntensity

By default the AmbientIntensity is 0.3 for home uniforms and 0.5 for away uniforms.
By default the MainLightIntensity is 2 for all uniforms.

In the edited screenshots above, I changed both the home and away uniforms to -0.4 for AmbientIntensity and 4 for MainLightIntensity . I would really like it if you guys could help me experiment with this further.

Here are some of the values I experimented with....

AmbientIntensity
cdcc4cbe Float = -.2
9a9999be Float = -.3
cdccccbe Float = -.4

MainLightIntensity
00000040 Float = 2
00004040 Float = 3
00008040 Float = 4

So please, if someone could mess with these values some more, post screenshots, and tell us what values you used, we might be able to add better shadows to 2K12's uniforms. I want to decide on good values to use before applying this to all the uniforms in the game....

DOWNLOAD TEST UNIFORMS - Here are the edited uniforms for you to look at for the road Clippers and home Mavs. Make sure you backup your originals!

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Fri Dec 16, 2011 4:42 am

ill try to help sir jao..

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Fri Dec 16, 2011 5:49 am

heres what i got...i dunno if it made any difference..

Image

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Fri Dec 16, 2011 6:02 am

It would be nice to see jersey sweat again good find jao

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Fri Dec 16, 2011 6:18 am

jaelove wrote:It would be nice to see jersey sweat again good find jao

unfortunately this is what it looked like.... http://steamcommunity.com/id/jaosming/s ... 6534993352
that was one of the first things I found, thought it was sweat but looking at it again...i dunno. I actually dont even know where that texture is coming from, but I dont know if it would dynamically get darker or just stick like that.....something worth exploring though. for the uh005 file it is at 41720 default float values of 5 and 0.1

tatlopuyo wrote:heres what i got...i dunno if it made any difference..

again, its at least better than default. What values did you use?

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Sat Dec 17, 2011 1:10 am

You should look at this. The jerseys have some knid of shadow on them not I'm not sure if it's just a texture.
http://nba-2k.com/nba-2k12-29-teams-hom ... s-patches/

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Sat Dec 17, 2011 4:03 am

very good news..
the values are for a max/min shadow?..or a color shadow ?

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Sat Dec 17, 2011 9:18 am

tjangel07 wrote:You should look at this. The jerseys have some knid of shadow on them not I'm not sure if it's just a texture.
http://nba-2k.com/nba-2k12-29-teams-hom ... s-patches/

I did see those before. IIRC, they edited the transparency of the "green" textures. It's a cool effect, but not what I am going for.

Sixers85 wrote:very good news..
the values are for a max/min shadow?..or a color shadow ?

There are min/max and color things to edit....but they dont change anything. Ambient is the reflection of the court on the uniform as seen in the video, and mainlight covers the rest of the uniform

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Sat Dec 17, 2011 10:23 am

Good News! Is this means that you guys can figure out what JD22 makes his shadow mod? i really excited bout this keep up the good work

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Sun Dec 18, 2011 8:12 pm

Gave it a try, AmbientIntensity is -.2 while MainLightIntensity is 3
Image

Re: Help Needed - Shadows on Uniforms fka "Miracle Jerseys"

Sun Dec 18, 2011 11:51 pm

I like it. It's subtle but a nice touch.

Been working the last two days and I got a lot of stuff to do around the house today....but tonight I'll post some more test values.

Remember, the point of this is so we, as a community, can pick what looks the best before applying it to all uniforms.

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 1:35 pm

So after a LOT of experimentation, I decided on the following values;

Home Uniforms

Ambient | -0.75 000040BF
Main | 4 00008040


Away Uniforms

Ambient | -0.75 000040BF
Main | 6 0000C040

Then I applied them to all 30 NBA Team's Home and Away Uniforms. Please test these out and let me know what you guys think. The uniforms are a bit brighter, or shinier, than default, and have more intense shadowing. If everyone is content with the values, then i will work on applying it to all the uniforms in the game!

See the first post for the Download Link, and check out the additional preview images.

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 2:06 pm

I think they look great only thing these are the default jerseys with the off colors

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 3:34 pm

I Really liked your miracle jerseys Jao!!! Fantastic job!!!

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 4:18 pm

The only problem with the jerseys are the shadow effect is little bit much and the colors are off. Ex the bulls away jerseys look pink. But its still a great patch!

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 4:40 pm

Watching todays games, the jerseys don't look like they are very shiny at all as years past. I mean Pau Gasol jersey was practically see through, i could see his nipples while he was shooting free throws :lol:

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 4:42 pm

just tried this with joejames jerseys they look sweet!

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 6:03 pm

The most great Miracle Jerseys (Y) (Y)


Could you make Miracle Warm-up ?

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 8:37 pm

Gotta check these out, great work (Y)

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Mon Dec 26, 2011 11:17 pm

jaelove wrote:I think they look great only thing these are the default jerseys with the off colors
bigt_24_r wrote:The only problem with the jerseys are the shadow effect is little bit much and the colors are off. Ex the bulls away jerseys look pink. But its still a great patch!
thankfully
chicagoRAW wrote:just tried this with joejames jerseys they look sweet!

So yea, these are default uniforms, and I don't know if I will add changing colors, patches, or correct numbers to the process. But these are "open source", this thread shows exactly what I do and the values I used, and any patcher can use these as a base for their own uniforms.

ASKOBE wrote:Could you make Miracle Warm-up ?

I've been looking at why the game doesn't keep the normal map applied to the warmups outside of replays and close ups, but I haven't figured it out yet....

Jowe wrote:Watching todays games, the jerseys don't look like they are very shiny at all as years past. I mean Pau Gasol jersey was practically see through, i could see his nipples while he was shooting free throws :lol:

More like :cheeky: . If I can figure out where the "sweat" texture I found is, we could do it, but the unis in 2k12 aren't as tight or short as they are in real life. The shininess is coming more from the 360 version rather than the games from yesterday, which IMO looks better. The subtle shadowing from last year's jerseys I don't think is possible, which would look realistic.

& thank you for the other comments too :)

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Tue Dec 27, 2011 3:42 am

JaoSming now can you figure out how to edit number and name colors on jerseys :lol: I cant believe its taking this long :?

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Tue Dec 27, 2011 9:44 am

for bobcats uax31 it didnt find "B82DF3F6DF29" in hex

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Tue Dec 27, 2011 10:23 am

It's better if you incorporate this to joejames jersey. Meaning, more detailed jerseys with the lighting effect. That would be awesome! :bowdown: :bowdown2:

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Tue Dec 27, 2011 11:27 am

i did some more tests, i think the home jerseys brightness needs to be turned down a bit and away jerseys lose a little color and there is less shadow effect on the away jerseys than home. im using joejames jerseys for testing.

Re: NBA Team's H&A Uniform Lighting Update fka "Miracle Jers

Wed Dec 28, 2011 11:40 am

nice gonna try this one up (Y)
Post a reply