Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Talk about NBA 2K10 here.

Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Tue May 18, 2010 7:45 pm

Okay, i'm helping with alonchos 1991/92 retro roster, and recentley we try to figure out the RGB values of the court .iff's via hex editor.

in a preview/release thread a guy was able to manage it to change the inbound color of the staple center with no errors. i tried his method and it worked well even though my code looks different from his (by accident, but it still worked). the good thing about
his code is, it changes the inbound area beneath the basket. BUT it justs adopts the secondary court color, to set a own color by rewriting the RGB value in the iff hex edit code isn't possible yet, and we really really need help with that.

Since i have no knowledge on hex editing it would be greatly appreciated if anybody with skill on hex editing could help us out to find the actual RGB color value of

- the inbound
- 3 point line
- bounds area

now, the problem is that we don't know if they used hexadecimal or decimal color scheme in the code, and of course where the values are located.

also, it's not possible to get the exact color value from an ingame screenshot or from an .iff logo etc.
the color schemes are different, and the ingame method doesn't work because the colors are SLIGHTY changed by the ingame parket floor underneath, reflections, shadows etc. so one wrong number in the 6 didgets hexadecimal or in the 7 didgets decimal code (we really dont know which of both methods they worked with) makes it impossible to even think of searching for the right code in the iff with hex editor, also sometimes they write RGB values backwards in the files for some stupid reason i will never understand.

so, if anybody could help us out it would be great. to make it a little bit clearer. here's the link to the threat that guy made for the western forum, to have at least a clue where some of the actual court parts are located in the code.

viewtopic.php?f=125&t=72401&p=1182672&hilit=western#p1182672


also another link with a hexadecimal / decimal color scheme converter which is pretty kool (no download),

http://www.mathsisfun.com/hexadecimal-d ... olors.html
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby JaoSming on Tue May 18, 2010 9:08 pm

well the idea I had but havent been able to utilize yet is to copy out the colored parts needed from one court and paste them into the other court in blender with the 3D editing.
but, that requires the file size to remain exactly the same and can cause issues which is why I havent had any success.
Opinions are my own.

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

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Tue May 18, 2010 9:31 pm

JaoSming wrote:well the idea I had but havent been able to utilize yet is to copy out the colored parts needed from one court and paste them into the other court in blender with the 3D editing.
but, that requires the file size to remain exactly the same and can cause issues which is why I havent had any success.


probably won't work. in the .iff the part for the outbound & bound is 16 x 16 pixels. if you open it in photoshop its a empty layer. so those maniacs probably created it that way, to keep the file size low and save time by creating a templae which makes it possible for them to just change the RGB value in the code and not to photoshop all courts in the game over and over. it's actually a pretty kool method but good god they really didn't think of the patch community. somewhere in the code must be the rgb value ! MUST FIND ! haha
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Wed May 19, 2010 4:49 am

Hey, bro, it's nice, that you have started this thing.

I want to help with what I can:

Search for these values:
76ers court (floor0.iff):
4C17EDFF
B36800FF

Bucks court (floor1.iff):
3F650AFF
3011C4FF


If you manage to track down anything interesting - let me know, I'll tell you exact colors for more floors. Actually, these colors are based on uniform colors.

About the way colors are stored: each color takes an integer (4 bytes), so inside the file RGB has format BBGGRRAA, where BB - blue, GG - green, RR - red, AA - alpha. In HEX editor it's viewed hexadecimal (varies from 00 to FF). And as it is integer, it's the normal way for it to be stored BGRA, not ARGB on IBM PCs. You can read about this here: http://en.wikipedia.org/wiki/Endianness So, it's not weird at all ;)
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby JaoSming on Wed May 19, 2010 4:56 am

very nice Vlad, thanks for the help (Y)
Opinions are my own.

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

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Wed May 19, 2010 5:24 am

Vl@d Zola Jr. wrote:Hey, bro, it's nice, that you have started this thing.

I want to help with what I can:

Search for these values:
76ers court (floor0.iff):
4C17EDFF
B36800FF

Bucks court (floor1.iff):
3F650AFF
3011C4FF


If you manage to track down anything interesting - let me know, I'll tell you exact colors for more floors. Actually, these colors are based on uniform colors.

About the way colors are stored: each color takes an integer (4 bytes), so inside the file RGB has format BBGGRRAA, where BB - blue, GG - green, RR - red, AA - alpha. In HEX editor it's viewed hexadecimal (varies from 00 to FF). And as it is integer, it's the normal way for it to be stored BGRA, not ARGB on IBM PCs. You can read about this here: http://en.wikipedia.org/wiki/Endianness So, it's not weird at all ;)


Man THANKS ALOT ! you helped me out with that ALOT and i think every one else here too.

with out knowing they working with 8 didget color values i'd been searching for ages.

and yes i found something interesting search for "R €" in between the R & the € sign has to be a dot.. the one which is in the middle.. not the normal one.. i don't know how to do this one on my keyboard so i left a space in between.. search for this 3 didget.. at the right just beneth it you will find the rows with "f.l.o.o.r" this code is unique and doesn't appear twice in the code. i haven't figured out what it is for but i changed it and the game crashed, but i will definitley play around with it to figure out for what its good for
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Wed May 19, 2010 5:34 am

Could you upload a couple of uncompressed courts (some regular + a couple of those floor8XX.iff, as they chnage their colors depending on a team, currently playing), please, as I have problems with Decompressor tool on my Win7 x64 :(
Or they are already decompressed?
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Wed May 19, 2010 6:18 am

Vl@d Zola Jr. wrote:Could you upload a couple of uncompressed courts (some regular + a couple of those floor8XX.iff, as they chnage their colors depending on a team, currently playing), please, as I have problems with Decompressor tool on my Win7 x64 :(
Or they are already decompressed?


couldn't find the values in the code :(

uncompressed courts are on its way
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Blade Runner on Wed May 19, 2010 11:50 am

This is going to be one tough battle dolemitemoffo! LOL. Thanks for the tips and help Vl@d! Really appreciate it! (Y)
Blade Runner
 
Posts: 682
Joined: Fri May 22, 2009 3:20 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Thu May 20, 2010 12:58 am

Now, i got some news from the battle front. seems like we might be able to reach the enemys line soon haha.

i figured out this :

Image

This is right at the top of the entire court code. the big red square seems to be like a block for the court. inside that big red square the small square which is the very first line of the code has something to do with the court, when i changed it the entire court turned out to be black. also the rest which is inside the red square has something to do with the court. i couldn't figure out if there is the color code yet. some of the lines turned out to be the lakers yellow and purple BUT this happened to me before alot of times and it came out that it's just... nothing at all.

second thing and most interesting : DXT1 and DXT5. i put a square around it. please read the wikipedia post about it

http://en.wikipedia.org/wiki/S3_Texture_Compression

now this sounds pretty good. i think we're on the right path. the color code might be somewhere in that section
at the top or in the big block of DXT1 and DXT5 which would makes sense (at least to somebody who has no clue about hex edit)
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Blade Runner on Thu May 20, 2010 1:07 am

Great find bro! Hey check your email :wink:
Blade Runner
 
Posts: 682
Joined: Fri May 22, 2009 3:20 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby JaoSming on Thu May 20, 2010 1:49 am

DXT1 and DXT5 mark where the actual textures are, so you are in the right spot i think
Opinions are my own.

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

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Thu May 20, 2010 3:23 am

aloncho11 wrote:Great find bro! Hey check your email :wink:


i didn't get any email lol
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Thu May 20, 2010 8:15 pm

I've been searching for the RGB code yesterday and today with no results yet. it seems to be much harder than i expected it to find it. also i guess (those people who are familiar with hex edit codes, programming etc. please correct me if i'm wrong) that the the 3 point line, inbound and outbound is vector based and not pixel x pixel based. it makes sense when you edit the part of the guy who started to edit the staple center by hex edit. if you change/delete certain parts it, ingame it "reacts" exactley like a vector point is missing. so this is just speculation but it this information might help the people who are familiar with hex editing.

also i think those who looked up the code probably noticed the part in it which says "diffuse line color".

i looked up the term and a site about 3D design says this

"Diffuse color is the most instinctive meaning of the color of an object. It is that essential color that the object reveals under pure white light. It is perceived as the color of the object itself rather than a reflection of the light.

Diffuse color is distinguished from a luminous color which an a object gives off on its own, and not in response to lighting. Diffuse color is also distinguished from the color of specular reflection (highlights) off an object, which are generally the color of the light source itself."

this is also might be helpful
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Thu May 20, 2010 9:33 pm

i've posted our concerns in a programming forum. i hope we can get some help there, first adive was also to get the color codes by files which rgb's values aren't "messed up" by textures etc. but since we tried that i really don't know any other method. my concern is that the BGR/RGB code is seperated in the code. I've googled a little bit and a guy posted his concerns where the BRG was seperated and not written in a row, even though it was a different file structure this might be in our case the same. cause the BGR values from the jerseys DEF. should be the ones used for the court.
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby JaoSming on Thu May 20, 2010 11:33 pm

well, nice work, at least someone is making progress
(Y)

keep it up man
Opinions are my own.

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

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby shadowgrin on Thu May 20, 2010 11:56 pm

Love the username dolemite, you moffo.
HE'S USING HYPNOSIS!
JaoSming2KTV wrote:its fun on a bun
shadowgrin
Doesn't negotiate with terrorists. NLSC's Jefferson Davis. The Questioneer
 
Posts: 23229
Joined: Thu Dec 12, 2002 6:21 am
Location: In your mind

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Fri May 21, 2010 12:09 am

First 4 bytes are most likely to be CRC32 hash of the file. Check this, please, because, if it is so, you have to recalculate hash every time you make some changes, ubless it can really just go black...
Also, as you have found out those DXTs, maybe it's worth to "grab" some parts of the file out and run them through some DXT-decompressor.
I suppose, the colors, I gave you, are right, but somehow encrypted in the file, most likely, with that method, described in Wikipedia (your link).
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Fri May 21, 2010 12:25 am

Ah, I'm wrong. First bytes are not CRC32, as they are equal for all the files.
Actually, it's strange, that different courts have so different sizes: from 630 KB till 3 MB :shock:

I've also found some string CAMERAPOSITION there. But can't see any DXT. Did you send me uncompressed or comressed files?
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby dolemitemoffo on Fri May 21, 2010 12:32 am

Vl@d Zola Jr. wrote:Ah, I'm wrong. First bytes are not CRC32, as they are equal for all the files.
Actually, it's strange, that different courts have so different sizes: from 630 KB till 3 MB :shock:

I've also found some string CAMERAPOSITION there. But can't see any DXT. Did you send me uncompressed or comressed files?


i sent you the uncompressed files. BUT the bulls court is compressed, celtics, thunder, suns, i replaced them with patches and don't have the uncompressed ones anymore. but the rest is uncompressed. i forgot to mention this, sorry for that.
User avatar
dolemitemoffo
 
Posts: 88
Joined: Mon Mar 22, 2010 11:31 pm

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Fri May 21, 2010 12:35 am

OK, I see, that's why they differ in sizes so much )))
Could you send me also uncompressed f800.iff, please?
==================
Actually, pngXXX.iff have the same 4 bytes, as fXXX.iff .
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Fri May 21, 2010 1:20 am

After looking through the file for a while, I can consider, that it works the same way as pngXXX.iff and so on. fXXX.iff are containers for floor objects (including shaders), some other things and textures, stored in DDS format.
So, the key problem here is to define, how texture blocks are stored. I mean, where to start grabbing and how much bytes to grab for a single texture. Other things are just a technical issue. I suppose, I can change the colors (should check this before sharing), using HEX, but it's uncomfortable, as textures are rather big.
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Fri May 21, 2010 1:45 am

Yes, I was right.
Just approximately defined texture by looking on HEX, than approximately defined wood colors and replaced some pixels with red:

Image

To do the same - load original uncompressed f001.iff and go to offset 496832 (decimal). Wood texture starts somewhere here. To change the color - use DDS plug-in for Photoshop, save some sample-file and copy the bytes (I did it this way).
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby JaoSming on Fri May 21, 2010 1:58 am

well we can use the 3D tool and the 2k9 iff editor to replace textures, the parts we want to be changing the color of are the lane and out of bounds paint areas.
Opinions are my own.

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

Re: Court Colors Hex Editor Help. Inbound, 3 Point Line etc.

Postby Vl@d Zola Jr. on Fri May 21, 2010 2:02 am

Hmmm... I though, that paint areas are also represented as textures... There are many equal 4-integer (128-bit) sequence in the file, that means, all the pixels of that texture have the same colors.

PS: Remember, I can't use IFF-tool on my Win7 x64 :(
User avatar
Vl@d Zola Jr.
Contributor
Contributor
 
Posts: 1057
Joined: Wed Apr 04, 2007 1:31 am
Location: Binaryland

Next

Return to NBA 2K10

Who is online

Users browsing this forum: No registered users and 1 guest