Announcement

Collapse
No announcement yet.

BSP vs Static Meshes:The real story

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BSP vs Static Meshes:The real story

    Happy new year everyone

    I've long experience with many different versions of unreal engine since 1999 and since unreal2, I know that static meshes are always faster than bsp. Is this still the case for udk?

    Because since both bsp and static meshes in their own respective way occlude objects behind them, which one would be better, per say, a simple room?

    Before ut3 was released I clearly remember Tim Sweeney saying "in this version of unreal engine, bsp will be less and less used". However, most of the levels shipped with ut3 has still has fair amount of bsp and example levels of udk has that.

    I don't have any problems making a level entirely with bsp or entirely with static meshes and I know mostly people block out the basic level lay out with bsp and populate it with static meshes.

    What I want to understand is how much gain I can get performance wise if I make a level entirely with static meshes, as long as they are cut to several small pieces.

    Or how slow is bsp compared to static meshes in general in UDK?

    #2
    Static meshes are generally going to be faster than BSP. There are some exceptions to this rule, but in general, the static meshes are just going to be instanced by the hardware across the entire level wherever they are used. However, it's probably largely irrelevant for the cases where you would be using BSP over a static mesh.

    The real advantage is likely on the art/design side of the equation. Constructing complex objects with good UV mapping is simply not practical to do in BSP. In the case of making simple objects (basic walls without the props, basic flooring, etc.) it's perfectly fine, but once you start getting into complex shapes, it's just not very smart to even attempt to try using BSP anymore, even before the performance argument takes effect.

    Comment


      #3
      Thanks, what I'm curious is most ut3 and gears of war levels has still too much bsp, although bsp is considered slower.

      Let's take dm-deck level of udk as an example. The basic lay out is bsp and the rest is static meshes. What would happen if dm-deck's basic lay out was static mesh also? Would there be a performance gain?

      Comment


        #4
        Technically speaking? Yes there likely would be. However, what you're talking about is BSP of a few hundred polygons tops vs. static meshes of a few hundred polygons. At this point, it becomes more work to do specialized static meshes for each of the simple BSP sections (modelling, UV mapping, export/import) vs. just setting up the generic material that can then be applied to the simple BSP. As the specialized sections would then not be instanced anywhere else, the performance gain would be largely negligible.

        Comment


          #5
          Originally posted by schenksmill View Post
          Technically speaking? Yes there likely would be. However, what you're talking about is BSP of a few hundred polygons tops vs. static meshes of a few hundred polygons. At this point, it becomes more work to do specialized static meshes for each of the simple BSP sections (modelling, UV mapping, export/import) vs. just setting up the generic material that can then be applied to the simple BSP. As the specialized sections would then not be instanced anywhere else, the performance gain would be largely negligible.
          schenksmill is completely correct here. I'm glad you are concerned with performance eastgate, makes a technical artist happy to see, especially on these forums =)

          Comment


            #6
            bringing this back from the dead... the general opinion seems to be use static meshes over BSP brushes...

            my first transport will be to a rather elaborate dungeon, but the dungeon can be rather square-ish in nature... so, does the general opinion still hold true... should i build and convert... export and (holy moly the uv map) blender it as an obj... or if it works it works... not much will be visible at one time, and i seem to have no problems yet, even with water included...

            i'll listen... but i kinda know myself, and will probably stubbornly bull my way through with BSP as long as it works because i can see it in action... but i'd like to hear from others for further consideration... thx

            Comment


              #7
              Northstar: Well just my thoughts here but building a detailed dungeon, even if it's "squarish" is gonna be hell to do with BSP. if you've already gone to all the trouble and it works fine for you, then just stick with it. having said that, UV mapping isn't hard especially if you use some auto unwrap algorithm which on simple shapes is totally serviceable. collision is also easy when you use per poly. I think you are probably uncertain about your modeling skills based on what you've said, so just stick with it and you'll soon be more comfortable with it than BSP. I garon-tee!

              Comment


                #8
                Originally posted by northstar View Post
                bringing this back from the dead... the general opinion seems to be use static meshes over BSP brushes...

                my first transport will be to a rather elaborate dungeon, but the dungeon can be rather square-ish in nature... so, does the general opinion still hold true... should i build and convert... export and (holy moly the uv map) blender it as an obj... or if it works it works... not much will be visible at one time, and i seem to have no problems yet, even with water included...

                i'll listen... but i kinda know myself, and will probably stubbornly bull my way through with BSP as long as it works because i can see it in action... but i'd like to hear from others for further consideration... thx
                In any case, you are better off with static meshes than BSP, because the way you build your BSP in UE is too primitive and non-intuitive. Using stuff like Sketchup to block out your level is much faster.

                Comment


                  #9
                  BSPs bug out very quickly when you use non boxy shapes. Even when you use only boxes, rotating them to create something like a ramp still has a high chance of bugging it out. Sometimes it is visual, sometimes it affects the collision, it is simply not feasible to depend on BSPs for anything other than simple, occasional corners, floor, or walls. Besides that, they are extremely slow, for large levels, it feels as if it is an order of magnitude slower.

                  Static meshes are way, way faster, but they are not instanced. Each Static Mesh takes a separate draw call to draw, even if they are exact copies of the same model. They don't waste memory however. You can use instancing via a 3d modelling application, instances created inside a 3d modeler will be instanced inside UDK as well, however they will all be inside the same mesh, and would take more memory than just copying a single mesh inside an editor.

                  UT3 afaik is mostly modular meshes with no special instancing, just copying same meshes all over the map to save memory at the performance cost. Dungeon Defenders use instancing extensively for variety of different sections of maps, I assume the main purpose is to have better performance at the cost of using more memory.

                  Comment


                    #10
                    hmmm... definitely food for thought... my reasoning, i think, is that i can test it out as i go in BSP, then maybe convert to mesh later... if i'm in blender i can't add particles or water traps or fog or waterfalls, not to mention all the blue meanies and (well kismet) conversations shops and such... and changing my mind is a much less complicated process... but... food for thought

                    we will see as i get deeper into the dungeon... i have no problem with starting over

                    thanx guys... NS

                    Comment


                      #11
                      ya know... i was thinking (yeah yeah :])... this almost comes down to methodology...

                      in a team, each group get's its sketches and goes off into their own cubicles and produces their part, then it all gets assembled and tweaked at the end... for me, i handle all aspects of the game from a concept in my mind... it bends and twists, churns and boils, as each aspect reaches its limits... i start from one side, and work my way to the other... its almost a totally different approach to making a game than that of a team

                      i figure i will build in bsp for now, then when i am happy with the result, i will convert the walls and such to mesh... there is a funny affliction of wo/mankind that i too fall into... 'i have to see it for myself'... make my own mistakes, and learn from them... i have no problem with self-confidence, i have a very good self-image

                      i'm looking forward to c++ and blueprint... interesting concepts. i lay awake at night and wonder if there will be only one game type, and whether it will be tweaked in blueprint or c++

                      Comment


                        #12
                        Converting CSG to StaticMesh does not create an optimized mesh.
                        You will typically get much better rendering performance by simply creating the mesh properly in an external app and importing it.

                        By using converted polygon data the issue is no welded/shared vertices. There is also no ability to do smoothing groups with CSG.
                        Vertices can only be shared if the position, texture coordinate, and normal are the same which almost never is the case with converted meshes.
                        Modern GPU hardware implements a vertex cache for faster triangle rendering of shared vertices.
                        Converted meshes do not take advantage of this as the vertices almost always cannot be shared.

                        Comment


                          #13
                          point taken, good point DG...

                          i will stubbornly push on, but now i have no intentions of converting to mesh... that does make sense... i'm still getting great performance in the main room, but i will see as i go... it might not be industry norm, but it might also work... the room is dimly lit so ambiance is not as much of an issue... i might have to shift over to blender for the lower flooded level of the dungeon... but i will cross that bridge when i get there...

                          yes... CSG not BSP... got it :]...

                          Comment


                            #14
                            Personally, I would only ever use CSG for blocking out a level for which the brushes will later be replaced with externally created meshes.
                            Or if I was creating an old skool game like Doom or Unreal where I wanted the old CSG design style.

                            The actual pipeline rendering performance of converted CSG is much slower than proper staticmeshes.
                            It is only the fact that there is typically very few polygons that helps it to be a less noticeable performance impact in framerate.

                            No problem.
                            I'm used to seeing either acronym used for the same thing here, even though they are not technically the same.
                            CSG = Constructive Solid Geometry, which is what the editor brush building system is.
                            BSP = Binary Space Partitioning, which is what the resulting built polygons are stored in and rendered from.
                            (links jump to wikipedia)

                            Comment


                              #15
                              lol... yeah but you have one striking advantage... you know what you're doing!... lol... i suppose thats what they mean by ignorance is bliss... (smile)
                              the dungeon is rather blocky and the game is a rather old school RPG type... well at least in my imagination... i think i will be fine. the landscape comes next and that will be a whole new ballgame and perspective... thx

                              have a great day DG...

                              Comment

                              Working...
                              X