Fable: The Lost Chapters Mod Scene
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Fable TLC » Development » Advanced Modding » STB crap
STB crap [message #7527] Fri, 14 April 2006 01:09 Go to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
36 bytes header
2048 bytes for DDS

4 bytes Size Chunk
[Size Chunk] Unknown (SOF x01 / EOF x80)

4 trailing Chunks of data:

2 bytes Coord
2 bytes Tile Size??
2 bytes Another Coord?
3 bytes Unknown
4 bytes Size Chunk
[Size Chunk] Unknown (SOF x01 / EOF x80)
12 bytes Unknown/NULL



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #8548 is a reply to message #7527] Tue, 30 May 2006 22:16 Go to previous messageGo to next message
Silverback is currently offline  Silverback
Messages: 170
Registered: July 2005
Location: Illinois

Cow Tipper
Basically a few split files. (excuse the names they were done auto Wink )

In order - Header - Image - TrailingEntry (extension .lastData)

There are a few that are like 9kb Sad

So.... compressed.....wtf I don't even know
Re: STB crap [message #10599 is a reply to message #7527] Fri, 04 August 2006 07:36 Go to previous messageGo to next message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
Who the fuck outputs a vertex buffer by doing a zig-zag for the first two lines.....
index.php?t=getfile&id=1558&private=0
  • Attachment: wtf.jpg
    (Size: 34.78KB, Downloaded 5053 times)
Re: STB crap [message #10616 is a reply to message #7527] Sat, 05 August 2006 06:32 Go to previous messageGo to next message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
X File of arena section 2
Note: degenerate triangles that would usually not pass de-stripification are not removed, though they should be. Each frame corresponds to a subsection.
  • Attachment: meshtest.x
    (Size: 40.23KB, Downloaded 949 times)

[Updated on: Sat, 05 August 2006 06:36]

Report message to a moderator

Re: STB crap [message #10622 is a reply to message #7527] Sat, 05 August 2006 10:17 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
Impressive.


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #10688 is a reply to message #7527] Sun, 06 August 2006 23:09 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
For Future Reference.

Creating Heightmaps and loading heightmaps into 3ds max.

http://www.ogre3d.org/wiki/index.php/3dsmax_Heightmap

I think heightmaps would be the easiest to do for our current userbase. Rolling Eyes

In this case here is the heightmap for the Arena.stb that you extracted....

index.php?t=getfile&id=1562&private=0
I'm guessing it's only a part of the circular area.

Edit:
Corresponds to this part of the arena if the coords are right.

index.php?t=getfile&id=1563&private=0



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.

[Updated on: Sun, 06 August 2006 23:28]

Report message to a moderator

Re: STB crap [message #10752 is a reply to message #7527] Tue, 08 August 2006 01:43 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
Package 1 of flora of creature hub. Extracted using Silver's STB app.
struct Unknown_Array_1
{
	dword	Unknown[4];
};

struct Unknown_Array_2
{
	float	x;
	float	y;
	float	z;
	dword	unknown;
};

struct Unknown_Array_4
{
	float	x[4];
	float	y[4];
	float	z[4];
	float	r[4];
	dword	Unknown[4];
};

struct Data
{
	dword			Unknown[4];
	float			xyz_1[3];
	float			xyz_2[3];
	float			xyz_3[3];
	float			Unknown_Float;
	dword			Array_1;
	dword			Unknown;
	struct	Unknown_Array_1	Unknown[Array_1];
	struct	Unknown_Array_2	Unknown[Array_1];

//unknown
	dword			Unknown; //always 1
	some sort of array of 00's
	float			unknown[Array_1];
	Some trailing data	
};

struct Start
{
	dword			NumberSections;
	struct	Data		Main_Array[NumberSections];
};



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #10755 is a reply to message #7527] Tue, 08 August 2006 02:23 Go to previous messageGo to next message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
No idea what data means. Cant even use hw to read it all.
*Update: It gets even better... One more embedded array and different entry types.
struct Unknown_Array_1
{
	dword	Unknown[4];
};

struct Unknown_Array_2
{
	float	x;
	float	y;
	float	z;
	dword	unknown;
};

struct Unknown_Array_3
{
	dword	unk;
	dword	unk;
};
struct Unknown_Array_4
{
	float	x[4];
	float	y[4];
	float	z[4];
	float	r[4];
	byte	Unknown[16];
};

struct Unknown_Array_5
{
	
	dword			Unknown;
	dword			Unknown;
	dword			Unknown;
	dword			Unknown;
	dword			Unknown;
	dword			Unknown;
	dword			Unknown;
	dword			Unknown;

	dword			Unknown;
	float			xyz_3[3];

	dword			Unknown;
	float			xyz_3[3];

	float			Unknown;

};
struct Unknown_Array_6
{
	float	x;
	float	y;
	float	z;
	float	r;
};
struct DataType0
{
	dword			Unknown[9];
	struct Unknown_Array_2	Unknown;
};
struct DataType1
{

	dword			Array_1;
	dword			Unknown;
	struct	Unknown_Array_1	Unknown[Array_1];
	struct	Unknown_Array_2	Unknown[Array_1];

	byte			Unknown; //always 1*

	dword			unknown[Array_1];
	can't read this with hw, next section must align with end of byte* above on a 16byte boundary

	dword			unknown[Array_1];
	can't read this with hw, next section must align with end of byte* above on a 16byte boundary

	float			unknown[Array_1];
	can't read this with hw, next section must align with end of byte* above on a 16byte boundary

	byte			Unknown;
	byte			Unknown[Array_1];
	byte			Unknown;	
	dword			Array_2;
	struct	Unknown_Array_4	Unknown[Array_2];
};

struct DataType2
{

	dword			Array_1;
	struct Unknown_Array_5	Unknown[Array_1];
	struct Unknown_Array_6	Unknown[Array_1];
};

struct DataEntry
{
	dword			EntryType;  // 0, 1, 2 so far... all different....
	float			xyz_1[3];
	float			xyz_2[3];
	float			xyz_3[3];
	float			Unknown_Float;
	***depending on type...***
	struct DataType0	Data
	or
	struct DataType1	Data
	or
	struct DataType2	Data

};
struct Data
{
	dword			Unknown;
	dword			FloraType; // lookup from static map header table
	dword			EntryCount;
	struct DataEntry	Entries[EntryCount];
};

struct Start
{
	dword			NumberSections;
	struct	Data		Main_Array[NumberSections];
};

[Updated on: Mon, 14 August 2006 00:33]

Report message to a moderator

Re: STB crap [message #10757 is a reply to message #7527] Tue, 08 August 2006 02:36 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
Are the actual existing floats in this
	float			unknown[18];

Not matching the array?



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #10761 is a reply to message #10757] Tue, 08 August 2006 03:20 Go to previous messageGo to next message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
The format I had before only worked on one file. The floats there were just repeating 84FE7F3F - 0.99997735.
Re: STB crap [message #10762 is a reply to message #10761] Tue, 08 August 2006 03:22 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
Hunter wrote on Tue, 08 August 2006 05:20

The format I had before only worked on one file. The floats there were just repeating 84FE7F3F - 0.99997735.


Ya. But they repeated [array_1] number of times. Must've been just a wierd coincedence then.



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #10851 is a reply to message #10762] Tue, 08 August 2006 21:30 Go to previous messageGo to next message
Silverback is currently offline  Silverback
Messages: 170
Registered: July 2005
Location: Illinois

Cow Tipper
some more decompressed stuff

Heroguildbigvssmall should be the same data almost?

Creature Hub xbox vs PC.. small differences.

[Updated on: Thu, 10 August 2006 02:11]

Report message to a moderator

Re: STB crap [message #10853 is a reply to message #7527] Tue, 08 August 2006 21:52 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
struct Data
{
	dword			Unknown[4];
	float			xyz_1[3];
	float			xyz_2[3];
	float			xyz_3[3];
	float			Unknown_Float;
	dword			Array_1;
	dword			Unknown;
	struct	Unknown_Array_1	Unknown[Array_1];
	struct	Unknown_Array_2	Unknown[Array_1];
	byte			Unknown; //always 1
	struct	Unknown_Array_3	Unknown[Array_1+1];
	struct	Unknown_Array_3	Unknown[Array_1+1];
	struct	Unknown_Array_3	Unknown[Array_1+1];
	byte			Unknown; //Always 1
	byte			Unknown[Array_1];
	byte			Unknown; //Always 1
	dword			Array_2;
	struct	Unknown_Array_4	Unknown[Array_2];
};



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #10854 is a reply to message #7527] Tue, 08 August 2006 21:59 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
The Array+1 is not always true....

The //Always 1 are not always 1. In such a case an entire section was missing.

Of the 4 beginning dwords. The second looks to be count.

The other 3 look to be controlling the arrays that appear.



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.

[Updated on: Tue, 08 August 2006 22:46]

Report message to a moderator

Re: STB crap [message #10877 is a reply to message #10854] Wed, 09 August 2006 15:00 Go to previous messageGo to next message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
BlueTooth wrote on Tue, 08 August 2006 21:59

The Array+1 is not always true....


My structs didn't catch this? 16-byte/4-dword boundary alignment.

BlueTooth wrote on Tue, 08 August 2006 21:59


... Of the 4 beginning dwords. The second looks to be count.

The other 3 look to be controlling the arrays that appear.


My structs didn't match?
Re: STB crap [message #11139 is a reply to message #7527] Mon, 14 August 2006 03:20 Go to previous messageGo to next message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
Awesome! Looks like our mystery dword type is a custom type...
Here are binary representations of several values.

Update: Based on pattern, I assumed its a floating point value type. Especially since the first 16 bits match their existing 16bit floating point type.

1bit sign, 4bits exponent, 27bits mantissa

value = (-1^s)*(2^(e-7))*(f/0x8000000)
(this assumes denormalized)

s eeee fff ffffffff ffffffff ffffffff  value  
0 0111 100 00100110 11010110 11010100  0.5189644396305084228515625
0 0111 011 10011100 11000011 11110010  0.45154561102390289306640625
0 0111 000 10100000 11010110 01001001  0.078533716499805450439453125
1 0111 100 00100110 11000100 10101001 -0.518929786980152130126953125
0 0111 011 10011100 10011011 00110000  0.45146787166595458984375
0 0111 001 11000100 10001101 10010110  0.22097317874431610107421875
0 0111 001 10100000 11001111 10101001  0.203521080315113067626953125
1 0111 001 01101111 11100110 11100001 -0.179639585316181182861328125
0 0111 100 00111000 00111010 10001101  0.527455426752567291259765625

0 0111 011 01110001 00111100 11110011  0.430292032659053802490234375
1 0111 100 00000001 10000100 01011111 -0.500740759074687957763671875
0 0111 010 10111000 00110110 10110101  0.339948095381259918212890625
0 0111 100 00000010 00011000 01011010  0.50102300941944122314453125
0 0111 011 01111001 11101000 10000110  0.43452553451061248779296875
0 0111 010 00101010 11011000 00111011  0.270920239388942718505859375
1 0111 010 10011011 11111011 10001000 -0.326163351535797119140625
0 0111 010 10000010 00000001 01011100  0.3134791553020477294921875
0 0111 100 00001110 01111000 10011110  0.50706599652767181396484375

[Updated on: Mon, 14 August 2006 03:57]

Report message to a moderator

Re: STB crap [message #17900 is a reply to message #7527] Mon, 09 April 2007 12:31 Go to previous messageGo to next message
BayStone is currently offline  BayStone
Messages: 144
Registered: October 2005
Location: HMQ
Got a question. Smile

Any ideas on how closely the STB terrain mesh matches the LEV heightfield? Not on topology (?) but in vertex count vs. cell count, etc. Basically, is STB mesh always a grid.

I was just thinking about which handles which... and how the FE-AE editor should handle it... whether the STB terrain mesh should generate the LEV heightfield or other way around. If the LEV generates the STB mesh then what are the consequences of that, texturing wise, etc. and vice versa.


Busy!

[Updated on: Mon, 09 April 2007 12:33]

Report message to a moderator

Re: STB crap [message #17906 is a reply to message #17900] Mon, 09 April 2007 13:58 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
BayStone wrote on Mon, 09 April 2007 14:31

Got a question. Smile

Any ideas on how closely the STB terrain mesh matches the LEV heightfield? Not on topology (?) but in vertex count vs. cell count, etc. Basically, is STB mesh always a grid.

I was just thinking about which handles which... and how the FE-AE editor should handle it... whether the STB terrain mesh should generate the LEV heightfield or other way around. If the LEV generates the STB mesh then what are the consequences of that, texturing wise, etc. and vice versa.



I'm going to assume it's going to be a problem. The fact that the texture mesh is stored in a completely different format is proof of that. I'd say let it go for now. There's a lot of baggage associated with the STB that needs to be worked out first. For one you'd need to be able to assign values to the flora for the scale and rotation. Which is what they use to simulate wind.

All in all though. The lev mesh is more important by far. And the texture mesh should be generated from that as close as possible.



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #17919 is a reply to message #7527] Mon, 09 April 2007 16:14 Go to previous messageGo to next message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
Well idealy they should both be the same. So if you plan to work with them both, then there's no difference between one or the other, you generate both lev and stb at once. If you're not planning to use both, then having things lined up to the lev is a better idea; even though it may not always look right in game, atleast it will always be functional.

As for flora and all that stuff we haven't figured out completely, it's possible to load STB and not modify any of the existing flora data and just recompile it back into the archive unmodified on save. We could stick to just messing with verts and mesh, although that alone is no small task.
Re: STB crap [message #17921 is a reply to message #7527] Mon, 09 April 2007 17:21 Go to previous messageGo to next message
BayStone is currently offline  BayStone
Messages: 144
Registered: October 2005
Location: HMQ
The idea that I had was basically make the STB and LEV meshes the same thing... only one single mesh, generated from a heightfield. The LEV walkable areas and navigation could be applied as a texture stage, kinda like how it was in AE. You could then paint on the textures. I've already done quite a lot of this and so the only thing I don't have is what does the STB require and how it relates to the LEV...

Couple more questions:

So the flora are completely separate from the terrain? Are they like any other object (houses, etc.)? Just simplified?

How about the ground textures? Multiple texture stages, etc.? Texture coordinates in the STB?




Busy!

[Updated on: Mon, 09 April 2007 17:22]

Report message to a moderator

Re: STB crap [message #17922 is a reply to message #17921] Mon, 09 April 2007 17:34 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
BayStone wrote on Mon, 09 April 2007 19:21

The idea that I had was basically make the STB and LEV meshes the same thing... only one single mesh, generated from a heightfield. The LEV walkable areas and navigation could be applied as a texture stage, kinda like how it was in AE. You could then paint on the textures. I've already done quite a lot of this and so the only thing I don't have is what does the STB require and how it relates to the LEV...

Couple more questions:

So the flora are completely separate from the terrain? Are they like any other object (houses, etc.)? Just simplified?

How about the ground textures? Multiple texture stages, etc.? Texture coordinates in the STB?





Flora is hooked right into the graphics.big I beleive. Based on File ID. There's a lot of either redundant/broken/not-used entries in both the LEV/STB/and game.bin.



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: STB crap [message #17947 is a reply to message #7527] Tue, 10 April 2007 15:18 Go to previous message
Hunter is currently offline  Hunter
Messages: 108
Registered: September 2005
Location: San Jose, CA

Idle Hands of the Devil
For more info on the stb's mesh structure, just look at my dump above.
Next Topic: QNOVI
Goto Forum:
  


Current Time: Thu Nov 21 03:14:43 PST 2024

Total time taken to generate the page: 0.09050 seconds