Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
motorsep's avatar
motorsep
Member
10 years ago

Backside triangles culling in Unity ?

As I was reading this: https://www.reddit.com/r/GearVR/comm...20th_november/ I saw that one of the posters wrote, referring to the video, that Gunjack devs had to manually hide backsides of the large ships.

While UE4 does backside triangles culling, I was told on UE4 forum that in UE4 it's possible to create multiple index buffers for meshes, where each index buffer contain just vertices that are seen by some direction. Then renderer chooses best index buffer for current view angle.

Does Unity 5 do backside triangles culling efficiently on Galaxy S6 hardware?

If not, does Unity 5 have a way to do manual culling of backside triangles as in UE4 and does Oculus recommend such approach for Gear VR ?

Thanks.

P.S. I would rather not mess with rendering stuff in the code, but people begin complaining about visuals in mobile VR and it would be in everyone's interest to push visuals on Gear VR, preferably with Oculus providing solution via Utils / updates for Samsung drivers/software and not having devs to resort to dig into rendering themselves :)

4 Replies

Replies have been turned off for this discussion
  • "motorsep" wrote:
    Gunjack devs had to manually hide backsides of the large ships.

    Not quite. You mean https://www.reddit.com/r/GearVR/comments/3sd9gd/eve_gunjack_released_20th_november/?
    Say a huge ship, it will have six sides (caps, belly, top, left and right side) but only 3 of those can ever be seen at any one time, and by moving around one, the others get blocked, so they can effectively turn each of the sides off as it gets blocked and pre-load the one you're flying around toward, so that it can be shown as you turn over to that side. Therefore, memory can be preserved and it allows much more detail and geometry (even baked geometry) to be seen, making the game feel 10 times bigger than any game on a phone.

    They split up the ships to conserve memory. You could do the same thing in Unity by making separate GameObjects for different parts of this ship. If you disable most of the ship, then the parts that you do show can use the amount of memory that you would normally allocate to the whole ship, allowing you to pack in more vertices and texture detail. You would have to force unloading of the invisible parts of the ship.
    "motorsep" wrote:
    Does Unity 5 do backside triangles culling efficiently on Galaxy S6 hardware?

    Yes, UE4 and Unity both support efficient back-face culling. I have not heard any reports of it being slow on Mali or Adreno hardware. ARM still recommends it here: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0555c/CHDEJFJH.html.
    "motorsep" wrote:
    it would be in everyone's interest to push visuals on Gear VR, preferably with Oculus providing solution via Utils / updates for Samsung drivers/software

    Yes, of course. We work closely with Epic and Unity to help them give you the best possible engines and tooling for VR. It's great to see how talented developers like CCP push the envelope.
  • "vrdaveb" wrote:
    Not quite. You mean https://www.reddit.com/r/GearVR/comments/3sd9gd/eve_gunjack_released_20th_november/? .......


    Yep, that one. The post was made by Stereoscopacetic.

    "vrdaveb" wrote:
    They split up the ships to conserve memory. You could do the same thing in Unity by making separate GameObjects for different parts of this ship. If you disable most of the ship, then the parts that you do show can use the amount of memory that you would normally allocate to the whole ship, allowing you to pack in more vertices and texture detail. You would have to force unloading of the invisible parts of the ship.


    Does it mean they load/unload models/textures on the fly? Isn't it a bad idea in multithreaded environment ?
  • "motorsep" wrote:
    Does it mean they load/unload models/textures on the fly? Isn't it a bad idea in multithreaded environment ?

    Yes, it can be challenging to load and unload cooked content, resources, or asset bundles on the fly. You need to be careful about asset sizes and load them at a low priority so the game has enough time to render.
  • owenwp's avatar
    owenwp
    Expert Protege
    The main reason to do something like this is that backfaces still need to go through vertex processing, counting against the number of verts you can have in your view. The GPU doesn't know which faces are pointing toward the camera until after the vertex shader is executed. It is a lot better to just not try to render the geometry in the first place if you can determine that cheaply.