Hex Editing: Lighting Data in the Global.iff

Patchmaking tutorials for NBA 2K12.

Hex Editing: Lighting Data in the Global.iff

Postby JaoSming on Fri Dec 16, 2011 4:06 am

So I started by comparing some of JD22's globals from last year and documented all the areas that had changes. Then I compared what he changed in 2k11 to the current 2k12 global file.

The way the lighting values work in 2K games is pretty ordered and can be mapped out perfectly. The biggest problem I (and Pat) have run into is that some of the values do absolutely nothing at all.

So down to the meat and gravy....make sure you have a decompressed global.iff file and load it in your hex editor of choice. We are going to use the player/dull lighting data as an example, even though it seems to change nothing at all.

Run a search for 6400 7500 6C00 6C00 or "d.u.l.l." you will see some text and data above the text

Image

I am going to refer to the text you see as "labels". What I like to do is copy out that text and use the procedure in this tutorial - viewtopic.php?f=138&t=81858 - to make a txt document I can read easier. For this example, here are all the labels laid out properly....

Code: Select all
player/newaccessory/dull
LightingGroup/AmbientColor
LightingGroup/AmbientIntensity
LightingGroup/AmbientColorV
LightingGroup/AmbientIntensityV
LightingGroup/MainLightColor
LightingGroup/MainLightIntensity
LightingGroup/VegasLightIntensity
LightingGroup/MainLightX
LightingGroup/RingPosition
LightingGroup/RingFalloff
OcclusionGroup/MainLightMod
OcclusionGroup/VegasLightMod
LightingGroup/BounceIntensity
OcclusionGroup/BounceLightMod
LightingGroup/ShadowEffect
MaterialGroup/DiffuseFocus
MaterialGroup/DiffuseRange
MaterialGroup/VegasRangeAdj
OcclusionGroup/DynAOContrast
OcclusionGroup/DynAODefault
Diffuse
DiffuseInside
Specular
SpecularFocus
SpecularColor
OcclusionInfluence
WeaveGroup/Pattern
WeaveGroup/UScale
WeaveGroup/VScale
WeaveGroup/Height
WeaveGroup/OcclusionMin
WeaveGroup/OcclusionMax
LogoGroup/ScaleU
LogoGroup/ScaleV
LogoGroup/OffsetU
LogoGroup/OffsetMirrorU
LogoGroup/OffsetV
LogoGroup/AlphaWidth
ColorizeRed
ColorizeGreen
ColorizeBlue


Now let's relate these labels to the data above it. You can notice a pattern of at least three "0000 803F"s in a row. These do not edit anything, but seem to separate each value set from each other. If there are three "0000 803F"s, the value in front of it is also a part of the separator, again, these don't change anything (that I am aware of). In the picture below, the separators are highlighted yellow.

So now that you can see where the separators are, you might be able to see the data in the middle. In the picture below I circled the editable data in red. To figure out what piece of data is what, I labeled each data set 1-5. Since we are at the bottom of the data, we gotta look at the bottom of those labels listed above to figure out which hex data lines up to which label.

Image

(taken from the bottom of the label list above)
5 = LogoGroup/OffsetV
4 = LogoGroup/AlphaWidth
3 = ColorizeRed
2 = ColorizeGreen
1 = ColorizeBlue

You may have noticed that I circled the 0000's before some of the editable data, that is because all these data is controlled by the "Float" value which uses 8 bytes, or 0000 0000.

So lets take a look at the editable data for #4 "LogoGroup/AlphaWidth". In hex workshop, if you click in front of the data, it will automatically tell you what the hex values equal in float values. As an example 0000 5040 = 3.25

Image

This makes it a bit easier to edit, since I know if I make that float value 10, 100, -100, 0, 0.1 different things may happen in the game.




That is the basics on how to edit the stuff in the global file. There are something like 90 different lighting things you can edit. JD22 only edited the "skin#" (# = 0-5) and "dull" sections of the 2K11 file. I have not fully mapped those out because I went immediately to the uniforms after figuring the above out. Here are some more offsets you can look at and edit,

B0C504 - Dull
B2c3a4 - skin
b2dbf4 - shiny
b360c4 - medium
b41314 - eye
b458d9 - teeth
b49e04 - warmups
b4e394 - casuals
F3BCC4 - skin/1
f3d6f4 - skin/1

There are also "Clothes0 - Clothes5" but they didn't change anything.

Here is also some offsets for editing things with the ball (as you will see in the screenshots for the uniforms below).

ball/ball/tweaks
LightingGroup/AmbientColor - b62184
LightingGroup/AmbientIntensity
LightingGroup/AmbientColorV
LightingGroup/AmbientIntensityV
LightingGroup/MainLightColor - b62224
LightingGroup/MainLightIntensity
LightingGroup/VegasLightIntensity
LightingGroup/MainLightX - b622a4
LightingGroup/RingPosition
LightingGroup/RingFalloff
OcclusionGroup/MainLightMod - b62314
OcclusionGroup/VegasLightMod
LightingGroup/BounceIntensity - b62344



PLEASE, let me know how I can make the above less ranty and easier to understand.
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Lighting Data in the Global.iff

Postby tatlopuyo on Thu Jan 19, 2012 9:55 pm

any developments on this jao?i tried playing around with this tutorial but nothing seems to change..
User avatar
tatlopuyo
 
Posts: 768
Joined: Thu May 19, 2011 6:20 pm

Re: Hex Editing: Lighting Data in the Global.iff

Postby JaoSming on Thu Jan 19, 2012 11:45 pm

nothing from me, I've been busy working on other projects
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Lighting Data in the Global.iff

Postby tatlopuyo on Sun Feb 05, 2012 4:54 pm

i found out the values to change in the global iff to change the shadows..just cant figure out how to make the right colors..will give you details jao later..maybe u can do it..
User avatar
tatlopuyo
 
Posts: 768
Joined: Thu May 19, 2011 6:20 pm

Re: Hex Editing: Lighting Data in the Global.iff

Postby JaoSming on Sun Feb 05, 2012 8:36 pm

that would be awesome, thank you for continuing to mess with it
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Lighting Data in the Global.iff

Postby athozoan on Fri May 25, 2012 12:19 am

They have alot of search options to choose from an im using the already checked default ones but its not finding no hex values im looking for What settings did you checked or choose from to search
athozoan
 
Posts: 125
Joined: Wed Dec 01, 2010 1:36 am

Re: Hex Editing: Lighting Data in the Global.iff

Postby Like A Boss on Fri May 25, 2012 1:11 pm

You should of just use global editor by Leftos

viewtopic.php?f=143&t=85230
User avatar
Like A Boss
Bulls
 
Posts: 826
Joined: Wed Mar 14, 2012 8:44 pm
Location: Pasig, Philippines


Return to NBA 2K12 Tutorials & FAQs

Who is online

Users browsing this forum: No registered users and 1 guest