Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Camera rendering 200k tris, but scene is 10k

Discussion in 'Editor & General Support' started by ginwakeup, Apr 3, 2015.

  1. ginwakeup

    ginwakeup

    Joined:
    Jun 13, 2013
    Posts:
    8
    Hello,
    I have a great problem here and I hope you can help me to solve it.

    I don't know what I did, but my camera is rendering from 100k to 200k tris when I look in the direction of my level and other assets



    if I look to another direction, where there is nothing behind the wall, the count is 20k (still to much however!!)

    Where is the problem? I can't find it anywhere. The level is 10k polygons total, I don't know how is it possible to render 100-200k tris in this scene... maybe I am missing something, I don't know
     

    Attached Files:

    • err1.jpg
      err1.jpg
      File size:
      126.5 KB
      Views:
      753
    • err2.jpg
      err2.jpg
      File size:
      113.2 KB
      Views:
      1,142
  2. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    603
    one poly can have many tris, one cube has 9 faces(polys) but each square poly will have 2 tris, each square poly is 4 vertices one in each corner but made of two triangles, hence a tri (triangle) is made from 3 vertices, so you see how tris can add up quickly
     
  3. ginwakeup

    ginwakeup

    Joined:
    Jun 13, 2013
    Posts:
    8
    my scene in maya is 20k tris.
    I don't think that maya tris count and unity tris count are different....
     
  4. ginwakeup

    ginwakeup

    Joined:
    Jun 13, 2013
    Posts:
    8
    However, this is not the problem.
    Let's suppose my complete level is 200k tris. why should camera render tris through object?
    If an object is not in the camera, the camera should not render it...
     
  5. LittleTree

    LittleTree

    Joined:
    Apr 4, 2015
    Posts:
    14
    just a guess but you might need to setup Occlusion Culling or something similar ?..or manually tell meshes to go away... best trying occlusion culling first :)
     
  6. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    603
    ok wasnt clear that your tris count was in maya first, well i dont think unity would be making up more tris so as suggested above try OC or LOD on your models, if you still have a problem could be a bug so just report it to unity team, i would reload the model into a clean scene just in case multiple instances got loaded for some reason, there are some strange bugs at the moment, you didnt say which unity version you are using?
     
  7. ginwakeup

    ginwakeup

    Joined:
    Jun 13, 2013
    Posts:
    8
    I am using 4.6
    Maybe my fellow worker made some mistakes with the scene, I can't find the problem, It's unreal!
     
  8. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Do you have lights casting shadows? That causes everything to redraw.
     
  9. ginwakeup

    ginwakeup

    Joined:
    Jun 13, 2013
    Posts:
    8
    My fellow worker set all in deferred lighting.
    The fact is that I should be the artist of this game, but cause of my generalist attitude I found myself fixing this now. great.

    However, maybe is the deferred lighting the problem? I see he is using 4 spotlight and two directional also..
     
  10. Deleted User

    Deleted User

    Guest

    Deferred has nothing to do with it, it actually removes the extra drawcalls that you'd have for each additional pixel light affecting an object.

    Each shadow cast by an object will cause that object to be rendered one more time. This is reflected in the triangle count in the stats. Turn off realtime shadows and then look at the triangle count. I've noticed a similar pattern regarding reflection probes, each reflection probe affecting an object will add an extra drawcall. Set the probe mode of the meshes to Simple if you can to save CPU cycles, since interpolating between reflections forces all of them to be rendered at once.

    Without occlusion culling, the camera will render all objects inside its view frustum, even if they aren't visible at the moment. This is why you see 200k triangles when you look in the direction of the rest of the scene.
    Compute occlusion after making sure that your level is split into meshes small enough to be culled, and you will see some pretty good savings on both triangles and drawcalls.

    A well built level that utilizes occlusion culling, static batching, lightmaps and careful probe placement can be kept well under 100 drawcalls, and only render as many triangles at a time as needed.