Jump to content

Infernal (PC) - *.xbn / *.xsi.bin / *.data


mrmaller1905

Recommended Posts

  • Engineer

"make a  map editor"? Sounds funny, but well, "never give up on your dreams"...

What I found on a quick glimpse:

terrain data
127 small vertex blocks of around 95 vertices
blocks may or may not sum up to a proper terrain, too lazy to check

scene.scb contains object data including position and rotation

object 2681
  based-on-template Zapora_roboty_deski_mk:1
  parent 0
  variables
    Name Zapora_roboty_deski_mk-4087
    Position 2240.127197265625 5.999873161315918 640.0706787109375 1
    Rotation 179.9999389648438 0 179.9998779296875 1
    Scale 1 1 1 1
    Hidden 0
    Reflection 1
    Optimized 0
    Optimized_source 0
    Frozen 0
    Layer 25
    Schematic_collapsed 0
    Schematic_position_X 240.000000
    Schematic_position_Y -2940.000000
    Object_class_modifier
    LUA_class
    LUA_initializer
    LUA_params
    Icon_string
    Icon_string2
    Mesh_random_number 9327
    Cast_shadow 1
    Receive_shadow 1
    Obstacle 2
    Destroyed 0
    Is_Band 0
    Shaders_params 0 0 0 0
    Distance_blend_start 0.000000
    Distance_blend_end 0.000000
    Disable_template_properties 0
  end-variables

scene.dat, 421 pic links such as
flares\Lamp_BOB_Flare_01.tga

freespacemap.data seems to contain simple objects.

freespacemap-data.png

Link to comment
Share on other sites

One would have to know how the terrain data is used in Game. Are the 127 blocks a height map? Could be, haven't looked that close at them.

I say that because I did write 010 Scripts to take height informaton from a file, change it into a wave front obj file that can be edited in a 3D program, then another Script to change it back to the Game compatable file.

That was 4 or 5 years ago.

 

 

Link to comment
Share on other sites

  • Engineer

Isn't a heightmap continuous data usually? Which can be visualized in a graphics program?

Plus those blocks have gaps of around 3600 bytes between them. Mostly zeroes.

And point clouds are ugly. But I have no idea... maybe you're right.

(Sadly the point clouds are too ugly to motivate me to sum them up...)

Link to comment
Share on other sites

That's the thing that one needs to know. How the data is used in Game.  I could hand you the files from the Game I did the Scripts for and you'd be lost.

It didn't make sense when We first looked at the files.  We found information on how that nonsence data was interpreted by the Game Engine.

So was able to read 101 floats and add information to create a 3D obj file that can be edited and reconverted to the proper format.

In our case? The 101 floats turned out to be the heights for a very small section of the World Map. And We found there was an over lap for each section that had to be accounted for!

Why an over lap for each area? Due to the scale of the World Wide map it was to help when rendering the surface. Kind of a buffer/transition area.

The odd ball numbers you reported reminded me of that. Why an odd number?

 

Edited by 05SpeedMaster
Link to comment
Share on other sites

  • Engineer
1 hour ago, 05SpeedMaster said:

In our case? The 101 floats turned out to be the heights for a very small section of the World Map.

So those vertices were all parallel?

That's not the case here afaics.

edit: ok, since the floats look strange to me I could imagine that it's not 95 vertices but 3x95 height values.

So I could create a grid, say 16x16 and apply them as height values. Though the number of vertices per block is not constant but differs a little bit.

Edited by shak-otay
Link to comment
Share on other sites

In our case, the floats were the Y in the X Y Z. Y being up/down in the World.

Some parts of the World grids were RLE encoded. Some parts were compressed differently. I don't recall the compression at the moment.

So if the grid was all deep Ocean? RLE would handle that as everything was 0 or so. Once you hit a land Grid, then the other compression was used.

0 was somewhere around 10,000 feet deep. Each float had a depth/height range. I can dig up the scaling for that if you want.

The program was written in Romania by Ubisoft Devs. 

And just for general information? I'm a 67 year old Guy that has hacked stuff since the mid 1980's. Even ran the first Dial up Internet Access in my area. Worked for Lawyers, Judges, Police, and Court Houses.  Just figured you all might get a kick out of that infomation. :classic_biggrin:

Edited by 05SpeedMaster
Link to comment
Share on other sites

In my case? Here's part of the 010 Script I wrote..........

for( i = 0; i < s; i++)
  {
    x=(x+50);
    z=-2550.0000;
    l=101;
    
    {
      for( t = 0; t < l; t++)
      {
        y = ReadFloat();
        z=(z+50);
          Printf( "v %d %f %d\n", z, y, x );
 FSkip(4);
 
      }
    }
  } 

Link to comment
Share on other sites

  • Engineer

Hi, it's not a matter of coding.

As you wrote: someone needs to find "information on how that nonsence data was interpreted by the Game Engine".

Interestingly Metropolis Software was taken over by CD Project in 2008. So I could have a look at the RedKit for TheWitcher2- how it handled terrain data.

Link to comment
Share on other sites

  • Engineer

freespacemap.data struct. Still don't know where is shape count? Also after shape data there is matrix table which use 4x4 and some other. But again no count.

struct {
    char Sign[3];
    uint32 Var0;
}Header;

struct {
    struct {
        uint32 Var0;
        uint32 Var1;
        float Var2,Var3,Var4,Var5,Var6,Var7,Var8,Var9,Var10,Var11,Var12;
        ubyte Null;
        uint32 VtxCount;
        uint32 IdxCount;
        uint32 Var13;
        ubyte Data[Var13*7];
    }ShapeHeader;
    ubyte VtxBuffer[ShapeHeader.VtxCount*12];
    ubyte IdxBuffer[ShapeHeader.IdxCount*6];
    ubyte End;
}Shape[you can guess count]<optimize=false>;

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...