xbox bsp editing
ok I have a program now, im sure it has some bugs in it, as all do, but its pretty simple and rather effective. You set a start and end, then open up a map file and in the left window you will have the hex, and in the right you will have the floats, it works well but have only tested it from f80 to 4760 so i dont know how it will handle huge huge huge amounts of data. I will send it to anyone that wants it, IM me at cyber psycho 563. One problem I have noticed as well is it uses the the microsoft shared dll not the static dll, I have tried fixing this but fro some reason my C++ does not give me the option of the static dll, if this is a problem or someone has a solution, feel free to tell me and I will fix it imediately. I am working on synching the scrolls etc. but M$++ is being a bitch about adding member variables, I add a member variable, it compiles right, but when it runs it crashes emidiately, I did have to add a union into the variables and am thinking that is the cause. The classes are layed out
public:
member variables
protected:
not sure(dont have my files with me, im at school)
private:
union
anyone who knows C++ I would appriciate some help, thanks!!!
public:
member variables
protected:
not sure(dont have my files with me, im at school)
private:
union
anyone who knows C++ I would appriciate some help, thanks!!!
Just a thought
I've been following this for a while, but got lost in places along the way
but I was thinking about what you said (specifcally xorange) about the
"passthrough" effect.
Perhaps it is meant to be the gradient of the plane? because it would make runtime alot more efficient if the game didnt have calculate the gradient whenever an object/player hit a piece of the bsp (for collision angle/sliding)
also that would make sense for the bounce/attach (I assume you mean of plasmas?) which only bounce of they hit a fairly steep angle.
this might be why your getting a "passthrough" effect, when the gradient and the bsp dont fit (ie, being able to run up/through really steep slopes)
i dont really have anyway of checking this (I'm running gentoo so none of the apps work, and I got lost when you guys were talking about the location/conversion/specification of points) but I just thought I'd share it with you anyway.
Of course it could be completely wrong
Toby
but I was thinking about what you said (specifcally xorange) about the
"passthrough" effect.
Perhaps it is meant to be the gradient of the plane? because it would make runtime alot more efficient if the game didnt have calculate the gradient whenever an object/player hit a piece of the bsp (for collision angle/sliding)
also that would make sense for the bounce/attach (I assume you mean of plasmas?) which only bounce of they hit a fairly steep angle.
this might be why your getting a "passthrough" effect, when the gradient and the bsp dont fit (ie, being able to run up/through really steep slopes)
i dont really have anyway of checking this (I'm running gentoo so none of the apps work, and I got lost when you guys were talking about the location/conversion/specification of points) but I just thought I'd share it with you anyway.
Of course it could be completely wrong

Toby
zero_cool-
I would love a copy of your code could you post the exe and cpp in the misc. Files section. I want to write some code that will update the map file with a txt file that has hex offset and modified planes. I am having a hard time getting a float value from a txt file and then writing it back as hex into the cache file. Any Ideas?
-Talin64
I would love a copy of your code could you post the exe and cpp in the misc. Files section. I want to write some code that will update the map file with a txt file that has hex offset and modified planes. I am having a hard time getting a float value from a txt file and then writing it back as hex into the cache file. Any Ideas?
-Talin64
So currently we know... ?
Can someone please post a description of the structure of the visual model and collision model data, possibly with an offset of an example point?
Here is what I have done.
I have been doing a lot of research on trying to edit the terrain of an Xbox Map, specifically Blood Gulch. What I have learned so far is it is a tough nut to crack. I have no previous modding experience, so this made it particularly hard.
One day I was poking around in Halomods.com\projects and found a file called something like xbox_bg_BSP.TXT. It looked interesting so I downloaded. A few weeks later I took a look at it and realized that someone had put a lot of work in to this file converting hex to floats. I later found out that Grenadiac had written some custom programs to make this file so he could better understand the BSP. So I started looking at this file and saw a large section of converted hex at the bottom. Every line had three float values and a hex value. I thought to myself this looks like a point in 3d space in x,y,z coordinates. So I took these points and put them into a graphical program I have and Blood gulch
I have been doing a lot of research on trying to edit the terrain of an Xbox Map, specifically Blood Gulch. What I have learned so far is it is a tough nut to crack. I have no previous modding experience, so this made it particularly hard.
One day I was poking around in Halomods.com\projects and found a file called something like xbox_bg_BSP.TXT. It looked interesting so I downloaded. A few weeks later I took a look at it and realized that someone had put a lot of work in to this file converting hex to floats. I later found out that Grenadiac had written some custom programs to make this file so he could better understand the BSP. So I started looking at this file and saw a large section of converted hex at the bottom. Every line had three float values and a hex value. I thought to myself this looks like a point in 3d space in x,y,z coordinates. So I took these points and put them into a graphical program I have and Blood gulch
Ok I will post it as soon as I get home, As of right now it doesnt output a text file but im sure it wouldnt be hard at all to do it. Ive now mainly finalized that project cuz i didnt think ne one wanted it any more. I will upload it, and try to get it output it to a text file. Talin, thanks for the full description, I have been looking for that forever, now i just gotta read it :-/
EDIT:
http://files.halomods.com/viewtopic.php?t=6520 - Hex To Float Program, if theres anything you would like to see done, besides text file output, tell me and ill try to do it.
EDIT:
http://files.halomods.com/viewtopic.php?t=6520 - Hex To Float Program, if theres anything you would like to see done, besides text file output, tell me and ill try to do it.
To Grenadiac:
I don't think I can add anything more to this topic. It is too a point where someone has too take over what we have done and incorporate it into a program or make a new program. I don't have the skill to do this. It also seems like everyone who is anyone is on to bigger and better things with the release of haloCE and HEK. So no one care about modifying old maps when they can create new ones.
Here is a list of things still left to figure out
How to find the start of each graphical mesh
And the graphical points for that mesh
How to find the collision points
How to find the points for each plane.
However most of this list has already been figure out by the elites of halo modding such as you. So I find myself asking why I should figure this out again. Another thing that is bothering me is that when you original created Sparkedit you intended it to be used for modifying maps. So now when we are so close I have heard nothing at all from you. Sorry for getting upset. I would love to hear you thoughts.
Sincerely, Talin64
I don't think I can add anything more to this topic. It is too a point where someone has too take over what we have done and incorporate it into a program or make a new program. I don't have the skill to do this. It also seems like everyone who is anyone is on to bigger and better things with the release of haloCE and HEK. So no one care about modifying old maps when they can create new ones.
Here is a list of things still left to figure out
How to find the start of each graphical mesh
And the graphical points for that mesh
How to find the collision points
How to find the points for each plane.
However most of this list has already been figure out by the elites of halo modding such as you. So I find myself asking why I should figure this out again. Another thing that is bothering me is that when you original created Sparkedit you intended it to be used for modifying maps. So now when we are so close I have heard nothing at all from you. Sorry for getting upset. I would love to hear you thoughts.
Sincerely, Talin64
dude
i just wanted to say GREAT FUCKING JOB!!!, your efforts will put xbox closer to new maps, hopefully grenadiac will see your message. If not try e-mailing him, he needs to know (At least I think so). But great job nonetheless. I haven't gotten into vector math yet, but I hope grenadiac can come up with something.
Well, BOLL and I pursued this for a while but I sort of gave up on it after a couple of miserable failures. The original reason for exporting .obj files from SparkEdit was so it could be modified and imported. BOLL and I did this, and we were able to import the vertices properly.
However, when we used it in-game, we ran into a similar problem. You would get caught on edges - the collision bsp wasn't working properly. I also noticed problems with VIS where meshes would blink in and out.
The problem was with updating the planes. The way a BSP is constructed, you could potentially have multiple polygons sharing one plane, and this is the real downside. However, this isn't hopeless, we just decided not to really pursue it because of the difficulty.
However, if you look at Guerilla, you can gather an incredible amount of information about the structure of the HCE bsp, the scenario, and other tags - a lot of which appears to be very similar to xbox (from what I've seen with my SparkEdit development). I haven't really examined this in detail yet, but it does show planes, nodes and vertices...along with other stuff that I have yet to understand. The structure of these things seems to match what I've seen in my reverse engineering travels, and I have yet to do an overhaul of SparkEdit to fill in the gaps. The simple fact is we can make a lot of progress using Guerilla.
As for the state of xbox development, I think most of the devs (including myself) really want to get two things done. Get new maps on xbox (which is an extremely difficult challenge) and get new single player maps working on HCE. And then there is always Halo2...
I plan on releasing some code that I used to do reverse engineering, or possibly make a tool to assist in reverse engineering efforts. However, if I were you, I would make a strong effort to install Guerilla and examine the tags that were released, then compare those to the HCE tutorial mapfile to gather some of the information we need. Combined with that reverse engineering tool, that will provide a wealth of information.
Or perhaps the effort should go toward a xbox converter for HCE maps? It's an interesting thought.
Grenadiac
However, when we used it in-game, we ran into a similar problem. You would get caught on edges - the collision bsp wasn't working properly. I also noticed problems with VIS where meshes would blink in and out.
The problem was with updating the planes. The way a BSP is constructed, you could potentially have multiple polygons sharing one plane, and this is the real downside. However, this isn't hopeless, we just decided not to really pursue it because of the difficulty.
However, if you look at Guerilla, you can gather an incredible amount of information about the structure of the HCE bsp, the scenario, and other tags - a lot of which appears to be very similar to xbox (from what I've seen with my SparkEdit development). I haven't really examined this in detail yet, but it does show planes, nodes and vertices...along with other stuff that I have yet to understand. The structure of these things seems to match what I've seen in my reverse engineering travels, and I have yet to do an overhaul of SparkEdit to fill in the gaps. The simple fact is we can make a lot of progress using Guerilla.
As for the state of xbox development, I think most of the devs (including myself) really want to get two things done. Get new maps on xbox (which is an extremely difficult challenge) and get new single player maps working on HCE. And then there is always Halo2...
I plan on releasing some code that I used to do reverse engineering, or possibly make a tool to assist in reverse engineering efforts. However, if I were you, I would make a strong effort to install Guerilla and examine the tags that were released, then compare those to the HCE tutorial mapfile to gather some of the information we need. Combined with that reverse engineering tool, that will provide a wealth of information.
Or perhaps the effort should go toward a xbox converter for HCE maps? It's an interesting thought.
Grenadiac
Heyhey
I know, long time no update...sorry.
Well, here's my Halo BSP Plane Calculator.
I didn't include a proof of concept mod, because I cannot yet proove the concept...not quite successfully at least.
I mean, I believe the idea is sound, but for whatever reason, when you go through the process of changing the terrain, it only partially works.
Granted, it works well enough that I'm still hopeful, & I'll continue to experiment...but it's definitely not perfect yet.
I'm not really sure yet what the problem is, but I don't think it's accuracy, as this calculator uses numbers with a much higher degree of precision than we were using before.
I think that one of the main problems is shared planes, as has been said several times before.
I imagine there's a way around this, but it hasn't come to me yet.
I also think that problems arise when you modify things to the point that planes are intersecting each other in ways they're not supposed to.
On that note, perhaps pushing the terrain down/out rather than up/in will work better. Idk yet.
Anyway, using this calculator I was able to do a test mod (1 vert, 9 planes) in about 15 minutes, so...the process is considerably less tedious now.
Hopefully some people will be inspired to experiment, as I haven't had much time to do so myself....but I will.
I'm not creating data sheets for any other level or making a tutorial until/unless I can make a mod work flawlessly.
Oh yeah...sorry the workbook is so big (16MB+)...it had to be.
Perhaps at some point in the future I'll move the data sheets to Access databases, which would probably be faster.
If you're working on an old 486 without a math-coprocessor or something then don't even open this.
By the way, if anyone figures out how to install/decompress the HEK without having HaloCE installed please let me know.
I have it all, & I'm totally down for some reverse engineering, but without HaloPC, HaloCE won't install, and without HaloCE, the HEK won't install. uggh

I know, long time no update...sorry.
Well, here's my Halo BSP Plane Calculator.
I didn't include a proof of concept mod, because I cannot yet proove the concept...not quite successfully at least.
I mean, I believe the idea is sound, but for whatever reason, when you go through the process of changing the terrain, it only partially works.
Granted, it works well enough that I'm still hopeful, & I'll continue to experiment...but it's definitely not perfect yet.
I'm not really sure yet what the problem is, but I don't think it's accuracy, as this calculator uses numbers with a much higher degree of precision than we were using before.
I think that one of the main problems is shared planes, as has been said several times before.
I imagine there's a way around this, but it hasn't come to me yet.
I also think that problems arise when you modify things to the point that planes are intersecting each other in ways they're not supposed to.
On that note, perhaps pushing the terrain down/out rather than up/in will work better. Idk yet.
Anyway, using this calculator I was able to do a test mod (1 vert, 9 planes) in about 15 minutes, so...the process is considerably less tedious now.
Hopefully some people will be inspired to experiment, as I haven't had much time to do so myself....but I will.
I'm not creating data sheets for any other level or making a tutorial until/unless I can make a mod work flawlessly.
Oh yeah...sorry the workbook is so big (16MB+)...it had to be.
Perhaps at some point in the future I'll move the data sheets to Access databases, which would probably be faster.
If you're working on an old 486 without a math-coprocessor or something then don't even open this.

By the way, if anyone figures out how to install/decompress the HEK without having HaloCE installed please let me know.
I have it all, & I'm totally down for some reverse engineering, but without HaloPC, HaloCE won't install, and without HaloCE, the HEK won't install. uggh
Ok, I put up a rar file with the tools (sorry, no tags yet) so you guys can get started. The download is 15MB.
http://www.halomods.com/downloads/hek_tools.rar
http://www.halomods.com/downloads/hek_tools.rar
hey
xorange, if you dont have haloPC you should be able to install HaloCE without trouble. I downloaded the 170mb install file and HaloCE installed fine. I haven't had the chance to play with it yet but I will today.
Grenadiac: Thanks very much!! ^_^
powerpack: Hey, thanks! Now that I think about it I only heard second hand that you needed HPC to install HCE. I remember now that I tried installing the HEK, it didn't work & I was disappointed, so I didn't quite finish downloading HCE.
Either way, as long as I have the tools!
powerpack: Hey, thanks! Now that I think about it I only heard second hand that you needed HPC to install HCE. I remember now that I tried installing the HEK, it didn't work & I was disappointed, so I didn't quite finish downloading HCE.
Either way, as long as I have the tools!
cool
sure, no problem. now can you teach me all you know about BSP editing? I would like to help out in coming up with a program that makes new levels for xbox. I use to know how to hex edit so it is not totally foreign to me, but I haven't used a hex editor in forever. No pressure if you don't want to teach me, it was just a question to see if I could help in some way. Also, once you have HCE installed and run it you still need the HPC original CD. However, there is a way around this if you know what I mean. You could just get a no cd patch, that is what I have done. Simply because I don't own HPC.
Grenadiac-
Unfortunately I am a little confused by you post about guerilla and finding the tags.
I think what you want is the format of the bsp and other terrain info.
I think the best way to do this is for you to release what you know so we can fill in the blanks for you
This is the format you used earlier, so maybe you could release a txt file with the info you are looking for. I was hoping to use BG as the prototype and having you give offests to the header and the eight blocks
struct BSP_VERTEX
{
float vertex[3]; // notes on vertexes
UINT unknown[3];
float texcoord[2];
}
I think I have a few of the blocks for the bsp figured out from reading what you have done and others and figuring it out on my own.
Block 1: Adjacency Matrix
Block 2: Force Plane Buffer
Block 3: Attribute buffer
...
Block #: starts at 00120760 // points for planes, "indice" array
...
Block 8: Vertex Buffer
If you don't release anything I will understand.
bye, Talin64
Xorange-
I loaded it up your excel app. about half an hour later it recalculated all the planes. I was very impressed. Still trying to figure it out.
bye-talin64
Unfortunately I am a little confused by you post about guerilla and finding the tags.
I think what you want is the format of the bsp and other terrain info.
I think the best way to do this is for you to release what you know so we can fill in the blanks for you
This is the format you used earlier, so maybe you could release a txt file with the info you are looking for. I was hoping to use BG as the prototype and having you give offests to the header and the eight blocks
struct BSP_VERTEX
{
float vertex[3]; // notes on vertexes
UINT unknown[3];
float texcoord[2];
}
I think I have a few of the blocks for the bsp figured out from reading what you have done and others and figuring it out on my own.
Block 1: Adjacency Matrix
Block 2: Force Plane Buffer
Block 3: Attribute buffer
...
Block #: starts at 00120760 // points for planes, "indice" array
...
Block 8: Vertex Buffer
If you don't release anything I will understand.
bye, Talin64
Xorange-
I loaded it up your excel app. about half an hour later it recalculated all the planes. I was very impressed. Still trying to figure it out.
bye-talin64
Hey,Talin64 wrote:Grenadiac-
Unfortunately I am a little confused by you post about guerilla and finding the tags.
I think what you want is the format of the bsp and other terrain info.
I think the best way to do this is for you to release what you know so we can fill in the blanks for you
This is the format you used earlier, so maybe you could release a txt file with the info you are looking for. I was hoping to use BG as the prototype and having you give offests to the header and the eight blocks
struct BSP_VERTEX
{
float vertex[3]; // notes on vertexes
UINT unknown[3];
float texcoord[2];
}
I think I have a few of the blocks for the bsp figured out from reading what you have done and others and figuring it out on my own.
Block 1: Adjacency Matrix
Block 2: Force Plane Buffer
Block 3: Attribute buffer
...
Block #: starts at 00120760 // points for planes, "indice" array
...
Block 8: Vertex Buffer
If you don't release anything I will understand.
bye, Talin64
Xorange-
I loaded it up your excel app. about half an hour later it recalculated all the planes. I was very impressed. Still trying to figure it out.
bye-talin64
Yeah...that excel file can be a bitch.
It's not actually the calculator that takes so long, it's the "BG Model Faces" data sheet.
It should really only take that long the first time.
As long as you don't change anything on the data sheets excel shouldn't need to recalculate them at all.
When I was putting that data sheet together it would take about 20-30 minutes to recalc, but now it doesn't do that to me anymore.
Good luck with it!

Oh, and I think what Grenadiac was mostly talking about was the benefits of reverse-engineering using the HEK.
For example, if you start up Guerilla & then open up the bsp for the tutorial level (tutorial.scenario_structure_bsp) you can see every single aspect of the bsp...all the nodes, planes, leaves, etc.
I highly recommend installing HaloCE & the HEK if you haven't already.
I just did that yesterday & it has already given me a lot more insight into things.
-
- Posts: 29
- Joined: Wed Dec 10, 2003 4:36 am