.:: 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

Thread Tools
Handling BSP Clip Nodes
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:


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
vBulletin Veteran
RoboCop's Avatar
Status: Offline
Posts: 210
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.


vBulletin Webmaster since 2001
Reply With Quote
Re: Handling BSP Clip Nodes
Status: Offline
Posts: 46
Join Date: Jan 2006
Default Re: Handling BSP Clip Nodes - 3 Weeks Ago

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

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 - 2022, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com