Important information: this site is currently scheduled to go offline indefinitely by end of the year.

modern combat 5 .bre files (android&pc)

Post questions about game models here, or help out others!
Faraz Adil
n00b
Posts: 11
Joined: Fri Jun 10, 2016 5:41 pm
Has thanked: 15 times

modern combat 5 .bre files (android&pc)

Post by Faraz Adil »

okay its about modern combat 5 (mc5) both android and pc.. i xtracted .gla2 using quick bms and nova3 bms script by aluigi.. then i got several files like .bre (model file), .dds (map and texture files) , .dat files, .swf files (which r actualy .fws when opened via hex editor) , .mih files, but the main are .bre files a guy named acewell converted .bre files to .obj via hex2obj but i dont know how to do tht(m not tht pro as u guyz r) [roll] gameloft is just hate me [bruce] so can any1 make a script for converting or there is any other way to do it? any help will b appreciated :) 3 files r attached below.. plz help :oops:
file1: http://www.mediafire.com/download/15875 ... 282%29.bre
file2: http://www.mediafire.com/download/g61qa ... 000000.bre
file3: http://www.mediafire.com/download/58f0k ... 00000a.bre
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: modern combat 5 .bre files (android&pc)

Post by shakotay2 »

Simple format:
0000_bre.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Faraz Adil
n00b
Posts: 11
Joined: Fri Jun 10, 2016 5:41 pm
Has thanked: 15 times

Re: modern combat 5 .bre files (android&pc)

Post by Faraz Adil »

wow wow wow.. m reading ur guide for past 2 hours but i cant understand (m a super noob) :( nd u just did it... so now i just hav to change the strt perimeters or everything for each file.. nd i realy appreciate ur work on hex2obj.. howevr it is confusing but not tht much as it should be thnx a lot :]
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: modern combat 5 .bre files (android&pc)

Post by shakotay2 »

Faraz Adil wrote:hex2obj.. howevr it is confusing
If you told me what exactly is confusing I could try to improve it.

btw: is there a problem with the 'a' key of your keyboard? :D
(You may find it cool to spare the 'a's but it makes your text hard to read - just my two cents.)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Faraz Adil
n00b
Posts: 11
Joined: Fri Jun 10, 2016 5:41 pm
Has thanked: 15 times

Re: modern combat 5 .bre files (android&pc)

Post by Faraz Adil »

:P lol :lol: actualy my a key is realy broken i mean sumtimes it works sum times not :p nd the confusing part is about sequential hey i giv u a gud idea use a practical example like. post a link to a file then screenshot it step by step how to do things it will make it a lot easier nd noobs like me could get the idea fast :]
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: modern combat 5 .bre files (android&pc)

Post by shakotay2 »

Faraz Adil wrote:hey i giv u a gud idea use a practical example like. post a link to a file then screenshot it step by step how to do things it will make it a lot easier nd noobs like me could get the idea fast :]
hey, I give you a good idea, too: there's dozens of examples in this forum where I showed how to do it.

Times to show again and again how to to it for a special example have passed, sry.

Tell me <what> you have tried so far and <where> you got stuck.
That's the only way that is working for me.
the confusing part is about sequential
you don't need the sequential mode here, it's 'Vertex Block mode', afaics
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Faraz Adil
n00b
Posts: 11
Joined: Fri Jun 10, 2016 5:41 pm
Has thanked: 15 times

Re: modern combat 5 .bre files (android&pc)

Post by Faraz Adil »

ok i got u but still u should attach examples for sequential nd block though.. nd i got a prblm.. now i no how to get strtaddr but i dont no how to get count.. i serched for clues but i couldnt find any :? edit: no m not saying tht giv special examples for each file type just post ur examples on a page nd say detailed tutorial for ulta noobs :p just giv more visual examples like upload a video on youtube in this way u can get more attention bcoz with ol due respct sir.. u guyz hav made a powerful software but its not tht much popular.. u shud go post links on diffrent forums.. even "the Aluigi" didnt no about ur product :ninja: edit: ok now i get it how to get count m realy confused in how to know what is fvf size as it always change my mesh and i dont know how to calculate it? :scaredy:
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: modern combat 5 .bre files (android&pc)

Post by shakotay2 »

Faraz Adil wrote:ok i got u but still u should attach examples for sequential nd block though
press the 'tut' button in hex2obj - there's a sequential example handled

For VB (vertex block) mode read here:
.hgs model file conversion
viewtopic.php?f=16&t=14377&p=118873#p118873

Flintstones Bedrock Bowling .AMW
viewtopic.php?f=16&t=12521&p=103091#p103091

(including maxscript)
Boiling Point: Road to Hell *.RF2
viewtopic.php?f=16&t=14294&p=118292#p118292
now i no how to get strtaddr but i dont no how to get count..
which start address are you talking of? start address of the vertex block or start address of face indices?
count of face indices (FIs) is size of FIs' block divided by 2
count of vertices is calculated automatically (read the tutorial, carefully)

size of FVF is (start address of FIs - start address of vertex block) / vertex count
(This formula DOESN'T apply for every model format!)
just giv more visual examples like upload a video on youtube
I don't have the time for such, sry.
in this way u can get more attention
well, I'm an old guy - the only attention I was keen on was the one of the pretty girls in my young days - rofl (:
u guyz hav made a powerful software but its not tht much popular.. u shud go post links on diffrent forums.. even "the Aluigi" didnt no about ur product
I really don't care - hex2obj is a helper tool for my own needs - it's development is finished more or less (except for weights which may come some day).
(There's about 2000 downloads up to now but I guess there's only a handful of regular users.)
how to know what is fvf size as it always change my mesh and i dont know how to calculate it? :scaredy:
see formula above
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Faraz Adil
n00b
Posts: 11
Joined: Fri Jun 10, 2016 5:41 pm
Has thanked: 15 times

Re: modern combat 5 .bre files (android&pc)

Post by Faraz Adil »

well thnx those postshelped nd i improved but not tht much :roll: as u said i got strt address for face indices (3c10) and count 2880 (it was calculated 2879 as last address of Face indices was 528f) after go1 i got max face idex= 559 vertices==vertex count.. then i calculated strt address of vertices 12x559=6708=1a34 and when i calculated fvf according to ur formula (3c10-1a34/559=6) but again its showing wiered images like in screenshot now my questions r how to get fvf size (any other effective method?) how to get uv pos(totally confused) :? file tht m working on: http://www.mediafire.com/download/sbxqb ... 000000.bre
now plz help me.. m so close.. i can feel it :D lol screenshot link: http://www.mediafire.com/download/923po ... 169%29.png
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: modern combat 5 .bre files (android&pc)

Post by Acewell »

0000000000000000.bre sample mesh header

little-endian

0x18D0 - offset to vertex block start
0x18D8 - length of vertex block
0x1910 - vertex stride/FVF (first occurance) 0x48 = 72 dec
0x19D0 - vert count (add 1)
0x19D4 - face count
0x19E0 - offset to face indices start
0x19E8 - length of face indices data to eof (or next submesh header)

i have not yet figured out how to find the start of the first submesh header :D
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: modern combat 5 .bre files (android&pc)

Post by shakotay2 »

Faraz Adil wrote:then i calculated strt address of vertices 12x559=6708=1a34
doesn't make sense to me - try

0x3C10 2880
Vb1
24 12
0x7C0 559
020000
0x0 255

(Not the final solution but should serve as a good starting point.)

btw: if you had pressed the go2 button you'd have been told that an EOF is met with your parameters
how to get fvf size (any other effective method?)
search for patterns - it's clear to be seen that FF0000FF is such a pattern in the vertex block
how to get uv pos(totally confused) :?
that's the hard part - there's various possibilities.
(For example vx,vy,vz, vnx,vny,vnz, tx,ty, so for floats uv pos= 24. Or uv pos= FVFsize-8)

Here it might be FVFsize-12 (just a wild guess).

edit: start of vertices is 0x7A8 - you'll get a perfect sphere then.

here's how to find the vertex start address:
  • search for 0000 302C302C -> 0x13A
  • go 10 bytes back, get DWord -> 0x650
  • add 0x48 to that DWord -> 0x698
  • it's a pointer, so it contains an address
[0x698] 0x7A8
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Faraz Adil
n00b
Posts: 11
Joined: Fri Jun 10, 2016 5:41 pm
Has thanked: 15 times

Re: modern combat 5 .bre files (android&pc)

Post by Faraz Adil »

wow easy i got it now just a few more questions guyz:-(acewell ur reply is confusing dont talk so pro m a ultra noob here :P )
ques.1-is every .bre file consist ff0000ff type pattern or it can b something else.. if so then how m gonna find it?
ques.2-is i always hav to search for 0000 302c302c? that line "go 10 bytes back,get d word" i serched for D and i found it on 0x650
but what u mean by go 10 bytes back?
ques.3-"add 0x48 to that d word" is i always hav to add 0x48 to every d word offset i found??
" it's a pointer, so it contains an address

[0x698] 0x7A8"
but it contains it like a807 and u wrote 7a8.. is i hav to interchange their value then read or what? :) edit: and how u know where is the v block is there another trick for it?
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: modern combat 5 .bre files (android&pc)

Post by shakotay2 »

Faraz Adil wrote:ques.1-is every .bre file consist ff0000ff type pattern or it can b something else.. if so then how m gonna find it?
patterns may change; a pattern is a byte sequence that occurs several times in a vertex block for example. If you find an identical sequence, then the offset to the previous one might be the FVF size. (There are one or two posts where I showed a picture of such but I'm too lazy to search, sry.)
ques.2-is i always hav to search for 0000 302c302c?
dunno - worked for the bre files I have
but what u mean by go 10 bytes back?
go back means count back
bre_explain.jpg
i always hav to add 0x48 to every d word offset i found??
don't understand the question. Do what you're told to do :D and you'll find the vertex start address, in most cases, I guess.
What I found is just a receipe, not a rule. (Finding rules requires a FULL format analysis and I don't waste my time with such.)
[0x698] 0x7A8"
but it contains it like a807 and u wrote 7a8..
because of the endianness - see above picture
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Faraz Adil
n00b
Posts: 11
Joined: Fri Jun 10, 2016 5:41 pm
Has thanked: 15 times

Re: modern combat 5 .bre files (android&pc)

Post by Faraz Adil »

THNX FOR HELPING MAY B I WILL COME UP WITH SOME PROBLEMS IN ANY OTHER .BRE FILES BCOZ THEY R SO LARGE ABOUT 60-80 MB YES MB :eek: BUT FOR NOW I HAV TO STUDY BCOZ I HAV TO GIV 3 XAMS IN 3 DAYS (DAILY) AND I HAV TO STUDY NOW :[ AND U SAID THAT IT CAN BE DONE I MEAN FULL FORMAT ANALYSIS CAN BE DONE!! IF ITS POSSIBLE THEN PLZ TELL ME HOW? I CAN DO ANYTHING TO ANALYZE THIS FORMAT.. BCOZ THE THING I WANT TO DO IS MAKE MAP MODELS LIKE CRATES AND WALLS MINIMIZED IN SIZE OR TOTALLY REPLACED WITH SUMTHING TRANSPARENT OR SEMI TRANSPARENT OR JUST NOTHING.. TO MAKE WHOLE MAP TRANSPARENT THEN AGAIN CODE THEM IN .BRE AND THEN REPACK THEM IN .GLA2 AND REPLACE DEFAULT FILES WITH THOSE EDITED FILES.. GIV ME SOMETHING POSITIVE.. (COZ MY BLOOD GRUP IS B POSITIV :lol: LOL) EAGER FOR UR REPLY [roll] :keke:
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: modern combat 5 .bre files (android&pc)

Post by shakotay2 »

Faraz Adil wrote:AND U SAID THAT IT CAN BE DONE I MEAN FULL FORMAT ANALYSIS CAN BE DONE!!
well, iirc I wrote it would require a full analysis - by someone else, not me
IF ITS POSSIBLE THEN PLZ TELL ME HOW?
As I wrote I've no time for such.
(I've spent tons of time to create hex2obj, so please, don't be too greedy. :D )

If you know 'C' you could read here to maybe get more insight: viewtopic.php?f=29&t=12756
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Post Reply