ProceduralSkyTextureDataSection.qml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. // Copyright (C) 2023 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
  3. import QtQuick 2.15
  4. import QtQuick.Layouts 1.15
  5. import HelperWidgets 2.0
  6. import StudioTheme 1.0 as StudioTheme
  7. Column {
  8. width: parent.width
  9. Section {
  10. width: parent.width
  11. caption: qsTr("Procedural Sky Texture Data")
  12. SectionLayout {
  13. PropertyLabel {
  14. text: qsTr("Quality")
  15. tooltip: qsTr("This property sets the size of the texture. The higher the quality, the more memory is used.")
  16. }
  17. SecondColumnLayout {
  18. ComboBox {
  19. scope: "ProceduralSkyTextureData"
  20. model: ["SkyTextureQualityLow", "SkyTextureQualityMedium", "SkyTextureQualityHigh", "SkyTextureQualityVeryHigh"]
  21. backendValue: backendValues.textureQuality
  22. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  23. + StudioTheme.Values.actionIndicatorWidth
  24. }
  25. ExpandingSpacer {}
  26. }
  27. }
  28. }
  29. Section {
  30. width: parent.width
  31. caption: qsTr("Sky")
  32. SectionLayout {
  33. PropertyLabel {
  34. text: qsTr("Top Color")
  35. tooltip: qsTr("Specifies the sky color at the top of the skybox.")
  36. }
  37. ColorEditor {
  38. backendValue: backendValues.skyTopColor
  39. supportGradient: false
  40. }
  41. PropertyLabel {
  42. text: qsTr("Horizon Color")
  43. tooltip: qsTr("Specifies the sky color at the horizon.")
  44. }
  45. ColorEditor {
  46. backendValue: backendValues.skyHorizonColor
  47. supportGradient: false
  48. }
  49. PropertyLabel {
  50. text: qsTr("Energy")
  51. tooltip: qsTr("Specifies the HDR color intensity of the top half of the skybox.")
  52. }
  53. SecondColumnLayout {
  54. SpinBox {
  55. minimumValue: 0
  56. maximumValue: 64
  57. decimals: 3
  58. stepSize: 0.01
  59. sliderIndicatorVisible: true
  60. backendValue: backendValues.skyEnergy
  61. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  62. + StudioTheme.Values.actionIndicatorWidth
  63. }
  64. ExpandingSpacer {}
  65. }
  66. PropertyLabel {
  67. text: qsTr("Curve")
  68. tooltip: qsTr("Modifies the curve (n^x) of the sky gradient from the horizon to the top.")
  69. }
  70. SecondColumnLayout {
  71. SpinBox {
  72. minimumValue: 0
  73. maximumValue: 64
  74. decimals: 3
  75. stepSize: 0.01
  76. sliderIndicatorVisible: true
  77. backendValue: backendValues.skyCurve
  78. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  79. + StudioTheme.Values.actionIndicatorWidth
  80. }
  81. ExpandingSpacer {}
  82. }
  83. }
  84. }
  85. Section {
  86. width: parent.width
  87. caption: qsTr("Ground")
  88. SectionLayout {
  89. PropertyLabel {
  90. text: qsTr("Bottom Color")
  91. tooltip: qsTr("Specifies the ground color at the bottom of the skybox.")
  92. }
  93. ColorEditor {
  94. backendValue: backendValues.groundBottomColor
  95. supportGradient: false
  96. }
  97. PropertyLabel {
  98. text: qsTr("Horizon Color")
  99. tooltip: qsTr("Specifies the ground color at the horizon.")
  100. }
  101. ColorEditor {
  102. backendValue: backendValues.groundHorizonColor
  103. supportGradient: false
  104. }
  105. PropertyLabel {
  106. text: qsTr("Energy")
  107. tooltip: qsTr("Specifies the HDR color intensity of the bottom half of the skybox.")
  108. }
  109. SecondColumnLayout {
  110. SpinBox {
  111. minimumValue: 0
  112. maximumValue: 64
  113. decimals: 3
  114. stepSize: 0.01
  115. sliderIndicatorVisible: true
  116. backendValue: backendValues.groundEnergy
  117. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  118. + StudioTheme.Values.actionIndicatorWidth
  119. }
  120. ExpandingSpacer {}
  121. }
  122. PropertyLabel {
  123. text: qsTr("Curve")
  124. tooltip: qsTr("Modifies the curve (n^x) of the ground gradient from the horizon to the bottom.")
  125. }
  126. SecondColumnLayout {
  127. SpinBox {
  128. minimumValue: 0
  129. maximumValue: 64
  130. decimals: 3
  131. stepSize: 0.01
  132. sliderIndicatorVisible: true
  133. backendValue: backendValues.groundCurve
  134. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  135. + StudioTheme.Values.actionIndicatorWidth
  136. }
  137. ExpandingSpacer {}
  138. }
  139. }
  140. }
  141. Section {
  142. width: parent.width
  143. caption: qsTr("Sun")
  144. SectionLayout {
  145. PropertyLabel {
  146. text: qsTr("Color")
  147. tooltip: qsTr("Specifies the color at the sun on the skybox.")
  148. }
  149. ColorEditor {
  150. backendValue: backendValues.sunColor
  151. supportGradient: false
  152. }
  153. PropertyLabel {
  154. text: qsTr("Energy")
  155. tooltip: qsTr("Specifies the HDR color intensity of sun on the skybox.")
  156. }
  157. SecondColumnLayout {
  158. SpinBox {
  159. minimumValue: 0
  160. maximumValue: 64
  161. decimals: 3
  162. stepSize: 0.01
  163. sliderIndicatorVisible: true
  164. backendValue: backendValues.sunEnergy
  165. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  166. + StudioTheme.Values.actionIndicatorWidth
  167. }
  168. ExpandingSpacer {}
  169. }
  170. PropertyLabel {
  171. text: qsTr("Fade Start")
  172. tooltip: qsTr("Specifies the angle from the center of the sun to where it starts to fade.")
  173. }
  174. SecondColumnLayout {
  175. SpinBox {
  176. minimumValue: 0
  177. maximumValue: 360
  178. decimals: 1
  179. stepSize: 0.1
  180. sliderIndicatorVisible: true
  181. backendValue: backendValues.sunAngleMin
  182. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  183. + StudioTheme.Values.actionIndicatorWidth
  184. }
  185. ExpandingSpacer {}
  186. }
  187. PropertyLabel {
  188. text: qsTr("Fade End")
  189. tooltip: qsTr("Specifies the angle from the center of the sun to where it fades out completely.")
  190. }
  191. SecondColumnLayout {
  192. SpinBox {
  193. minimumValue: 0
  194. maximumValue: 360
  195. decimals: 1
  196. stepSize: 0.1
  197. sliderIndicatorVisible: true
  198. backendValue: backendValues.sunAngleMax
  199. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  200. + StudioTheme.Values.actionIndicatorWidth
  201. }
  202. ExpandingSpacer {}
  203. }
  204. PropertyLabel {
  205. text: qsTr("Curve")
  206. tooltip: qsTr("Modifies the curve (n^x) of the gradient from the sky color and the sun.")
  207. }
  208. SecondColumnLayout {
  209. SpinBox {
  210. minimumValue: 0
  211. maximumValue: 64
  212. decimals: 3
  213. stepSize: 0.01
  214. sliderIndicatorVisible: true
  215. backendValue: backendValues.sunCurve
  216. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  217. + StudioTheme.Values.actionIndicatorWidth
  218. }
  219. ExpandingSpacer {}
  220. }
  221. PropertyLabel {
  222. text: qsTr("Latitude")
  223. tooltip: qsTr("Specifies the angle between the horizon and the sun position.")
  224. }
  225. SecondColumnLayout {
  226. SpinBox {
  227. minimumValue: -180
  228. maximumValue: 180
  229. decimals: 1
  230. stepSize: 0.1
  231. sliderIndicatorVisible: true
  232. backendValue: backendValues.sunLatitude
  233. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  234. + StudioTheme.Values.actionIndicatorWidth
  235. }
  236. ExpandingSpacer {}
  237. }
  238. PropertyLabel {
  239. text: qsTr("Longitude")
  240. tooltip: qsTr("Specifies the angle between the forward direction and the sun position.")
  241. }
  242. SecondColumnLayout {
  243. SpinBox {
  244. minimumValue: 0
  245. maximumValue: 360
  246. decimals: 1
  247. stepSize: 0.1
  248. sliderIndicatorVisible: true
  249. backendValue: backendValues.sunLongitude
  250. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  251. + StudioTheme.Values.actionIndicatorWidth
  252. }
  253. ExpandingSpacer {}
  254. }
  255. }
  256. }
  257. }