diff --git a/Assets/FulldomeCamera/Examples/Example.unity b/Assets/FulldomeCamera/Examples/Example.unity index 71dd358..b368875 100644 --- a/Assets/FulldomeCamera/Examples/Example.unity +++ b/Assets/FulldomeCamera/Examples/Example.unity @@ -39,7 +39,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44369325, g: 0.49302882, b: 0.5725704, a: 1} + m_IndirectSpecularColor: {r: 0.44367877, g: 0.49301547, b: 0.57256657, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &528984 LightmapSettings: @@ -117,9 +117,10 @@ NavMeshSettings: --- !u!1 &1364618 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 143484, guid: f839fee193e761540837c9d831bc637d, type: 2} + m_CorrespondingSourceObject: {fileID: 143484, guid: f839fee193e761540837c9d831bc637d, + type: 2} m_PrefabInternal: {fileID: 0} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 1364619} - component: {fileID: 1364620} @@ -133,7 +134,8 @@ GameObject: --- !u!4 &1364619 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 489874, guid: f839fee193e761540837c9d831bc637d, type: 2} + m_CorrespondingSourceObject: {fileID: 489874, guid: f839fee193e761540837c9d831bc637d, + type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1364618} m_LocalRotation: {x: 0.48557264, y: -0, z: -0, w: 0.87419635} @@ -146,7 +148,7 @@ Transform: --- !u!108 &1364620 Light: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 10808866, guid: f839fee193e761540837c9d831bc637d, + m_CorrespondingSourceObject: {fileID: 10808866, guid: f839fee193e761540837c9d831bc637d, type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1364618} @@ -174,6 +176,7 @@ Light: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 4 + m_LightShadowCasterMode: 0 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 @@ -183,9 +186,9 @@ Light: --- !u!1 &351873905 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 351873909} - component: {fileID: 351873908} @@ -201,7 +204,7 @@ GameObject: --- !u!64 &351873906 MeshCollider: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 351873905} m_Material: {fileID: 0} @@ -215,7 +218,7 @@ MeshCollider: --- !u!23 &351873907 MeshRenderer: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 351873905} m_Enabled: 1 @@ -250,14 +253,14 @@ MeshRenderer: --- !u!33 &351873908 MeshFilter: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 351873905} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &351873909 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 351873905} m_LocalRotation: {x: -0.00000007165881, y: 0.92387956, z: -0.38268343, w: -0.00000017299969} @@ -307,14 +310,14 @@ Prefab: value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: a4961af01f7834fbea3cacfd38b8c515, type: 2} - m_IsPrefabParent: 0 + m_SourcePrefab: {fileID: 100100000, guid: a4961af01f7834fbea3cacfd38b8c515, type: 2} + m_IsPrefabAsset: 0 --- !u!1 &1361361590 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 1361361591} m_Layer: 0 @@ -327,7 +330,7 @@ GameObject: --- !u!4 &1361361591 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1361361590} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} @@ -344,10 +347,10 @@ Transform: --- !u!1 &1664343969 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 1600569392201904, guid: e05e1164b2f004c479eed2a41b8e57c3, + m_CorrespondingSourceObject: {fileID: 1600569392201904, guid: e05e1164b2f004c479eed2a41b8e57c3, type: 2} m_PrefabInternal: {fileID: 0} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 1664343976} - component: {fileID: 1664343975} @@ -364,7 +367,7 @@ GameObject: --- !u!114 &1664343970 MonoBehaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1664343969} m_Enabled: 1 @@ -375,7 +378,7 @@ MonoBehaviour: --- !u!81 &1664343973 AudioListener: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 81112989899386346, guid: e05e1164b2f004c479eed2a41b8e57c3, + m_CorrespondingSourceObject: {fileID: 81112989899386346, guid: e05e1164b2f004c479eed2a41b8e57c3, type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1664343969} @@ -383,7 +386,7 @@ AudioListener: --- !u!124 &1664343974 Behaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 124087444013616886, guid: e05e1164b2f004c479eed2a41b8e57c3, + m_CorrespondingSourceObject: {fileID: 124087444013616886, guid: e05e1164b2f004c479eed2a41b8e57c3, type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1664343969} @@ -391,7 +394,7 @@ Behaviour: --- !u!20 &1664343975 Camera: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 20346431752478706, guid: e05e1164b2f004c479eed2a41b8e57c3, + m_CorrespondingSourceObject: {fileID: 20346431752478706, guid: e05e1164b2f004c479eed2a41b8e57c3, type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1664343969} @@ -399,6 +402,10 @@ Camera: serializedVersion: 2 m_ClearFlags: 1 m_BackGroundColor: {r: 0.036578864, g: 0.04523829, b: 0.05660379, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -428,7 +435,7 @@ Camera: --- !u!4 &1664343976 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 4852272179631692, guid: e05e1164b2f004c479eed2a41b8e57c3, + m_CorrespondingSourceObject: {fileID: 4852272179631692, guid: e05e1164b2f004c479eed2a41b8e57c3, type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1664343969} @@ -442,9 +449,9 @@ Transform: --- !u!1 &1808502821 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 1808502824} - component: {fileID: 1808502823} @@ -458,9 +465,9 @@ GameObject: m_IsActive: 1 --- !u!199 &1808502822 ParticleSystemRenderer: - serializedVersion: 5 + serializedVersion: 6 m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1808502821} m_Enabled: 1 @@ -506,6 +513,7 @@ ParticleSystemRenderer: m_Pivot: {x: 0, y: 0, z: 0} m_UseCustomVertexStreams: 0 m_EnableGPUInstancing: 1 + m_ApplyActiveColorSpace: 0 m_VertexStreams: 00010304 m_Mesh: {fileID: 0} m_Mesh1: {fileID: 0} @@ -515,7 +523,7 @@ ParticleSystemRenderer: --- !u!198 &1808502823 ParticleSystem: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1808502821} serializedVersion: 5 @@ -1150,6 +1158,8 @@ ParticleSystem: m_Mesh: {fileID: 0} m_MeshRenderer: {fileID: 0} m_SkinnedMeshRenderer: {fileID: 0} + m_Sprite: {fileID: 0} + m_SpriteRenderer: {fileID: 0} m_UseMeshMaterialIndex: 0 m_UseMeshColors: 1 alignToDirection: 0 @@ -5046,7 +5056,7 @@ ParticleSystem: --- !u!4 &1808502824 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1808502821} m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} @@ -5059,9 +5069,9 @@ Transform: --- !u!1 &1810034350 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 1810034351} - component: {fileID: 1810034354} @@ -5077,7 +5087,7 @@ GameObject: --- !u!4 &1810034351 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1810034350} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} @@ -5090,7 +5100,7 @@ Transform: --- !u!65 &1810034352 BoxCollider: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1810034350} m_Material: {fileID: 0} @@ -5102,7 +5112,7 @@ BoxCollider: --- !u!23 &1810034353 MeshRenderer: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1810034350} m_Enabled: 1 @@ -5137,7 +5147,7 @@ MeshRenderer: --- !u!33 &1810034354 MeshFilter: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1810034350} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/FulldomeCamera/FulldomeCamera.txt b/Assets/FulldomeCamera/FulldomeCamera.txt new file mode 100644 index 0000000..b0b6e04 --- /dev/null +++ b/Assets/FulldomeCamera/FulldomeCamera.txt @@ -0,0 +1,12 @@ + +FulldomeCameraForUnity +====================== + +Check new versions and implementations at: +https://github.com/rsodre/FulldomeCameraForUnity + +Part of the Fulldome VJs family +http://fulldomevjs.com/ + +Developed by Roger Sodré @ Studio Avante +http://studioavante.com/ diff --git a/Assets/FulldomeCamera/FulldomeCamera.txt.meta b/Assets/FulldomeCamera/FulldomeCamera.txt.meta new file mode 100644 index 0000000..4a98a51 --- /dev/null +++ b/Assets/FulldomeCamera/FulldomeCamera.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d359f5e98e7fa44979651d78e16cf460 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index b0b3f17..1342d0a 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,8 +1,39 @@ { "dependencies": { - "com.unity.ads": "exclude", - "com.unity.analytics": "exclude", - "com.unity.standardevents": "exclude", - "com.unity.purchasing": "exclude" + "com.unity.ads": "2.0.8", + "com.unity.analytics": "2.0.16", + "com.unity.package-manager-ui": "1.9.11", + "com.unity.purchasing": "2.0.3", + "com.unity.textmeshpro": "1.2.4", + "com.unity.modules.ai": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.cloth": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.terrain": "1.0.0", + "com.unity.modules.terrainphysics": "1.0.0", + "com.unity.modules.tilemap": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.umbra": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.unitywebrequesttexture": "1.0.0", + "com.unity.modules.unitywebrequestwww": "1.0.0", + "com.unity.modules.vehicles": "1.0.0", + "com.unity.modules.video": "1.0.0", + "com.unity.modules.vr": "1.0.0", + "com.unity.modules.wind": "1.0.0", + "com.unity.modules.xr": "1.0.0" } } diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 22977b3..997bd4a 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 2018.1.0f2 +m_EditorVersion: 2018.2.5f1 diff --git a/README.md b/README.md index 501e08f..c1352e5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,16 @@ # FulldomeCameraForUnity -Fulldome Camera for Unity 2018+ +Compatible with **Unity 2018.2** -For Unity 5.6, use [FulldomeCameraForUnity5](https://github.com/rsodre/FulldomeCameraForUnity5) +* Newer versions may be available at the [master branch](https://github.com/rsodre/FulldomeCameraForUnity) +* For **Unity 2018.1**, checkout the [2018.1 tag](https://github.com/rsodre/FulldomeCameraForUnity/tree/2018.1) +* For **Unity 5.6**, use [FulldomeCameraForUnity5](https://github.com/rsodre/FulldomeCameraForUnity5) -![](images/example.png) +## Introduction +![](images/example.png) -This plugin was inspired by [this article](https://blogs.unity3d.com/2018/01/26/stereo-360-image-and-video-capture/), and relies on the `Camera.RenderToCubemap` [method](https://docs.unity3d.com/ScriptReference/Camera.RenderToCubemap.html) from Unity 2018.1. It will render your game's camera as a [cubemap](https://en.wikipedia.org/wiki/Cube_mapping) and distort it to a [Domemaster](http://download.studioavante.com/TEMPLATES/DOME/DOME_template_2K.png) format. +This plugin was inspired by [this article](https://blogs.unity3d.com/2018/01/26/stereo-360-image-and-video-capture/), and relies on the `Camera.RenderToCubemap` [method](https://docs.unity3d.com/ScriptReference/Camera.RenderToCubemap.html) first available in Unity 2018.1. It will render your game's camera as a [cubemap](https://en.wikipedia.org/wiki/Cube_mapping) and distort it to a [Domemaster](http://download.studioavante.com/TEMPLATES/DOME/DOME_template_2K.png) format. If we consider performance and quality, this solution is far from ideal. To make a cubemap, we need to render the scene (up to) 6 times, with 6 different cameras, one for each face of the cube. Rendering a good looking game once is already a challenge, everybody knows, just imagine six. Another problem is that some effects and shaders that depend on the camera position, like reflections, will look weird where the cube faces meet, because neigboring pixels were calculated for different cameras. Front-facing sprites commonly used on particles also will suffer from the same problem. @@ -17,12 +20,14 @@ There's an [issue in Unity Feedback](https://feedback.unity3d.com/suggestions/co And here's the Unity [forum thread](https://forum.unity.com/threads/fulldome-camera-for-unity.547939/). +Get inspired and share your works at the [Unity 3D Fulldome Development](https://www.facebook.com/groups/640529606365067/) and [Fulldome Artists United](https://www.facebook.com/groups/FulldomeArtistsUnited/) groups. + ## Install Download and import the latest [package](https://github.com/rsodre/FulldomeCameraForUnity/releases) release. -Alternatvely, you can [clone](https://help.github.com/articles/cloning-a-repository/) or [download](https://github.com/rsodre/FulldomeCameraForUnity/archive/master.zip) this repository and open as a full project in Unity 2018.1 or newer. +Alternatvely, you can [clone](https://help.github.com/articles/cloning-a-repository/) or [download](https://github.com/rsodre/FulldomeCameraForUnity/archive/master.zip) this repository and open as a full project in Unity. ## Usage @@ -126,13 +131,14 @@ So the game can be played in fullscreen (Windows or macOS), sending a mirror ima -## Thanks +## Credits -The work of all these people allowed us to get to this point. +Developed by [Roger Sodré](https://github.com/rsodre) of [Studio Avante](http://www.studioavante.com/) and [United VJs](http://unitedvjs.com.br/). -Many thanks to Paul Bourke for his amazing [dome research](http://paulbourke.net/dome/) +Many thanks to all these people whose work allowed us to get to this point.... -[Anton Marini](https://github.com/vade) and [Tom Butterworth](https://github.com/bangnoise) for revolutionizing visuals with [Syphon](https://github.com/Syphon). +Paul Bourke for his amazing [dome research](http://paulbourke.net/dome/) -[David Lublin](https://github.com/dlublin) of [Vidvod](https://github.com/Vidvox) for all the freebie tools and for the amazing [VDMX](https://vidvox.net/). +[Anton Marini](https://github.com/vade) and [Tom Butterworth](https://github.com/bangnoise) for revolutionizing visuals with [Syphon](https://github.com/Syphon). +[David Lublin](https://github.com/dlublin) of [Vidvox](https://github.com/Vidvox) for all the freebie tools and for the amazing [VDMX](https://vidvox.net/).