![]() |
BSP file: a couple of question linked to geometry
Hello,
In short, I'm helping Stefan with his Realbot. I'm specially working on a automatic translation of BSP map file into the waypoints file used by Realbot. It is a mixed approach between Navmesh (merci Pierre-Marie) and usual waypoint. As I graduated a long time ago, a lot of my mathematics has disappeared from my brain :( Hence, a couple of questions: 1) how can we compute the area (in square unit) of a polygon (i.e. an area defined by multiple points in the same plane) ? Splitting the face into multiple triangles seems a little too much. 2) how can we check whether a point is inside a polygon ? I know about the mathematical fact that all egdes defines a 360 degree when inside, but, again looks heavy to compute 3) as my utility is running as standalone, it does not have access to the HL engine :'( , hence the TraceHull function is not available :'( I used Botman TraceLine but how can we emulate the TraceHull ? 3.1) what are the 'sizes' of point_hull, head_hull, human_hull ? It looks like the shape of a human player when standing is 16x16x76 and when duckinc 16x16x36, is it correct ? 3.2) how can we handle the de_aztec bridge, the utility cannot waypoint it probably because it cannot 'feel' the ground as the brigde has holes :'( Thanks in advance for any piece of information -eric PS: for this interested, the utility is not rocket science and is based on Pierre-Marie's ideas of navmesh combined with a lot of algorithms & code from Botman. The code is in the realbot CVS repository under Bsp2Rbn directory. |
Re: BSP file: a couple of question linked to geometry
Quote:
Quote:
Quote:
Quote:
Crouching it is 32x36x32. Quote:
|
Re: BSP file: a couple of question linked to geometry
Take a look at Quake1 engine source code for the TraceHull code.
It can be found at http://www.idsoftware.com, at the Technolody Download page. Look at the SV_Move() function and what it called. PS, I think the HL routine is identical as the Quake1 routine. |
Re: BSP file: a couple of question linked to geometry
If you use Quake code you will have to comply with the terms of the GPL.
|
Re: BSP file: a couple of question linked to geometry
Quote:
Quote:
Quote:
Quote:
head_hull == ducking player human_hull == standing player Quote:
But if you don't want to do that (as I do), then you consider that the bridge is straight, and that there is a direct connection from one end of the bridge to the other. It's as if the bot was jumping off a cliff to land on another, except that here it won't fall but cross a bridge (even if the bot doesn't "feel" it that won't prevent it to cross it successfully). |
Re: BSP file: a couple of question linked to geometry
Pierre-Marie,
First thanks for the information (as well as sfx1999, Whistler). Code:
It *is* possible to use TraceHull without the HL engine because a TraceHull is a version of TraceLine that works in a "fattened" world. Did I miss something ? I would be delighted =) Code:
Since there are 3 hulls (or is it 4 ?) in this game, 3 chunks of the map geometry are stored in the BSP file. The first one corresponds to TraceLine (which is in fact TraceHull+point_hull), and the successive ones correspond to each of the TraceHulls. Thanks again Merci beaucoup -eric PS: PM, funny that my brother in law has exactly the same first name as you :D PS2: for de_aztec bridge, I made further test. It seems linked to the use of the Botman TraceLine: it never detects the bridge itself, I'm afraid that the bridge is not a worldspawn block but rather a func_wall entity... So, I'll need to extend TraceLine to handle func_wall entities :'( |
Re: BSP file: a couple of question linked to geometry
"If you use Quake code you will have to comply with the terms of the GPL."
...and if you use Metamod code (i.e., make the bot as a metamod plugin) or botman's BSP tools code you also will have to comply with the GNU GPL. (and is it so bad ?) @evy: the bridge in de_aztec is func_illusionary. and it even does not block tracelines in the HL engine. and there's no implemention of traceline/hull in HLSDK btw, I think what he means is to make one yourself in the code, and you just need to thicken the walls and use traceline. |
Re: BSP file: a couple of question linked to geometry
Quote:
I'll have to put the GPLize the comments in every source file :( (no clue how to do it -- I'll look in another GPL package) but this will be done. Quote:
Thickening the walls looks more complex than shooting a couple of TraceLine even if less efficient. I do not really understand the node structure of a BSP file and I do not want to re-invent a MAP compiler 8) THANKS all for the help -eric |
Re: BSP file: a couple of question linked to geometry
Quote:
TraceLine and TraceHull are the same thing, they call the same function in the engine: SV_RecursiveHullTrace(). Look in any of the Quake's source code to find out how this function works and how to make yours work with HL BSP files. |
Re: BSP file: a couple of question linked to geometry
Quote:
Pierre-Marie, You were right: by digging in the code and by using my crystal ball ;) : - BSP contains information about 4 hulls: visibility (=point_hull), human, head and large - hull0 = pointhull starts on nodes 0 (i.e. the nodes 'lump') for worldspawn - other hulls start on model->headnode[hullNumber] and use clipnodes (i.e. the clipnodes 'lump') instead of nodes The algorithm to parse the node tree is the same (I used first Botman's TraceLine which is easier to understand).:) Thanks for everyone's help -eric |
All times are GMT +2. The time now is 21:34. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.