2014-07-08 03:11:14 -04:00
|
|
|
#pragma once
|
|
|
|
|
2014-12-11 00:50:15 -05:00
|
|
|
#include "FractoriumCommon.h"
|
2014-07-08 03:11:14 -04:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// EmberFile class.
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Class for representing an ember Xml file in memory.
|
|
|
|
/// It contains a filename and a vector of embers.
|
|
|
|
/// It also provides static helper functions for creating
|
|
|
|
/// default names for the file and the embers in it.
|
|
|
|
/// </summary>
|
|
|
|
template <typename T>
|
|
|
|
class EmberFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/// <summary>
|
2016-04-03 21:55:12 -04:00
|
|
|
/// Default constructor and destructor.
|
2014-07-08 03:11:14 -04:00
|
|
|
/// </summary>
|
2016-04-03 21:55:12 -04:00
|
|
|
EmberFile() = default;
|
|
|
|
~EmberFile() = default;
|
2014-07-08 03:11:14 -04:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Default copy constructor.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="emberFile">The EmberFile object to copy</param>
|
|
|
|
EmberFile(const EmberFile<T>& emberFile)
|
|
|
|
{
|
|
|
|
EmberFile<T>::operator=<T>(emberFile);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Copy constructor to copy an EmberFile object of type U.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="emberFile">The EmberFile object to copy</param>
|
|
|
|
template <typename U>
|
|
|
|
EmberFile(const EmberFile<U>& emberFile)
|
|
|
|
{
|
|
|
|
EmberFile<T>::operator=<U>(emberFile);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Default assignment operator.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="emberFile">The EmberFile object to copy</param>
|
|
|
|
EmberFile<T>& operator = (const EmberFile<T>& emberFile)
|
|
|
|
{
|
|
|
|
if (this != &emberFile)
|
|
|
|
EmberFile<T>::operator=<T>(emberFile);
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Assignment operator to assign a EmberFile object of type U.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="emberFile">The EmberFile object to copy.</param>
|
|
|
|
/// <returns>Reference to updated self</returns>
|
|
|
|
template <typename U>
|
|
|
|
EmberFile<T>& operator = (const EmberFile<U>& emberFile)
|
|
|
|
{
|
|
|
|
m_Filename = emberFile.m_Filename;
|
2016-04-03 21:55:12 -04:00
|
|
|
CopyCont(m_Embers, emberFile.m_Embers);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Move constructor.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="emberFile">The EmberFile object to move</param>
|
|
|
|
EmberFile(EmberFile<T>&& emberFile)
|
|
|
|
{
|
|
|
|
EmberFile<T>::operator=<T>(emberFile);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Move assignment operator.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="emberFile">The EmberFile object to move</param>
|
|
|
|
EmberFile<T>& operator = (EmberFile<T>&& emberFile)
|
|
|
|
{
|
|
|
|
if (this != &emberFile)
|
|
|
|
{
|
|
|
|
m_Filename = emberFile.m_Filename;
|
|
|
|
m_Embers = std::move(emberFile.m_Embers);
|
|
|
|
}
|
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Clear the file name and the vector of embers.
|
|
|
|
/// </summary>
|
|
|
|
void Clear()
|
|
|
|
{
|
|
|
|
m_Filename.clear();
|
|
|
|
m_Embers.clear();
|
|
|
|
}
|
|
|
|
|
2014-10-14 11:53:15 -04:00
|
|
|
/// <summary>
|
|
|
|
/// Thin wrapper to get the size of the vector of embers.
|
|
|
|
/// </summary>
|
|
|
|
size_t Size()
|
|
|
|
{
|
|
|
|
return m_Embers.size();
|
|
|
|
}
|
|
|
|
|
2016-04-03 21:55:12 -04:00
|
|
|
/// <summary>
|
|
|
|
/// Get a pointer to the ember at the specified index.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="i">The index of the ember to retrieve</param>
|
|
|
|
/// <returns>A pointer to the ember if it was within bounds, else nullptr.</returns>
|
|
|
|
Ember<T>* Get(size_t i)
|
|
|
|
{
|
|
|
|
if (i < m_Embers.size())
|
|
|
|
return &(*Advance(m_Embers.begin(), i));
|
|
|
|
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2015-03-21 18:27:37 -04:00
|
|
|
/// <summary>
|
|
|
|
/// Delete the ember at the given index.
|
|
|
|
/// Will not delete anything if the size is already 1.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="index">The index of the ember to delete</param>
|
|
|
|
/// <returns>True if successfully deleted, else false.</returns>
|
|
|
|
bool Delete(size_t index)
|
|
|
|
{
|
|
|
|
if (Size() > 1 && index < Size())
|
|
|
|
{
|
2016-04-03 21:55:12 -04:00
|
|
|
m_Embers.erase(Advance(m_Embers.begin(), index));
|
2015-03-21 18:27:37 -04:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
/// <summary>
|
|
|
|
/// Ensure all ember names are unique.
|
|
|
|
/// </summary>
|
|
|
|
void MakeNamesUnique()
|
|
|
|
{
|
2016-04-03 21:55:12 -04:00
|
|
|
for (auto it1 = m_Embers.begin(); it1 != m_Embers.end(); ++it1)
|
2014-07-08 03:11:14 -04:00
|
|
|
{
|
2016-04-03 21:55:12 -04:00
|
|
|
for (auto it2 = m_Embers.begin(); it2 != m_Embers.end(); ++it2)
|
2014-07-08 03:11:14 -04:00
|
|
|
{
|
2016-04-03 21:55:12 -04:00
|
|
|
if (it1 != it2 && it1->m_Name == it2->m_Name)
|
2014-07-08 03:11:14 -04:00
|
|
|
{
|
2016-04-03 21:55:12 -04:00
|
|
|
it2->m_Name = IncrementTrailingUnderscoreInt(QString::fromStdString(it2->m_Name)).toStdString();
|
|
|
|
it2 = m_Embers.begin();
|
2014-07-08 03:11:14 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Return the default filename based on the current date/time.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>The default filename</returns>
|
2016-06-11 20:47:03 -04:00
|
|
|
static QString DefaultFilename(QString prefix = "Flame_")
|
2014-07-08 03:11:14 -04:00
|
|
|
{
|
2016-06-11 20:47:03 -04:00
|
|
|
return prefix + QDateTime(QDateTime::currentDateTime()).toString("yyyy-MM-dd-hhmmss");
|
2014-07-08 03:11:14 -04:00
|
|
|
}
|
|
|
|
|
--User changes
-Add new variations: bubbleT3D, crob, hexaplay3D, hexcrop, hexes, hexnix3D, loonie2, loonie3, nBlur, octapol and synth.
-Allow for pre/post versions of dc_bubble, dc_cylinder and dc_linear whereas before they were omitted.
-When saving a file with multiple embers in it, detect if time values are all the same and if so, start them at zero and increment by 1 for each ember.
-Allow for numerous quality increases to be coalesced into one. It will pick up at the end of the current render.
-Show selection highlight on variations tree in response to mouse hover. This makes it easier to see for which variation or param the current mouse wheel action will apply.
-Make default temporal samples be 100, whereas before it was 1000 which was overkill.
-Require the shift key to be held with delete for deleting an ember to prevent it from triggering when the user enters delete in the edit box.
-This wasn't otherwise fixable without writing a lot more code.
--Bug fixes
-EmberGenome was crashing when generating a sequence from a source file with more than 2 embers in it.
-EmberGenome was improperly handling the first frame of a merge after the last frame of the loop.
-These bugs were due to a previous commit. Revert parts of that commit.
-Prevent a zoom value of less than 0 when reading from xml.
-Slight optimization of the crescents, and mask variations, if the compiler wasn't doing it already.
-Unique file naming was broken because it was looking for _# and the default names ended with -#.
-Disallow renaming of an ember in the library tree to an empty string.
-Severe bug that prevented some variations from being read correctly from params generated outside this program.
-Severe OpenCL randomization bug. The first x coordinates of the first points in the first kernel call of the first ember of a render since the OpenCL renderer object was created were not random and were mostly -1.
-Severe bug when populating xform selection distributions that could sometimes cause a crash due to roundoff error. Fix by using double.
-Limit the max number of variations in a random ember to MAX_CL_VARS, which is 8. This ensures they'll look the same on CPU and GPU.
-Prevent user from saving stylesheet to default.qss, it's a special reserved filename.
--Code changes
-Generalize using the running sum output point inside of a variation for all cases: pre, reg and post.
-Allow for array variables in variations where the address of each element is stored in m_Params.
-Qualify all math functions with std::
-No longer use our own Clamp() in OpenCL, instead use the standard clamp().
-Redesign how functions are used in the variations OpenCL code.
-Add tests to EmberTester to verify some of the new functionality.
-Place more const and override qualifiers on functions where appropriate.
-Add a global rand with a lock to be used very sparingly.
-Use a map instead of a vector for bad param names in Xml parsing.
-Prefix affine interpolation mode defines with "AFFINE_" to make their purpose more clear.
-Allow for variations that change state during iteration by sending a separate copy of the ember to each rendering thread.
-Implement this same functionality with a local struct in OpenCL. It's members are the total of all variables that need to change state within an ember.
-Add Contains() function to Utils.h.
-EmberRender: print names of kernels being printed with --dump_kernel option.
-Clean up EmberTester to handle some of the recent changes.
-Fix various casts.
-Replace % 2 with & 1, even though the compiler was likely doing this already.
-Add new file Variations06.h to accommodate new variations.
-General cleanup.
2015-11-22 17:15:07 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Return a copy of the string which ends with _# where # is the
|
|
|
|
/// previous number at that position incremented by one.
|
|
|
|
/// If the original string did not end with _#, the returned
|
|
|
|
/// string will just have _1 appended to it.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="str">The string to process</param>
|
|
|
|
/// <returns>The original string with the number after the final _ character incremented by one</returns>
|
|
|
|
static QString IncrementTrailingUnderscoreInt(const QString& str)
|
|
|
|
{
|
|
|
|
bool ok = false;
|
|
|
|
size_t num = 0;
|
|
|
|
QString endSection;
|
|
|
|
QString ret = str;
|
|
|
|
int lastUnderscore = str.lastIndexOf('_');
|
|
|
|
|
|
|
|
if (lastUnderscore != -1)
|
|
|
|
{
|
|
|
|
endSection = str.section('_', -1);
|
|
|
|
num = endSection.toULongLong(&ok);
|
--User changes
-Allow for pausing the renderer in the main window. This makes is more efficient when entering many parameters, such as when following a tutorial.
-Add support for new variations: erf, gamma, jac_cn, jac_dn, jac_sn, logDB, pressure_wave, pRose3D, splits3D, w, waves2b, x, xerf, y, z.
-Inform user of the start and stop of file parsing in EmberAnimate because the files could potentially be very large.
-Move the follwing fields to a new table called Animation: Interpolation, Affine Interpolation, Temporal Samples, Temporal Filter Width, Temporal Filter Type.
-These currently have no effect on the interactive renderer and instead are used when running flames through EmberGenome to generate sequences, and then animating them in Fractorium or EmberAnimate.
-Add new parameter overrides for EmberRender and EmberAnimate which directly assign values to all flames being rendered, rather than scale:
--quality
--demin
--demax
--Bug fixes
-Left pad instead of right pad names of sequence outputs from EmberGenome.
-Unique file naming was broken for files which already had an underscore in them.
-Properly report that png is the default format of EmberRender and EmberAnimate output instead of erroneously claiming it was jpg.
-Make command line programs search these folders in this order for the palette file:
./
~/.fractorium
~/.config/fractorium
/usr/share/fractorium
/usr/local/share/fractorium
-Fix possible bad values in hexes.
-Better assignment of Z variables.
-Fix boarders due to use of poorly implemented rint() function from flam3. Use std::rint() now.
-wedge_sph was completely wrong due to having accidentally swapped the mapping of two parameters.
-Make juliascope juliascope_power parameter be of type REAL_NONZERO since it's used as a denominator.
-Make Z assignment compatible with the originals in:
-arch, bcircle, bCollide, bent, bent2, bisplit, blob, blur_linear, blur_square, bMod, boarders, boarders2, bSwirl, bTransform, butterfly, cardioid, cell, circleblur, circlize, circlize2, circus, collideoscope, cos, cosine, cosh, coth, cpow, cpow2, crescents, cropn, csc, csch, curl, curve, dc_gridout, deltaa, diamond, disc2, eclipse, eCollide, edisc, eJulia, elliptic, eMod, eMotion, ennepers, epispiral, ePush, eRotate, eScale, eSwirl, ex, exp, expo, exponential, fan, fdisc, fibonacci, fibonacci2, fisheye, flipcircle, flipy, flower, flux, funnel, glynnia, GlynnSim1, GlynnSim2, GlynnSim3, gridout, handkerchief, heart, hole, idisc, julia, julian2, juliaNab, kaleidoscope, lazyTravis, Lissajous, mask, MobiusN, mobius_strip, modulus, murl, murl2, npolar, ortho, oscilloscope, parabola, perspective, petal, phoenix_julia, pie (was also inconsistent between cpu and gpu), poincare, popcorn, popcorn2, power, pow_block, rational3, rays, rblur, rings, rippled, roundspher, sec, secant2, sigmoid, sin, sineblur, sinh, sinusgrid, sphericaln, spiralwing, spirograph, split, squarize, squirrel, squish, sschecks, starblur, stripes, stwin, super_shape, tan, tancos, tangent, tanh, TwinTrian, twoface, unpolar, waves, wavesn, wedge_julia, whorl, xheart, zblur, zscale.
--Code changes
-Generalize Variation::PrecalcHelper() and rename to PrePostPrecalcHelper().
--Do the same for the OpenCL version and rename it PrePostPrecalcOpenCLString().
-Rename Variation::m_AssignType to m_PrePostAssignType since it's only relevant to pre/post variations.
2016-01-29 20:02:15 -05:00
|
|
|
|
|
|
|
if (ok)
|
|
|
|
ret.chop(str.size() - lastUnderscore);
|
--User changes
-Add new variations: bubbleT3D, crob, hexaplay3D, hexcrop, hexes, hexnix3D, loonie2, loonie3, nBlur, octapol and synth.
-Allow for pre/post versions of dc_bubble, dc_cylinder and dc_linear whereas before they were omitted.
-When saving a file with multiple embers in it, detect if time values are all the same and if so, start them at zero and increment by 1 for each ember.
-Allow for numerous quality increases to be coalesced into one. It will pick up at the end of the current render.
-Show selection highlight on variations tree in response to mouse hover. This makes it easier to see for which variation or param the current mouse wheel action will apply.
-Make default temporal samples be 100, whereas before it was 1000 which was overkill.
-Require the shift key to be held with delete for deleting an ember to prevent it from triggering when the user enters delete in the edit box.
-This wasn't otherwise fixable without writing a lot more code.
--Bug fixes
-EmberGenome was crashing when generating a sequence from a source file with more than 2 embers in it.
-EmberGenome was improperly handling the first frame of a merge after the last frame of the loop.
-These bugs were due to a previous commit. Revert parts of that commit.
-Prevent a zoom value of less than 0 when reading from xml.
-Slight optimization of the crescents, and mask variations, if the compiler wasn't doing it already.
-Unique file naming was broken because it was looking for _# and the default names ended with -#.
-Disallow renaming of an ember in the library tree to an empty string.
-Severe bug that prevented some variations from being read correctly from params generated outside this program.
-Severe OpenCL randomization bug. The first x coordinates of the first points in the first kernel call of the first ember of a render since the OpenCL renderer object was created were not random and were mostly -1.
-Severe bug when populating xform selection distributions that could sometimes cause a crash due to roundoff error. Fix by using double.
-Limit the max number of variations in a random ember to MAX_CL_VARS, which is 8. This ensures they'll look the same on CPU and GPU.
-Prevent user from saving stylesheet to default.qss, it's a special reserved filename.
--Code changes
-Generalize using the running sum output point inside of a variation for all cases: pre, reg and post.
-Allow for array variables in variations where the address of each element is stored in m_Params.
-Qualify all math functions with std::
-No longer use our own Clamp() in OpenCL, instead use the standard clamp().
-Redesign how functions are used in the variations OpenCL code.
-Add tests to EmberTester to verify some of the new functionality.
-Place more const and override qualifiers on functions where appropriate.
-Add a global rand with a lock to be used very sparingly.
-Use a map instead of a vector for bad param names in Xml parsing.
-Prefix affine interpolation mode defines with "AFFINE_" to make their purpose more clear.
-Allow for variations that change state during iteration by sending a separate copy of the ember to each rendering thread.
-Implement this same functionality with a local struct in OpenCL. It's members are the total of all variables that need to change state within an ember.
-Add Contains() function to Utils.h.
-EmberRender: print names of kernels being printed with --dump_kernel option.
-Clean up EmberTester to handle some of the recent changes.
-Fix various casts.
-Replace % 2 with & 1, even though the compiler was likely doing this already.
-Add new file Variations06.h to accommodate new variations.
-General cleanup.
2015-11-22 17:15:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
ret += "_" + QString::number(num + 1);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
/// <summary>
|
|
|
|
/// Ensures a given input filename is unique by appending a count to the end.
|
|
|
|
/// </summary>
|
2015-03-21 18:27:37 -04:00
|
|
|
/// <param name="filename">The filename to ensure is unique</param>
|
2014-07-08 03:11:14 -04:00
|
|
|
/// <returns>The passed in name if it was unique, else a uniquely made name.</returns>
|
2014-10-14 11:53:15 -04:00
|
|
|
static QString UniqueFilename(const QString& filename)
|
2014-07-08 03:11:14 -04:00
|
|
|
{
|
|
|
|
if (!QFile::exists(filename))
|
|
|
|
return filename;
|
|
|
|
|
|
|
|
QString newPath;
|
|
|
|
QFileInfo original(filename);
|
2014-10-14 11:53:15 -04:00
|
|
|
QString path = original.absolutePath() + '/';
|
2014-07-08 03:11:14 -04:00
|
|
|
QString base = original.completeBaseName();
|
|
|
|
QString extension = original.suffix();
|
--User changes
-Add new variations: bubbleT3D, crob, hexaplay3D, hexcrop, hexes, hexnix3D, loonie2, loonie3, nBlur, octapol and synth.
-Allow for pre/post versions of dc_bubble, dc_cylinder and dc_linear whereas before they were omitted.
-When saving a file with multiple embers in it, detect if time values are all the same and if so, start them at zero and increment by 1 for each ember.
-Allow for numerous quality increases to be coalesced into one. It will pick up at the end of the current render.
-Show selection highlight on variations tree in response to mouse hover. This makes it easier to see for which variation or param the current mouse wheel action will apply.
-Make default temporal samples be 100, whereas before it was 1000 which was overkill.
-Require the shift key to be held with delete for deleting an ember to prevent it from triggering when the user enters delete in the edit box.
-This wasn't otherwise fixable without writing a lot more code.
--Bug fixes
-EmberGenome was crashing when generating a sequence from a source file with more than 2 embers in it.
-EmberGenome was improperly handling the first frame of a merge after the last frame of the loop.
-These bugs were due to a previous commit. Revert parts of that commit.
-Prevent a zoom value of less than 0 when reading from xml.
-Slight optimization of the crescents, and mask variations, if the compiler wasn't doing it already.
-Unique file naming was broken because it was looking for _# and the default names ended with -#.
-Disallow renaming of an ember in the library tree to an empty string.
-Severe bug that prevented some variations from being read correctly from params generated outside this program.
-Severe OpenCL randomization bug. The first x coordinates of the first points in the first kernel call of the first ember of a render since the OpenCL renderer object was created were not random and were mostly -1.
-Severe bug when populating xform selection distributions that could sometimes cause a crash due to roundoff error. Fix by using double.
-Limit the max number of variations in a random ember to MAX_CL_VARS, which is 8. This ensures they'll look the same on CPU and GPU.
-Prevent user from saving stylesheet to default.qss, it's a special reserved filename.
--Code changes
-Generalize using the running sum output point inside of a variation for all cases: pre, reg and post.
-Allow for array variables in variations where the address of each element is stored in m_Params.
-Qualify all math functions with std::
-No longer use our own Clamp() in OpenCL, instead use the standard clamp().
-Redesign how functions are used in the variations OpenCL code.
-Add tests to EmberTester to verify some of the new functionality.
-Place more const and override qualifiers on functions where appropriate.
-Add a global rand with a lock to be used very sparingly.
-Use a map instead of a vector for bad param names in Xml parsing.
-Prefix affine interpolation mode defines with "AFFINE_" to make their purpose more clear.
-Allow for variations that change state during iteration by sending a separate copy of the ember to each rendering thread.
-Implement this same functionality with a local struct in OpenCL. It's members are the total of all variables that need to change state within an ember.
-Add Contains() function to Utils.h.
-EmberRender: print names of kernels being printed with --dump_kernel option.
-Clean up EmberTester to handle some of the recent changes.
-Fix various casts.
-Replace % 2 with & 1, even though the compiler was likely doing this already.
-Add new file Variations06.h to accommodate new variations.
-General cleanup.
2015-11-22 17:15:07 -05:00
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
do
|
|
|
|
{
|
--User changes
-Add new variations: bubbleT3D, crob, hexaplay3D, hexcrop, hexes, hexnix3D, loonie2, loonie3, nBlur, octapol and synth.
-Allow for pre/post versions of dc_bubble, dc_cylinder and dc_linear whereas before they were omitted.
-When saving a file with multiple embers in it, detect if time values are all the same and if so, start them at zero and increment by 1 for each ember.
-Allow for numerous quality increases to be coalesced into one. It will pick up at the end of the current render.
-Show selection highlight on variations tree in response to mouse hover. This makes it easier to see for which variation or param the current mouse wheel action will apply.
-Make default temporal samples be 100, whereas before it was 1000 which was overkill.
-Require the shift key to be held with delete for deleting an ember to prevent it from triggering when the user enters delete in the edit box.
-This wasn't otherwise fixable without writing a lot more code.
--Bug fixes
-EmberGenome was crashing when generating a sequence from a source file with more than 2 embers in it.
-EmberGenome was improperly handling the first frame of a merge after the last frame of the loop.
-These bugs were due to a previous commit. Revert parts of that commit.
-Prevent a zoom value of less than 0 when reading from xml.
-Slight optimization of the crescents, and mask variations, if the compiler wasn't doing it already.
-Unique file naming was broken because it was looking for _# and the default names ended with -#.
-Disallow renaming of an ember in the library tree to an empty string.
-Severe bug that prevented some variations from being read correctly from params generated outside this program.
-Severe OpenCL randomization bug. The first x coordinates of the first points in the first kernel call of the first ember of a render since the OpenCL renderer object was created were not random and were mostly -1.
-Severe bug when populating xform selection distributions that could sometimes cause a crash due to roundoff error. Fix by using double.
-Limit the max number of variations in a random ember to MAX_CL_VARS, which is 8. This ensures they'll look the same on CPU and GPU.
-Prevent user from saving stylesheet to default.qss, it's a special reserved filename.
--Code changes
-Generalize using the running sum output point inside of a variation for all cases: pre, reg and post.
-Allow for array variables in variations where the address of each element is stored in m_Params.
-Qualify all math functions with std::
-No longer use our own Clamp() in OpenCL, instead use the standard clamp().
-Redesign how functions are used in the variations OpenCL code.
-Add tests to EmberTester to verify some of the new functionality.
-Place more const and override qualifiers on functions where appropriate.
-Add a global rand with a lock to be used very sparingly.
-Use a map instead of a vector for bad param names in Xml parsing.
-Prefix affine interpolation mode defines with "AFFINE_" to make their purpose more clear.
-Allow for variations that change state during iteration by sending a separate copy of the ember to each rendering thread.
-Implement this same functionality with a local struct in OpenCL. It's members are the total of all variables that need to change state within an ember.
-Add Contains() function to Utils.h.
-EmberRender: print names of kernels being printed with --dump_kernel option.
-Clean up EmberTester to handle some of the recent changes.
-Fix various casts.
-Replace % 2 with & 1, even though the compiler was likely doing this already.
-Add new file Variations06.h to accommodate new variations.
-General cleanup.
2015-11-22 17:15:07 -05:00
|
|
|
base = IncrementTrailingUnderscoreInt(base);
|
|
|
|
newPath = path + base + "." + extension;
|
2014-07-08 03:11:14 -04:00
|
|
|
}
|
|
|
|
while (QFile::exists(newPath));
|
--User changes
-Allow for pausing the renderer in the main window. This makes is more efficient when entering many parameters, such as when following a tutorial.
-Add support for new variations: erf, gamma, jac_cn, jac_dn, jac_sn, logDB, pressure_wave, pRose3D, splits3D, w, waves2b, x, xerf, y, z.
-Inform user of the start and stop of file parsing in EmberAnimate because the files could potentially be very large.
-Move the follwing fields to a new table called Animation: Interpolation, Affine Interpolation, Temporal Samples, Temporal Filter Width, Temporal Filter Type.
-These currently have no effect on the interactive renderer and instead are used when running flames through EmberGenome to generate sequences, and then animating them in Fractorium or EmberAnimate.
-Add new parameter overrides for EmberRender and EmberAnimate which directly assign values to all flames being rendered, rather than scale:
--quality
--demin
--demax
--Bug fixes
-Left pad instead of right pad names of sequence outputs from EmberGenome.
-Unique file naming was broken for files which already had an underscore in them.
-Properly report that png is the default format of EmberRender and EmberAnimate output instead of erroneously claiming it was jpg.
-Make command line programs search these folders in this order for the palette file:
./
~/.fractorium
~/.config/fractorium
/usr/share/fractorium
/usr/local/share/fractorium
-Fix possible bad values in hexes.
-Better assignment of Z variables.
-Fix boarders due to use of poorly implemented rint() function from flam3. Use std::rint() now.
-wedge_sph was completely wrong due to having accidentally swapped the mapping of two parameters.
-Make juliascope juliascope_power parameter be of type REAL_NONZERO since it's used as a denominator.
-Make Z assignment compatible with the originals in:
-arch, bcircle, bCollide, bent, bent2, bisplit, blob, blur_linear, blur_square, bMod, boarders, boarders2, bSwirl, bTransform, butterfly, cardioid, cell, circleblur, circlize, circlize2, circus, collideoscope, cos, cosine, cosh, coth, cpow, cpow2, crescents, cropn, csc, csch, curl, curve, dc_gridout, deltaa, diamond, disc2, eclipse, eCollide, edisc, eJulia, elliptic, eMod, eMotion, ennepers, epispiral, ePush, eRotate, eScale, eSwirl, ex, exp, expo, exponential, fan, fdisc, fibonacci, fibonacci2, fisheye, flipcircle, flipy, flower, flux, funnel, glynnia, GlynnSim1, GlynnSim2, GlynnSim3, gridout, handkerchief, heart, hole, idisc, julia, julian2, juliaNab, kaleidoscope, lazyTravis, Lissajous, mask, MobiusN, mobius_strip, modulus, murl, murl2, npolar, ortho, oscilloscope, parabola, perspective, petal, phoenix_julia, pie (was also inconsistent between cpu and gpu), poincare, popcorn, popcorn2, power, pow_block, rational3, rays, rblur, rings, rippled, roundspher, sec, secant2, sigmoid, sin, sineblur, sinh, sinusgrid, sphericaln, spiralwing, spirograph, split, squarize, squirrel, squish, sschecks, starblur, stripes, stwin, super_shape, tan, tancos, tangent, tanh, TwinTrian, twoface, unpolar, waves, wavesn, wedge_julia, whorl, xheart, zblur, zscale.
--Code changes
-Generalize Variation::PrecalcHelper() and rename to PrePostPrecalcHelper().
--Do the same for the OpenCL version and rename it PrePostPrecalcOpenCLString().
-Rename Variation::m_AssignType to m_PrePostAssignType since it's only relevant to pre/post variations.
2016-01-29 20:02:15 -05:00
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
return newPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Return the default ember name based on the current date/time and
|
|
|
|
/// the ember's index in the file.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="i">The index in the file of the ember</param>
|
|
|
|
/// <returns>The default ember name</returns>
|
2016-02-13 20:24:51 -05:00
|
|
|
static QString DefaultEmberName(T i)
|
2014-07-08 03:11:14 -04:00
|
|
|
{
|
2016-02-13 20:24:51 -05:00
|
|
|
return DefaultFilename() + "_" + ToString<T>(i);
|
2014-07-08 03:11:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
QString m_Filename;
|
2016-04-03 21:55:12 -04:00
|
|
|
list<Ember<T>> m_Embers;
|
2014-07-08 03:11:14 -04:00
|
|
|
};
|