ReflectionProbeSection.qml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. // Copyright (C) 2021 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. Section {
  8. caption: qsTr("Reflection Probe")
  9. SectionLayout {
  10. PropertyLabel {
  11. text: qsTr("Box Size")
  12. tooltip: qsTr("Sets the reflection probe box size.")
  13. }
  14. SecondColumnLayout {
  15. SpinBox {
  16. minimumValue: 0
  17. maximumValue: 9999999
  18. decimals: 2
  19. backendValue: backendValues.boxSize_x
  20. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  21. + StudioTheme.Values.actionIndicatorWidth
  22. }
  23. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  24. ControlLabel {
  25. text: "box size x"
  26. color: StudioTheme.Values.theme3DAxisXColor
  27. }
  28. ExpandingSpacer {}
  29. }
  30. PropertyLabel {}
  31. SecondColumnLayout {
  32. SpinBox {
  33. minimumValue: 0
  34. maximumValue: 9999999
  35. decimals: 2
  36. backendValue: backendValues.boxSize_y
  37. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  38. + StudioTheme.Values.actionIndicatorWidth
  39. }
  40. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  41. ControlLabel {
  42. text: "box size y"
  43. color: StudioTheme.Values.theme3DAxisYColor
  44. }
  45. ExpandingSpacer {}
  46. }
  47. PropertyLabel {}
  48. SecondColumnLayout {
  49. SpinBox {
  50. minimumValue: 0
  51. maximumValue: 9999999
  52. decimals: 2
  53. backendValue: backendValues.boxSize_z
  54. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  55. + StudioTheme.Values.actionIndicatorWidth
  56. }
  57. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  58. ControlLabel {
  59. text: "box size z"
  60. color: StudioTheme.Values.theme3DAxisZColor
  61. }
  62. ExpandingSpacer {}
  63. }
  64. PropertyLabel {
  65. text: qsTr("Box Offset")
  66. tooltip: qsTr("Sets the reflection probe box position relative to the probe position.")
  67. }
  68. SecondColumnLayout {
  69. SpinBox {
  70. minimumValue: -9999999
  71. maximumValue: 9999999
  72. decimals: 2
  73. backendValue: backendValues.boxOffset_x
  74. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  75. + StudioTheme.Values.actionIndicatorWidth
  76. }
  77. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  78. ControlLabel {
  79. text: "box offset x"
  80. color: StudioTheme.Values.theme3DAxisXColor
  81. }
  82. ExpandingSpacer {}
  83. }
  84. PropertyLabel {}
  85. SecondColumnLayout {
  86. SpinBox {
  87. minimumValue: -9999999
  88. maximumValue: 9999999
  89. decimals: 2
  90. backendValue: backendValues.boxOffset_y
  91. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  92. + StudioTheme.Values.actionIndicatorWidth
  93. }
  94. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  95. ControlLabel {
  96. text: "box offset y"
  97. color: StudioTheme.Values.theme3DAxisYColor
  98. }
  99. ExpandingSpacer {}
  100. }
  101. PropertyLabel {}
  102. SecondColumnLayout {
  103. SpinBox {
  104. minimumValue: -9999999
  105. maximumValue: 9999999
  106. decimals: 2
  107. backendValue: backendValues.boxOffset_z
  108. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  109. + StudioTheme.Values.actionIndicatorWidth
  110. }
  111. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  112. ControlLabel {
  113. text: "box offset z"
  114. color: StudioTheme.Values.theme3DAxisZColor
  115. }
  116. ExpandingSpacer {}
  117. }
  118. PropertyLabel {
  119. text: qsTr("Parallax Correction")
  120. tooltip: qsTr("Reflection maps are considered to be at infinite distance by default. This is unsuitable for indoor area as it produces parallax issues.\nSetting this property to true corrects the cubemap by taking the camera position and the box's dimension into account.")
  121. }
  122. SecondColumnLayout {
  123. CheckBox {
  124. text: backendValues.parallaxCorrection.valueToString
  125. backendValue: backendValues.parallaxCorrection
  126. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  127. + StudioTheme.Values.actionIndicatorWidth
  128. }
  129. ExpandingSpacer {}
  130. }
  131. PropertyLabel {
  132. text: qsTr("Debug View")
  133. tooltip: qsTr("Enables rendering a wireframe to visualize the reflection probe box.")
  134. }
  135. SecondColumnLayout {
  136. CheckBox {
  137. text: backendValues.debugView.valueToString
  138. backendValue: backendValues.debugView
  139. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  140. + StudioTheme.Values.actionIndicatorWidth
  141. }
  142. ExpandingSpacer {}
  143. }
  144. PropertyLabel {
  145. text: qsTr("Clear Color")
  146. tooltip: qsTr("Sets the color that will be used to clear the reflection map.")
  147. }
  148. ColorEditor {
  149. backendValue: backendValues.clearColor
  150. supportGradient: false
  151. }
  152. PropertyLabel {
  153. text: qsTr("Reflection Map Quality")
  154. tooltip: qsTr("Sets the quality of the reflection map.")
  155. }
  156. SecondColumnLayout {
  157. ComboBox {
  158. scope: "ReflectionProbe"
  159. model: ["VeryLow", "Low", "Medium", "High", "VeryHigh"]
  160. backendValue: backendValues.quality
  161. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  162. + StudioTheme.Values.actionIndicatorWidth
  163. }
  164. ExpandingSpacer {}
  165. }
  166. PropertyLabel {
  167. text: qsTr("Refresh Mode")
  168. tooltip: qsTr("Sets how often the reflection map will be updated.")
  169. }
  170. SecondColumnLayout {
  171. ComboBox {
  172. scope: "ReflectionProbe"
  173. model: ["FirstFrame", "EveryFrame"]
  174. backendValue: backendValues.refreshMode
  175. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  176. + StudioTheme.Values.actionIndicatorWidth
  177. }
  178. ExpandingSpacer {}
  179. }
  180. PropertyLabel {
  181. text: qsTr("Time Slicing")
  182. tooltip: qsTr("Sets how often the faces of the reflection cube map are updated.")
  183. }
  184. SecondColumnLayout {
  185. ComboBox {
  186. scope: "ReflectionProbe"
  187. model: ["None", "AllFacesAtOnce", "IndividualFaces"]
  188. backendValue: backendValues.timeSlicing
  189. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  190. + StudioTheme.Values.actionIndicatorWidth
  191. }
  192. ExpandingSpacer {}
  193. }
  194. PropertyLabel {
  195. text: qsTr("Override Texture")
  196. tooltip: qsTr("Sets an override texture to use for the reflection map instead of rendering the scene.")
  197. }
  198. SecondColumnLayout {
  199. ItemFilterComboBox {
  200. typeFilter: "QtQuick3D.CubeMapTexture"
  201. backendValue: backendValues.texture
  202. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  203. + StudioTheme.Values.actionIndicatorWidth
  204. }
  205. ExpandingSpacer {}
  206. }
  207. }
  208. }