Bsp to txt program help
Bsp to txt program help
Hello,
I am looking for a program to convert the first part of the .map file to a txt file. I know someone has written it already because I have a bloodgulch txt file. I want to use it to compare the bsp of halopc and haloxbox. Any Help would be appreciated.
Thanks Talin64
I am looking for a program to convert the first part of the .map file to a txt file. I know someone has written it already because I have a bloodgulch txt file. I want to use it to compare the bsp of halopc and haloxbox. Any Help would be appreciated.
Thanks Talin64
derp... Um... just get yourself a hex editor, and open the map files, then select all the text, and copy it into a text editor... I'm not sure why you'd want to compare the bsp when it's completely different... BTW, I'm almost ready to begin to write a program to extract the tags from the maps, just so we can analyze them better...
-
- Posts: 73
- Joined: Mon Dec 15, 2003 2:47 am
The major difference is that the PC bsp points to completely different files for all its resources.... let alone the fact that the PC version uses a bitmaps.map and sounds.map set of files. I believe the biggest problem is the map format version. the xbox version of halo uses version 05, while the PC version uses version 07. It is rumored that Halo2 uses version 06. The version number is not interchangeable between the two versions of the game. (Now 3 versions, with HaloCE). I think if someone (probably me) writes an app to extract the raw tag data out of the map files, we might have a chance to figure out all the differnces....
to sum up the above, the main problem is that the BSP's in haloPC are very large, larger than any bsp space we can get ahold of in the xbox maps, and the bsp data points to resources that are shared in separate files, which is really a technical bug.
In the future, it might be possible to swap between all the map versions, but without 100% working tag extractors and comparing of strings, we're not going anywhere...
Grenadiac, would you care to field this question?
to sum up the above, the main problem is that the BSP's in haloPC are very large, larger than any bsp space we can get ahold of in the xbox maps, and the bsp data points to resources that are shared in separate files, which is really a technical bug.
In the future, it might be possible to swap between all the map versions, but without 100% working tag extractors and comparing of strings, we're not going anywhere...
Grenadiac, would you care to field this question?
Hey Jimmsta,
Thanks, fot the info.
I took a look at Bloodgluch bsp section for haloxbox, halopc, and haloce.
It looked like the bsp sections were identical between pc and ce. When I looked at the meshes for pc versus xbox there were 78 meshes each but the pc version had extra points in some meshes. I think it would be possible to import a halo ce map over a halo xbox map but it would be a ton of work figuring out where everything goes and how to update it. correctly. I am going to take my time and try to figure it out.
bye, Talin64
Thanks, fot the info.
I took a look at Bloodgluch bsp section for haloxbox, halopc, and haloce.
It looked like the bsp sections were identical between pc and ce. When I looked at the meshes for pc versus xbox there were 78 meshes each but the pc version had extra points in some meshes. I think it would be possible to import a halo ce map over a halo xbox map but it would be a ton of work figuring out where everything goes and how to update it. correctly. I am going to take my time and try to figure it out.
bye, Talin64
the PC version of bloodgulch is somewhat different than the xbox version. An area off to the side, where some people have launched ghosts off in the past was taken away on the PC/CE version. This is probably some of those *extra* points that you saw. I have a feeling that if someone would release a tutorial about reflexive offsets, in plain english, I'd be able to figure out how to make an xbox map rebuilder...
Hello,
Here is a quick compilation of what iron forge had to say about reflexive offsets. By the way I think it is imprtant to note that the collision model of a regular model has the same structure as the terrain model.
meta is composed of reflexive offsets, reference offsets, meta data itself, and padding.
as such, we are going to look at meta from the perspective of the warthog. The warthog itself, is a vehicle, and it has a vehicle meta object. If you look at this object, there is acctually very little true meta data in it. It starts out as being around 4000 bytes, but if you ignore all the references (those are the things which point to other objects remember), and the reflexives (offsets which point to more meta), theres not many values left. Many of whats left are just 0's, and 0's are usually just padding, extra data, things you can ignore. ;o)
reflexive offsets are those offsets which point to somewhere further in the meta your editing. But you just duplicated your meta to a new location, and all those reflexives still point to the original object. What you need to do is find all the reflexive offsets in the meta your copying, its usually a simple time consuming tasks, as reflexives usually end in 40 or 41 (80 or 81 for xBox maps), same as all the other offsets people are (hopefully) familiar with using.
So you will have to take their value (easily obtained from your data inspector in Hex Workshop saving you the headaches of little/big endian conversion), subtract pesky magic, and then go to that offset. It (should) take you somewhere into the original object, usually near a reference tag. Make a mental note of where this is, and return to your duplicated meta. Once there, try to find the location that you just pointed to in the original meta, and get its offset. To this you will add magic, and then change that reflexive offset to this point.
That needs to be done for all of the reflexives, so that they now point to the correct locations in your newly duplicated meta instead of their old meta points. Once this is done, you've completely duplicated meta. All of the references can remain the same of course, since they do not depend on where the meta is to begin with.
Here is a quick compilation of what iron forge had to say about reflexive offsets. By the way I think it is imprtant to note that the collision model of a regular model has the same structure as the terrain model.
meta is composed of reflexive offsets, reference offsets, meta data itself, and padding.
as such, we are going to look at meta from the perspective of the warthog. The warthog itself, is a vehicle, and it has a vehicle meta object. If you look at this object, there is acctually very little true meta data in it. It starts out as being around 4000 bytes, but if you ignore all the references (those are the things which point to other objects remember), and the reflexives (offsets which point to more meta), theres not many values left. Many of whats left are just 0's, and 0's are usually just padding, extra data, things you can ignore. ;o)
reflexive offsets are those offsets which point to somewhere further in the meta your editing. But you just duplicated your meta to a new location, and all those reflexives still point to the original object. What you need to do is find all the reflexive offsets in the meta your copying, its usually a simple time consuming tasks, as reflexives usually end in 40 or 41 (80 or 81 for xBox maps), same as all the other offsets people are (hopefully) familiar with using.
So you will have to take their value (easily obtained from your data inspector in Hex Workshop saving you the headaches of little/big endian conversion), subtract pesky magic, and then go to that offset. It (should) take you somewhere into the original object, usually near a reference tag. Make a mental note of where this is, and return to your duplicated meta. Once there, try to find the location that you just pointed to in the original meta, and get its offset. To this you will add magic, and then change that reflexive offset to this point.
That needs to be done for all of the reflexives, so that they now point to the correct locations in your newly duplicated meta instead of their old meta points. Once this is done, you've completely duplicated meta. All of the references can remain the same of course, since they do not depend on where the meta is to begin with.
I am *cough* looking into this in detail. My opinion is that converting the bsp is definitely possible, although very difficult. There are extra sections in the xbox version, and the order of the data sections is not the same. Another difference is that the xbox uses compressed vectors for some of the vertex data (some of it is still a mystery), whereas PC does not. I would say I understand the entire BSP from a high level, it's just a matter of decoding all the tiny details that we need to make it work. From what I have seen, we would need to modify the vertex data, the reflexives, the lightmaps, and the shaders. I've looked at about 20% of the BSP so far in detail and most of it looks very similar.
I've added some special functions to SparkEdit to convert the binary data to text you are talking about, but it is sort of hacked together right now. Once I get some time, I will make the implementation easier to use and maybe get it to some select people that are interested in working on this problem.
I've added some special functions to SparkEdit to convert the binary data to text you are talking about, but it is sort of hacked together right now. Once I get some time, I will make the implementation easier to use and maybe get it to some select people that are interested in working on this problem.
take a look at my post here: http://www.halomods.com/forums/viewtopic.php?t=11641