Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rendering/sky box v2 sun moon and stars #207

Merged
merged 21 commits into from
Jan 8, 2024

Conversation

mikhail-dcl
Copy link
Collaborator

@mikhail-dcl mikhail-dcl commented Dec 14, 2023

From the Unity side this is what should be done to target the production quality:

  • Eliminate Find Object Call
  • Make Renderer Feature not throw exception if the settings are missing (currently, it works on the DynamicLoaderScene only)
  • Compute Shader: MissingReferenceException on scene change
  • Introduce a system to update the render feature directly or via a shared model
  • Move all the math from the main thread (it looks quite heavy)
  • Move all the values to the Debug Widget
  • Add a Pause button to stop simulating the time of day change
  • Try replacing Marshal.SizeOf
  • Make the system work from the Edit Mode [optional]
  • Serialize Stars' compute buffers directly with Unity if it's possible [optional]

How to test:
Use the debug panel to control values.
They should change the appearance of the sky box both in Editor and Build. In case of doubts @GBirch33 should be able to provide details of the time of day algorithm.
There should be no exceptions related to Sky Box at any point with any values.

image

mikhail-dcl and others added 5 commits December 15, 2023 12:39
* Move to the separate plugin
* Move logic to the system
* Jobify math ops
…nMoonAndStars

# Conflicts:
#	Explorer/Assets/DCL/AvatarRendering/AvatarShape/AvatarShape.asmdef
#	Explorer/Assets/DCL/InfiniteFloor/Floor.mat
#	Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/DebugUtilitiesContainer.cs
#	Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Declarations/DebugIntSliderDef.cs
#	Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Declarations/DebugIntSliderDef.cs.meta
#	Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/Assets/DebugIntSlider.uxml
#	Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/Assets/DebugIntSlider.uxml.meta
#	Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/DebugIntSliderElement.cs
#	Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/DebugIntSliderElement.cs.meta
#	Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef
#	Explorer/Assets/DCL/PluginSystem/Global/Global Plugins Settings.asset
#	Explorer/Assets/DCL/Rendering/SkyBox/DCL_RenderFeature_ProceduralSkyBox.cs
#	Explorer/Assets/DCL/Rendering/SkyBox/DCL_RenderPass_GenerateSkyBox.cs
#	Explorer/Assets/DCL/SkyBox/Rendering/DCL_RenderPass_DrawSkyBox.cs
#	Explorer/Assets/Resources.meta
#	Explorer/Assets/Scenes/DynamicSceneLoading.unity
#	Explorer/Assets/Scripts/Global/Dynamic/DynamicSceneLoader.cs
#	Explorer/Assets/Scripts/Global/Dynamic/DynamicWorldContainer.cs
#	Explorer/DCL.Plugins.csproj.DotSettings
@mikhail-dcl mikhail-dcl marked this pull request as ready for review December 15, 2023 14:54
Copy link
Contributor

github-actions bot commented Dec 15, 2023

badge

Windows build successfull! You can find a link to the downloadable artifact below.

Name Link
Commit 0970237
Logs https://github.com/decentraland/unity-explorer/actions/runs/7451205018
Download https://github.com/decentraland/unity-explorer/suites/19605334776/artifacts/1154779338

…nMoonAndStars

# Conflicts:
#	Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef
#	Explorer/Assets/DCL/PluginSystem/Global/Global Plugins Settings.asset
#	Explorer/Assets/Scenes/DynamicSceneLoading.unity
#	Explorer/Assets/Scripts/Global/Dynamic/DynamicSceneLoader.cs
@anicalbano
Copy link
Contributor

When the zoom is at full and you see the horizon line, you can still see the night sky on a thin line even if it's day time:
image

Besides this minor thing, the build appears to be working on Windows:

26.12.2023_09.57.12_REC.mp4

I'll approve the PR depending on what's mentioned above 😄

Copy link

@Ludmilafantaniella Ludmilafantaniella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on Mac as well. I was able to reproduce Ani's issue with the night sky on the horizon when it's still day.
The directional light matches the position and rotation of illuminating elements (sun or moon) with corresponding color and intensity variations based on time marks.

mikhail-dcl and others added 5 commits January 8, 2024 18:15
# Conflicts:
#	Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef
#	Explorer/Assets/DCL/PluginSystem/Global/Global Plugins Settings.asset
#	Explorer/Assets/Scenes/DynamicSceneLoading.unity
#	Explorer/Assets/Scripts/Global/Dynamic/DynamicSceneLoader.cs
#	Explorer/Assets/Scripts/Global/Dynamic/DynamicWorldContainer.cs
@mikhail-dcl
Copy link
Collaborator Author

With @GBirch33 we fixed the forementioned bugs

@mikhail-dcl mikhail-dcl enabled auto-merge (squash) January 8, 2024 16:14
@mikhail-dcl mikhail-dcl merged commit a361ecb into main Jan 8, 2024
3 checks passed
@mikhail-dcl mikhail-dcl deleted the Rendering/SkyBoxV2_SunMoonAndStars branch January 8, 2024 18:05
Kinerius pushed a commit that referenced this pull request Feb 20, 2024
* Calibration of SkyBox sun coord, addition of BSC5 stars
* Compute vs Pixel shader star rendering.
* Create an utility to hot reload compute shaders
* TimeOfDay - Skybox
* Arrange SkyBox according to the architecture
* Move to the separate plugin
* Move logic to the system
* Jobify math ops

---------

Co-authored-by: Geoff Birch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants