Gamestudio Links
Zorro Links
Newest Posts
Loging off automatically ?
by old_bill. 03/30/20 22:07
Need help to log in my broker into ZORRO
by buttcorgi. 03/30/20 19:52
textureLod into HLSL
by 3run. 03/30/20 18:01
Running banchmark test with FxPro on MT4
by Cobus. 03/30/20 14:55
Read Z12.fac while running Z2
by AndrewAMD. 03/29/20 22:32
Comment Out
by danatrader. 03/29/20 22:03
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
5 registered members (AndrewAMD, jbhunter, alibaba, 3run, 1 invisible), 668 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
gonzalez21, Cobus, HF_Psy, jj02520024, heitorfr
18409 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: WMB7 BSP [Re: _cash_] #365095
03/23/11 12:29
03/23/11 12:29
Joined: Jul 2000
Posts: 27,148
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,148
Frankfurt
I believe it codes for special block contents such as Passable, Invisible, and so on. It is not used by the engine AFAIK, so it can normally be 0.

Re: WMB7 BSP [Re: jcl] #366265
04/02/11 14:17
04/02/11 14:17
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Hi. I was just wondering if you still plan on documenting the BSP data? All I really need to know is how to interpret the data stored in the file. Thanks!

Re: WMB7 BSP [Re: sheefo] #369103
05/01/11 17:17
05/01/11 17:17
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I know a bit about BSP and have been trying to hack the format you have used to serialize them in the WMB7 file format.
I could use a little help. So far I have identified structures, now all I need is to [figure out/be told] what variable means what?

Re: WMB7 BSP [Re: sheefo] #369177
05/02/11 13:19
05/02/11 13:19
Joined: Jul 2000
Posts: 27,148
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,148
Frankfurt
You can post the structures and variables in question here and I'll try to help.

Re: WMB7 BSP [Re: jcl] #369254
05/03/11 00:27
05/03/11 00:27
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
This code was taken from a TXT file I backup A LONG TIME AGO so if it embaresses me by looking retarded, just remember that PLEASE.
I don't have access to my current version of my source code and will not for at least a week. To be honest I havent touched the source code in a few months (she must be gagging for it) due to the lack of information of the data structures.
Remember; this will benefit the community (without compromising the integrity of the engines best kept secrets).

NOTE: I have since forgotten the meaning behind some data, such as bsp_blocks, which is just (in my case) and array of 20 32-bit integers.
NOTE: I do remember that this map only had 5 regions.
NOTE: I did my best using the manual.

Code:
////////////////////////////////////////////////////////////////
	// bsp_leafs
	typedef struct {
		unsigned long type; // root = 0xFFFFFF80, child = 0xFFFFFF00
		long  region;
		float plane[4];
		long  _unused_;
		long  lBlockIndex; // x = block offset
		long  lNumBlocks; // y = num blocks
	} WMB7_BSP_LEAFS;
	// NOTE: x+y = next leaf x
	// x = block offset
	// y = num blocks
	WMB7_BSP_LEAFS bsp_leafs[5];
	// NOTE: Number of leafs = Number of regions
	// Each leaf is 36 bytes. There is always one leaf (the root) even without BSP.
	file.Seek(header.bsp_leafs.offset);
	file.Read(&bsp_leafs, header.bsp_leafs.length);
	////////////////////////////////////////////////////////////////
	// bsp_blocks
	typedef struct {
		long a;
		long unused0; // 0
		float c[3];
		long unused1; // 0
		long next; // ?
		long prev; // ?
		long lSurfaceOffset; // ?
		long lVisibleSurfaces; // ?
	} WMB7_BSP_NODES;
	WMB7_BSP_NODES bsp_nodes[15];
	file.Seek(header.bsp_nodes.offset);
	file.Read(&bsp_nodes, header.bsp_nodes.length);
	////////////////////////////////////////////////////////////////
	// aabb_hulls
	file.Skip(header.aabb_hulls.length);
	////////////////////////////////////////////////////////////////
	// bsp_blocks
	unsigned long bsp_blocks[20];
	file.Seek(header.bsp_blocks.offset);
	file.Read(&bsp_blocks, header.bsp_blocks.length);
	////////////////////////////////////////////////////////////////
	// pvs
	file.Skip(header.pvs.length);
	////////////////////////////////////////////////////////////////
	// objects
	file.Skip(header.objects.length);
	////////////////////////////////////////////////////////////////



Many, many thanks!

Re: WMB7 BSP [Re: sheefo] #369730
05/06/11 15:14
05/06/11 15:14
Joined: Jul 2000
Posts: 27,148
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,148
Frankfurt
Ok, here are the same structs in the engine source:

Code:
typedef struct BSP_LEAF {
	int   type;
	int   nRenderFrame;	// was leaf already rendered?
	float minmaxs[6]; // bounding box
	BSP_NODE  *parent;
	byte  *PVS;
	BSP_SURFACE **surfacelist;
	int   numSurfaces;
	int   nLeaf;
} BSP_LEAF;

typedef struct BSP_NODE {
	int   type;
	int   nRenderFrame;	// was node already rendered?
	float minmaxs[6]; // bounding box
	BSP_NODE  *parent;
	BSP_PLANE *plane;
	BSP_NODE  *child[2];
	int   nSurface;
	int   numSurfaces;
} BSP_NODE;



Re: WMB7 BSP [Re: jcl] #479215
03/02/20 09:36
03/02/20 09:36
Joined: Jun 2007
Posts: 1,304
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,304
Hiporope and its pain
Hi @jcl,
Would you be so kind as to show us here the data structures of the region object, which is not documented in the manual?
It is the only data missing to complete the simple scenarios.

Thank you in advance.
Txes.

Re: WMB7 BSP [Re: sheefo] #479278
03/13/20 11:22
03/13/20 11:22
Joined: Jul 2000
Posts: 27,148
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,148
Frankfurt
Code
typedef struct {
	long	type;       // 8 = Region
	float	mins[3],maxs[3];  // Bounding Box
	void*	event;    	// Trigger-Aktion
	long	flags;
	char	name[ENT_NAMESIZE];
} E_REGION;

Re: WMB7 BSP [Re: sheefo] #479279
03/13/20 16:33
03/13/20 16:33
Joined: Jun 2007
Posts: 1,304
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,304
Hiporope and its pain
Thank you very much!

Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1