Introducing the new URP 3D Sample

@Pitou22
Removing old input system did indeed break the Benchmark UI. This doesn’t seem to reproduce in latest 2023 so we are investigating if a fix needs to be backported. Thanks for reporting!

I’ll take a look at WebGL and see if I can get it to build. I do want to add that WebGL isn’t a platform that we are focusing on with this project. It should still build though :slight_smile:

These are a good general start. The scenes I have looked at seem to have zero real optimizations done yet. Would be kind of neat to see another version also publish that is optimized to various levels, such as shader precision, baking down high poly objects, combining materials, lighting tricks, etc. Would be a great lesson for devs on optimization techniques having two versions to compare visually side-by-side with and without certain optimizations. IMHO there is a lot of room for some significant performance improvements.
Overall, these are useful.

Problem with only being concerned with the “cool factor” is practicality. These are tiny scenes so yes, you can afford to do these things. But in reality, real games with larger scenes should avoid these things, especially where mobile is concerned. This is your opportunity to showcase best practices that are applicable to game budgets. Otherwise it ends up being another unrealistic sample of limited use.

@Jonas-Mortensen I pulled the latest changes from the public-beta branch but still see SceneLoader exceptions when I run the Benchmark scene. Made a build on Android. The Benchmark scene just flickers on the phone without loading any other scenes.

I then tried to make only the Garden scene build with Android Low-quality settings. It runs at 6 FPS on Redmi 12(4GB RAM, Mediatek Helio G88, Mali-G52 MC2). On Google Pixel 6. It just glitches a lot. Screenshots attached.



2 Likes

@Pitou22 We pushed a fix to the Benchmark not working after removing the old input system.

3 Likes

@bnmguy good proposal to fine tune the shader precision! Regarding the other proposals I want to make sure I understand what you mean:
Baking down high poly objects: We manage our poly count using LODs. Are you suggesting that our lower LODs have even less geometry or are you thinking about something else?
Combining materials: We rely on the SRP Batcher to optimize draw calls. SRP Batches do not break per material but rather per variant so I’m not sure if combining materials would be much of an optimization. Could be worth a try though! I’ll add to the backlog
Lighting tricks: What kind of tricks are you talking about? A couple of examples of what we currently do: Fade out lights based on distance, use cookies in stead of shadow maps where it makes sense, use shadow mask in stead of real time shadows on low end, use shared lightmaps between LODs.

If you have any more suggestions about improving performance I’ll be more that happy to hear them!

3 Likes

@Inverse101 thanks for testing the project! I’ll see if I can get my hand on devices that reproduce these issues. On the Redmi 12 did you run it in Mobile Low or Mobile High?

1 Like

I ran it on Mobile low on all devices.

1 Like

This is looking very good. Keep up the great work!

4 Likes

@Inverse101
I looked a bit into it and the Mali-G52 MC2 is bellow our minimum spec. You could experiment with running regular forward and GLES3 (in stead of Vulkan and deferred) but expect light popping. Before final release we will probably add some additional scaling like varying vegetation density and shader tiers to give some more headroom on lower end.
The investigation did surface a bug in native render pass though which I’m hoping is also causing the artifacts you’re seeing on the pixel. I’ll get back to you once we have news on that.

2 Likes

@Jonas-Mortensen You should fix the license, it says Unity Companion license. I highly doubt that any SpeedTree is something we publishers could use in demos on the Asset Store, Unity is not Epic. Otherwise please clarify / confirm. Would be awesome. Thank you! :slight_smile:

You read it right, the URP 3D Sample is distributed under the UCL.

I have also double-checked with the SpeedTree team, and they are more than happy for you guys to use the respective assets created for this URP 3d Sample. In short, you can indeed use the SpeedTree assets in a game or demo. :wink:

What will be highly frown upon is repacking these assets as is and reselling them.

15 Likes

If I run the benchmark scene directly. The game window doesn’t show the environment. I keep getting the below exception. Once I switch to Scene view and come back to game view, it works. On Android, It’s just the Benchmark popup without the environment in the background. I am on M1 MAC with Unity silicon version 2022.3.7f1.

(wrapper stelemref) System.Object.virt_stelemref_class_small_idepth(intptr,object)
UnityEngine.Rendering.Universal.Internal.DeferredLights.UpdateDeferredInputAttachments () (at ./Library/PackageCache/com.unity.render-pipelines.universal@14.0.8/Runtime/DeferredLights.cs:429)
UnityEngine.Rendering.Universal.Internal.GBufferPass.Configure (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.RenderTextureDescriptor cameraTextureDescriptor) (at ./Library/PackageCache/com.unity.render-pipelines.universal@14.0.8/Runtime/Passes/GBufferPass.cs:106)
UnityEngine.Rendering.Universal.UniversalRenderer.EnqueueDeferred (UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean hasDepthPrepass, System.Boolean hasNormalPrepass, System.Boolean hasRenderingLayerPrepass, System.Boolean applyMainShadow, System.Boolean applyAdditionalShadow) (at ./Library/PackageCache/com.unity.render-pipelines.universal@14.0.8/Runtime/UniversalRenderer.cs:1332)```

![9390512--1313720--Screenshot 2023-10-05 at 2.21.56 PM.png|1194x886](upload://iGAqu88lxPUcadgGkdcUN5hZkpW.png)

@Inverse101 I tried running the benchmark on M1 Mac in deferred and wasn’t able to reproduce your issue. Which Quality level are you using?

I am testing on mobile low.

9391571--1313873--Screenshot 2023-10-06 at 12.08.57 AM.png

@Jonas-Mortensen I am curious if this is in active development. I have not seen any push in the public beta branch since 4th Oct 2023 in this. It’s a good starter project and can help a lot of people.

@Inverse101 It certainly is in active development. I haven’t pushed our changes to the public repo in a while since there haven’t been any fixes to issues discussed in this thread but I’m happy that you are interested and have now pushed our latest changes :slight_smile:

1 Like

Regarding Oasis: would be nice to have it on a proper terrain instead of mesh terrain.

In addition to @Jonas-Mortensen 's message, we’ve been polishing most levels, cleaning up the project here and there, adding more optimizations, and fixing internally discovered bugs.

One of the biggest visual improvement, is the wind support and improved subsurface scattering for all the vegetation in the Oasis.

9425300--1321142--2023-10-23_10-57-41.gif

13 Likes

Thanks for the update. I pulled and tested it out. Mobile low graphics setting still doesn’t render on mobiles. Mobile high worked. Tested on Google Pixel 3.

1 Like