Added timing parameters and visual debug of threshold

This commit is contained in:
Olivier Prat 2017-07-04 12:01:28 +02:00
parent 0244dd6325
commit 7d851c1cbd
6 changed files with 418 additions and 236 deletions

View file

@ -25,7 +25,7 @@ struct FadeParameters
vec4 _innerEdgeColor;
vec4 _outerEdgeColor;
vec2 _edgeWidthInvWidth;
int _invertBase;
int _isInverted;
float _padding;
};
@ -102,7 +102,7 @@ void applyFadeClip(vec3 position) {
void applyFade(vec3 position, out vec3 emissive) {
float alpha = evalFadeAlpha(position);
if (fadeParameters[fadeCategory]._invertBase!=0) {
if (fadeParameters[fadeCategory]._isInverted!=0) {
alpha = -alpha;
}

View file

@ -8,6 +8,7 @@
#define FADE_MIN_SCALE 0.001
#define FADE_MAX_SCALE 10000.0
#define FADE_MAX_SPEED 50.f
inline float parameterToValuePow(float parameter, const double minValue, const double maxOverMinValue) {
return (float)(minValue * pow(maxOverMinValue, double(parameter)));
@ -128,6 +129,18 @@ FadeJobConfig::FadeJobConfig()
noiseLevel[FadeJobConfig::USER_ENTER_LEAVE_DOMAIN] = 0.7f;
noiseLevel[FadeJobConfig::AVATAR_CHANGE] = 1.f;
noiseSpeed[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN] = glm::vec3{ 0.0f, 0.0f, 0.0f };
noiseSpeed[FadeJobConfig::BUBBLE_ISECT_OWNER] = glm::vec3{ 1.0f, 0.2f, 1.0f };
noiseSpeed[FadeJobConfig::BUBBLE_ISECT_TRESPASSER] = glm::vec3{ 1.0f, 0.2f, 1.0f };
noiseSpeed[FadeJobConfig::USER_ENTER_LEAVE_DOMAIN] = glm::vec3{ 0.0f, -0.5f, 0.0f };
noiseSpeed[FadeJobConfig::AVATAR_CHANGE] = glm::vec3{ 0.0f, 0.0f, 0.0f };
timing[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN] = FadeJobConfig::LINEAR;
timing[FadeJobConfig::BUBBLE_ISECT_OWNER] = FadeJobConfig::LINEAR;
timing[FadeJobConfig::BUBBLE_ISECT_TRESPASSER] = FadeJobConfig::LINEAR;
timing[FadeJobConfig::USER_ENTER_LEAVE_DOMAIN] = FadeJobConfig::LINEAR;
timing[FadeJobConfig::AVATAR_CHANGE] = FadeJobConfig::LINEAR;
baseSize[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN] = glm::vec3{ 1.0f, 1.0f, 1.0f };
baseSize[FadeJobConfig::BUBBLE_ISECT_OWNER] = glm::vec3{ 2.0f, 2.0f, 2.0f };
baseSize[FadeJobConfig::BUBBLE_ISECT_TRESPASSER] = glm::vec3{ 2.0f, 2.0f, 2.0f };
@ -140,11 +153,11 @@ FadeJobConfig::FadeJobConfig()
baseLevel[FadeJobConfig::USER_ENTER_LEAVE_DOMAIN] = 1.f;
baseLevel[FadeJobConfig::AVATAR_CHANGE] = 1.f;
baseInverted[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN] = false;
baseInverted[FadeJobConfig::BUBBLE_ISECT_OWNER] = false;
baseInverted[FadeJobConfig::BUBBLE_ISECT_TRESPASSER] = false;
baseInverted[FadeJobConfig::USER_ENTER_LEAVE_DOMAIN] = true;
baseInverted[FadeJobConfig::AVATAR_CHANGE] = false;
_isInverted[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN] = false;
_isInverted[FadeJobConfig::BUBBLE_ISECT_OWNER] = false;
_isInverted[FadeJobConfig::BUBBLE_ISECT_TRESPASSER] = false;
_isInverted[FadeJobConfig::USER_ENTER_LEAVE_DOMAIN] = true;
_isInverted[FadeJobConfig::AVATAR_CHANGE] = false;
_duration[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN] = 4.f;
_duration[FadeJobConfig::BUBBLE_ISECT_OWNER] = 4.f;
@ -219,13 +232,13 @@ void FadeJobConfig::setBaseLevel(float value) {
emit dirty();
}
void FadeJobConfig::setBaseInverted(bool value) {
baseInverted[editedCategory] = value;
void FadeJobConfig::setInverted(bool value) {
_isInverted[editedCategory] = value;
emit dirty();
}
bool FadeJobConfig::isBaseInverted() const {
return baseInverted[editedCategory];
bool FadeJobConfig::isInverted() const {
return _isInverted[editedCategory];
}
void FadeJobConfig::setNoiseSizeX(float value) {
@ -260,6 +273,33 @@ void FadeJobConfig::setNoiseLevel(float value) {
emit dirty();
}
void FadeJobConfig::setNoiseSpeedX(float value) {
noiseSpeed[editedCategory].x = powf(value, 3.f)*FADE_MAX_SPEED;
emit dirty();
}
float FadeJobConfig::getNoiseSpeedX() const {
return powf(noiseSpeed[editedCategory].x / FADE_MAX_SPEED, 1.f/3.f);
}
void FadeJobConfig::setNoiseSpeedY(float value) {
noiseSpeed[editedCategory].y = powf(value, 3.f)*FADE_MAX_SPEED;
emit dirty();
}
float FadeJobConfig::getNoiseSpeedY() const {
return powf(noiseSpeed[editedCategory].y / FADE_MAX_SPEED, 1.f / 3.f);
}
void FadeJobConfig::setNoiseSpeedZ(float value) {
noiseSpeed[editedCategory].z = powf(value, 3.f)*FADE_MAX_SPEED;
emit dirty();
}
float FadeJobConfig::getNoiseSpeedZ() const {
return powf(noiseSpeed[editedCategory].z / FADE_MAX_SPEED, 1.f / 3.f);
}
void FadeJobConfig::setEdgeWidth(float value) {
edgeWidth[editedCategory] = value * value;
emit dirty();
@ -309,6 +349,12 @@ void FadeJobConfig::setEdgeOuterIntensity(float value) {
emit dirty();
}
void FadeJobConfig::setTiming(int value) {
assert(value < TIMING_COUNT);
timing[editedCategory] = value;
emit dirty();
}
FadeConfigureJob::FadeConfigureJob(FadeCommonParameters::Pointer commonParams) :
_parameters{ commonParams }
{
@ -334,12 +380,14 @@ void FadeConfigureJob::configure(const Config& config) {
configuration._noiseInvSizeAndLevel.y = 1.f / config.noiseSize[i].y;
configuration._noiseInvSizeAndLevel.z = 1.f / config.noiseSize[i].z;
configuration._noiseInvSizeAndLevel.w = config.noiseLevel[i];
configuration._invertBase = config.baseInverted[i] & 1;
configuration._isInverted = config._isInverted[i] & 1;
configuration._edgeWidthInvWidth.x = config.edgeWidth[i];
configuration._edgeWidthInvWidth.y = 1.f / configuration._edgeWidthInvWidth.x;
configuration._innerEdgeColor = config.edgeInnerColor[i];
configuration._outerEdgeColor = config.edgeOuterColor[i];
_parameters->_thresholdScale[i] = 1.f + 2.f*(configuration._edgeWidthInvWidth.x + std::max(0.f, (config.noiseLevel[i] + config.baseLevel[i])*0.5f-0.5f));
_parameters->_noiseSpeed[i] = config.noiseSpeed[i];
_parameters->_timing[i] = (FadeJobConfig::Timing) config.timing[i];
}
_isBufferDirty = true;
}
@ -435,14 +483,28 @@ void FadeRenderJob::run(const render::RenderContextPointer& renderContext, const
}
}
float FadeRenderJob::computeElementEnterThreshold(double time, const double period) const {
float FadeRenderJob::computeElementEnterThreshold(double time, const double period, FadeJobConfig::Timing timing) const {
assert(period > 0.0);
float fadeAlpha = 1.0f;
const double INV_FADE_PERIOD = 1.0 / period;
double fraction = time * INV_FADE_PERIOD;
fraction = std::max(fraction, 0.0);
if (fraction < 1.0) {
fadeAlpha = Interpolate::easeInOutQuad(fraction);
switch (timing) {
default:
fadeAlpha = fraction;
break;
case FadeJobConfig::EASE_IN:
fadeAlpha = fraction*fraction;
break;
case FadeJobConfig::EASE_OUT:
fadeAlpha = 1.f - fraction;
fadeAlpha = 1.f- fadeAlpha*fadeAlpha;
break;
case FadeJobConfig::EASE_IN_OUT:
fadeAlpha = fraction*fraction*(3 - 2 * fraction);
break;
}
}
return fadeAlpha;
}
@ -450,7 +512,9 @@ float FadeRenderJob::computeElementEnterThreshold(double time, const double peri
float FadeRenderJob::computeFadePercent(quint64 startTime) {
const double time = (double)(int64_t(usecTimestampNow()) - int64_t(startTime)) / (double)(USECS_PER_SECOND);
assert(_currentInstance);
return _currentInstance->computeElementEnterThreshold(time, _currentInstance->_parameters->_durations[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN]);
return _currentInstance->computeElementEnterThreshold(time,
_currentInstance->_parameters->_durations[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN],
_currentInstance->_parameters->_timing[FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN]);
}
void FadeRenderJob::updateFadeEdit(const render::RenderContextPointer& renderContext, const render::ItemBound& itemBounds) {
@ -461,7 +525,9 @@ void FadeRenderJob::updateFadeEdit(const render::RenderContextPointer& renderCon
uint64_t now = usecTimestampNow();
const double deltaTime = (int64_t(now) - int64_t(_editPreviousTime)) / double(USECS_PER_SECOND);
const double eventDuration = (double)_parameters->_durations[_parameters->_editedCategory];
const int editedCategory = _parameters->_editedCategory;
const double eventDuration = (double)_parameters->_durations[editedCategory];
const FadeJobConfig::Timing timing = _parameters->_timing[editedCategory];
const double waitTime = 0.5; // Wait between fade in and out
double cycleTime = fmod(_editTime, (eventDuration + waitTime) * 2.0);
@ -473,20 +539,24 @@ void FadeRenderJob::updateFadeEdit(const render::RenderContextPointer& renderCon
}
else {
if (cycleTime < eventDuration) {
_editThreshold = 1.f - computeElementEnterThreshold(cycleTime, eventDuration);
_editThreshold = 1.f - computeElementEnterThreshold(cycleTime, eventDuration, timing);
}
else if (cycleTime < (eventDuration + waitTime)) {
_editThreshold = 0.f;
}
else if (cycleTime < (2 * eventDuration + waitTime)) {
_editThreshold = computeElementEnterThreshold(cycleTime - (eventDuration + waitTime), eventDuration);
_editThreshold = computeElementEnterThreshold(cycleTime - (eventDuration + waitTime), eventDuration, timing);
}
else {
_editThreshold = 1.f;
}
}
switch (_parameters->_editedCategory) {
renderContext->jobConfig->setProperty("threshold", _editThreshold);
_editNoiseOffset = _parameters->_noiseSpeed[editedCategory] * (float)_editTime;
switch (editedCategory) {
case FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN:
break;
@ -497,9 +567,6 @@ void FadeRenderJob::updateFadeEdit(const render::RenderContextPointer& renderCon
float distance = glm::length(delta);
delta = glm::normalize(delta) * std::max(0.f, distance - 0.5f);
_editNoiseOffset.x = _editTime*2.1f;
_editNoiseOffset.y = _editTime*1.0f;
_editNoiseOffset.z = _editTime*2.1f;
_editBaseOffset = cameraPos + delta*_editThreshold;
_editThreshold = 0.33f;
@ -508,20 +575,12 @@ void FadeRenderJob::updateFadeEdit(const render::RenderContextPointer& renderCon
case FadeJobConfig::BUBBLE_ISECT_TRESPASSER:
{
_editNoiseOffset.x = _editTime*2.1f;
_editNoiseOffset.y = _editTime*1.0f;
_editNoiseOffset.z = _editTime*2.1f;
_editBaseOffset = glm::vec3{ 0.f, 0.f, 0.f };
}
break;
case FadeJobConfig::USER_ENTER_LEAVE_DOMAIN:
{
_editNoiseOffset.x = _editTime*0.5f;
_editNoiseOffset.y = 0.f;
_editNoiseOffset.z = _editTime*0.75f;
_editBaseOffset = itemBounds.bound.calcCenter();
_editBaseOffset.y -= itemBounds.bound.getDimensions().y / 2.f;
}

View file

@ -38,7 +38,7 @@ class FadeJobConfig : public render::Job::Config {
Q_PROPERTY(float baseSizeY READ getBaseSizeY WRITE setBaseSizeY NOTIFY dirty)
Q_PROPERTY(float baseSizeZ READ getBaseSizeZ WRITE setBaseSizeZ NOTIFY dirty)
Q_PROPERTY(float baseLevel READ getBaseLevel WRITE setBaseLevel NOTIFY dirty)
Q_PROPERTY(bool baseInverted READ isBaseInverted WRITE setBaseInverted NOTIFY dirty)
Q_PROPERTY(bool _isInverted READ isInverted WRITE setInverted NOTIFY dirty)
Q_PROPERTY(float noiseSizeX READ getNoiseSizeX WRITE setNoiseSizeX NOTIFY dirty)
Q_PROPERTY(float noiseSizeY READ getNoiseSizeY WRITE setNoiseSizeY NOTIFY dirty)
Q_PROPERTY(float noiseSizeZ READ getNoiseSizeZ WRITE setNoiseSizeZ NOTIFY dirty)
@ -54,6 +54,10 @@ class FadeJobConfig : public render::Job::Config {
Q_PROPERTY(float edgeOuterIntensity READ getEdgeOuterIntensity WRITE setEdgeOuterIntensity NOTIFY dirty)
Q_PROPERTY(bool manualFade MEMBER manualFade NOTIFY dirty)
Q_PROPERTY(float manualThreshold MEMBER manualThreshold NOTIFY dirty)
Q_PROPERTY(int timing READ getTiming WRITE setTiming NOTIFY dirty)
Q_PROPERTY(float noiseSpeedX READ getNoiseSpeedX WRITE setNoiseSpeedX NOTIFY dirty)
Q_PROPERTY(float noiseSpeedY READ getNoiseSpeedY WRITE setNoiseSpeedY NOTIFY dirty)
Q_PROPERTY(float noiseSpeedZ READ getNoiseSpeedZ WRITE setNoiseSpeedZ NOTIFY dirty)
public:
@ -68,6 +72,15 @@ public:
EVENT_CATEGORY_COUNT
};
enum Timing {
LINEAR,
EASE_IN,
EASE_OUT,
EASE_IN_OUT,
TIMING_COUNT
};
FadeJobConfig();
void setEditedCategory(int value);
@ -87,8 +100,8 @@ public:
void setBaseLevel(float value);
float getBaseLevel() const { return baseLevel[editedCategory]; }
void setBaseInverted(bool value);
bool isBaseInverted() const;
void setInverted(bool value);
bool isInverted() const;
void setNoiseSizeX(float value);
float getNoiseSizeX() const;
@ -102,6 +115,15 @@ public:
void setNoiseLevel(float value);
float getNoiseLevel() const { return noiseLevel[editedCategory]; }
void setNoiseSpeedX(float value);
float getNoiseSpeedX() const;
void setNoiseSpeedY(float value);
float getNoiseSpeedY() const;
void setNoiseSpeedZ(float value);
float getNoiseSpeedZ() const;
void setEdgeWidth(float value);
float getEdgeWidth() const;
@ -128,19 +150,24 @@ public:
void setEdgeOuterIntensity(float value);
float getEdgeOuterIntensity() const { return edgeOuterColor[editedCategory].a; }
void setTiming(int value);
int getTiming() const { return timing[editedCategory]; }
bool manualFade{ false };
float manualThreshold{ 0.f };
int editedCategory{ ELEMENT_ENTER_LEAVE_DOMAIN };
glm::vec3 noiseSize[EVENT_CATEGORY_COUNT];
glm::vec3 noiseSpeed[EVENT_CATEGORY_COUNT];
float noiseLevel[EVENT_CATEGORY_COUNT];
glm::vec3 baseSize[EVENT_CATEGORY_COUNT];
float baseLevel[EVENT_CATEGORY_COUNT];
bool baseInverted[EVENT_CATEGORY_COUNT];
bool _isInverted[EVENT_CATEGORY_COUNT];
float _duration[EVENT_CATEGORY_COUNT];
float edgeWidth[EVENT_CATEGORY_COUNT];
glm::vec4 edgeInnerColor[EVENT_CATEGORY_COUNT];
glm::vec4 edgeOuterColor[EVENT_CATEGORY_COUNT];
int timing[EVENT_CATEGORY_COUNT];
signals:
void dirty();
@ -160,6 +187,8 @@ struct FadeCommonParameters
float _thresholdScale[FadeJobConfig::EVENT_CATEGORY_COUNT];
int _editedCategory{ FadeJobConfig::ELEMENT_ENTER_LEAVE_DOMAIN };
float _durations[FadeJobConfig::EVENT_CATEGORY_COUNT];
glm::vec3 _noiseSpeed[FadeJobConfig::EVENT_CATEGORY_COUNT];
FadeJobConfig::Timing _timing[FadeJobConfig::EVENT_CATEGORY_COUNT];
};
class FadeSwitchJob {
@ -200,7 +229,7 @@ struct FadeParameters
glm::vec4 _innerEdgeColor;
glm::vec4 _outerEdgeColor;
glm::vec2 _edgeWidthInvWidth;
glm::int32 _invertBase;
glm::int32 _isInverted;
glm::float32 _padding;
};
@ -234,15 +263,31 @@ private:
FadeParameters _configurations[FadeJobConfig::EVENT_CATEGORY_COUNT];
};
class FadeRenderJobConfig : public render::Job::Config {
Q_OBJECT
Q_PROPERTY(float threshold MEMBER threshold NOTIFY dirty)
public:
float threshold{ 0.f };
signals:
void dirty();
};
class FadeRenderJob {
public:
using Config = FadeRenderJobConfig;
using Input = render::VaryingSet3<render::ItemBounds, LightingModelPointer, FadeConfigureJob::Output>;
using JobModel = render::Job::ModelI<FadeRenderJob, Input>;
using JobModel = render::Job::ModelI<FadeRenderJob, Input, Config>;
FadeRenderJob(FadeCommonParameters::Pointer commonParams, render::ShapePlumberPointer shapePlumber) : _shapePlumber{ shapePlumber }, _parameters{ commonParams } {}
void configure(const Config& config) {}
void run(const render::RenderContextPointer& renderContext, const Input& inputs);
static void bindPerBatch(gpu::Batch& batch, int fadeMaskMapLocation, int fadeBufferLocation);
@ -263,7 +308,7 @@ private:
render::ShapePlumberPointer _shapePlumber;
FadeCommonParameters::Pointer _parameters;
float computeElementEnterThreshold(double time, const double period) const;
float computeElementEnterThreshold(double time, const double period, FadeJobConfig::Timing timing) const;
// Everything needed for interactive edition
uint64_t _editPreviousTime{ 0 };

View file

@ -43,7 +43,7 @@ Item {
anchors.left: root.left
anchors.leftMargin: 200
anchors.top: root.top
anchors.topMargin: 7
anchors.topMargin: 15
}
Binding {
@ -57,7 +57,7 @@ Item {
Slider {
id: sliderControl
stepSize: root.integral ? 1.0 : 0.0
width: 150
width: root.width-130
height: 20
anchors.right: root.right
anchors.rightMargin: 8

View file

@ -14,8 +14,8 @@ var qml = Script.resolvePath('fade.qml');
var window = new OverlayWindow({
title: 'Fade',
source: qml,
width: 500,
height: 900,
width: 910,
height: 610,
});
window.setPosition(50, 50);
window.closed.connect(function() { Script.stop(); });

View file

@ -11,6 +11,7 @@
import QtQuick 2.5
import QtQuick.Controls 1.4
import "configSlider"
import "../lib/plotperf"
Column {
id: root
@ -47,6 +48,8 @@ Column {
}
}
Row {
spacing: 8
CheckBox {
text: "Manual"
checked: root.config["manualFade"]
@ -72,209 +75,284 @@ Column {
Column {
spacing: 8
ConfigSlider {
label: "Duration"
integral: false
config: root.config
property: "duration"
max: 10.0
min: 0.1
width: 400
CheckBox {
text: "Invert"
checked: root.config["isInverted"]
onCheckedChanged: { root.config["isInverted"] = checked }
}
GroupBox {
title: "Base Gradient"
width: 500
Column {
spacing: 8
Row {
spacing: 8
GroupBox {
title: "Base Gradient"
width: 450
Column {
spacing: 8
ConfigSlider {
label: "Size X"
integral: false
config: root.config
property: "baseSizeX"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Y"
integral: false
config: root.config
property: "baseSizeY"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Z"
integral: false
config: root.config
property: "baseSizeZ"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Level"
integral: false
config: root.config
property: "baseLevel"
max: 1.0
min: 0.0
width: 400
}
CheckBox {
text: "Invert"
checked: root.config["baseInverted"]
onCheckedChanged: { root.config["baseInverted"] = checked }
}
}
}
GroupBox {
title: "Noise Gradient"
width: 500
Column {
spacing: 8
ConfigSlider {
label: "Size X"
integral: false
config: root.config
property: "noiseSizeX"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Y"
integral: false
config: root.config
property: "noiseSizeY"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Z"
integral: false
config: root.config
property: "noiseSizeZ"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Level"
integral: false
config: root.config
property: "noiseLevel"
max: 1.0
min: 0.0
width: 400
}
}
}
GroupBox {
title: "Edge"
width: 500
Column {
spacing: 8
ConfigSlider {
label: "Width"
integral: false
config: root.config
property: "edgeWidth"
max: 1.0
min: 0.0
width: 400
}
GroupBox {
title: "Inner color"
Column {
spacing: 8
ConfigSlider {
label: "Color R"
integral: false
config: root.config
property: "edgeInnerColorR"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color G"
integral: false
config: root.config
property: "edgeInnerColorG"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color B"
integral: false
config: root.config
property: "edgeInnerColorB"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color intensity"
integral: false
config: root.config
property: "edgeInnerIntensity"
max: 5.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size X"
integral: false
config: root.config
property: "baseSizeX"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Y"
integral: false
config: root.config
property: "baseSizeY"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Z"
integral: false
config: root.config
property: "baseSizeZ"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Level"
integral: false
config: root.config
property: "baseLevel"
max: 1.0
min: 0.0
width: 400
}
}
GroupBox {
title: "Outer color"
Column {
spacing: 8
ConfigSlider {
label: "Color R"
integral: false
config: root.config
property: "edgeOuterColorR"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color G"
integral: false
config: root.config
property: "edgeOuterColorG"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color B"
integral: false
config: root.config
property: "edgeOuterColorB"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color intensity"
integral: false
config: root.config
property: "edgeOuterIntensity"
max: 5.0
min: 0.0
width: 400
}
}
GroupBox {
title: "Noise Gradient"
width: 450
Column {
spacing: 8
ConfigSlider {
label: "Size X"
integral: false
config: root.config
property: "noiseSizeX"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Y"
integral: false
config: root.config
property: "noiseSizeY"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Size Z"
integral: false
config: root.config
property: "noiseSizeZ"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Level"
integral: false
config: root.config
property: "noiseLevel"
max: 1.0
min: 0.0
width: 400
}
}
}
}
Row {
spacing: 8
GroupBox {
title: "Edge"
width: 450
Column {
spacing: 8
ConfigSlider {
label: "Width"
integral: false
config: root.config
property: "edgeWidth"
max: 1.0
min: 0.0
width: 400
}
GroupBox {
title: "Inner color"
Column {
spacing: 8
ConfigSlider {
label: "Color R"
integral: false
config: root.config
property: "edgeInnerColorR"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color G"
integral: false
config: root.config
property: "edgeInnerColorG"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color B"
integral: false
config: root.config
property: "edgeInnerColorB"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color intensity"
integral: false
config: root.config
property: "edgeInnerIntensity"
max: 5.0
min: 0.0
width: 400
}
}
}
GroupBox {
title: "Outer color"
Column {
spacing: 8
ConfigSlider {
label: "Color R"
integral: false
config: root.config
property: "edgeOuterColorR"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color G"
integral: false
config: root.config
property: "edgeOuterColorG"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color B"
integral: false
config: root.config
property: "edgeOuterColorB"
max: 1.0
min: 0.0
width: 400
}
ConfigSlider {
label: "Color intensity"
integral: false
config: root.config
property: "edgeOuterIntensity"
max: 5.0
min: 0.0
width: 400
}
}
}
}
}
GroupBox {
title: "Timing"
width: 450
Column {
spacing: 8
ConfigSlider {
label: "Duration"
integral: false
config: root.config
property: "duration"
max: 10.0
min: 0.1
width: 400
}
ComboBox {
width: 400
model: ["Linear", "Ease In", "Ease Out", "Ease In / Out"]
onCurrentIndexChanged: {
root.config["timing"] = currentIndex;
}
}
GroupBox {
title: "Noise Animation"
Column {
spacing: 8
ConfigSlider {
label: "Speed X"
integral: false
config: root.config
property: "noiseSpeedX"
max: 1.0
min: -1.0
width: 400
}
ConfigSlider {
label: "Speed Y"
integral: false
config: root.config
property: "noiseSpeedY"
max: 1.0
min: -1.0
width: 400
}
ConfigSlider {
label: "Speed Z"
integral: false
config: root.config
property: "noiseSpeedZ"
max: 1.0
min: -1.0
width: 400
}
}
}
PlotPerf {
title: "Threshold"
height: parent.evalEvenHeight()
object: Render.getConfig("RenderMainView.DrawFadeOpaque")
valueUnit: "%"
valueScale: 0.01
valueNumDigits: "1"
plots: [
{
prop: "threshold",
label: "Threshold",
color: "#FFBB77"
}
]
}
}
}
}
}
}