.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Handling BSP Clip Nodes
Old
  (#1)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Handling BSP Clip Nodes - 22-09-2022

Hi everyone,

Bit of a long shot asking, hopefully there's still people around!

I have an issue with parsing a BSP file to produce a navmesh. The issue is that right now I'm transforming a HL1 map into a triangle mesh for navmesh generation by lifting out the vertices. The vertices represent all visible parts of the level geometry.

This is fine for the most part, except that func_illusionary entities are also visible and therefore included in the list of vertices, which means that they're treated as solid, same as the rest of the geometry. This is easy to fix by just discarding any vertices tied to a func_illusionary.

What isn't easy to fix however are clip brushes. I believe most HL maps use a func_illusionary to create something with transparency (such as a ladder or chain-link fence) and then use a brush with a clip texture to prevent players moving through it. The problem is that because these clip brushes are never rendered, their vertices never appear in the list of vertices in the BSP. I think they're represented in the clipnodes lump instead.

The result is that currently I have only two choices: have the bots treat all func_illusionary as solid, meaning bots can't walk through the curtains in cs_747 for example, or treat them all as non-solid, meaning the bots will try to walk through the chain-link fence in cs_militia and get stuck.

Has anyone resolved this issue before? I can see a reference to the BSP format here:

http://hlbsp.sourceforge.net/index.p...pdef#clipnodes

But I don't understand how you can convert a clipnode into a set of vertices. As far as I can tell, it only holds a plane normal and distance from the origin, making them infinitely wide and tall.
  
Reply With Quote
Re: Handling BSP Clip Nodes
Old
  (#2)
RoboCop
vBulletin Veteran
 
RoboCop's Avatar
 
Status: Offline
Posts: 217
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Handling BSP Clip Nodes - 22-09-2022

Hello, have you joined our Bots-United Discord? We mostly have our activity in there.

https://discord.gg/5v5YvKG4Hr





vBulletin Webmaster since 2001
  
Reply With Quote
Re: Handling BSP Clip Nodes
Old
  (#3)
SamPlay
Member
 
Status: Offline
Posts: 46
Join Date: Jan 2006
Default Re: Handling BSP Clip Nodes - 07-11-2022

hello,
build a map from the bsptree:
- start with an aabox ( a convex poyhedron) big enough to encompass the virtual world
- split this aabox by the bsptree down to leaves ( which carry contents information);
in cases where a node plane splits the current polyhedron, build 2 faces to close the two resulting polyhedra on the splitting plane.
you will get all the faces ( associated with contents of the leaf they bound)/edges/vertices you need
  
Reply With Quote
Re: Handling BSP Clip Nodes
Old
  (#4)
tschumann
Moderator
 
tschumann's Avatar
 
Status: Offline
Posts: 277
Join Date: Apr 2011
Location: Australia
Default Re: Handling BSP Clip Nodes - 31-12-2022

It looks like the Counter-Strike bot nav mesh generation code is in https://github.com/ValveSoftware/hal...ame_shared/bot (I think) - does that give any hints?
  
Reply With Quote
Re: Handling BSP Clip Nodes
Old
  (#5)
RoboCop
vBulletin Veteran
 
RoboCop's Avatar
 
Status: Offline
Posts: 217
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Handling BSP Clip Nodes - 31-12-2022

Yes well Michael Booth is credited for making CZ Bots using nav meshes...





vBulletin Webmaster since 2001
  
Reply With Quote
Re: Handling BSP Clip Nodes
Old
  (#6)
Immortal_BLG
Member
 
Status: Offline
Posts: 171
Join Date: Nov 2007
Location: Russian Federation
Default Re: Handling BSP Clip Nodes - 11-03-2023

Hello

See Glidor's Quake2 modified engine to understand how to build brushes out from bsp30 file. In your code you only need to switch drawing nodes to clip nodes.
See jswigart's Omni-bot to see how to create vertice mesh from generated brushes. This mesh later can be provided for recastnavmesh for example.

I personally thanks to Glidor realized tracing against bboxes of different sizes in HL1 engine, but this is not the end, with generated brushes we can trace against any arbitrary shape even if it's angled like it does in modern game engines like source engine - I think this thing is definitely must be in HL1 modified engines, like regamedll for example

The only one i've stucked in is how to match clipping brushes with drawing brushes to stole their texture data and original size without addional hull.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com