Introducing the new URP 3D Sample

Introducing the new URP 3D Samples
We are excited to share with you the brand-new 3D Sample for the Universal Render Pipeline!

We have created 4 vignette environments with different art styles, rendering paths, and scene complexity, to represent the great variety of 3D projects built with URP. This sample targets a wide range of platforms, from mobile devices, to consoles and PCs, as well as VR headsets.

We wanted to make a visually engaging experience to showcase the customizability and scalability of URP, while taking into account the many hardware limitations that impact cross-platform development.

Let’s take a look at the different environments we created!

Terminal
Recommended minimum configurations: iPhone 6S or similar

This environment takes inspiration from various modern museums, airports, and sci-fi architecture designs. In particular, this scene takes advantage of physically-based materials and the GPU Lightmapper to offer a realistic rendering.

In the main outdoor area, a large platform surrounded by water lets you review your assets in a neutral environment with calibrated lighting conditions. Once on the ramp, you can enter 3 rooms which will teleport you into universes with radically different art styles and platform reach: the Garden, the Oasis, and the Cockpit. To initiate the teleportation, focus on the Unity logo above the teleporting device for a few seconds (requires Play Mode).

Garden
Recommended minimum configurations: iPhone 6S or similar

This scene offers a more stylized rendering, with painterly materials and more organic geometries. Have a stroll in the courtyard of this quiet and nocturnal Japanese building (inspired by Shoin-zukuri style), or visit one of its interiors for a cup of jasmine tea.

The Garden scales effortlessly on mobile devices and higher end platforms. It features a modular architectural set relying on the default Lit shader, beautifully crafted vegetation (SpeedTree), interconnected interiors, a gentle water stream meandering across the garden, stylized visual effects, as well as numerous decorative dynamic lights to take advantage of URP’s Forward+ (or Deferred) rendering path.

Oasis
Recommended minimum configurations: iPhone 8 or similar

Enjoy the warm glow of the sun setting on this peaceful oasis. Walk down the sandy hill, and you’ll find a traditional Bedouin tent set up for the night.

The Oasis targets handheld consoles and higher-end devices, with the use of more complex Shader Graphs for sand, water, fog, and vegetation. This level is an opportunity to demonstrate the ability for URP to reach a higher level of visual quality when the content is tailored for platforms with more performant GPUs.

Cockpit
Recommended minimum configurations: Meta Quest 2

Jump into this ultra-stylized rollercoaster where your fleet is under heavy attack from an unknown alien faction. You start your ride inside a hangar ship, and quickly realize your armada isn’t a match for the opposing force.

This scene is specifically tailored for VR headsets and lower-end mobile devices: it is designed to run at high frame rates, while still featuring beautifully stylized visuals. Furthermore, we offer a custom lighting model to showcase the ease of customizability of URP.

Getting started

  • Install Unity 2022.3.12f1 via the Unity Hub
  • Create a new Project and select “3D Sample Scenes (URP)”
  • Click the “Download template” button on the right panel, and click “Create project”
  • The project will load in the Editor. The first important time may take a few minutes.

What’s next
Regularly, we will post updates in this thread to let you know about bug fixes, additions, and major changes.

Currently, this sample targets Unity 2022 LTS. After the final release later this year, our objective is to add support for Unity 6, which brings further improvements to URP, such as Render Graph and GPU Resident Drawer.

Known issues
Build Times: Due to the wide variety of use cases, target platforms, renderers, and features presented in these samples, some URP configurations can result in large numbers of shader variants, which take a long time to compile. To reduce build times, we recommend only building with one Quality Level, a subset of scenes, and toggling VR on or off. We are currently working on optimizing the shader compilation times.

First editor run: When opening the editor, navigating the scenes and entering game mode for the first time, many shader compilations will happen.

Temporal Anti-Aliasing (TAA): TAA is a set on the camera and is currently not set per quality level.

Misc: Changing the resolution at runtime (such as scaling the game view) will cause the screen textures to have incorrect resolution.

How to give feedback?
Please take a look at the “Known issues” section above, before reporting issues.

We invite you to share your general sentiment, ask questions and request help directly in this thread. We also encourage you to experiment with the content of this project and share your findings.

Furthermore, we are also interested in the level of performance you are getting on your devices. This may help us to identify performance issues on certain hardware configurations.

For bug reports and crashes, we invite you to discuss them in this thread as well. However, we may ask you to also formally report bugs that aren’t trivial for us to reproduce.

Thank you!


9365378--1310057--Teleportation.gif

41 Likes

Even while developing samples, you found several issues with your own engine. Imagine what it would be like if you were making games. However, these samples are good, keep it up, Unity.

14 Likes

Yeah, I am happy they are making new samples. It is at least letting them see first hand certain bugs.
This could help debug and fix them faster. This is a good start too for 3D URP demos.

4 Likes

Gotta say, these look gorgeous. Especially the Garden one. Good work :slight_smile:

7 Likes

This looks amazing! Great work! :smile: Looking forward to digging deeper into it!

7 Likes

We enabled Include Git LFS objects in archives now so you can download the project using the Code->Download ZIP button if you don’t want to pull with git :slight_smile:

3 Likes

Yeah, it just shows how insufficient their internal testing has been. Having these is a good step forward.

On the topic of making games at Unity: while we don’t publish our own games, we still do a lot of game development at Unity through development and co-development consulting services. We have a lot of engineers partnering with Unity customers to make real games and get them to market. So we do have a lot of input from these consulting teams that helps improve the engine.

https://resources.unity.com/unitenow/onlinesessions/benefiting-from-unity-professional-services

edit: I wanted to share a few resources on the topic of making games. But this isn’t the topic for this thread, so let’s focus on the new sample project here :slight_smile:

4 Likes

I’m getting a null reference with the sample in 2022.3.10 with the benchmark scene

NullReferenceException: Object reference not set to an instance of an object
SceneTransitionManager.EnableScene (SceneLoader sceneLoader) (at Assets/Shared Assets/Scripts/Runtime/SceneTransitionManager.cs:444)
SceneLoader.EnableScene () (at Assets/Shared Assets/Scripts/Runtime/SceneLoader.cs:55)
MediaSceneLoader.EnableGarden () (at Assets/Shared Assets/Scripts/Runtime/MediaSceneLoader.cs:20)
UnityEngine.Events.InvokableCall.Invoke () (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0)
UnityEngine.Timeline.SignalReceiver.OnNotify (UnityEngine.Playables.Playable origin, UnityEngine.Playables.INotification notification, System.Object context) (at ./Library/PackageCache/com.unity.timeline@1.7.5/Runtime/Events/Signals/SignalReceiver.cs:36)
NullReferenceException: Object reference not set to an instance of an object
SceneTransitionManager.StartTransition (MediaSceneLoader mediaSceneLoader) (at Assets/Shared Assets/Scripts/Runtime/SceneTransitionManager.cs:541)
MediaSceneLoader.Transition () (at Assets/Shared Assets/Scripts/Runtime/MediaSceneLoader.cs:55)
UnityEngine.Events.InvokableCall.Invoke () (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0)
UnityEngine.Timeline.SignalReceiver.OnNotify (UnityEngine.Playables.Playable origin, UnityEngine.Playables.INotification notification, System.Object context) (at ./Library/PackageCache/com.unity.timeline@1.7.5/Runtime/Events/Signals/SignalReceiver.cs:36)

Also for questions:

  1. Why is IL2CPP disabled for android? This means the sample would not be ready for the play store.
  2. Why is input management on both? This is a bad practice in my opinion
  3. Is there a reason prebake collision meshes is disabled? (just curious on your views)
  4. Why isn’t strip unused post processing varients on?
  5. Why is Android burst target CPU architecture on nothing? Could hurt performance
  6. The default quality tier used for android is PC Low. It is unchecked, but since it’s green it’s forced to be included and WILL be used! Desktop is also weirdly setup
  7. What are your thoughts on using Vulkan for android with graphics jobs? (can help quite a bit on the main thread!)
  8. I see light cookies is enabled with 2K textures and Color High, even on mobile low. Is this really that cheap to run?
  9. Is there a reason for Fast sRGB/Linear to be disabled?
  10. Why is native renderpass not enabled for mobile?
  11. Maybe a good idea to put the company name to Unity instead of DefaultCompany, looks better
6 Likes

The only evidence of games made by Unity I’ve seen is Gigaya which was abandoned, proving even Unity can’t finish a game using their own engine. The point behind that project was identifying challenges facing your users, the fact you had to abandon it should be one of the most valuable feedback…

1 Like

@DevDunk Thanks!
I’ll look into the null reference right away!

The answer to most of your questions is that it was an oversight by me. So thanks for pointing these things out!

  1. Simply because it is default and I didn’t go over the Android player settings yet. I’ll update it today
  2. Oversight. I’ll remove the old system
  3. From my understanding this is a load time optimization at the cost of build time. I haven’t done any thorough testing but for now I prefer the options that saves on build time
  4. It should be. Will update
  5. I honestly don’t know about this one. I’ve asked internally to know cost/benefits and will get back to you
  6. My mistake. Fixed
  7. I did a quick test and didn’t see any difference in total frame time (project is very much GPU bound). We are using deferred though so we kind of have to use Vulkan so I’m keeping the settings you proposed.
  8. It’s not. Oversight
  9. Nope. Enabled
  10. In forward it shouldn’t make a difference but I’ve enabled it in deferred
  11. Good Idea!

Updates are pushed to the repo

5 Likes

Awesome!
Thanks for the rapid response and fixes

3 Likes

Wonderful!
A few pieces of feedback/issues:

  • Please make it so when the cursor is unlocked the camera doesn’t rotate so I can easily take a look at things in the game view!
  • It would be nice if the flythrough timer didn’t start when there is no cursor focus, at least there’s a checkbox for this.
  • In reality you would probably want an FPS cap on these scenes, but I can understand the desire to avoid it for those that want to frame count, my GPU be squealing!
  • The parallax in the garden rocks is full of artefacts for me (RX 7900XTX), including bright parts at the edges that disappear when I Stop NaNs on the camera.
  • Probably worthwhile to clean up the collisions at the start of the terminal scene, you can shove your head through a lot of geo here.

Big fan of Plant_01 btw,very nice

5 Likes

Looks great! I found enabling post processing and FXAA helped a lot with the pixelated / aliased look of the teleportation screens, I understand the choice to not enable it when optimizing for mobile, but the higher quality presets should definitely include it.

Unrelatedly, is there a reason why the return screens for the garden and the oasis don’t just use a prebaked box projected cube map? With how little your perspective shifts, I imagine it would run a lot better than a second camera.

I’d like to add some input on question #7 regarding Vulkan + graphics jobs.

Unity’s Vulkan graphics jobs relies on secondary command buffer, which is poorly supported by low-end mobile GPUs and higher-end mobile GPUs prior to Adreno 650 and Mali G710, resulting in extra invocation overhead and sometimes disabled hardware optimization. This could lead to performance regression on a lot of Android devices.

Therefore, unless you are targeting newer high-end Android devices, it would be wise to keep graphics jobs off. But ultimately, it’s also project/hardware dependent so run your own profiling before making the decision.

1 Like

Thanks, that’s good to know!
I mostly work with quest 2, where it does help a bit (or has no measurable effect)

2 Likes

Great feedback, thank you!

Regarding the teleportation optimization, this is something we discussed internally in the past, and using a reprojected cubemap could indeed be a great solution (especially on lower end devices).

Having a static image on the screen and a full black dissolve was also considered for the most problematic devices (potentially with a forced player position to initiate the teleportation). But so far we went for a more brute force approach to maximize the “cool factor”.

It’s definitely on our list of things to improve already. :wink:

1 Like

@vertxxyz Great stuff!
Input is now blocked if the cursor is unlocked
Defocusing game view will now pause the idle timer.
Collision mesh in terminal is adjusted

All pushed to the repo

I’ll look into the parallax bug but I need to find a way to reproduce. My Nvidia card doesn’t repro but I am seeing some issues with the parallax on android so maybe fixing it there will fix it on your end as well.

I think we might add a configurable fps cap to an in game menu along with settings for mouse sensitivity, resolution etc. Can’t say for sure when that will be added though.

3 Likes

@Jonas-Mortensen If you switch build target to WebGL, the script “StarterAssetsInputs” doesn’t compile due to a missing using Unity.InputSystem; (the existing using Unity.InputSystem; is excluded)

Inputs doesn’t work on the benchmark UI since you disabled the old input system (you need to restart unity to see the breaking change).