Tryhard mapping - efficiency question

cabooblecabooble Canada Join Date: 2015-06-24 Member: 205748Members
Consider the following screenshots:

Exhibit A: Typical corridor geometry. The selected face is composed of four polygons.
3fdbebd79e.png

Exhibit B: Face deleted.
9908e4e7d1.png

Exhibit C1: Drawing a new edge from top-left to top-right of wall and filling with new face.
474d852128.png

Exhibit C2:
fc62d75d80.png

Exhibit C3:
a947663b53.png

Exhibit C4:

As you can see, the new face only needs two polygons to be filled now.
e939286707.png

MY QUESTION IS THE FOLLOWING:
Is it more efficient to render this map section with the (4-polygon face), or to render the (2-polygon face + added edge)?

Comments

  • cabooblecabooble Canada Join Date: 2015-06-24 Member: 205748Members
    I will attempt to answer my own question. I realize this may be more CPU than GPU intensive, but the question remains. I'm running some tests to determine the better option.
  • cabooblecabooble Canada Join Date: 2015-06-24 Member: 205748Members
    edited August 2015
    All polys
    a72c39a11e.png
    All polys (welded)
    fd5c37a4b9.png






    Less polys
    2827e53a06.png
    Less polys (welded)
    3282c74c7d.png






    Least polys
    cad464b247.png
    Least polys (welded)
    4caa0648a3.png


    Looks like it's better to render more edges if it reduces the number of polygons. How do lighting/reflection probes interact with faces?
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited August 2015
    More edges > More faces. Because less rendering needs to be done on edges than faces. I don't know for sure how rendering is done but you can probably assume this is the case
  • UncleCrunchUncleCrunch Mayonnaise land Join Date: 2005-02-16 Member: 41365Members, Reinforced - Onos
    If you have a PC that is less than 5 years you probably have the GPU that is quite OK for the NS2 engine. I will try to stay clear and simple. In 3D it is not only geometry that is important.
    • It's the amount of data that is processed (size of texture) in the final result
    • in conjunction with the lightning effects (and shadows).
    • In conjunction with the special effects like atmospheric/fog, distortion, Bump, HDR etc.
    And maybe with the use of tricks to optimize (mipmaps, 3D LOD, occlusion etc..).

    Example : A cube which is simple in terms of geometry can take more time to render with a 4096x4096 texture than one with a 128x128 texture. Add light effect (some specular for example) and it needs more power to render. Add bump etc.

    In your case it doesn't really matter unless you make a polygon with a million vertex or apply on it a huge texture scaled make it tiled a 100 times in the face (like 0.1 in editor. 1 normal, 2 = zoom X2, so 0.1 will force the renderer to process more pixels (not exactly but you get it)), with tons of effects.

    It's always good to make things optimized as much as possible. It's good practices. But you have to think not only of this kind of optimizations but also : is the optimization (trick) will be ok to edit when i have to change something later ? It can be a pain a make you loose a lot of time for a small 'win' (because you have to Re-do it).

    If your concern is performances. The use of occlusion will ensure the engine only renders the part that are seen in the location. That also gives you freedom.


    Spark Lights are somehow clearly different than other engines. It's a kind of candle model. The closer from the origin (light coordinates) the brighter the pixels are. The interaction is based upon radius, except for Spot light but i guess you get that. So everything that is in the radius will get an amount of light depending on the light intensity and distance from the light origin.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    edited August 2015
    Edge's have absolutely NOTHING to do with the renderer.

    Edges are only ever used when processing the level geometry, and even then, off the top of my head, the only use for them is specifying smoothing groups to get smoothed normals for the level.

    Likewise, in the game itself, faces are almost completely ignored. What's really important is the triangle count. Triangles are what get rendered by the game engine.

    Also, I would suggest you take a step back and reassess how you're going about building your levels. Try to build with bigger pieces of geometry, rather than trying to make everything weld together really nicely.
    RXQcBfa.jpg

    In the end, your triangle count isn't going to have nearly as big of an impact performance-wise as your light-count and shadow-count. Spark is really good at handling really high-polygon stuff. It's the lighting that tends to lag behind.

    EDIT: Also, if you need something REALLY high-poly, you should probably use a prop instead.
  • LokiLoki Join Date: 2012-07-07 Member: 153973Members, Forum Moderators, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited August 2015
    Basically less faces = better fps (from a geometry point of view (editor only ofc))
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    Loki wrote: »
    Basically less faces = better fps (from a geometry point of view (editor only ofc))

    Technically, faces aren't drawn, ever. Triangles are. :P
  • cabooblecabooble Canada Join Date: 2015-06-24 Member: 205748Members
    Thanks for the replies, gentlemen and improbable ladies.
Sign In or Register to comment.