LightmapperSection.qml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. Section {
  8. caption: qsTr("Lightmapper")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Adaptive Bias")
  13. tooltip: qsTr("Enables additional dynamic biasing based on the surface normal.")
  14. }
  15. SecondColumnLayout {
  16. CheckBox {
  17. text: backendValues.adaptiveBiasEnabled.valueToString
  18. backendValue: backendValues.adaptiveBiasEnabled
  19. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  20. + StudioTheme.Values.actionIndicatorWidth
  21. }
  22. ExpandingSpacer {}
  23. }
  24. PropertyLabel {
  25. text: qsTr("Bias")
  26. tooltip: qsTr("Raycasting bias to avoid self-intersection artifacts.")
  27. }
  28. SecondColumnLayout {
  29. SpinBox {
  30. minimumValue: -9999999
  31. maximumValue: 9999999
  32. decimals: 5
  33. stepSize: 0.001
  34. backendValue: backendValues.bias
  35. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  36. + StudioTheme.Values.actionIndicatorWidth
  37. }
  38. ExpandingSpacer {}
  39. }
  40. PropertyLabel {
  41. text: qsTr("Opacity Threshold")
  42. tooltip: qsTr("Bounces against materials with opacity values below this threshold are ignored when calculating lighting via raytracing.")
  43. }
  44. SecondColumnLayout {
  45. SpinBox {
  46. minimumValue: 0
  47. maximumValue: 1
  48. decimals: 2
  49. stepSize: 0.01
  50. sliderIndicatorVisible: true
  51. backendValue: backendValues.opacityThreshold
  52. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  53. + StudioTheme.Values.actionIndicatorWidth
  54. }
  55. ExpandingSpacer {}
  56. }
  57. PropertyLabel {
  58. text: qsTr("Samples")
  59. tooltip: qsTr("The number of samples per lightmap texel.")
  60. }
  61. SecondColumnLayout {
  62. SpinBox {
  63. minimumValue: 0
  64. maximumValue: 2048
  65. decimals: 0
  66. stepSize: 16
  67. sliderIndicatorVisible: true
  68. backendValue: backendValues.samples
  69. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  70. + StudioTheme.Values.actionIndicatorWidth
  71. }
  72. ExpandingSpacer {}
  73. }
  74. PropertyLabel {
  75. text: qsTr("Indirect Lighting")
  76. tooltip: qsTr("Enables the baking of indirect lighting.")
  77. }
  78. SecondColumnLayout {
  79. CheckBox {
  80. id: indirectLightEnabledCheckBox
  81. text: backendValues.indirectLightEnabled.valueToString
  82. backendValue: backendValues.indirectLightEnabled
  83. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  84. + StudioTheme.Values.actionIndicatorWidth
  85. }
  86. ExpandingSpacer {}
  87. }
  88. PropertyLabel {
  89. visible: indirectLightEnabledCheckBox.checked
  90. text: qsTr("Bounces")
  91. tooltip: qsTr("The maximum number of indirect light bounces per sample.")
  92. }
  93. SecondColumnLayout {
  94. visible: indirectLightEnabledCheckBox.checked
  95. SpinBox {
  96. minimumValue: 1
  97. maximumValue: 16
  98. decimals: 0
  99. stepSize: 1
  100. backendValue: backendValues.bounces
  101. sliderIndicatorVisible: true
  102. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  103. + StudioTheme.Values.actionIndicatorWidth
  104. }
  105. ExpandingSpacer {}
  106. }
  107. PropertyLabel {
  108. visible: indirectLightEnabledCheckBox.checked
  109. text: qsTr("Indirect Light Factor")
  110. tooltip: qsTr("Multiplier for the indirect light amount.")
  111. }
  112. SecondColumnLayout {
  113. visible: indirectLightEnabledCheckBox.checked
  114. SpinBox {
  115. minimumValue: 0
  116. maximumValue: 10
  117. decimals: 2
  118. stepSize: 0.01
  119. backendValue: backendValues.indirectLightFactor
  120. sliderIndicatorVisible: true
  121. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  122. + StudioTheme.Values.actionIndicatorWidth
  123. }
  124. ExpandingSpacer {}
  125. }
  126. PropertyLabel {
  127. visible: indirectLightEnabledCheckBox.checked
  128. text: qsTr("Indirect Workgroup Size")
  129. tooltip: qsTr("The size of the workgroup used for indirect light computation.")
  130. }
  131. SecondColumnLayout {
  132. visible: indirectLightEnabledCheckBox.checked
  133. SpinBox {
  134. minimumValue: 1
  135. maximumValue: 512
  136. decimals: 0
  137. stepSize: 1
  138. backendValue: backendValues.indirectLightWorkgroupSize
  139. sliderIndicatorVisible: true
  140. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  141. + StudioTheme.Values.actionIndicatorWidth
  142. }
  143. ExpandingSpacer {}
  144. }
  145. }
  146. }