Home Unreal Engine

BSP, and games

I heard a little while ago on this forum that games are moving away from using BSP, should I stop using BSP all together??

Replies

  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 18
    Games have been moving away from BSP for many many years now. I've heard its not as efficient as vert/mesh data (and that modern graphics cards are optimized to handle meshes rather than BSP) and is of limited visual quality compared to a UV'ed mesh.

    HOWEVER, it's still used in pretty much every major UE3 game somewhere, be it a wall, a block-in, a flat floor here and there, etc. It can be extremely handy, after all, and the difference in cost, if there is any, has never been significant enough to have a graphics programmer come scold me in the past. Then again, I generally have used BSP pretty sparingly.

    So, no, I don't think it needs to be outright banned from your toolchest or anything.
  • solarSailor
    really, I was always told that BSP was cheap to use, like cheaper then polys, but that was a few years ago.
  • Oniram
    Offline / Send Message
    Oniram polycounter lvl 15
    not necessarily. bsps are really great for blocking out quick shapes. they are kind of a pain in the ass when you get involved with adding and subtracting bsps.. but really it all depends on the engine. ue4 still uses BSPs.. and its even better because they're realtime. :)

    our engine at work still uses BSP as well. whichever you find to be more quick.. bsp, or blocking in a scene with max/maya.
  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 18
    Solar, Yeah, BSP were/are cheap to use...but there was a time when they were preferred over meshes and that time has long passed.

    Keep in mind that BSPs are NOT just 'low-res meshes built in-engine'. IRRC, they're not the strict vert/tri data we're used to, but rather their own set of info (maybe it still boils down to verts in the end..i dunno).

    I think it's not that BSP has gotten more expensive, but that there's been so many optimizations done on the cards to handle mesh data that it's the preferred pipeline on the card now, unless I was misinterpreting what past graphics engineers have told me.

    Still, its not like people build things with BSP that have thousands upon thousands of faces, you know? How much cost can a few dozen BSP walls/floors really add? And the tools to make BSP in various engines are usually clunky enough that they self-regulate how much you'll rely on them, IMO :-)

    So I wouldn't stress out much about the occasional BSP wall/floor.

    Oniram---realtime BSP? You mean the pathing is all recalc-ed on the fly so we can once again have giant moving elevators/walls and stuff??? Is it *actual* BSP or do they just reuse the tool chain and make editable meshes in the editor now? It looked like they might be moving that direction with the 'convert to mesh' option they added to brushes not too long ago.
  • Oniram
    Offline / Send Message
    Oniram polycounter lvl 15
    its still just regular ol' bsp. add/subtract and the like. if you watch the videos theyve released on the engine you can still see a bsp tab on the left-hand side.

    https://www.youtube.com/watch?feature=player_detailpage&v=MOvfn1p92_8#t=334s

    and given that they've switched to an entirely realtime system now (with their lighting and even scripting in a sense), its safe to assume the bsps work realtime as well, so they probably did away with the "build" buttons.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    most people shy away from bsp now since in the past it was what was holding LD's back.

    since in older idtech engines and goldSrc and source engine, it is required and brings it quirks with it, such as levels needing to be airtight from the void, and not allowing concave faces.

    about performance between the two, it depends on the circumstances, if your using it for simple and unique geometry around a level, it would be extremely cheap, but since bsp isnt instanced, meshes become cheaper when the geometry is more complex and things repeat a lot. Since with meshes you can instance the geometry at no extra memory cost, and only have to store additional data for the transforms of the instanced meshes.

    also BSP, limiting when it comes to vertex shaders, since you cant vertex paint it, or do vertex transforms.

    really in the end it is a other tool at your disposal, just use it when it makes sense to, and dont use it where it dosnt make sense.
  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    I think you're also missing the fundamental performance issue with BSP.

    Whereas meshes are drawn as individual soups - that is, they are drawn or they are not, and they are a simple list of triangles, a BSP is a structure; it cuts space up into "solid" and "not solid" and in most implementations rejects faces CPU-side using this structure and various precomputed data. This was hugely advantageous decades ago when we could only manage a hundred polygons a frame, but today such a level of micromanagement is highly inefficient given our GPU architectures are built around minimizing CPU-GPU communication and massively parallel chipsets performing large numbers of simple operations at onces.
  • WarrenM
    To be fair, that depends on the engine. I believe most modern engines aren't doing face culling or really using the BSP structure for rendering at all. It's all batched up into a pseudo mesh and thrown at the video card.

    The real advantage of it these days is speed of iteration for the level designers.
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    I should jump in to make clarifications because it seems people may be confused.

    BSP isn't what those brush tools are, it's a partitioning algorithm used to compartmentalise objects in the world. It is however true that the brush system is very tightly coupled to the spatial partitioning system since the BSP generation will derive a significant part of it's structure based on the organisation of the brushes.

    I strongly prefer referring to them as brushes, as this avoids that misnomer.
    WarrenM wrote: »
    To be fair, that depends on the engine. I believe most modern engines aren't doing face culling or really using the BSP structure for rendering at all. It's all batched up into a pseudo mesh and thrown at the video card.

    There's more to games than rendering!

    BSP is often also used to compartmentalize actors in the game world for the purpose of simplifying not only rendering, but also things like handling actor movement (e.g. physics) - but most importantly it's a general data structure that can be rapidly iterated across as part of a scenegraph (http://en.wikipedia.org/wiki/Scenegraph).

    I'd be surprised if actor rendering was not handled using the BSP tree in Unreal.
  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 18
    I feel educated now! Thanks guys!
    Themoreyouknow.jpg
Sign In or Register to comment.