--User changes

-Allow for specifying linear or smooth interpolation when generating a sequence in the Library tab (was formerly hardcoded to smooth). This has the effect of exposing the --unsmoother option used in EmberGenome in the GUI.
 -Clarify tool tips of the sequence interpolation fields in the animation group on the Flame tab.
 -Change caption of the Bounds tab to be Bounds & Log.
This commit is contained in:
Person 2021-03-28 20:37:02 -06:00
parent 897ccdd375
commit 0956cd6592
9 changed files with 537 additions and 516 deletions

View File

@ -1,4 +1,4 @@
1.0.0.21 4/11/2020
1.0.0.20 4/11/2020
--Bug fixes
-ETA time was wrong with incremental final renders after waiting for a period of time.
-Fix possible OpenCL bugs in cubic3D, cubicLattice_3D, dc_cube, falloff, falloff2, falloff3, waffle.

View File

@ -922,7 +922,7 @@ public:
vector<v2T> cxTrn(size);
thisXform->m_Affine.m_Mat = m23T(0);
//Affine part.
Interpolater<T>::ConvertLinearToPolar(embers, size, i, 0, cxAng, cxMag, cxTrn);
Interpolater<T>::ConvertLinearToPolar(embers, size, i, false, cxAng, cxMag, cxTrn);
Interpolater<T>::InterpAndConvertBack(coefs, cxAng, cxMag, cxTrn, thisXform->m_Affine);
//Post part.
allID = true;
@ -945,7 +945,7 @@ public:
}
else
{
Interpolater<T>::ConvertLinearToPolar(embers, size, i, 1, cxAng, cxMag, cxTrn);
Interpolater<T>::ConvertLinearToPolar(embers, size, i, true, cxAng, cxMag, cxTrn);
Interpolater<T>::InterpAndConvertBack(coefs, cxAng, cxMag, cxTrn, thisXform->m_Post);
}
}

View File

@ -667,13 +667,13 @@ public:
/// </summary>
/// <param name="embers">The vector of embers whose affine transforms will be copied and converted</param>
/// <param name="xfi">The xform index in each ember to convert</param>
/// <param name="cflag">If 0 convert pre affine, else post affine.</param>
/// <param name="post">True to convert post affine, else convert pre affine.</param>
/// <param name="cxAng">The vec2 vector to store the polar angular values</param>
/// <param name="cxMag">The vec2 vector to store the polar magnitude values</param>
/// <param name="cxTrn">The vec2 vector to store the polar translation values</param>
static void ConvertLinearToPolar(const vector<Ember<T>>& embers, size_t xfi, size_t cflag, vector<v2T>& cxAng, vector<v2T>& cxMag, vector<v2T>& cxTrn)
static void ConvertLinearToPolar(const vector<Ember<T>>& embers, size_t xfi, bool post, vector<v2T>& cxAng, vector<v2T>& cxMag, vector<v2T>& cxTrn)
{
ConvertLinearToPolar(embers.data(), embers.size(), xfi, cflag, cxAng, cxMag, cxTrn);
ConvertLinearToPolar(embers.data(), embers.size(), xfi, post, cxAng, cxMag, cxTrn);
}
/// <summary>
@ -683,11 +683,11 @@ public:
/// <param name="embers">The array of embers whose affine transforms will be copied and converted</param>
/// <param name="size">The size of the embers array</param>
/// <param name="xfi">The xform index in each ember to convert</param>
/// <param name="cflag">If 0 convert pre affine, else post affine.</param>
/// <param name="post">True to convert post affine, else convert pre affine.</param>
/// <param name="cxAng">The vec2 vector to store the polar angular values</param>
/// <param name="cxMag">The vec2 vector to store the polar magnitude values</param>
/// <param name="cxTrn">The vec2 vector to store the polar translation values</param>
static void ConvertLinearToPolar(const Ember<T>* embers, size_t size, size_t xfi, size_t cflag, vector<v2T>& cxAng, vector<v2T>& cxMag, vector<v2T>& cxTrn)
static void ConvertLinearToPolar(const Ember<T>* embers, size_t size, size_t xfi, bool post, vector<v2T>& cxAng, vector<v2T>& cxMag, vector<v2T>& cxTrn)
{
const auto LOCALEPS = T(1e-10);//Even though EPS is defined elsewhere, need this here for full compatibility with flam3.
@ -710,7 +710,7 @@ public:
{
for (col = 0; col < 2; col++)
{
if (cflag == 0)
if (!post)
{
c1[0] = xform->m_Affine.m_Mat[0][col];//a or b.
c1[1] = xform->m_Affine.m_Mat[1][col];//d or e.
@ -752,7 +752,7 @@ public:
if (auto xform = embers[k].GetTotalXform(xfi))
{
//Adjust angles differently if an asymmetric case.
if (xform->m_Wind[col] > 0 && cflag == 0)
if (xform->m_Wind[col] > 0 && !post)
{
//Adjust the angles to make sure that it's within wind : wind + 2pi.
refang = xform->m_Wind[col] - M_2PI;
@ -880,7 +880,6 @@ public:
else
accmag[col] += coefs[i] * (cxMag[i][col]);
//Translation is ready to go.
store.m_Mat[col][2] += coefs[i] * cxTrn[i][col];
}
}

View File

@ -419,8 +419,8 @@ public:
INITDOUBLEOPTION(BlackThresh, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_BLACK_THRESH, _T("--black"), 0.01, SO_REQ_SEP, " --black=<val> Minimum number of allowed black pixels as a percentage from 0 - 1. Ignored if sequence, inter or rotate were specified [default: 0.01].\n"));
INITDOUBLEOPTION(WhiteLimit, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_WHITE_LIMIT, _T("--white"), 0.05, SO_REQ_SEP, " --white=<val> Maximum number of allowed white pixels as a percentage from 0 - 1. Ignored if sequence, inter or rotate were specified [default: 0.05].\n"));
INITDOUBLEOPTION(Speed, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_SPEED, _T("--speed"), 0.1, SO_REQ_SEP, " --speed=<val> Speed as a percentage from 0 - 1 that the affine transform of an existing flame mutates with the new flame. Ignored if sequence, inter or rotate were specified [default: 0.1].\n"));
INITDOUBLEOPTION(OffsetX, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETX, _T("--offsetx"), 0.0, SO_REQ_SEP, " --offsetx=<val> Amount to jitter each flame horizontally when applying genome tools [default: 0].\n"));
INITDOUBLEOPTION(OffsetY, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETY, _T("--offsety"), 0.0, SO_REQ_SEP, " --offsety=<val> Amount to jitter each flame vertically when applying genome tools [default: 0].\n"));
INITDOUBLEOPTION(OffsetX, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETX, _T("--offsetx"), 0.0, SO_REQ_SEP, " --offsetx=<val> Amount to move each flame horizontally when applying genome tools [default: 0].\n"));
INITDOUBLEOPTION(OffsetY, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETY, _T("--offsety"), 0.0, SO_REQ_SEP, " --offsety=<val> Amount to move each flame vertically when applying genome tools [default: 0].\n"));
INITDOUBLEOPTION(UseMem, Eod(eOptionUse::OPT_USE_RENDER, eOptionIDs::OPT_USEMEM, _T("--use_mem"), 0.0, SO_REQ_SEP, " --use_mem=<val> Number of bytes of memory to use [default: max system memory].\n"));
INITDOUBLEOPTION(Loops, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_LOOPS, _T("--loops"), 1.0, SO_REQ_SEP, " --loops=<val> Number of times to rotate each control point in sequence [default: 1].\n"));
//String.

View File

@ -435,7 +435,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
!focusedctrlCombo &&
!QGuiApplication::keyboardModifiers().testFlag(Qt::AltModifier))//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform. Also exclude alt.
{
unsigned int index;
size_t index;
double vdist = 0.01;
double hdist = 0.01;
double zoom = 1;
@ -1233,6 +1233,7 @@ void Fractorium::SetTabOrders()
w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendSpinBox);
w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendCWCheckBox);
w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendMaxSpinBox);
w = SetTabOrder(this, w, ui.SequenceLinearCheckBox);
w = SetTabOrder(this, w, ui.SequenceGenerateButton);
w = SetTabOrder(this, w, ui.SequenceRenderButton);
w = SetTabOrder(this, w, ui.SequenceSaveButton);

File diff suppressed because it is too large Load Diff

View File

@ -61,6 +61,8 @@ void Fractorium::InitLibraryUI()
ui.SequenceRotationsPerBlendSpinBox->setMaximum(std::numeric_limits<int>::max());//Lower max = upper.
ui.SequenceRotationsPerBlendMaxSpinBox->setValue(m_Settings->RotationsPerBlendMax());//Upper.
ui.SequenceRotationsPerBlendMaxSpinBox->setMinimum(m_Settings->RotationsPerBlend());//Upper min = lower max.
//Linear.
ui.SequenceLinearCheckBox->setChecked(m_Settings->Linear());
}
/// <summary>
@ -614,6 +616,7 @@ void FractoriumEmberController<T>::SequenceGenerateButtonClicked()
const size_t start = ui.SequenceStartFlameSpinBox->value();
const size_t stop = ui.SequenceStopFlameSpinBox->value();
const size_t startCount = ui.SequenceStartCountSpinBox->value();
const bool linear = ui.SequenceLinearCheckBox->isChecked();
const size_t keyFrames = (stop - start) + 1;
size_t frameCount = 0;
double frames = 0;
@ -647,7 +650,7 @@ void FractoriumEmberController<T>::SequenceGenerateButtonClicked()
}
SheepTools<T, float> tools(palettePath, EmberCommon::CreateRenderer<T>(eRendererType::CPU_RENDERER, devices, false, 0, emberReport));
tools.SetSpinParams(true,
tools.SetSpinParams(!linear,
stagger,//Will be set again below if random is used.
0,
0,
@ -918,6 +921,7 @@ void Fractorium::SyncSequenceSettings()
m_Settings->BlendFramesMax(ui.SequenceRandomBlendMaxFramesSpinBox->value());
m_Settings->RotationsPerBlend(ui.SequenceRotationsPerBlendSpinBox->value());
m_Settings->RotationsPerBlendMax(ui.SequenceRotationsPerBlendMaxSpinBox->value());
m_Settings->Linear(ui.SequenceLinearCheckBox->isChecked());
}
template class FractoriumEmberController<float>;

View File

@ -239,6 +239,9 @@ void FractoriumSettings::RotationsPerBlend(uint i) { setValue(ROTATIONSPERBLE
uint FractoriumSettings::RotationsPerBlendMax() { return value(ROTATIONSPERBLENDMAX).toUInt(); }
void FractoriumSettings::RotationsPerBlendMax(uint i) { setValue(ROTATIONSPERBLENDMAX, i); }
bool FractoriumSettings::Linear() { return value(LINEAR).toBool(); }
void FractoriumSettings::Linear(bool b) { setValue(LINEAR, b); }
/// <summary>
/// Variations filter settings.
/// </summary>

View File

@ -42,6 +42,7 @@
#define BLENDFRAMESMAX "sequence/blendframesmax"
#define ROTATIONSPERBLEND "sequence/rotationsperblend"
#define ROTATIONSPERBLENDMAX "sequence/rotationsperblendmax"
#define LINEAR "sequence/linear"
#define VARFILTERSUM "varfilter/sumcheckbox"
#define VARFILTERASSIGN "varfilter/assigncheckbox"
@ -214,6 +215,9 @@ public:
uint RotationsPerBlendMax();
void RotationsPerBlendMax(uint i);
bool Linear();
void Linear(bool b);
int VarFilterSum();
void VarFilterSum(int i);