Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Discussion Virtual geometry in unity

Discussion in 'General Graphics' started by laurentlavigne, Feb 27, 2024.

  1. Agoxandr

    Agoxandr

    Joined:
    Aug 16, 2014
    Posts:
    57
    I am assuming that the implementations for URP of the same features is going to be simpler. If you start reading HDRP source you start to realize how complicated the Lit shader is in comparison to the SimpleLit or any URP shader. Example: The Lit shader aligns reflection probes with screenspace reflections.
     
  2. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    704
    I agree that URP has been lacking support but there is one good reason for keeping it separate: You don’t want high-performance platforms to be held back by low-performance platforms. If everything needs to scale all the way down to mobile, development of new features would take a very long time and Unity can't already keep up with UE in regards to visual fidelity.
    However, it does make sense to modularize features so that code can be shared as much as possible.

    Also some effects like decals or fog have to be implemented entirely differently in a forward renderer and a deferred renderer.
     
    Last edited: Mar 8, 2024
    Arithmetica likes this.
  3. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,741
    i see... well tbh i'm not getting too much info about features and stuffs, because basically i'm moving away from this mess, i know some stuffs but i did not know about SSR or SSGI, imo is pretty useless for urp, but wth i know?
    Well, mobile devices are getting more and more advance, so, SSR can be a thing in the future for phones xD
    "Shader Graph & VFX graph been struggling trying to support the same features on both and make them reusable on both." XD ¯\_(ツ)_/¯

    EDIT: I just checked the links... and i'm pretty confused now, i'm now one of those guys who does not know what is urp and hdrp now, thanks Unity, every day is a pleasure...


    HDRP can be pretty performant on low-mid end devices with a pretty amateur or noob work, i know that 100%
     
    Last edited: Mar 8, 2024
    Gekigengar likes this.
  4. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    288
    URP is not for mobile-only, it's for any platform.
    HDRP is not even supported on Nintendo Switch, and produces very poor results on integrated GPUs like Vega 7.
     
  5. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,741
    Yeah of course, in a good case scenario which unity doesn ot have at all, i'm talking about following a correct path once an for all, what is the point of ssr on URP? what is the point of HDRP then?

    Yeah that is my point... URP would be perfect for that.

    Edit: Change the name from URP to LWRP, without ssr, ssgi volumetrics and those fancy stuffs that Nintendo Switch and "integrated GPUs like Vega 7" strugles with, for all platforms of course.
    Put all those "fancy" (pretty 2013ish) features that unity is implementing NOW on HDRP, at least doing that, newers devs will be able to understand easily what is URP and what is HDRP for
     
    Last edited: Mar 9, 2024
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,988
    The Zelda games on the Switch have SSR. If I want to release a Switch game with SSR with Unity, what do I use?
     
    Gasimo and Neonage like this.
  7. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    597
    Standard pipeline (make sure you don't exceed 128*128 I used 32*32 and 64*64)
     
    laurentlavigne and AcidArrow like this.
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,740
  9. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    288
  10. Arithmetica

    Arithmetica

    Joined:
    Feb 11, 2019
    Posts:
    44
    Based on the performance of the switch, I would guess that the technique is similar to the reflection probe, not SSR.
     
  11. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    288
    It's very blurry and subtle, but clearly an SSR (used only in shrines). There's SSAO as well.
    The game utilizes deferred path for rendering tons of lights (even Area types).


     
    Ryiah and AcidArrow like this.
  12. Arithmetica

    Arithmetica

    Joined:
    Feb 11, 2019
    Posts:
    44
    Oh sorry, there is indeed an unnatural distinctive distortion of SSR. I had not noticed that.
     
  13. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,741
    fair enough, good point. (i don't play too much nintendo games)
     
  14. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    656
    I disagree.

    You could have the tick box right away on right click without a child menu.

    Or better, just have it activated by default and be done with it.

    That's not excellence, that's regular customer service.

    And Unity's strategy of waiting long enough for the customer to forget about that bug report is why we're having that conversation. When your customer service is a scam, you don't go anywhere.
     
    kristoof, Sluggy and Ryiah like this.
  15. Gasimo

    Gasimo

    Joined:
    Mar 3, 2015
    Posts:
    80

    Lets not forget that even the PS Vita pulled off SSR. For instance in the first-party title Killzone Mercenary.

    upload_2024-3-12_10-40-17.jpeg
    upload_2024-3-12_10-46-37.jpeg

    Its an incredibly impressive handheld title from the graphics engineering perspective.

    upload_2024-3-12_10-49-22.png
    upload_2024-3-12_10-49-54.jpeg
     
  16. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,457
    I'm sure it's a mix of having hired AAA studio graphics superstar and their oversized ego, plus the perceived need to target super high end graphics. URP was for the longest time a separate team and from my interaction with them, both teams didn't speak much.
    ego is an expensive bitch
     
    Jingle-Fett likes this.
  17. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,988
    Unfortunately Unity has distorted the perception of what is reasonable performance for certain effects, which is why old ass SSR is treated like high end HDRP only feature (although even older ass planar reflections being HDRP only is even funnier) and why people think you can't do native res on mobiles.

    There are some aspects of URP that are modern, but its feature set as a whole is... stale.

    Maybe it's not a complete coincidence I'm reading stuff like this on twitter today:

    upload_2024-3-13_2-53-23.png

    upload_2024-3-13_2-53-44.png
     
  18. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    2,034
    Funny thing is that SSR and pretty much all post-process effects should be independent of the technique used to render the frame: deferred, forward, forward+, etc. Inputs (depth, normals, albedo) are either readily available or easily obtainable. I see no reason to restrict certain effects to specific pipelines, or even have different post-processing workflows for them.
     
  19. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    790
    Maybe these post-processing should become part of the Core-RP package and shared between URP and HDRP, just like the FSR 1.0 and STP.
     
    c0d3_m0nk3y likes this.
  20. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,553
    in unity GDC2024 sponsored sessions,

     
  21. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    483
    Apparently there's going to be a bouncer on the door who will check whether you're a Chinese citizen :p
     
  22. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,553
    saw this in yt,
     
    kristoof, Kreshi, c0d3_m0nk3y and 2 others like this.
  23. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,457
    Almost: "If the Chinese version you want to evaluate refers to the Tuanjie engine, we are sorry that this version is currently only available for download by users in China."
     
  24. CyberAngel

    CyberAngel

    Joined:
    Oct 4, 2014
    Posts:
    128
    It is no wonder people are so disgruntled with Unity, they are charging and arm and a leg for things and yet are so behind where they should be.

    Now I am happy to pay these engagement fees, if and when I hit those requirements.

    But for the love of Unity, start giving us the tools we need!!
     
  25. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,553
  26. CyberAngel

    CyberAngel

    Joined:
    Oct 4, 2014
    Posts:
    128
  27. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    748
    Virtual Texturing isn't even Virtual Geometry though, and isn't that focused more on Terrain System?
     
    pragmascript and mgear like this.
  28. Dargon_huihui

    Dargon_huihui

    Joined:
    Mar 23, 2016
    Posts:
    10
    of course
     
  29. Dargon_huihui

    Dargon_huihui

    Joined:
    Mar 23, 2016
    Posts:
    10
    But developing games in China is really too difficult, and the pressure policies from all aspects make people feel helpless
     
  30. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,988
    The answer seems to be "no" actually.
     
  31. kristoof

    kristoof

    Joined:
    Aug 26, 2013
    Posts:
    89
    pragmascript likes this.
  32. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    637
    The pace of usable features and bug fixes for this engine happens at a snails pace. This fact has mostly been hidden thanks to the wonderful asset developers patching the gaps and large studios having source code access.
     
  33. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,148
    A lot of things can be fixed these days by embedding packages. You just need to be closely familiar with several overengineered APIs in multiple disciplines and not mind Unity ignoring critical bugs, sometimes for years.
     
    Ryiah and Lurking-Ninja like this.
  34. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 5, 2024
    Posts:
    574
    Sometimes it's even more infuriating when they finally fix the issue, it means you need to touch the relevant stuff again often after years. :D
     
    Last edited: Mar 20, 2024
    Sluggy and Ryiah like this.
  35. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,740
    You can fix a ton of things by also not using anything recently made by Unity and instead rely on third party assets like these Flexbox implementations for UGUI. That way you're not compromising like you are with UI Toolkit.

    https://assetstore.unity.com/packages/tools/gui/flexalon-ui-layouts-254652
    https://assetstore.unity.com/packages/tools/gui/flexbuilder-2023-flexbox-css-3-ui-245345
     
    Last edited: Mar 20, 2024
    laurentlavigne and pragmascript like this.
  36. kristoof

    kristoof

    Joined:
    Aug 26, 2013
    Posts:
    89
    Meanwhile you still can't import multiple packages at once from package manager and since they moved asset store assets to package manager too, every new project's first few hours is d!cking around with package manager.
    At least they should fix that
    Screenshot_20240320_100619_Chrome.jpg
     
    Ryiah likes this.
  37. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    597
    that has nothing to do with quality , that's not an excuse for delivering a bad product
     
    Gasimo likes this.
  38. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,457
    So, I've been using Tuanjie for a the past couple of days.

    The virtual geometry needs special shader but all you need is toggle a flag, like on Unreal. If you don't do that then VG won't work and it's semi silent as you'd expect from a beta.

    The end result is good, but polys do pop when the camera is near.

    I imported 30 Mpoly mesh and it behaves like a 20k poly mesh in the editor in term of fluidity.

    The GPU occlusion is something else, I kept adding more brains up to about 2G poly and it wouldn't flinch.

    It crashed when I did a GPU debugging on the compute culling. Apart from that it's rock solid, minus aforementioned glitches and the editor seems very responsive.

    This changes the way you work, and removes the pesky stage of optimizing your geometry.

    Hopefully Unity global will get the fruit of the Chinese team's labor and we'll all benefit.
     
    Ryiah, Gasimo, chingwa and 2 others like this.
  39. Sluggy

    Sluggy

    Joined:
    Nov 27, 2012
    Posts:
    1,020
    Exactly why I stopped selling on the asset store. Having to stay up-to-date with new bugs was hard enough. But nearly half my code started to become embedded in a rat's nest of conditional compilation blocks where each was a minefield of versions based on if Unity had a bug, fixed a bug, reintroduced a bug, created a new bug odue to a fix, or any permutation of the above with each and every release of Unity 5. I lost my mind and the niche demand for my product didn't warrant the insane amount of time I had to put into it with every new update.
     
  40. echu33

    echu33

    Joined:
    Oct 30, 2020
    Posts:
    69
    https://gdcvault.com/play/1034911/Mecha-BREAK-s-Virtual-Geometry

    Probably not related to Tuanjie, but some other company do integrate their own VG in Unity as well. Also URP/HDRP Compatible.

    Still, VG will probably only benefits user that required extremely high polycount model in their scene. It has even more overhead for regular user. I'm posting the link only shows that if you're a studio that use Unity and want VG, it's possible but you need to hire rendering guy (And a good one).

    Not to mention feature such as nanite and lumen will basically burn mobile device/ switch (yeah you can run it, like 1 fps)

    I mean sure it is nice to have such feature but I'd rather unity focus on improving what makes Unity Engine special at first place such as C#, ease of use components, improve the timeline/cinemachine that helps studio's development workflow.

    The feature got delivered in Unity 6 seems promising (GPU resident drawer, gpu occlusion culling) just hoping they can make sane decesion going forward.
     
    Last edited: May 5, 2024
    Gekigengar likes this.
  41. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,457
    Forgot to update this thread.

    Unity.ch already fixed all these bugs a while back. It took them 2 weeks, only :cool:

    They're working to add nanite and occlusion *that work* to URP.
     
  42. Lymdun

    Lymdun

    Joined:
    Jan 1, 2017
    Posts:
    47
    This is just so depressing to witness. Wish we will be able to use their piece of tech.
     
    blackbird likes this.
  43. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    637
    Seeing the speed at which Unity china moves and Unreal moves with epic, makes it all the more clear the fundamental way that Unity US is run is not conducive to productivity.

    It takes Unity US about 5 years to implement a feature, make it production, ready and then continously update and bug test it. While other companies can do it in months.
     
  44. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,741
    They took 5 months to fix a bug on the terrain where the heatmap option in the “Visualization Modes” was making the terrain totally inviisible... 5 months to fix that on a LTS version BTW, imagine fixing bugs on Virtual Geometry...
     
    Gasimo likes this.
  45. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    69
    As a person that knows what he's talking about, it is very cringe to me that people are asking nanite and lumen for URP.

    HDRP doesn't even need it to begin with, a d the moment a universal solution exists, every game will feel and play the same.

    Thankfully, the new CEO is mobile focused, and will likely ( hopefully ) keep URP's focus on customization and performance, and NOT features 99 percent of games people play don't even need.
     
  46. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,740
    You clearly don't based off of the rest of your post.

    How a game plays has nothing to do with the rendering technology. The reason that we have multiple pipelines has to do with performance and platform capabilities. HDRP can't run on every platform supported by Unity, and even if it could those platforms wouldn't have the performance for it.

    Virtualized geometry (eg Nanite) is a tremendous technology but Epic Games did an abhorrent job of presenting it to developers. Epic focused entirely on the insane number of triangles it allows for, but the biggest advantage is the automatic, optimizing LODs.

    Virtualized geometry eliminates the need to create your own LODs, but more importantly when it renders them it does so in a manner that optimizes the number of draw calls needed. It does this by sorting to ensure that it's drawing as many triangles as possible before it has no choice but to move to the next material.

    You can find my earliest tests if you search the forums. My benchmark was with the Synty Studios Dungeon Pack. Triangles were reduced from ~2 million down to around 80 thousand, but much more impressively draw calls were reduced from 1,500 to 550.
     
    Last edited: May 5, 2024
    florianBrn, TerraUnity and AcidArrow like this.
  47. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    69
    I'm not putting just words. I will lobby the Unity board to prevent this if possible.

    Our predecessors didn't implement these tecniques because they didn't know how to do them and we instead are smarter.

    There are consequences these systems have on gameplay, compatibility and rendering on different devices.

    Depht priming is another example ... Windwaker didn't use it on purpose.

    You can have these new features, but I want it to be a package, that I can exclude from the Engine with a click of a button and forget about it, because I can achieve the same result with old and field-tested methods.
     
  48. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,740
    Our "predeccessors" didn't implement them because there were lower hanging fruits at the time, but that doesn't mean they weren't aware of it and thought that it was the eventual path we would go down. John Carmack said as much in an interview in 2008.

    https://pcper.com/2008/03/john-carmack-on-id-tech-6-ray-tracing-consoles-physics-and-more/
    Nintendo is an exception thanks to them eternally choosing extremely outdated hardware. For example the Tegra X1 was already a few years old by the time they released the Switch, but even if it had come out the same year as the chip it still would've been underpowered.

    https://en.wikipedia.org/wiki/Tegra#Tegra_X1

    That is the entire point of the SRPs.
     
    Last edited: May 5, 2024
    Gekigengar likes this.
  49. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,741
    mmm english is not my main lenguage but maybe you don't know what you are talking? maybe i'm wrong and i did not understand your comment, those features, at least nanite, can be useful for any 3d game, is literaly a good performance technique pretty easy and fast to implement, i don't see why a game would not need it, i think even low poly games can make a good use of it...
     
    Gekigengar likes this.
  50. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    69
    It puts too much stress on the GPU's memory, and are instructions that need to be compiled and loaded when the application starts.

    Then, each object in the scene is copied and converted 4 to 5 times for each part of the engine.

    I'm nitpicking, because realistically people that buy games are also willing to spend thousend of dollars on a rig.

    But people like me, that use cheap stuff and mainly work ... I feel left out, as all these teqniques are fast, but mainly for systems that don't actually need the performance boost.

    The entirety of Unreal 5 indie and professional projects that all flex about I will never buy or be interested in them, as they are built on too bloated a fundation.

    Unity really is the middle ground if you know how to use it. It really makes all other engines obsolete, no nanite or lumen required, as you ironically can achieve the same result with a coroutine and a single matrix in a shader.