ExtendedSceneEnvironmentSection.qml 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879
  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("Extended Scene Environment")
  12. SectionLayout {
  13. id: baseSectionLayout
  14. property bool isColorMode: backgroundModeComboBox.currentIndex === 2
  15. property bool isSkyBoxMode: backgroundModeComboBox.currentIndex === 3
  16. property bool isSkyBoxCubeMapMode: backgroundModeComboBox.currentIndex === 4
  17. PropertyLabel {
  18. text: qsTr("Background Mode")
  19. tooltip: qsTr("Sets if and how the background of the scene should be cleared.")
  20. }
  21. SecondColumnLayout {
  22. ComboBox {
  23. id: backgroundModeComboBox
  24. scope: "SceneEnvironment"
  25. model: ["Transparent", "Unspecified", "Color", "SkyBox", "SkyBoxCubeMap"]
  26. backendValue: backendValues.backgroundMode
  27. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  28. + StudioTheme.Values.actionIndicatorWidth
  29. }
  30. ExpandingSpacer {}
  31. }
  32. PropertyLabel {
  33. visible: baseSectionLayout.isColorMode
  34. text: qsTr("Clear Color")
  35. tooltip: qsTr("Sets which color will be used to clear the viewport when using SceneEnvironment.Color for the backgroundMode property.")
  36. }
  37. ColorEditor {
  38. visible: baseSectionLayout.isColorMode
  39. backendValue: backendValues.clearColor
  40. supportGradient: false
  41. }
  42. PropertyLabel {
  43. visible: baseSectionLayout.isSkyBoxCubeMapMode
  44. text: qsTr("Skybox Cube Map")
  45. tooltip: qsTr("Sets a cubemap to be used as a skybox when the background mode is SkyBoxCubeMap.")
  46. }
  47. SecondColumnLayout {
  48. visible: baseSectionLayout.isSkyBoxCubeMapMode
  49. ItemFilterComboBox {
  50. typeFilter: "QtQuick3D.CubeMapTexture"
  51. backendValue: backendValues.skyBoxCubeMap
  52. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  53. + StudioTheme.Values.actionIndicatorWidth
  54. }
  55. ExpandingSpacer {}
  56. }
  57. PropertyLabel {
  58. visible: baseSectionLayout.isSkyBoxMode || baseSectionLayout.isSkyBoxCubeMapMode
  59. text: qsTr("Skybox Blur")
  60. tooltip: qsTr("Sets how much to blur the skybox when using SceneEnvironment.SkyBox for the backgroundMode property.")
  61. }
  62. SecondColumnLayout {
  63. visible: baseSectionLayout.isSkyBoxMode || baseSectionLayout.isSkyBoxCubeMapMode
  64. SpinBox {
  65. minimumValue: 0
  66. maximumValue: 1
  67. decimals: 2
  68. stepSize: 0.01
  69. sliderIndicatorVisible: true
  70. backendValue: backendValues.skyboxBlurAmount
  71. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  72. + StudioTheme.Values.actionIndicatorWidth
  73. }
  74. ExpandingSpacer {}
  75. }
  76. }
  77. }
  78. Section {
  79. id: antialiasingSection
  80. width: parent.width
  81. caption: qsTr("Antialiasing")
  82. property bool isAntialiasingEnabled: antialiasingModeComboBox.currentIndex !== 0
  83. SectionLayout {
  84. PropertyLabel {
  85. text: qsTr("Antialiasing Mode")
  86. tooltip: qsTr("Sets the antialiasing mode applied to the scene.")
  87. }
  88. SecondColumnLayout {
  89. ComboBox {
  90. id: antialiasingModeComboBox
  91. scope: "SceneEnvironment"
  92. model: ["NoAA", "SSAA", "MSAA", "ProgressiveAA"]
  93. backendValue: backendValues.antialiasingMode
  94. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  95. + StudioTheme.Values.actionIndicatorWidth
  96. }
  97. ExpandingSpacer {}
  98. }
  99. PropertyLabel {
  100. visible: antialiasingSection.isAntialiasingEnabled
  101. text: qsTr("Antialiasing Quality")
  102. tooltip: qsTr("Sets the level of antialiasing applied to the scene.")
  103. }
  104. SecondColumnLayout {
  105. visible: antialiasingSection.isAntialiasingEnabled
  106. ComboBox {
  107. scope: "SceneEnvironment"
  108. model: ["Medium", "High", "VeryHigh"]
  109. backendValue: backendValues.antialiasingQuality
  110. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  111. + StudioTheme.Values.actionIndicatorWidth
  112. }
  113. ExpandingSpacer {}
  114. }
  115. PropertyLabel {
  116. text: qsTr("FXAA")
  117. tooltip: qsTr("Enables fast approximate antialiasing.")
  118. }
  119. SecondColumnLayout {
  120. CheckBox {
  121. text: backendValues.fxaaEnabled.valueToString
  122. backendValue: backendValues.fxaaEnabled
  123. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  124. + StudioTheme.Values.actionIndicatorWidth
  125. }
  126. ExpandingSpacer {}
  127. }
  128. PropertyLabel {
  129. text: qsTr("Specular AA")
  130. tooltip: qsTr("Enables specular antialiasing.")
  131. }
  132. SecondColumnLayout {
  133. CheckBox {
  134. text: backendValues.specularAAEnabled.valueToString
  135. backendValue: backendValues.specularAAEnabled
  136. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  137. + StudioTheme.Values.actionIndicatorWidth
  138. }
  139. ExpandingSpacer {}
  140. }
  141. PropertyLabel {
  142. text: qsTr("Temporal AA")
  143. tooltip: qsTr("Enables temporal antialiasing using camera jittering and frame blending.")
  144. }
  145. SecondColumnLayout {
  146. CheckBox {
  147. id: temporalAAEnabledCheckBox
  148. text: backendValues.temporalAAEnabled.valueToString
  149. backendValue: backendValues.temporalAAEnabled
  150. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  151. + StudioTheme.Values.actionIndicatorWidth
  152. }
  153. ExpandingSpacer {}
  154. }
  155. PropertyLabel {
  156. visible: temporalAAEnabledCheckBox.checked
  157. text: qsTr("Temporal AA Strength")
  158. tooltip: qsTr("Sets the amount of temporal antialiasing applied.")
  159. }
  160. SecondColumnLayout {
  161. visible: temporalAAEnabledCheckBox.checked
  162. SpinBox {
  163. minimumValue: 0.01
  164. maximumValue: 2.0
  165. decimals: 2
  166. stepSize: 0.1
  167. backendValue: backendValues.temporalAAStrength
  168. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  169. + StudioTheme.Values.actionIndicatorWidth
  170. }
  171. ExpandingSpacer {}
  172. }
  173. }
  174. }
  175. Section {
  176. width: parent.width
  177. caption: qsTr("Tone Mapping")
  178. SectionLayout {
  179. PropertyLabel {
  180. text: qsTr("Mode")
  181. tooltip: qsTr("Sets how colors are tonemapped from HDR to LDR before being displayed.")
  182. }
  183. SecondColumnLayout {
  184. ComboBox {
  185. scope: "SceneEnvironment"
  186. model: ["TonemapModeNone", "TonemapModeLinear", "TonemapModeAces", "TonemapModeHejlDawson", "TonemapModeFilmic"]
  187. backendValue: backendValues.tonemapMode
  188. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  189. + StudioTheme.Values.actionIndicatorWidth
  190. }
  191. ExpandingSpacer {}
  192. }
  193. PropertyLabel {
  194. text: qsTr("Exposure")
  195. tooltip: qsTr("Sets the exposure of the scene.")
  196. }
  197. SecondColumnLayout {
  198. SpinBox {
  199. minimumValue: 0
  200. maximumValue: 10
  201. decimals: 2
  202. stepSize: 0.01
  203. sliderIndicatorVisible: true
  204. backendValue: backendValues.exposure
  205. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  206. + StudioTheme.Values.actionIndicatorWidth
  207. }
  208. ExpandingSpacer {}
  209. }
  210. PropertyLabel {
  211. text: qsTr("White Point")
  212. tooltip: qsTr("Sets the white point of the scene.")
  213. }
  214. SecondColumnLayout {
  215. SpinBox {
  216. minimumValue: 0
  217. maximumValue: 1
  218. decimals: 2
  219. stepSize: 0.01
  220. sliderIndicatorVisible: true
  221. backendValue: backendValues.whitePoint
  222. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  223. + StudioTheme.Values.actionIndicatorWidth
  224. }
  225. ExpandingSpacer {}
  226. }
  227. PropertyLabel {
  228. text: qsTr("Sharpening")
  229. tooltip: qsTr("Set the sharpening amount applied to the scene.")
  230. }
  231. SecondColumnLayout {
  232. SpinBox {
  233. minimumValue: 0
  234. maximumValue: 1
  235. decimals: 2
  236. stepSize: 0.01
  237. sliderIndicatorVisible: true
  238. backendValue: backendValues.sharpnessAmount
  239. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  240. + StudioTheme.Values.actionIndicatorWidth
  241. }
  242. ExpandingSpacer {}
  243. }
  244. PropertyLabel {
  245. text: qsTr("Dithering")
  246. tooltip: qsTr("Enables dithering to reduce banding artifacts.")
  247. }
  248. SecondColumnLayout {
  249. CheckBox {
  250. text: backendValues.ditheringEnabled.valueToString
  251. backendValue: backendValues.ditheringEnabled
  252. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  253. + StudioTheme.Values.actionIndicatorWidth
  254. }
  255. ExpandingSpacer {}
  256. }
  257. }
  258. }
  259. Section {
  260. width: parent.width
  261. caption: qsTr("Color Adjustments")
  262. SectionLayout {
  263. PropertyLabel {
  264. text: qsTr("Enabled")
  265. tooltip: qsTr("Enables color adjustments")
  266. }
  267. SecondColumnLayout {
  268. CheckBox {
  269. id: adjustmentsEnabledCheckBox
  270. text: backendValues.colorAdjustmentsEnabled.valueToString
  271. backendValue: backendValues.colorAdjustmentsEnabled
  272. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  273. + StudioTheme.Values.actionIndicatorWidth
  274. }
  275. ExpandingSpacer {}
  276. }
  277. PropertyLabel {
  278. visible: adjustmentsEnabledCheckBox.checked
  279. text: qsTr("Brightness")
  280. tooltip: qsTr("Adjusts the brightness of the scene.")
  281. }
  282. SecondColumnLayout {
  283. visible: adjustmentsEnabledCheckBox.checked
  284. SpinBox {
  285. minimumValue: 0.01
  286. maximumValue: 8.0
  287. decimals: 2
  288. stepSize: 0.01
  289. sliderIndicatorVisible: true
  290. backendValue: backendValues.adjustmentBrightness
  291. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  292. + StudioTheme.Values.actionIndicatorWidth
  293. }
  294. ExpandingSpacer {}
  295. }
  296. PropertyLabel {
  297. visible: adjustmentsEnabledCheckBox.checked
  298. text: qsTr("Contrast")
  299. tooltip: qsTr("Adjusts the contrast of the scene.")
  300. }
  301. SecondColumnLayout {
  302. visible: adjustmentsEnabledCheckBox.checked
  303. SpinBox {
  304. minimumValue: 0.01
  305. maximumValue: 8.0
  306. decimals: 2
  307. stepSize: 0.01
  308. sliderIndicatorVisible: true
  309. backendValue: backendValues.adjustmentContrast
  310. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  311. + StudioTheme.Values.actionIndicatorWidth
  312. }
  313. ExpandingSpacer {}
  314. }
  315. PropertyLabel {
  316. visible: adjustmentsEnabledCheckBox.checked
  317. text: qsTr("Saturation")
  318. tooltip: qsTr("Adjusts the saturation of the scene.")
  319. }
  320. SecondColumnLayout {
  321. visible: adjustmentsEnabledCheckBox.checked
  322. SpinBox {
  323. minimumValue: 0.01
  324. maximumValue: 8.0
  325. decimals: 2
  326. stepSize: 0.01
  327. sliderIndicatorVisible: true
  328. backendValue: backendValues.adjustmentSaturation
  329. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  330. + StudioTheme.Values.actionIndicatorWidth
  331. }
  332. ExpandingSpacer {}
  333. }
  334. }
  335. }
  336. Section {
  337. width: parent.width
  338. caption: qsTr("Color Grading")
  339. SectionLayout {
  340. PropertyLabel {
  341. text: qsTr("Enabled")
  342. tooltip: qsTr("Enables color grading via look up table (LUT) textures.")
  343. }
  344. SecondColumnLayout {
  345. CheckBox {
  346. id: colorGradingEnabledCheckBox
  347. text: backendValues.lutEnabled.valueToString
  348. backendValue: backendValues.lutEnabled
  349. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  350. + StudioTheme.Values.actionIndicatorWidth
  351. }
  352. ExpandingSpacer {}
  353. }
  354. PropertyLabel {
  355. visible: colorGradingEnabledCheckBox.checked
  356. text: qsTr("Size")
  357. tooltip: qsTr("Sets the size of the LUT texture. The texture should have the dimensions: width=(size * size), height=(size).")
  358. }
  359. SecondColumnLayout {
  360. visible: colorGradingEnabledCheckBox.checked
  361. SpinBox {
  362. minimumValue: 1
  363. maximumValue: 64
  364. decimals: 0
  365. stepSize: 1
  366. sliderIndicatorVisible: true
  367. backendValue: backendValues.skyboxBlurAmount
  368. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  369. + StudioTheme.Values.actionIndicatorWidth
  370. }
  371. ExpandingSpacer {}
  372. }
  373. PropertyLabel {
  374. visible: colorGradingEnabledCheckBox.checked
  375. text: qsTr("Texture")
  376. tooltip: qsTr("Sets the source of the LUT texture.")
  377. }
  378. SecondColumnLayout {
  379. visible: colorGradingEnabledCheckBox.checked
  380. ItemFilterComboBox {
  381. typeFilter: "QtQuick3D.Texture"
  382. backendValue: backendValues.lutTexture
  383. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  384. + StudioTheme.Values.actionIndicatorWidth
  385. }
  386. ExpandingSpacer {}
  387. }
  388. PropertyLabel {
  389. visible: colorGradingEnabledCheckBox.checked
  390. text: qsTr("Alpha Mix")
  391. tooltip: qsTr("Sets the amount of color grading to mix with the scene.")
  392. }
  393. SecondColumnLayout {
  394. visible: colorGradingEnabledCheckBox.checked
  395. SpinBox {
  396. minimumValue: 0
  397. maximumValue: 1
  398. sliderIndicatorVisible: true
  399. decimals: 2
  400. stepSize: 0.01
  401. backendValue: backendValues.lutFilterAlpha
  402. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  403. + StudioTheme.Values.actionIndicatorWidth
  404. }
  405. ExpandingSpacer {}
  406. }
  407. }
  408. }
  409. Section {
  410. width: parent.width
  411. caption: qsTr("Ambient Occlusion (SSAO)")
  412. SectionLayout {
  413. PropertyLabel {
  414. text: qsTr("Enabled")
  415. tooltip: qsTr("Enables ambient occlusion.")
  416. }
  417. SecondColumnLayout {
  418. CheckBox {
  419. id: ambientOcclusionEnabledCheckBox
  420. text: backendValues.aoEnabled.valueToString
  421. backendValue: backendValues.aoEnabled
  422. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  423. + StudioTheme.Values.actionIndicatorWidth
  424. }
  425. ExpandingSpacer {}
  426. }
  427. PropertyLabel {
  428. visible: ambientOcclusionEnabledCheckBox.checked
  429. text: qsTr("Strength")
  430. tooltip: qsTr("Sets the amount of ambient occulusion applied.")
  431. }
  432. SecondColumnLayout {
  433. visible: ambientOcclusionEnabledCheckBox.checked
  434. SpinBox {
  435. minimumValue: 0
  436. maximumValue: 100
  437. sliderIndicatorVisible: true
  438. decimals: 0
  439. backendValue: backendValues.aoStrength
  440. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  441. + StudioTheme.Values.actionIndicatorWidth
  442. }
  443. ExpandingSpacer {}
  444. }
  445. PropertyLabel {
  446. visible: ambientOcclusionEnabledCheckBox.checked
  447. text: qsTr("Distance")
  448. tooltip: qsTr("Sets roughly how far ambient occlusion shadows spread away from objects.")
  449. }
  450. SecondColumnLayout {
  451. visible: ambientOcclusionEnabledCheckBox.checked
  452. SpinBox {
  453. minimumValue: 0
  454. maximumValue: 9999999
  455. decimals: 2
  456. backendValue: backendValues.aoDistance
  457. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  458. + StudioTheme.Values.actionIndicatorWidth
  459. }
  460. ExpandingSpacer {}
  461. }
  462. PropertyLabel {
  463. visible: ambientOcclusionEnabledCheckBox.checked
  464. text: qsTr("Softness")
  465. tooltip: qsTr("Sets how smooth the edges of the ambient occlusion shading are.")
  466. }
  467. SecondColumnLayout {
  468. visible: ambientOcclusionEnabledCheckBox.checked
  469. SpinBox {
  470. minimumValue: 0
  471. maximumValue: 50
  472. sliderIndicatorVisible: true
  473. decimals: 2
  474. backendValue: backendValues.aoSoftness
  475. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  476. + StudioTheme.Values.actionIndicatorWidth
  477. }
  478. ExpandingSpacer {}
  479. }
  480. PropertyLabel {
  481. visible: ambientOcclusionEnabledCheckBox.checked
  482. text: qsTr("Sample Rate")
  483. tooltip: qsTr("Sets ambient occlusion quality (more shades of gray) at the expense of performance.")
  484. }
  485. SecondColumnLayout {
  486. visible: ambientOcclusionEnabledCheckBox.checked
  487. SpinBox {
  488. minimumValue: 2
  489. maximumValue: 4
  490. decimals: 0
  491. stepSize: 1
  492. sliderIndicatorVisible: true
  493. backendValue: backendValues.aoSampleRate
  494. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  495. + StudioTheme.Values.actionIndicatorWidth
  496. }
  497. ExpandingSpacer {}
  498. }
  499. PropertyLabel {
  500. visible: ambientOcclusionEnabledCheckBox.checked
  501. text: qsTr("Bias")
  502. tooltip: qsTr("Sets a cutoff distance preventing objects from exhibiting ambient occlusion at close distances.")
  503. }
  504. SecondColumnLayout {
  505. visible: ambientOcclusionEnabledCheckBox.checked
  506. SpinBox {
  507. minimumValue: -1.0
  508. maximumValue: 1.0
  509. decimals: 2
  510. backendValue: backendValues.aoBias
  511. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  512. + StudioTheme.Values.actionIndicatorWidth
  513. }
  514. ExpandingSpacer {}
  515. }
  516. PropertyLabel {
  517. visible: ambientOcclusionEnabledCheckBox.checked
  518. text: qsTr("Dither")
  519. tooltip: qsTr("Enables scattering the edges of the ambient occlusion shadow bands to improve smoothness.")
  520. }
  521. SecondColumnLayout {
  522. visible: ambientOcclusionEnabledCheckBox.checked
  523. CheckBox {
  524. id: aoDitherCheckBox
  525. text: backendValues.aoDither.valueToString
  526. backendValue: backendValues.aoDither
  527. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  528. + StudioTheme.Values.actionIndicatorWidth
  529. }
  530. ExpandingSpacer {}
  531. }
  532. }
  533. }
  534. Section {
  535. width: parent.width
  536. caption: qsTr("Depth of Field")
  537. SectionLayout {
  538. PropertyLabel {
  539. text: qsTr("Enabled")
  540. tooltip: qsTr("Enables Depth of Field effect.")
  541. }
  542. SecondColumnLayout {
  543. CheckBox {
  544. id: depthOfFieldEnabledCheckBox
  545. text: backendValues.depthOfFieldEnabled.valueToString
  546. backendValue: backendValues.depthOfFieldEnabled
  547. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  548. + StudioTheme.Values.actionIndicatorWidth
  549. }
  550. ExpandingSpacer {}
  551. }
  552. PropertyLabel {
  553. visible: depthOfFieldEnabledCheckBox.checked
  554. text: qsTr("Focus Distance")
  555. tooltip: qsTr("Sets the distance from the camera at which objects are in focus.")
  556. }
  557. SecondColumnLayout {
  558. visible: depthOfFieldEnabledCheckBox.checked
  559. SpinBox {
  560. minimumValue: 0
  561. maximumValue: 9999999
  562. decimals: 2
  563. backendValue: backendValues.depthOfFieldFocusDistance
  564. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  565. + StudioTheme.Values.actionIndicatorWidth
  566. }
  567. ExpandingSpacer {}
  568. }
  569. PropertyLabel {
  570. visible: depthOfFieldEnabledCheckBox.checked
  571. text: qsTr("Focus Range")
  572. tooltip: qsTr("Sets the range of distances from the focus distance that are in focus.")
  573. }
  574. SecondColumnLayout {
  575. visible: depthOfFieldEnabledCheckBox.checked
  576. SpinBox {
  577. minimumValue: 0
  578. maximumValue: 9999999
  579. decimals: 2
  580. backendValue: backendValues.depthOfFieldFocusRange
  581. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  582. + StudioTheme.Values.actionIndicatorWidth
  583. }
  584. ExpandingSpacer {}
  585. }
  586. PropertyLabel {
  587. visible: depthOfFieldEnabledCheckBox.checked
  588. text: qsTr("Blur Amount")
  589. tooltip: qsTr("Sets the amount of blur applied to objects outside the focus range.")
  590. }
  591. SecondColumnLayout {
  592. visible: depthOfFieldEnabledCheckBox.checked
  593. SpinBox {
  594. minimumValue: 0
  595. maximumValue: 25
  596. decimals: 2
  597. stepSize: 0.01
  598. backendValue: backendValues.depthOfFieldBlurAmount
  599. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  600. + StudioTheme.Values.actionIndicatorWidth
  601. }
  602. ExpandingSpacer {}
  603. }
  604. }
  605. }
  606. Section {
  607. width: parent.width
  608. caption: qsTr("Glow")
  609. SectionLayout {
  610. PropertyLabel {
  611. text: qsTr("Enabled")
  612. tooltip: qsTr("Enables the Glow/Bloom Effect")
  613. }
  614. SecondColumnLayout {
  615. CheckBox {
  616. id: glowEnabledCheckBox
  617. text: backendValues.glowEnabled.valueToString
  618. backendValue: backendValues.glowEnabled
  619. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  620. + StudioTheme.Values.actionIndicatorWidth
  621. }
  622. ExpandingSpacer {}
  623. }
  624. PropertyLabel {
  625. visible: glowEnabledCheckBox.checked
  626. text: qsTr("High Quality")
  627. tooltip: qsTr("Enables high quality mode for the glow effect.")
  628. }
  629. SecondColumnLayout {
  630. visible: glowEnabledCheckBox.checked
  631. CheckBox {
  632. text: backendValues.glowQualityHigh.valueToString
  633. backendValue: backendValues.glowQualityHigh
  634. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  635. + StudioTheme.Values.actionIndicatorWidth
  636. }
  637. ExpandingSpacer {}
  638. }
  639. PropertyLabel {
  640. visible: glowEnabledCheckBox.checked
  641. text: qsTr("Bicubic Upsampling")
  642. tooltip: qsTr("Reduces the aliasing artifacts and boxing in the glow effect.")
  643. }
  644. SecondColumnLayout {
  645. visible: glowEnabledCheckBox.checked
  646. CheckBox {
  647. text: backendValues.glowUseBicubicUpscale.valueToString
  648. backendValue: backendValues.glowUseBicubicUpscale
  649. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  650. + StudioTheme.Values.actionIndicatorWidth
  651. }
  652. ExpandingSpacer {}
  653. }
  654. PropertyLabel {
  655. visible: glowEnabledCheckBox.checked
  656. text: qsTr("Strength")
  657. tooltip: qsTr("Sets the strength of the glow effect.")
  658. }
  659. SecondColumnLayout {
  660. visible: glowEnabledCheckBox.checked
  661. SpinBox {
  662. minimumValue: 0
  663. maximumValue: 2
  664. decimals: 2
  665. stepSize: 0.01
  666. sliderIndicatorVisible: true
  667. backendValue: backendValues.glowStrength
  668. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  669. + StudioTheme.Values.actionIndicatorWidth
  670. }
  671. ExpandingSpacer {}
  672. }
  673. PropertyLabel {
  674. visible: glowEnabledCheckBox.checked
  675. text: qsTr("Intensity")
  676. tooltip: qsTr("Sets the Intensity of the glow effect.")
  677. }
  678. SecondColumnLayout {
  679. visible: glowEnabledCheckBox.checked
  680. SpinBox {
  681. minimumValue: 0
  682. maximumValue: 2
  683. decimals: 2
  684. stepSize: 0.01
  685. sliderIndicatorVisible: true
  686. backendValue: backendValues.glowIntensity
  687. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  688. + StudioTheme.Values.actionIndicatorWidth
  689. }
  690. ExpandingSpacer {}
  691. }
  692. PropertyLabel {
  693. visible: glowEnabledCheckBox.checked
  694. text: qsTr("Bloom")
  695. tooltip: qsTr("Sets the amount of bloom applied to the glow effect.")
  696. }
  697. SecondColumnLayout {
  698. visible: glowEnabledCheckBox.checked
  699. SpinBox {
  700. minimumValue: 0
  701. maximumValue: 1
  702. decimals: 2
  703. stepSize: 0.01
  704. sliderIndicatorVisible: true
  705. backendValue: backendValues.glowBloom
  706. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  707. + StudioTheme.Values.actionIndicatorWidth
  708. }
  709. ExpandingSpacer {}
  710. }
  711. PropertyLabel {
  712. visible: glowEnabledCheckBox.checked
  713. text: qsTr("Lower Threshold")
  714. tooltip: qsTr("Sets the minimum brightness of the HDR glow.")
  715. }
  716. SecondColumnLayout {
  717. visible: glowEnabledCheckBox.checked
  718. SpinBox {
  719. minimumValue: 0
  720. maximumValue: 4
  721. decimals: 2
  722. stepSize: 0.01
  723. sliderIndicatorVisible: true
  724. backendValue: backendValues.glowHDRMinimumValue
  725. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  726. + StudioTheme.Values.actionIndicatorWidth
  727. }
  728. ExpandingSpacer {}
  729. }
  730. PropertyLabel {
  731. visible: glowEnabledCheckBox.checked
  732. text: qsTr("Upper Threshold")
  733. tooltip: qsTr("Sets the maximum brightness of the HDR glow.")
  734. }
  735. SecondColumnLayout {
  736. visible: glowEnabledCheckBox.checked
  737. SpinBox {
  738. minimumValue: 0
  739. maximumValue: 256
  740. decimals: 2
  741. stepSize: 0.01
  742. sliderIndicatorVisible: true
  743. backendValue: backendValues.glowHDRMaximumValue
  744. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  745. + StudioTheme.Values.actionIndicatorWidth
  746. }
  747. ExpandingSpacer {}
  748. }
  749. PropertyLabel {
  750. visible: glowEnabledCheckBox.checked
  751. text: qsTr("HDR Scale")
  752. tooltip: qsTr("Sets the bleed scale of the HDR glow.")
  753. }
  754. SecondColumnLayout {
  755. visible: glowEnabledCheckBox.checked
  756. SpinBox {
  757. minimumValue: 0
  758. maximumValue: 8
  759. decimals: 2
  760. stepSize: 0.01
  761. sliderIndicatorVisible: true
  762. backendValue: backendValues.glowHDRScale
  763. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  764. + StudioTheme.Values.actionIndicatorWidth
  765. }
  766. ExpandingSpacer {}
  767. }
  768. PropertyLabel {
  769. visible: glowEnabledCheckBox.checked
  770. text: qsTr("Blend Mode")
  771. tooltip: qsTr("Sets the blending mode for the glow effect.")
  772. }
  773. SecondColumnLayout {
  774. visible: glowEnabledCheckBox.checked
  775. ComboBox {
  776. scope: "ExtendedSceneEnvironment.GlowBlendMode"
  777. model: ["Additive", "Screen", "SoftLight", "Replace"]
  778. backendValue: backendValues.glowBlendMode
  779. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  780. + StudioTheme.Values.actionIndicatorWidth
  781. }
  782. ExpandingSpacer {}
  783. }
  784. PropertyLabel {
  785. visible: glowEnabledCheckBox.checked
  786. text: qsTr("Blur Levels")
  787. tooltip: qsTr("Sets which of the blur passes get applied to the glow effect.")
  788. }
  789. SecondColumnLayout {
  790. visible: glowEnabledCheckBox.checked
  791. // ### This isn't perfect, but it's the best we can do for now
  792. ActionIndicator {
  793. id: glowLevelController
  794. icon.color: extFuncLogic.color
  795. icon.text: extFuncLogic.glyph
  796. onClicked: extFuncLogic.show()
  797. forceVisible: extFuncLogic.menuVisible
  798. visible: true
  799. property var enableLevel1: { "value": false, "isInModel": false}
  800. property var enableLevel2: { "value": false, "isInModel": false}
  801. property var enableLevel3: { "value": false, "isInModel": false}
  802. property var enableLevel4: { "value": false, "isInModel": false}
  803. property var enableLevel5: { "value": false, "isInModel": false}
  804. property var enableLevel6: { "value": false, "isInModel": false}
  805. property var enableLevel7: { "value": false, "isInModel": false}
  806. property variant backendValue: backendValues.glowLevel
  807. property variant valueFromBackend: backendValue === undefined ? 0 : backendValue.value
  808. property bool blockLevels: false
  809. onBackendValueChanged: evaluateLevels()
  810. onValueFromBackendChanged: evaluateLevels()
  811. Connections {
  812. target: modelNodeBackend
  813. function onSelectionChanged() {
  814. evaluateLevels()
  815. }
  816. }
  817. Component.onCompleted: evaluateLevels()
  818. function evaluateLevels() {
  819. blockLevels = true
  820. enableLevel1 = { "value": valueFromBackend & 1, "isInModel": false}
  821. enableLevel2 = { "value": valueFromBackend & 2, "isInModel": false}
  822. enableLevel3 = { "value": valueFromBackend & 4, "isInModel": false}
  823. enableLevel4 = { "value": valueFromBackend & 8, "isInModel": false}
  824. enableLevel5 = { "value": valueFromBackend & 16, "isInModel": false}
  825. enableLevel6 = { "value": valueFromBackend & 32, "isInModel": false}
  826. enableLevel7 = { "value": valueFromBackend & 64, "isInModel": false}
  827. blockLevels = false
  828. }
  829. function composeExpressionString() {
  830. if (blockLevels)
  831. return
  832. let expressionStr = "";
  833. if (enableLevel1.value || enableLevel2.value || enableLevel3.value || enableLevel4.value
  834. || enableLevel5.value || enableLevel6.value || enableLevel7.value) {
  835. if (enableLevel1.value)
  836. expressionStr += " | ExtendedSceneEnvironment.GlowLevel.One";
  837. if (enableLevel2.value)
  838. expressionStr += " | ExtendedSceneEnvironment.GlowLevel.Two";
  839. if (enableLevel3.value)
  840. expressionStr += " | ExtendedSceneEnvironment.GlowLevel.Three";
  841. if (enableLevel4.value)
  842. expressionStr += " | ExtendedSceneEnvironment.GlowLevel.Four";
  843. if (enableLevel5.value)
  844. expressionStr += " | ExtendedSceneEnvironment.GlowLevel.Five";
  845. if (enableLevel6.value)
  846. expressionStr += " | ExtendedSceneEnvironment.GlowLevel.Six";
  847. if (enableLevel7.value)
  848. expressionStr += " | ExtendedSceneEnvironment.GlowLevel.Seven";
  849. expressionStr = expressionStr.substring(3);
  850. backendValue.expression = expressionStr
  851. } else {
  852. expressionStr = "0";
  853. backendValue.expression = expressionStr
  854. }
  855. }
  856. ExtendedFunctionLogic {
  857. id: extFuncLogic
  858. backendValue: backendValues.glowLevel
  859. onReseted: {
  860. glowLevelController.enableLevel1 = { "value": true, "isInModel": false}
  861. glowLevelController.enableLevel2 = { "value": false, "isInModel": false}
  862. glowLevelController.enableLevel3 = { "value": false, "isInModel": false}
  863. glowLevelController.enableLevel4 = { "value": false, "isInModel": false}
  864. glowLevelController.enableLevel5 = { "value": false, "isInModel": false}
  865. glowLevelController.enableLevel6 = { "value": false, "isInModel": false}
  866. glowLevelController.enableLevel7 = { "value": false, "isInModel": false}
  867. glowLevelController.evaluateLevels()
  868. }
  869. }
  870. }
  871. }
  872. PropertyLabel {
  873. // spacer
  874. visible: glowEnabledCheckBox.checked
  875. }
  876. SecondColumnLayout {
  877. visible: glowEnabledCheckBox.checked
  878. Item {
  879. // spacer for the always hiden action indicator
  880. width: StudioTheme.Values.actionIndicatorWidth
  881. }
  882. CheckBox {
  883. text: qsTr("Level 1")
  884. backendValue: glowLevelController.enableLevel1
  885. actionIndicatorVisible: false
  886. onCheckedChanged: glowLevelController.composeExpressionString()
  887. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  888. }
  889. ExpandingSpacer {}
  890. }
  891. PropertyLabel {
  892. // spacer
  893. visible: glowEnabledCheckBox.checked
  894. }
  895. SecondColumnLayout {
  896. visible: glowEnabledCheckBox.checked
  897. Item {
  898. // spacer for the always hiden action indicator
  899. width: StudioTheme.Values.actionIndicatorWidth
  900. }
  901. CheckBox {
  902. text: qsTr("Level 2")
  903. backendValue: glowLevelController.enableLevel2
  904. actionIndicatorVisible: false
  905. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  906. onCheckedChanged: glowLevelController.composeExpressionString()
  907. }
  908. ExpandingSpacer {}
  909. }
  910. PropertyLabel {
  911. // spacer
  912. visible: glowEnabledCheckBox.checked
  913. }
  914. SecondColumnLayout {
  915. visible: glowEnabledCheckBox.checked
  916. Item {
  917. // spacer for the always hiden action indicator
  918. width: StudioTheme.Values.actionIndicatorWidth
  919. }
  920. CheckBox {
  921. text: qsTr("Level 3")
  922. backendValue: glowLevelController.enableLevel3
  923. actionIndicatorVisible: false
  924. onCheckedChanged: glowLevelController.composeExpressionString()
  925. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  926. }
  927. ExpandingSpacer {}
  928. }
  929. PropertyLabel {
  930. // spacer
  931. visible: glowEnabledCheckBox.checked
  932. }
  933. SecondColumnLayout {
  934. visible: glowEnabledCheckBox.checked
  935. Item {
  936. // spacer for the always hiden action indicator
  937. width: StudioTheme.Values.actionIndicatorWidth
  938. }
  939. CheckBox {
  940. text: qsTr("Level 4")
  941. backendValue: glowLevelController.enableLevel4
  942. actionIndicatorVisible: false
  943. onCheckedChanged: glowLevelController.composeExpressionString()
  944. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  945. + StudioTheme.Values.actionIndicatorWidth
  946. }
  947. ExpandingSpacer {}
  948. }
  949. PropertyLabel {
  950. // spacer
  951. visible: glowEnabledCheckBox.checked
  952. }
  953. SecondColumnLayout {
  954. visible: glowEnabledCheckBox.checked
  955. Item {
  956. // spacer for the always hiden action indicator
  957. width: StudioTheme.Values.actionIndicatorWidth
  958. }
  959. CheckBox {
  960. text: qsTr("Level 5")
  961. backendValue: glowLevelController.enableLevel5
  962. actionIndicatorVisible: false
  963. onCheckedChanged: glowLevelController.composeExpressionString()
  964. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  965. + StudioTheme.Values.actionIndicatorWidth
  966. }
  967. ExpandingSpacer {}
  968. }
  969. PropertyLabel {
  970. // spacer
  971. visible: glowEnabledCheckBox.checked
  972. }
  973. SecondColumnLayout {
  974. visible: glowEnabledCheckBox.checked
  975. Item {
  976. // spacer for the always hiden action indicator
  977. width: StudioTheme.Values.actionIndicatorWidth
  978. }
  979. CheckBox {
  980. text: qsTr("Level 6")
  981. backendValue: glowLevelController.enableLevel6
  982. actionIndicatorVisible: false
  983. onCheckedChanged: glowLevelController.composeExpressionString()
  984. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  985. + StudioTheme.Values.actionIndicatorWidth
  986. }
  987. ExpandingSpacer {}
  988. }
  989. PropertyLabel {
  990. // spacer
  991. visible: glowEnabledCheckBox.checked
  992. }
  993. SecondColumnLayout {
  994. visible: glowEnabledCheckBox.checked
  995. Item {
  996. // spacer for the always hiden action indicator
  997. width: StudioTheme.Values.actionIndicatorWidth
  998. }
  999. CheckBox {
  1000. text: qsTr("Level 7")
  1001. backendValue: glowLevelController.enableLevel7
  1002. actionIndicatorVisible: false
  1003. onCheckedChanged: glowLevelController.composeExpressionString()
  1004. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  1005. + StudioTheme.Values.actionIndicatorWidth
  1006. }
  1007. ExpandingSpacer {}
  1008. }
  1009. }
  1010. }
  1011. Section {
  1012. width: parent.width
  1013. caption: qsTr("Vignette")
  1014. SectionLayout {
  1015. PropertyLabel {
  1016. text: qsTr("Enabled")
  1017. tooltip: qsTr("Enables the vignette effect.")
  1018. }
  1019. SecondColumnLayout {
  1020. CheckBox {
  1021. id: vignetteEnabledCheckBox
  1022. text: backendValues.vignetteEnabled.valueToString
  1023. backendValue: backendValues.vignetteEnabled
  1024. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1025. + StudioTheme.Values.actionIndicatorWidth
  1026. }
  1027. ExpandingSpacer {}
  1028. }
  1029. PropertyLabel {
  1030. visible: vignetteEnabledCheckBox.checked
  1031. text: qsTr("Color")
  1032. tooltip: qsTr("Sets the color of the vignette effect.")
  1033. }
  1034. ColorEditor {
  1035. visible: vignetteEnabledCheckBox.checked
  1036. backendValue: backendValues.vignetteColor
  1037. supportGradient: false
  1038. }
  1039. PropertyLabel {
  1040. visible: vignetteEnabledCheckBox.checked
  1041. text: qsTr("Strength")
  1042. tooltip: qsTr("Sets the strength of the vignette effect.")
  1043. }
  1044. SecondColumnLayout {
  1045. visible: vignetteEnabledCheckBox.checked
  1046. SpinBox {
  1047. minimumValue: 0.01
  1048. maximumValue: 15
  1049. decimals: 2
  1050. stepSize: 0.01
  1051. sliderIndicatorVisible: true
  1052. backendValue: backendValues.vignetteStrength
  1053. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1054. + StudioTheme.Values.actionIndicatorWidth
  1055. }
  1056. ExpandingSpacer {}
  1057. }
  1058. PropertyLabel {
  1059. visible: vignetteEnabledCheckBox.checked
  1060. text: qsTr("Radius")
  1061. tooltip: qsTr("Sets the radius of the vignette effect.")
  1062. }
  1063. SecondColumnLayout {
  1064. visible: vignetteEnabledCheckBox.checked
  1065. SpinBox {
  1066. minimumValue: 0
  1067. maximumValue: 5
  1068. decimals: 2
  1069. stepSize: 0.01
  1070. sliderIndicatorVisible: true
  1071. backendValue: backendValues.vignetteRadius
  1072. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1073. + StudioTheme.Values.actionIndicatorWidth
  1074. }
  1075. ExpandingSpacer {}
  1076. }
  1077. }
  1078. }
  1079. Section {
  1080. width: parent.width
  1081. caption: qsTr("Lens Flare")
  1082. SectionLayout {
  1083. PropertyLabel {
  1084. text: qsTr("Enabled")
  1085. tooltip: qsTr("Enables the Lens Flare effect.")
  1086. }
  1087. SecondColumnLayout {
  1088. CheckBox {
  1089. id: lensFlareEnabledCheckBox
  1090. text: backendValues.lensFlareEnabled.valueToString
  1091. backendValue: backendValues.lensFlareEnabled
  1092. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1093. + StudioTheme.Values.actionIndicatorWidth
  1094. }
  1095. ExpandingSpacer {}
  1096. }
  1097. PropertyLabel {
  1098. visible: lensFlareEnabledCheckBox.checked
  1099. text: qsTr("Bloom Scale")
  1100. tooltip: qsTr("Sets the scale of the lens flare bloom effect.")
  1101. }
  1102. SecondColumnLayout {
  1103. visible: lensFlareEnabledCheckBox.checked
  1104. SpinBox {
  1105. minimumValue: 0
  1106. maximumValue: 20
  1107. decimals: 2
  1108. stepSize: 0.01
  1109. sliderIndicatorVisible: true
  1110. backendValue: backendValues.lensFlareBloomScale
  1111. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1112. + StudioTheme.Values.actionIndicatorWidth
  1113. }
  1114. ExpandingSpacer {}
  1115. }
  1116. PropertyLabel {
  1117. visible: lensFlareEnabledCheckBox.checked
  1118. text: qsTr("Bloom Bias")
  1119. tooltip: qsTr("Sets the level at which the lens flare bloom starts.")
  1120. }
  1121. SecondColumnLayout {
  1122. visible: lensFlareEnabledCheckBox.checked
  1123. SpinBox {
  1124. minimumValue: 0
  1125. maximumValue: 10
  1126. decimals: 2
  1127. stepSize: 0.01
  1128. sliderIndicatorVisible: true
  1129. backendValue: backendValues.lensFlareBloomBias
  1130. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1131. + StudioTheme.Values.actionIndicatorWidth
  1132. }
  1133. ExpandingSpacer {}
  1134. }
  1135. PropertyLabel {
  1136. visible: lensFlareEnabledCheckBox.checked
  1137. text: qsTr("Ghost Dispersal")
  1138. tooltip: qsTr("Sets the distance between the lens flare ghosts.")
  1139. }
  1140. SecondColumnLayout {
  1141. visible: lensFlareEnabledCheckBox.checked
  1142. SpinBox {
  1143. minimumValue: 0.001
  1144. maximumValue: 1
  1145. decimals: 3
  1146. stepSize: 0.001
  1147. sliderIndicatorVisible: true
  1148. backendValue: backendValues.lensFlareGhostDispersal
  1149. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1150. + StudioTheme.Values.actionIndicatorWidth
  1151. }
  1152. ExpandingSpacer {}
  1153. }
  1154. PropertyLabel {
  1155. visible: lensFlareEnabledCheckBox.checked
  1156. text: qsTr("Ghost Count")
  1157. tooltip: qsTr("Sets the amount of lens flare ghosts.")
  1158. }
  1159. SecondColumnLayout {
  1160. visible: lensFlareEnabledCheckBox.checked
  1161. SpinBox {
  1162. minimumValue: 0
  1163. maximumValue: 20
  1164. decimals: 0
  1165. stepSize: 1
  1166. sliderIndicatorVisible: true
  1167. backendValue: backendValues.lensFlareGhostCount
  1168. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1169. + StudioTheme.Values.actionIndicatorWidth
  1170. }
  1171. ExpandingSpacer {}
  1172. }
  1173. PropertyLabel {
  1174. visible: lensFlareEnabledCheckBox.checked
  1175. text: qsTr("Halo Width")
  1176. tooltip: qsTr("Sets the size of the lens flare halo.")
  1177. }
  1178. SecondColumnLayout {
  1179. visible: lensFlareEnabledCheckBox.checked
  1180. SpinBox {
  1181. minimumValue: 0
  1182. maximumValue: 1
  1183. decimals: 3
  1184. stepSize: 0.001
  1185. sliderIndicatorVisible: true
  1186. backendValue: backendValues.lensFlareHaloWidth
  1187. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1188. + StudioTheme.Values.actionIndicatorWidth
  1189. }
  1190. ExpandingSpacer {}
  1191. }
  1192. PropertyLabel {
  1193. visible: lensFlareEnabledCheckBox.checked
  1194. text: qsTr("Stretch Aspect")
  1195. tooltip: qsTr("Set correction factor for roundness of the lens flare halo.")
  1196. }
  1197. SecondColumnLayout {
  1198. visible: lensFlareEnabledCheckBox.checked
  1199. SpinBox {
  1200. minimumValue: 0
  1201. maximumValue: 1
  1202. decimals: 3
  1203. stepSize: 0.001
  1204. sliderIndicatorVisible: true
  1205. backendValue: backendValues.lensFlareStretchToAspect
  1206. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1207. + StudioTheme.Values.actionIndicatorWidth
  1208. }
  1209. ExpandingSpacer {}
  1210. }
  1211. PropertyLabel {
  1212. visible: lensFlareEnabledCheckBox.checked
  1213. text: qsTr("Distortion")
  1214. tooltip: qsTr("Set amount of chromatic aberration in the lens flare.")
  1215. }
  1216. SecondColumnLayout {
  1217. visible: lensFlareEnabledCheckBox.checked
  1218. SpinBox {
  1219. minimumValue: 0
  1220. maximumValue: 25
  1221. decimals: 2
  1222. stepSize: 0.01
  1223. sliderIndicatorVisible: true
  1224. backendValue: backendValues.lensFlareDistortion
  1225. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1226. + StudioTheme.Values.actionIndicatorWidth
  1227. }
  1228. ExpandingSpacer {}
  1229. }
  1230. PropertyLabel {
  1231. visible: lensFlareEnabledCheckBox.checked
  1232. text: qsTr("Blur")
  1233. tooltip: qsTr("Set amount of blur to apply to the lens flare.")
  1234. }
  1235. SecondColumnLayout {
  1236. visible: lensFlareEnabledCheckBox.checked
  1237. SpinBox {
  1238. minimumValue: 0
  1239. maximumValue: 50
  1240. decimals: 2
  1241. stepSize: 0.01
  1242. sliderIndicatorVisible: true
  1243. backendValue: backendValues.lensFlareBlurAmount
  1244. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1245. + StudioTheme.Values.actionIndicatorWidth
  1246. }
  1247. ExpandingSpacer {}
  1248. }
  1249. PropertyLabel {
  1250. visible: lensFlareEnabledCheckBox.checked
  1251. text: qsTr("Lens Color Texture")
  1252. tooltip: qsTr("A gradient image used for the lens flare lens color.")
  1253. }
  1254. SecondColumnLayout {
  1255. visible: lensFlareEnabledCheckBox.checked
  1256. ItemFilterComboBox {
  1257. typeFilter: "QtQuick3D.Texture"
  1258. backendValue: backendValues.lensFlareLensColorTexture
  1259. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1260. + StudioTheme.Values.actionIndicatorWidth
  1261. }
  1262. ExpandingSpacer {}
  1263. }
  1264. PropertyLabel {
  1265. visible: lensFlareEnabledCheckBox.checked
  1266. text: qsTr("Apply Dirt")
  1267. tooltip: qsTr("Set whether to apply a dirt texture to the lens flare.")
  1268. }
  1269. SecondColumnLayout {
  1270. visible: lensFlareEnabledCheckBox.checked
  1271. CheckBox {
  1272. id: lensFlareDirtEnabledCheckBox
  1273. text: backendValues.lensFlareApplyDirtTexture.valueToString
  1274. backendValue: backendValues.lensFlareApplyDirtTexture
  1275. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1276. + StudioTheme.Values.actionIndicatorWidth
  1277. }
  1278. ExpandingSpacer {}
  1279. }
  1280. PropertyLabel {
  1281. visible: lensFlareEnabledCheckBox.checked && lensFlareDirtEnabledCheckBox.checked
  1282. text: qsTr("Dirt Texture")
  1283. tooltip: qsTr("An image that is used to simulate inperfections on the lens.")
  1284. }
  1285. SecondColumnLayout {
  1286. visible: lensFlareEnabledCheckBox.checked && lensFlareDirtEnabledCheckBox.checked
  1287. ItemFilterComboBox {
  1288. typeFilter: "QtQuick3D.Texture"
  1289. backendValue: backendValues.lensFlareLensDirtTexture
  1290. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1291. + StudioTheme.Values.actionIndicatorWidth
  1292. }
  1293. ExpandingSpacer {}
  1294. }
  1295. PropertyLabel {
  1296. visible: lensFlareEnabledCheckBox.checked
  1297. text: qsTr("Apply Starburst")
  1298. tooltip: qsTr("Set whether to apply a starburst texture to the lens flare.")
  1299. }
  1300. SecondColumnLayout {
  1301. visible: lensFlareEnabledCheckBox.checked
  1302. CheckBox {
  1303. id: lensFlareStarburstEnabledCheckBox
  1304. text: backendValues.lensFlareApplyStarburstTexture.valueToString
  1305. backendValue: backendValues.lensFlareApplyStarburstTexture
  1306. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1307. + StudioTheme.Values.actionIndicatorWidth
  1308. }
  1309. ExpandingSpacer {}
  1310. }
  1311. PropertyLabel {
  1312. visible: lensFlareEnabledCheckBox.checked && lensFlareStarburstEnabledCheckBox.checked
  1313. text: qsTr("Starburst Texture")
  1314. tooltip: qsTr("A noise image to augment the starburst effect of the lens flare.")
  1315. }
  1316. SecondColumnLayout {
  1317. visible: lensFlareEnabledCheckBox.checked && lensFlareStarburstEnabledCheckBox.checked
  1318. ItemFilterComboBox {
  1319. typeFilter: "QtQuick3D.Texture"
  1320. backendValue: backendValues.lensFlareLensStarburstTexture
  1321. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1322. + StudioTheme.Values.actionIndicatorWidth
  1323. }
  1324. ExpandingSpacer {}
  1325. }
  1326. PropertyLabel {
  1327. visible: lensFlareEnabledCheckBox.checked
  1328. text: qsTr("Direction")
  1329. tooltip: qsTr("Sets the direction of the camera in the scene.")
  1330. }
  1331. SecondColumnLayout {
  1332. visible: lensFlareEnabledCheckBox.checked
  1333. SpinBox {
  1334. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1335. + StudioTheme.Values.actionIndicatorWidth
  1336. minimumValue: -9999999
  1337. maximumValue: 9999999
  1338. decimals: 2
  1339. backendValue: backendValues.lensFlareCameraDirection_x
  1340. }
  1341. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  1342. ControlLabel {
  1343. text: "X"
  1344. color: StudioTheme.Values.theme3DAxisXColor
  1345. }
  1346. ExpandingSpacer {}
  1347. }
  1348. PropertyLabel {
  1349. visible: lensFlareEnabledCheckBox.checked
  1350. }
  1351. SecondColumnLayout {
  1352. visible: lensFlareEnabledCheckBox.checked
  1353. SpinBox {
  1354. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1355. + StudioTheme.Values.actionIndicatorWidth
  1356. minimumValue: -9999999
  1357. maximumValue: 9999999
  1358. decimals: 2
  1359. backendValue: backendValues.lensFlareCameraDirection_y
  1360. }
  1361. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  1362. ControlLabel {
  1363. text: "Y"
  1364. color: StudioTheme.Values.theme3DAxisYColor
  1365. }
  1366. ExpandingSpacer {}
  1367. }
  1368. PropertyLabel {
  1369. visible: lensFlareEnabledCheckBox.checked
  1370. }
  1371. SecondColumnLayout {
  1372. visible: lensFlareEnabledCheckBox.checked
  1373. SpinBox {
  1374. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1375. + StudioTheme.Values.actionIndicatorWidth
  1376. minimumValue: -9999999
  1377. maximumValue: 9999999
  1378. decimals: 2
  1379. backendValue: backendValues.lensFlareCameraDirection_z
  1380. }
  1381. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  1382. ControlLabel {
  1383. text: "Z"
  1384. color: StudioTheme.Values.theme3DAxisZColor
  1385. }
  1386. ExpandingSpacer {}
  1387. }
  1388. }
  1389. }
  1390. Section {
  1391. width: parent.width
  1392. caption: qsTr("Image Based Lighting")
  1393. SectionLayout {
  1394. PropertyLabel {
  1395. text: qsTr("HDR Image")
  1396. tooltip: qsTr("Sets an image to use to light the scene, either instead of, or in addition to standard lights.")
  1397. }
  1398. SecondColumnLayout {
  1399. ItemFilterComboBox {
  1400. typeFilter: "QtQuick3D.Texture"
  1401. backendValue: backendValues.lightProbe
  1402. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1403. + StudioTheme.Values.actionIndicatorWidth
  1404. }
  1405. ExpandingSpacer {}
  1406. }
  1407. PropertyLabel {
  1408. text: qsTr("Exposure")
  1409. tooltip: qsTr("Sets the amount of light emitted by the light probe.")
  1410. }
  1411. SecondColumnLayout {
  1412. SpinBox {
  1413. minimumValue: 0
  1414. maximumValue: 9999999
  1415. decimals: 2
  1416. backendValue: backendValues.probeExposure
  1417. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1418. + StudioTheme.Values.actionIndicatorWidth
  1419. }
  1420. ExpandingSpacer {}
  1421. }
  1422. PropertyLabel {
  1423. text: qsTr("Horizon")
  1424. tooltip: qsTr("Sets the light probe horizon. When set, adds darkness (black) to the bottom of the environment, forcing the lighting to come predominantly from the top of the image.")
  1425. }
  1426. SecondColumnLayout {
  1427. SpinBox {
  1428. minimumValue: 0
  1429. maximumValue: 1
  1430. decimals: 2
  1431. stepSize: 0.1
  1432. backendValue: backendValues.probeHorizon
  1433. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1434. + StudioTheme.Values.actionIndicatorWidth
  1435. }
  1436. ExpandingSpacer {}
  1437. }
  1438. PropertyLabel {
  1439. text: qsTr("Orientation")
  1440. tooltip: qsTr("Sets the orientation of the light probe.")
  1441. }
  1442. SecondColumnLayout {
  1443. SpinBox {
  1444. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1445. + StudioTheme.Values.actionIndicatorWidth
  1446. minimumValue: -9999999
  1447. maximumValue: 9999999
  1448. decimals: 2
  1449. backendValue: backendValues.probeOrientation_x
  1450. }
  1451. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  1452. ControlLabel {
  1453. text: "X"
  1454. color: StudioTheme.Values.theme3DAxisXColor
  1455. }
  1456. ExpandingSpacer {}
  1457. }
  1458. PropertyLabel {}
  1459. SecondColumnLayout {
  1460. SpinBox {
  1461. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1462. + StudioTheme.Values.actionIndicatorWidth
  1463. minimumValue: -9999999
  1464. maximumValue: 9999999
  1465. decimals: 2
  1466. backendValue: backendValues.probeOrientation_y
  1467. }
  1468. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  1469. ControlLabel {
  1470. text: "Y"
  1471. color: StudioTheme.Values.theme3DAxisYColor
  1472. }
  1473. ExpandingSpacer {}
  1474. }
  1475. PropertyLabel {}
  1476. SecondColumnLayout {
  1477. SpinBox {
  1478. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1479. + StudioTheme.Values.actionIndicatorWidth
  1480. minimumValue: -9999999
  1481. maximumValue: 9999999
  1482. decimals: 2
  1483. backendValue: backendValues.probeOrientation_z
  1484. }
  1485. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  1486. ControlLabel {
  1487. text: "Z"
  1488. color: StudioTheme.Values.theme3DAxisZColor
  1489. }
  1490. ExpandingSpacer {}
  1491. }
  1492. }
  1493. }
  1494. Section {
  1495. width: parent.width
  1496. caption: qsTr("Other Effects")
  1497. SectionLayout {
  1498. PropertyLabel {
  1499. text: qsTr("Effects")
  1500. tooltip: qsTr("Post Processing effects applied to this scene.")
  1501. Layout.alignment: Qt.AlignTop
  1502. Layout.topMargin: 5
  1503. }
  1504. SecondColumnLayout {
  1505. EditableListView {
  1506. backendValue: backendValues.effects
  1507. model: backendValues.effects.expressionAsList
  1508. Layout.fillWidth: true
  1509. typeFilter: "QtQuick3D.Effect"
  1510. onAdd: function(value) { backendValues.effects.idListAdd(value) }
  1511. onRemove: function(idx) { backendValues.effects.idListRemove(idx) }
  1512. onReplace: function (idx, value) { backendValues.effects.idListReplace(idx, value) }
  1513. }
  1514. ExpandingSpacer {}
  1515. }
  1516. PropertyLabel {
  1517. text: qsTr("Fog")
  1518. tooltip: qsTr("Settings for Fog applied to the scene.")
  1519. }
  1520. SecondColumnLayout {
  1521. ItemFilterComboBox {
  1522. typeFilter: "QtQuick3D.Fog"
  1523. backendValue: backendValues.fog
  1524. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1525. + StudioTheme.Values.actionIndicatorWidth
  1526. }
  1527. ExpandingSpacer {}
  1528. }
  1529. }
  1530. }
  1531. Section {
  1532. width: parent.width
  1533. caption: qsTr("Advanced")
  1534. SectionLayout {
  1535. PropertyLabel {
  1536. text: qsTr("Enable Depth Test")
  1537. tooltip: qsTr("Enables depth testing. Disable to optimize render speed for layers with mostly transparent objects.")
  1538. }
  1539. SecondColumnLayout {
  1540. CheckBox {
  1541. text: backendValues.depthTestEnabled.valueToString
  1542. backendValue: backendValues.depthTestEnabled
  1543. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  1544. + StudioTheme.Values.actionIndicatorWidth
  1545. }
  1546. ExpandingSpacer {}
  1547. }
  1548. PropertyLabel {
  1549. text: qsTr("Enable Depth Prepass")
  1550. tooltip: qsTr("Enables draw depth buffer as a separate pass. Disable to optimize render speed for layers with low depth complexity.")
  1551. }
  1552. SecondColumnLayout {
  1553. CheckBox {
  1554. text: backendValues.depthPrePassEnabled.valueToString
  1555. backendValue: backendValues.depthPrePassEnabled
  1556. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  1557. + StudioTheme.Values.actionIndicatorWidth
  1558. }
  1559. ExpandingSpacer {}
  1560. }
  1561. PropertyLabel {
  1562. text: qsTr("Debug Settings")
  1563. tooltip: qsTr("Additional render settings for debugging scenes.")
  1564. }
  1565. SecondColumnLayout {
  1566. ItemFilterComboBox {
  1567. typeFilter: "QtQuick3D.DebugSettings"
  1568. backendValue: backendValues.debugSettings
  1569. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  1570. + StudioTheme.Values.actionIndicatorWidth
  1571. }
  1572. ExpandingSpacer {}
  1573. }
  1574. }
  1575. }
  1576. }