BSP Viewer is an application I am working on for a school assignment designed to demonstrate the performance boost the many culling techniques used by BSP files produce. I wrote the application in C++ .NET from scratch this week and thought it might be a useful tool for mappers. BSP Viewer allows the optional rendering of textures, lightmaps, entities, special faces, and edges and is a useful tool for diagnosing what the HL engine is drawing. BSP Viewer does not render skyboxes or models (these features may be added in a latter version).
Users with a small amount of video memory should note that the viewer may lag when you leave the world. This is because when you leave the world the whole world is drawn and it causes a lot of thrashing of your video card's cache. Also, some entities may not be rendered by the viewer. This isn't so much a bug but a problem with how the viewer uses the PVS to determine if an entity is visible and is a pretty rare occurrence. Lastly, be sure to set your Half-Life root directory from the options menu. This is used by the editor to scan for WAD files.
Very nice and smooth. I have a small feature suggestion: An option in the menu "Copy current co-ordinates to clipboard".
Also "copy angle to clipboard" would be cool.
That'd be very handy for mappers and plugin developers for adding new features.
nice app works nicely.
Nice, that's pretty impressive, writing a renderer from scratch. I just look at the D3D API and it scares me to death, let alone actually trying to write something with it...
VERY cool, thanks much. One thing I would find useful is the ability to view the clipping hulls, would be much appreciated.
I've sent you PM som months ago about things you could add to this app. Those were:
1) Viewing portals
2) Viewing leafs boundaries in 3D
3) "Freezing" rendered walls in 3D coords (seen from current leaf) and ability to move around and see what walls are suposed to be drawn from original leaf.
4) Ability to see order of drawn walls as engine draws (accoring to BSP tree).
- I don't know how HL stores its clipping hulls but I don't think it stores actual faces for them in which case they would be pretty hard to draw, at least in a useful manner.
- I'm quite sure that portals aren't actually stored in the BSP file. When you navigate the tree you use each node's plane to quickly find the leaf you are in. When you then travel from one side of the plane to the other you may effectively pass through a portal but how do you draw a plane? It's infinite. And if you drew all of them you would have a mess.
- Leaf and model AABBs would be easy to draw, I'm not sure if they would be too useful though (I'll have to give it a try and see what it looks like).
- I like the freezing idea; that really would be useful.
- BSP Viewer uses the depth buffer when it draws the level because when you go and draw the entities on top of the level you need to know where everything is. When I was writing BSP Viewer I tried reversing the draw order (that is inversing the depth test) but the output it produced wasn't very useful at all. Freezing the scene would be a lot more useful for analysis.
Can you tell me where BspViewer is looking for textures? I use Quark as editor but somehow BspViewer can’t find the textures I am using
My .bsp is in D:\Studio\Half-Life\tmpQuArK\maps and somehow my entire map is white. Where should my .wad files be located?
/// Modiefead By Owner \\\
Woops… Napivo needs to learn and read what other people write…Don’t forget to set Half-life directory as root under options.
Nem, I have tried and failed to get this done about a year ago. Congrats on this util and keep up the good work.
Glad you figured it out. To clarify, BSP Viewer basically scans the files in your root directory looking for the WAD files (it ignores the paths because the various editors have various ways of formatting them (hammer is particularly bad)). If no root directory is specified BSP Viewer looks in BSP Viewer's directory.
I've uploaded v1.1.1 which includes the ability to freeze sorted and culled polygons (so you can fly around and see exactly what is drawn). I also tried adding AABBs for leafs and models but there were just so many of them that they were pretty much useless. It was like a random sea of lines.
its very good programm
but sometimes it dont find wad files
i use this for day of defeat
2/there are 3 position x,y,z
but i can t move with z position (upper)
to see the map from the sky
You can "move" using the arrow keys and "look" using the mouse (right click).
New users can register here.