2014-07-08 03:11:14 -04:00
# include "FractoriumPch.h"
# include "Fractorium.h"
/// <summary>
/// Initialize the menus UI.
/// </summary>
void Fractorium : : InitMenusUI ( )
{
//File menu.
connect ( ui . ActionNewFlock , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionNewFlock ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionNewEmptyFlameInCurrentFile , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionNewEmptyFlameInCurrentFile ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionNewRandomFlameInCurrentFile , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionNewRandomFlameInCurrentFile ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionCopyFlameInCurrentFile , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionCopyFlameInCurrentFile ( bool ) ) , Qt : : QueuedConnection ) ;
2020-02-17 21:45:02 -05:00
connect ( ui . ActionCreateReferenceFile , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionCreateReferenceFile ( bool ) ) , Qt : : QueuedConnection ) ;
2014-07-08 03:11:14 -04:00
connect ( ui . ActionOpen , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionOpen ( bool ) ) , Qt : : QueuedConnection ) ;
2020-03-08 17:17:13 -04:00
connect ( ui . ActionOpenExamples , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionOpenExamples ( bool ) ) , Qt : : QueuedConnection ) ;
2014-07-08 03:11:14 -04:00
connect ( ui . ActionSaveCurrentAsXml , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionSaveCurrentAsXml ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionSaveEntireFileAsXml , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionSaveEntireFileAsXml ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionSaveCurrentScreen , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionSaveCurrentScreen ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionExit , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionExit ( bool ) ) , Qt : : QueuedConnection ) ;
//Edit menu.
--User changes
-Add support for multiple GPU devices.
--These options are present in the command line and in Fractorium.
-Change scheme of specifying devices from platform,device to just total device index.
--Single number on the command line.
--Change from combo boxes for device selection to a table of all devices in Fractorium.
-Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Bug fixes
-EmberAnimate, EmberRender, FractoriumSettings, FinalRenderDialog: Fix wrong order of arguments to Clamp() when assigning thread priority.
-VariationsDC.h: Fix NVidia OpenCL compilation error in DCTriangleVariation.
-FractoriumXformsColor.cpp: Checking for null pixmap pointer is not enough, must also check if the underlying buffer is null via call to QPixmap::isNull().
--Code changes
-Ember.h: Add case for FLAME_MOTION_NONE and default in ApplyFlameMotion().
-EmberMotion.h: Call base constructor.
-EmberPch.h: #pragma once only on Windows.
-EmberToXml.h:
--Handle different types of exceptions.
--Add default cases to ToString().
-Isaac.h: Remove unused variable in constructor.
-Point.h: Call base constructor in Color().
-Renderer.h/cpp:
--Add bool to Alloc() to only allocate memory for the histogram. Needed for multi-GPU.
--Make CoordMap() return a const ref, not a pointer.
-SheepTools.h:
--Use 64-bit types like the rest of the code already does.
--Fix some comment misspellings.
-Timing.h: Make BeginTime(), EndTime(), ElapsedTime() and Format() be const functions.
-Utils.h:
--Add new functions Equal() and Split().
--Handle more exception types in ReadFile().
--Get rid of most legacy blending of C and C++ argument parsing.
-XmlToEmber.h:
--Get rid of most legacy blending of C and C++ code from flam3.
--Remove some unused variables.
-EmberAnimate:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--If a render fails, exit since there is no point in continuing an animation with a missing frame.
--Pass variables to threaded save better, which most likely fixes a very subtle bug that existed before.
--Remove some unused variables.
-EmberGenome, EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
-EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--Only print values when not rendering with OpenCL, since they're always 0 in that case.
-EmberCLPch.h:
--#pragma once only on Windows.
--#include <atomic>.
-IterOpenCLKernelCreator.h: Add new kernel for summing two histograms. This is needed for multi-GPU.
-OpenCLWrapper.h:
--Move all OpenCL info related code into its own class OpenCLInfo.
--Add members to cache the values of global memory size and max allocation size.
-RendererCL.h/cpp:
--Redesign to accomodate multi-GPU.
--Constructor now takes a vector of devices.
--Remove DumpErrorReport() function, it's handled in the base.
--ClearBuffer(), ReadPoints(), WritePoints(), ReadHist() and WriteHist() now optionally take a device index as a parameter.
--MakeDmap() override and m_DmapCL member removed because it no longer applies since the histogram is always float since the last commit.
--Add new function SumDeviceHist() to sum histograms from two devices by first copying to a temporary on the host, then a temporary on the device, then summing.
--m_Calls member removed, as it's now per-device.
--OpenCLWrapper removed.
--m_Seeds member is now a vector of vector of seeds, to accomodate a separate and different array of seeds for each device.
--Added member m_Devices, a vector of unique_ptr of RendererCLDevice.
-EmberCommon.h
--Added Devices() function to convert from a vector of device indices to a vector of platform,device indices.
--Changed CreateRenderer() to accept a vector of devices to create a single RendererCL which will split work across multiple devices.
--Added CreateRenderers() function to accept a vector of devices to create multiple RendererCL, each which will render on a single device.
--Add more comments to some existing functions.
-EmberCommonPch.h: #pragma once only on Windows.
-EmberOptions.h:
--Remove --platform option, it's just sequential device number now with the --device option.
--Make --out be OPT_USE_RENDER instead of OPT_RENDER_ANIM since it's an error condition when animating. It makes no sense to write all frames to a single image.
--Add Devices() function to parse comma separated --device option string and return a vector of device indices.
--Make int and uint types be 64-bit, so intmax_t and size_t.
--Make better use of macros.
-JpegUtils.h: Make string parameters to WriteJpeg() and WritePng() be const ref.
-All project files: Turn off buffer security check option in Visual Studio (/Gs-)
-deployment.pri: Remove the line OTHER_FILES +=, it's pointless and was causing problems.
-Ember.pro, EmberCL.pro: Add CONFIG += plugin, otherwise it wouldn't link.
-EmberCL.pro: Add new files for multi-GPU support.
-build_all.sh: use -j4 and QMAKE=${QMAKE:/usr/bin/qmake}
-shared_settings.pri:
-Add version string.
-Remove old DESTDIR definitions.
-Add the following lines or else nothing would build:
CONFIG(release, debug|release) {
CONFIG += warn_off
DESTDIR = ../../../Bin/release
}
CONFIG(debug, debug|release) {
DESTDIR = ../../../Bin/debug
}
QMAKE_POST_LINK += $$quote(cp --update ../../../Data/flam3-palettes.xml $${DESTDIR}$$escape_expand(\n\t))
LIBS += -L/usr/lib -lpthread
-AboutDialog.ui: Another futile attempt to make it look correct on Linux.
-FinalRenderDialog.h/cpp:
--Add support for multi-GPU.
--Change from combo boxes for device selection to a table of all devices.
--Ensure device selection makes sense.
--Remove "FinalRender" prefix of various function names, it's implied given the context.
-FinalRenderEmberController.h/cpp:
--Add support for multi-GPU.
--Change m_FinishedImageCount to be atomic.
--Move CancelRender() from the base to FinalRenderEmberController<T>.
--Refactor RenderComplete() to omit any progress related functionality or image saving since it can be potentially ran in a thread.
--Consolidate setting various renderer fields into SyncGuiToRenderer().
-Fractorium.cpp: Allow for resizing of the options dialog to show the entire device table.
-FractoriumCommon.h: Add various functions to handle a table showing the available OpenCL devices on the system.
-FractoriumEmberController.h/cpp: Remove m_FinalImageIndex, it's no longer needed.
-FractoriumRender.cpp: Scale the interactive sub batch count and quality by the number of devices used.
-FractoriumSettings.h/cpp:
--Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Add multi-GPU support, remove old device,platform pair.
-FractoriumToolbar.cpp: Disable OpenCL toolbar button if there are no devices present on the system.
-FractoriumOptionsDialog.h/cpp:
--Add support for multi-GPU.
--Consolidate more assignments in DataToGui().
--Enable/disable CPU/OpenCL items in response to OpenCL checkbox event.
-Misc: Convert almost everything to size_t for unsigned, intmax_t for signed.
2015-09-12 21:33:45 -04:00
connect ( ui . ActionUndo , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionUndo ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionRedo , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionRedo ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionCopyXml , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionCopyXml ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionCopyAllXml , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionCopyAllXml ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionPasteXmlAppend , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionPasteXmlAppend ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionPasteXmlOver , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionPasteXmlOver ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionCopySelectedXforms , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionCopySelectedXforms ( bool ) ) , Qt : : QueuedConnection ) ;
2015-05-19 22:31:33 -04:00
connect ( ui . ActionPasteSelectedXforms , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionPasteSelectedXforms ( bool ) ) , Qt : : QueuedConnection ) ;
2018-07-31 00:39:41 -04:00
connect ( ui . ActionCopyKernel , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionCopyKernel ( bool ) ) , Qt : : QueuedConnection ) ;
2015-05-19 22:31:33 -04:00
ui . ActionPasteSelectedXforms - > setEnabled ( false ) ;
2015-06-20 14:35:08 -04:00
//View menu.
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
connect ( ui . ActionResetWorkspace , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionResetWorkspace ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionAlternateEditorImage , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionAlternateEditorImage ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionResetScale , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionResetScale ( bool ) ) , Qt : : QueuedConnection ) ;
2014-07-08 03:11:14 -04:00
//Tools menu.
connect ( ui . ActionAddReflectiveSymmetry , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionAddReflectiveSymmetry ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionAddRotationalSymmetry , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionAddRotationalSymmetry ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionAddBothSymmetry , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionAddBothSymmetry ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionClearFlame , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionClearFlame ( bool ) ) , Qt : : QueuedConnection ) ;
Numerous fixes
0.4.0.5 Beta 07/18/2014
--User Changes
Allow for vibrancy values > 1.
Add flatten and unflatten menu items.
Automatically flatten like Apophysis does.
Add plugin and new_linear tags to Xml to be compatible with Apophysis.
--Bug Fixes
Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho,
julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x,
sinusoidal, spherical, spherical3d, stripes.
Unique filename on final render was completely broken.
Two severe OpenCL bugs. Random seeds were biased and fusing was being
reset too often leading to results that differ from the CPU.
Subtle, but sometimes severe bug in the setup of the xaos weights.
Use properly defined epsilon by getting the value from
std::numeric_limits, rather than hard coding 1e-6 or 1e-10.
Omit incorrect usage of epsilon everywhere. It should not be
automatically added to denominators. Rather, it should only be used if
the denominator is zero.
Force final render progress bars to 100 on completion. Sometimes they
didn't seem to make it there.
Make variation name and params comparisons be case insensitive.
--Code Changes
Make ForEach and FindIf wrappers around std::for_each and std::find_if.
2014-07-19 02:33:18 -04:00
connect ( ui . ActionFlatten , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionFlatten ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionUnflatten , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionUnflatten ( bool ) ) , Qt : : QueuedConnection ) ;
2014-07-08 03:11:14 -04:00
connect ( ui . ActionStopRenderingPreviews , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionStopRenderingPreviews ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionRenderPreviews , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionRenderPreviews ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionFinalRender , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionFinalRender ( bool ) ) , Qt : : QueuedConnection ) ;
connect ( ui . ActionOptions , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionOptions ( bool ) ) , Qt : : QueuedConnection ) ;
//Help menu.
connect ( ui . ActionAbout , SIGNAL ( triggered ( bool ) ) , this , SLOT ( OnActionAbout ( bool ) ) , Qt : : QueuedConnection ) ;
}
/// <summary>
/// Create a new flock of random embers, with the specified length.
/// </summary>
/// <param name="count">The number of embers to include in the flock</param>
template < typename T >
--User changes
-Add support for multiple GPU devices.
--These options are present in the command line and in Fractorium.
-Change scheme of specifying devices from platform,device to just total device index.
--Single number on the command line.
--Change from combo boxes for device selection to a table of all devices in Fractorium.
-Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Bug fixes
-EmberAnimate, EmberRender, FractoriumSettings, FinalRenderDialog: Fix wrong order of arguments to Clamp() when assigning thread priority.
-VariationsDC.h: Fix NVidia OpenCL compilation error in DCTriangleVariation.
-FractoriumXformsColor.cpp: Checking for null pixmap pointer is not enough, must also check if the underlying buffer is null via call to QPixmap::isNull().
--Code changes
-Ember.h: Add case for FLAME_MOTION_NONE and default in ApplyFlameMotion().
-EmberMotion.h: Call base constructor.
-EmberPch.h: #pragma once only on Windows.
-EmberToXml.h:
--Handle different types of exceptions.
--Add default cases to ToString().
-Isaac.h: Remove unused variable in constructor.
-Point.h: Call base constructor in Color().
-Renderer.h/cpp:
--Add bool to Alloc() to only allocate memory for the histogram. Needed for multi-GPU.
--Make CoordMap() return a const ref, not a pointer.
-SheepTools.h:
--Use 64-bit types like the rest of the code already does.
--Fix some comment misspellings.
-Timing.h: Make BeginTime(), EndTime(), ElapsedTime() and Format() be const functions.
-Utils.h:
--Add new functions Equal() and Split().
--Handle more exception types in ReadFile().
--Get rid of most legacy blending of C and C++ argument parsing.
-XmlToEmber.h:
--Get rid of most legacy blending of C and C++ code from flam3.
--Remove some unused variables.
-EmberAnimate:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--If a render fails, exit since there is no point in continuing an animation with a missing frame.
--Pass variables to threaded save better, which most likely fixes a very subtle bug that existed before.
--Remove some unused variables.
-EmberGenome, EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
-EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--Only print values when not rendering with OpenCL, since they're always 0 in that case.
-EmberCLPch.h:
--#pragma once only on Windows.
--#include <atomic>.
-IterOpenCLKernelCreator.h: Add new kernel for summing two histograms. This is needed for multi-GPU.
-OpenCLWrapper.h:
--Move all OpenCL info related code into its own class OpenCLInfo.
--Add members to cache the values of global memory size and max allocation size.
-RendererCL.h/cpp:
--Redesign to accomodate multi-GPU.
--Constructor now takes a vector of devices.
--Remove DumpErrorReport() function, it's handled in the base.
--ClearBuffer(), ReadPoints(), WritePoints(), ReadHist() and WriteHist() now optionally take a device index as a parameter.
--MakeDmap() override and m_DmapCL member removed because it no longer applies since the histogram is always float since the last commit.
--Add new function SumDeviceHist() to sum histograms from two devices by first copying to a temporary on the host, then a temporary on the device, then summing.
--m_Calls member removed, as it's now per-device.
--OpenCLWrapper removed.
--m_Seeds member is now a vector of vector of seeds, to accomodate a separate and different array of seeds for each device.
--Added member m_Devices, a vector of unique_ptr of RendererCLDevice.
-EmberCommon.h
--Added Devices() function to convert from a vector of device indices to a vector of platform,device indices.
--Changed CreateRenderer() to accept a vector of devices to create a single RendererCL which will split work across multiple devices.
--Added CreateRenderers() function to accept a vector of devices to create multiple RendererCL, each which will render on a single device.
--Add more comments to some existing functions.
-EmberCommonPch.h: #pragma once only on Windows.
-EmberOptions.h:
--Remove --platform option, it's just sequential device number now with the --device option.
--Make --out be OPT_USE_RENDER instead of OPT_RENDER_ANIM since it's an error condition when animating. It makes no sense to write all frames to a single image.
--Add Devices() function to parse comma separated --device option string and return a vector of device indices.
--Make int and uint types be 64-bit, so intmax_t and size_t.
--Make better use of macros.
-JpegUtils.h: Make string parameters to WriteJpeg() and WritePng() be const ref.
-All project files: Turn off buffer security check option in Visual Studio (/Gs-)
-deployment.pri: Remove the line OTHER_FILES +=, it's pointless and was causing problems.
-Ember.pro, EmberCL.pro: Add CONFIG += plugin, otherwise it wouldn't link.
-EmberCL.pro: Add new files for multi-GPU support.
-build_all.sh: use -j4 and QMAKE=${QMAKE:/usr/bin/qmake}
-shared_settings.pri:
-Add version string.
-Remove old DESTDIR definitions.
-Add the following lines or else nothing would build:
CONFIG(release, debug|release) {
CONFIG += warn_off
DESTDIR = ../../../Bin/release
}
CONFIG(debug, debug|release) {
DESTDIR = ../../../Bin/debug
}
QMAKE_POST_LINK += $$quote(cp --update ../../../Data/flam3-palettes.xml $${DESTDIR}$$escape_expand(\n\t))
LIBS += -L/usr/lib -lpthread
-AboutDialog.ui: Another futile attempt to make it look correct on Linux.
-FinalRenderDialog.h/cpp:
--Add support for multi-GPU.
--Change from combo boxes for device selection to a table of all devices.
--Ensure device selection makes sense.
--Remove "FinalRender" prefix of various function names, it's implied given the context.
-FinalRenderEmberController.h/cpp:
--Add support for multi-GPU.
--Change m_FinishedImageCount to be atomic.
--Move CancelRender() from the base to FinalRenderEmberController<T>.
--Refactor RenderComplete() to omit any progress related functionality or image saving since it can be potentially ran in a thread.
--Consolidate setting various renderer fields into SyncGuiToRenderer().
-Fractorium.cpp: Allow for resizing of the options dialog to show the entire device table.
-FractoriumCommon.h: Add various functions to handle a table showing the available OpenCL devices on the system.
-FractoriumEmberController.h/cpp: Remove m_FinalImageIndex, it's no longer needed.
-FractoriumRender.cpp: Scale the interactive sub batch count and quality by the number of devices used.
-FractoriumSettings.h/cpp:
--Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Add multi-GPU support, remove old device,platform pair.
-FractoriumToolbar.cpp: Disable OpenCL toolbar button if there are no devices present on the system.
-FractoriumOptionsDialog.h/cpp:
--Add support for multi-GPU.
--Consolidate more assignments in DataToGui().
--Enable/disable CPU/OpenCL items in response to OpenCL checkbox event.
-Misc: Convert almost everything to size_t for unsigned, intmax_t for signed.
2015-09-12 21:33:45 -04:00
void FractoriumEmberController < T > : : NewFlock ( size_t count )
2014-07-08 03:11:14 -04:00
{
2017-08-07 22:53:13 -04:00
bool nv = false ;
2014-07-08 03:11:14 -04:00
Ember < T > ember ;
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
2014-07-08 03:11:14 -04:00
m_EmberFile . Clear ( ) ;
m_EmberFile . m_Filename = EmberFile < T > : : DefaultFilename ( ) ;
2017-08-07 22:53:13 -04:00
vector < eVariationId > filteredVariations ;
--User changes:
-Show common folder locations such as documents, downloads, pictures in the sidebar in all file dialogs.
-Warning message about exceeding memory in final render dialog now suggests strips as the solution to the problem.
-Strips now has a tooltip explaining what it does.
-Allow more digits in the spinners on the color section the flame tab.
-Add manually adjustable size spinners in the final render dialog. Percentage scale and absolute size are fully synced.
-Default prefix in final render is now the filename when doing animations (coming from sequence section of the library tab).
-Changed the elliptic variation back to using a less precise version for float, and a more precise version for double. The last release had it always using double.
-New applied xaos table that shows a read-only view of actual weights by taking the base xform weights and multiplying them by the xaos values.
-New table in the xaos tab that gives a graphical representation of the probability that each xform is chosen, with and without xaos.
-Add button to transpose the xaos rows and columns.
-Add support for importing .chaos files from Chaotica.
--Pasting back to Chaotica will work for most, but not all, variations due to incompatible parameter names in some.
-Curves are now splines instead of Bezier. This adds compatibility with Chaotica, but breaks it for Apophysis. Xmls are still pastable, but the color curves will look different.
--The curve editor on the palette tab can now add points by clicking on the lines and remove points by clicking on the points themselves, just like Chaotica.
--Splines are saved in four new xml fields: overall_curve, red_curve, green_curve and blue_curve.
-Allow for specifying the percentage of a sub batch each thread should iterate through per kernel call when running with OpenCL. This gives a roughly 1% performance increase due to having to make less kernel calls while iterating.
--This field is present for interactive editing (where it's not very useful) and in the final render dialog.
--On the command line, this is specified as --sbpctth for EmberRender and EmberAnimate.
-Allow double clicking to toggle the supersample field in the flame tab between 1 and 2 for easily checking the effect of the field.
-When showing affine values as polar coordinates, show angles normalized to 360 to match Chaotica.
-Fuse Count spinner now toggles between 15 and 100 when double clicking for easily checking the effect of the field.
-Added field for limiting the range in the x and y direction that the initial points are chosen from.
-Added a field called K2 which is an alternative way to set brightness, ignored when zero.
--This has no effect for many variations, but hs a noticeable effect for some.
-Added new variations:
arcsech
arcsech2
arcsinh
arctanh
asteria
block
bwraps_rand
circlecrop2
coth_spiral
crackle2
depth_blur
depth_blur2
depth_gaussian
depth_gaussian2
depth_ngon
depth_ngon2
depth_sine
depth_sine2
dragonfire
dspherical
dust
excinis
exp2
flipx
flowerdb
foci_p
gaussian
glynnia2
glynnsim4
glynnsim5
henon
henon
hex_rand
hex_truchet
hypershift
lazyjess
lens
lozi
lozi
modulusx
modulusy
oscilloscope2
point_symmetry
pointsymmetry
projective
pulse
rotate
scry2
shift
smartshape
spher
squares
starblur2
swirl3
swirl3r
tanh_spiral
target0
target2
tile_hlp
truchet_glyph
truchet_inv
truchet_knot
unicorngaloshen
vibration
vibration2
--hex_truchet, hex_rand should always use double. They are extremely sensitive.
--Bug fixes:
-Bounds sign was flipped for x coordinate of world space when center was not zero.
-Right clicking and dragging spinner showed menu on mouse up, even if it was very far away.
-Text boxes for size in final render dialog were hard to type in. Same bug as xform weight used to be so fix the same way.
-Fix spelling to be plural in toggle color speed box.
-Stop using the blank user palette to generate flames. Either put colored palettes in it, or exclude it from randoms.
-Clicking the random palette button for a palette file with only one palette in it would freeze the program.
-Clicking none scale in final render did not re-render the preview.
-Use less precision on random xaos. No need for 12 decimal places.
-The term sub batch is overloaded in the options dialog. Change the naming and tooltip of those settings for cpu and opencl.
--Also made clear in the tooltip for the default opencl quality setting that the value is per device.
-The arrows spinner in palette editor appears like a read-only label. Made it look like a spinner.
-Fix border colors for various spin boxes and table headers in the style sheet. Requires reload.
-Fix a bug in the bwraps variation which would produce different results than Chaotica and Apophysis.
-Synth was allowed to be selected for random flame generation when using an Nvidia card but it shouldn't have been because Nvidia has a hard time compiling synth.
-A casting bug in the OpenCL kernels for log scaling and density filtering was preventing successful compilations on Intel iGPUs. Fixed even though we don't support anything other than AMD and Nvidia.
-Palette rotation (click and drag) position was not being reset when loading a new flame.
-When the xform circles were hidden, opening and closing the options dialog would improperly reshow them.
-Double click toggle was broken on integer spin boxes.
-Fixed tab order of some controls.
-Creating a palette from a jpg in the palette editor only produced a single color.
--Needed to package imageformats/qjpeg.dll with the Windows installer.
-The basic memory benchmark test flame was not really testing memory. Make it more spread out.
-Remove the temporal samples field from the flame tab, it was never used because it's only an animation parameter which is specified in the final render dialog or on the command line with EmberAnimate.
--Code changes:
-Add IsEmpty() to Palette to determine if a palette is all black.
-Attempt to avoid selecting a blank palette in PaletteList::GetRandomPalette().
-Add function ScanForChaosNodes() and some associated helper functions in XmlToEmber.
-Make variation param name correction be case insensitive in XmlToEmber.
-Report error when assigning a variation param value in XmlToEmber.
-Add SubBatchPercentPerThread() method to RendererCL.
-Override enterEvent() and leaveEvent() in DoubleSpinBox and SpinBox to prevent the context menu from showing up on right mouse up after already leaving the spinner.
-Filtering the mouse wheel event in TableWidget no longer appears to be needed. It was probably an old Qt bug that has been fixed.
-Gui/ember syncing code in the final render dialog needed to be reworked to accommodate absolute sizes.
2019-04-13 22:00:46 -04:00
vector < eVariationId > * filteredVariationsRef = & m_FilteredVariations ;
2017-08-07 22:53:13 -04:00
auto & deviceNames = OpenCLInfo : : Instance ( ) - > AllDeviceNames ( ) ;
for ( auto & dev : deviceNames )
if ( Find ( ToLower ( dev ) , " nvidia " ) )
nv = true ;
if ( nv ) //Nvidia cannot handle synth. It takes over a minute to compile and uses about 4GB of memory.
{
filteredVariations = m_FilteredVariations ;
--User changes:
-Show common folder locations such as documents, downloads, pictures in the sidebar in all file dialogs.
-Warning message about exceeding memory in final render dialog now suggests strips as the solution to the problem.
-Strips now has a tooltip explaining what it does.
-Allow more digits in the spinners on the color section the flame tab.
-Add manually adjustable size spinners in the final render dialog. Percentage scale and absolute size are fully synced.
-Default prefix in final render is now the filename when doing animations (coming from sequence section of the library tab).
-Changed the elliptic variation back to using a less precise version for float, and a more precise version for double. The last release had it always using double.
-New applied xaos table that shows a read-only view of actual weights by taking the base xform weights and multiplying them by the xaos values.
-New table in the xaos tab that gives a graphical representation of the probability that each xform is chosen, with and without xaos.
-Add button to transpose the xaos rows and columns.
-Add support for importing .chaos files from Chaotica.
--Pasting back to Chaotica will work for most, but not all, variations due to incompatible parameter names in some.
-Curves are now splines instead of Bezier. This adds compatibility with Chaotica, but breaks it for Apophysis. Xmls are still pastable, but the color curves will look different.
--The curve editor on the palette tab can now add points by clicking on the lines and remove points by clicking on the points themselves, just like Chaotica.
--Splines are saved in four new xml fields: overall_curve, red_curve, green_curve and blue_curve.
-Allow for specifying the percentage of a sub batch each thread should iterate through per kernel call when running with OpenCL. This gives a roughly 1% performance increase due to having to make less kernel calls while iterating.
--This field is present for interactive editing (where it's not very useful) and in the final render dialog.
--On the command line, this is specified as --sbpctth for EmberRender and EmberAnimate.
-Allow double clicking to toggle the supersample field in the flame tab between 1 and 2 for easily checking the effect of the field.
-When showing affine values as polar coordinates, show angles normalized to 360 to match Chaotica.
-Fuse Count spinner now toggles between 15 and 100 when double clicking for easily checking the effect of the field.
-Added field for limiting the range in the x and y direction that the initial points are chosen from.
-Added a field called K2 which is an alternative way to set brightness, ignored when zero.
--This has no effect for many variations, but hs a noticeable effect for some.
-Added new variations:
arcsech
arcsech2
arcsinh
arctanh
asteria
block
bwraps_rand
circlecrop2
coth_spiral
crackle2
depth_blur
depth_blur2
depth_gaussian
depth_gaussian2
depth_ngon
depth_ngon2
depth_sine
depth_sine2
dragonfire
dspherical
dust
excinis
exp2
flipx
flowerdb
foci_p
gaussian
glynnia2
glynnsim4
glynnsim5
henon
henon
hex_rand
hex_truchet
hypershift
lazyjess
lens
lozi
lozi
modulusx
modulusy
oscilloscope2
point_symmetry
pointsymmetry
projective
pulse
rotate
scry2
shift
smartshape
spher
squares
starblur2
swirl3
swirl3r
tanh_spiral
target0
target2
tile_hlp
truchet_glyph
truchet_inv
truchet_knot
unicorngaloshen
vibration
vibration2
--hex_truchet, hex_rand should always use double. They are extremely sensitive.
--Bug fixes:
-Bounds sign was flipped for x coordinate of world space when center was not zero.
-Right clicking and dragging spinner showed menu on mouse up, even if it was very far away.
-Text boxes for size in final render dialog were hard to type in. Same bug as xform weight used to be so fix the same way.
-Fix spelling to be plural in toggle color speed box.
-Stop using the blank user palette to generate flames. Either put colored palettes in it, or exclude it from randoms.
-Clicking the random palette button for a palette file with only one palette in it would freeze the program.
-Clicking none scale in final render did not re-render the preview.
-Use less precision on random xaos. No need for 12 decimal places.
-The term sub batch is overloaded in the options dialog. Change the naming and tooltip of those settings for cpu and opencl.
--Also made clear in the tooltip for the default opencl quality setting that the value is per device.
-The arrows spinner in palette editor appears like a read-only label. Made it look like a spinner.
-Fix border colors for various spin boxes and table headers in the style sheet. Requires reload.
-Fix a bug in the bwraps variation which would produce different results than Chaotica and Apophysis.
-Synth was allowed to be selected for random flame generation when using an Nvidia card but it shouldn't have been because Nvidia has a hard time compiling synth.
-A casting bug in the OpenCL kernels for log scaling and density filtering was preventing successful compilations on Intel iGPUs. Fixed even though we don't support anything other than AMD and Nvidia.
-Palette rotation (click and drag) position was not being reset when loading a new flame.
-When the xform circles were hidden, opening and closing the options dialog would improperly reshow them.
-Double click toggle was broken on integer spin boxes.
-Fixed tab order of some controls.
-Creating a palette from a jpg in the palette editor only produced a single color.
--Needed to package imageformats/qjpeg.dll with the Windows installer.
-The basic memory benchmark test flame was not really testing memory. Make it more spread out.
-Remove the temporal samples field from the flame tab, it was never used because it's only an animation parameter which is specified in the final render dialog or on the command line with EmberAnimate.
--Code changes:
-Add IsEmpty() to Palette to determine if a palette is all black.
-Attempt to avoid selecting a blank palette in PaletteList::GetRandomPalette().
-Add function ScanForChaosNodes() and some associated helper functions in XmlToEmber.
-Make variation param name correction be case insensitive in XmlToEmber.
-Report error when assigning a variation param value in XmlToEmber.
-Add SubBatchPercentPerThread() method to RendererCL.
-Override enterEvent() and leaveEvent() in DoubleSpinBox and SpinBox to prevent the context menu from showing up on right mouse up after already leaving the spinner.
-Filtering the mouse wheel event in TableWidget no longer appears to be needed. It was probably an old Qt bug that has been fixed.
-Gui/ember syncing code in the final render dialog needed to be reworked to accommodate absolute sizes.
2019-04-13 22:00:46 -04:00
filteredVariations . erase ( std : : remove_if ( filteredVariations . begin ( ) , filteredVariations . end ( ) ,
[ & ] ( const eVariationId & id ) - > bool
{
return id = = eVariationId : : VAR_SYNTH | | id = = eVariationId : : VAR_PRE_SYNTH | | id = = eVariationId : : VAR_POST_SYNTH ;
}
) , filteredVariations . end ( ) ) ;
filteredVariationsRef = & filteredVariations ;
2017-08-07 22:53:13 -04:00
}
2014-07-08 03:11:14 -04:00
--User changes
-Add support for multiple GPU devices.
--These options are present in the command line and in Fractorium.
-Change scheme of specifying devices from platform,device to just total device index.
--Single number on the command line.
--Change from combo boxes for device selection to a table of all devices in Fractorium.
-Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Bug fixes
-EmberAnimate, EmberRender, FractoriumSettings, FinalRenderDialog: Fix wrong order of arguments to Clamp() when assigning thread priority.
-VariationsDC.h: Fix NVidia OpenCL compilation error in DCTriangleVariation.
-FractoriumXformsColor.cpp: Checking for null pixmap pointer is not enough, must also check if the underlying buffer is null via call to QPixmap::isNull().
--Code changes
-Ember.h: Add case for FLAME_MOTION_NONE and default in ApplyFlameMotion().
-EmberMotion.h: Call base constructor.
-EmberPch.h: #pragma once only on Windows.
-EmberToXml.h:
--Handle different types of exceptions.
--Add default cases to ToString().
-Isaac.h: Remove unused variable in constructor.
-Point.h: Call base constructor in Color().
-Renderer.h/cpp:
--Add bool to Alloc() to only allocate memory for the histogram. Needed for multi-GPU.
--Make CoordMap() return a const ref, not a pointer.
-SheepTools.h:
--Use 64-bit types like the rest of the code already does.
--Fix some comment misspellings.
-Timing.h: Make BeginTime(), EndTime(), ElapsedTime() and Format() be const functions.
-Utils.h:
--Add new functions Equal() and Split().
--Handle more exception types in ReadFile().
--Get rid of most legacy blending of C and C++ argument parsing.
-XmlToEmber.h:
--Get rid of most legacy blending of C and C++ code from flam3.
--Remove some unused variables.
-EmberAnimate:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--If a render fails, exit since there is no point in continuing an animation with a missing frame.
--Pass variables to threaded save better, which most likely fixes a very subtle bug that existed before.
--Remove some unused variables.
-EmberGenome, EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
-EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--Only print values when not rendering with OpenCL, since they're always 0 in that case.
-EmberCLPch.h:
--#pragma once only on Windows.
--#include <atomic>.
-IterOpenCLKernelCreator.h: Add new kernel for summing two histograms. This is needed for multi-GPU.
-OpenCLWrapper.h:
--Move all OpenCL info related code into its own class OpenCLInfo.
--Add members to cache the values of global memory size and max allocation size.
-RendererCL.h/cpp:
--Redesign to accomodate multi-GPU.
--Constructor now takes a vector of devices.
--Remove DumpErrorReport() function, it's handled in the base.
--ClearBuffer(), ReadPoints(), WritePoints(), ReadHist() and WriteHist() now optionally take a device index as a parameter.
--MakeDmap() override and m_DmapCL member removed because it no longer applies since the histogram is always float since the last commit.
--Add new function SumDeviceHist() to sum histograms from two devices by first copying to a temporary on the host, then a temporary on the device, then summing.
--m_Calls member removed, as it's now per-device.
--OpenCLWrapper removed.
--m_Seeds member is now a vector of vector of seeds, to accomodate a separate and different array of seeds for each device.
--Added member m_Devices, a vector of unique_ptr of RendererCLDevice.
-EmberCommon.h
--Added Devices() function to convert from a vector of device indices to a vector of platform,device indices.
--Changed CreateRenderer() to accept a vector of devices to create a single RendererCL which will split work across multiple devices.
--Added CreateRenderers() function to accept a vector of devices to create multiple RendererCL, each which will render on a single device.
--Add more comments to some existing functions.
-EmberCommonPch.h: #pragma once only on Windows.
-EmberOptions.h:
--Remove --platform option, it's just sequential device number now with the --device option.
--Make --out be OPT_USE_RENDER instead of OPT_RENDER_ANIM since it's an error condition when animating. It makes no sense to write all frames to a single image.
--Add Devices() function to parse comma separated --device option string and return a vector of device indices.
--Make int and uint types be 64-bit, so intmax_t and size_t.
--Make better use of macros.
-JpegUtils.h: Make string parameters to WriteJpeg() and WritePng() be const ref.
-All project files: Turn off buffer security check option in Visual Studio (/Gs-)
-deployment.pri: Remove the line OTHER_FILES +=, it's pointless and was causing problems.
-Ember.pro, EmberCL.pro: Add CONFIG += plugin, otherwise it wouldn't link.
-EmberCL.pro: Add new files for multi-GPU support.
-build_all.sh: use -j4 and QMAKE=${QMAKE:/usr/bin/qmake}
-shared_settings.pri:
-Add version string.
-Remove old DESTDIR definitions.
-Add the following lines or else nothing would build:
CONFIG(release, debug|release) {
CONFIG += warn_off
DESTDIR = ../../../Bin/release
}
CONFIG(debug, debug|release) {
DESTDIR = ../../../Bin/debug
}
QMAKE_POST_LINK += $$quote(cp --update ../../../Data/flam3-palettes.xml $${DESTDIR}$$escape_expand(\n\t))
LIBS += -L/usr/lib -lpthread
-AboutDialog.ui: Another futile attempt to make it look correct on Linux.
-FinalRenderDialog.h/cpp:
--Add support for multi-GPU.
--Change from combo boxes for device selection to a table of all devices.
--Ensure device selection makes sense.
--Remove "FinalRender" prefix of various function names, it's implied given the context.
-FinalRenderEmberController.h/cpp:
--Add support for multi-GPU.
--Change m_FinishedImageCount to be atomic.
--Move CancelRender() from the base to FinalRenderEmberController<T>.
--Refactor RenderComplete() to omit any progress related functionality or image saving since it can be potentially ran in a thread.
--Consolidate setting various renderer fields into SyncGuiToRenderer().
-Fractorium.cpp: Allow for resizing of the options dialog to show the entire device table.
-FractoriumCommon.h: Add various functions to handle a table showing the available OpenCL devices on the system.
-FractoriumEmberController.h/cpp: Remove m_FinalImageIndex, it's no longer needed.
-FractoriumRender.cpp: Scale the interactive sub batch count and quality by the number of devices used.
-FractoriumSettings.h/cpp:
--Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Add multi-GPU support, remove old device,platform pair.
-FractoriumToolbar.cpp: Disable OpenCL toolbar button if there are no devices present on the system.
-FractoriumOptionsDialog.h/cpp:
--Add support for multi-GPU.
--Consolidate more assignments in DataToGui().
--Enable/disable CPU/OpenCL items in response to OpenCL checkbox event.
-Misc: Convert almost everything to size_t for unsigned, intmax_t for signed.
2015-09-12 21:33:45 -04:00
for ( size_t i = 0 ; i < count ; i + + )
2014-07-08 03:11:14 -04:00
{
--User changes:
-Show common folder locations such as documents, downloads, pictures in the sidebar in all file dialogs.
-Warning message about exceeding memory in final render dialog now suggests strips as the solution to the problem.
-Strips now has a tooltip explaining what it does.
-Allow more digits in the spinners on the color section the flame tab.
-Add manually adjustable size spinners in the final render dialog. Percentage scale and absolute size are fully synced.
-Default prefix in final render is now the filename when doing animations (coming from sequence section of the library tab).
-Changed the elliptic variation back to using a less precise version for float, and a more precise version for double. The last release had it always using double.
-New applied xaos table that shows a read-only view of actual weights by taking the base xform weights and multiplying them by the xaos values.
-New table in the xaos tab that gives a graphical representation of the probability that each xform is chosen, with and without xaos.
-Add button to transpose the xaos rows and columns.
-Add support for importing .chaos files from Chaotica.
--Pasting back to Chaotica will work for most, but not all, variations due to incompatible parameter names in some.
-Curves are now splines instead of Bezier. This adds compatibility with Chaotica, but breaks it for Apophysis. Xmls are still pastable, but the color curves will look different.
--The curve editor on the palette tab can now add points by clicking on the lines and remove points by clicking on the points themselves, just like Chaotica.
--Splines are saved in four new xml fields: overall_curve, red_curve, green_curve and blue_curve.
-Allow for specifying the percentage of a sub batch each thread should iterate through per kernel call when running with OpenCL. This gives a roughly 1% performance increase due to having to make less kernel calls while iterating.
--This field is present for interactive editing (where it's not very useful) and in the final render dialog.
--On the command line, this is specified as --sbpctth for EmberRender and EmberAnimate.
-Allow double clicking to toggle the supersample field in the flame tab between 1 and 2 for easily checking the effect of the field.
-When showing affine values as polar coordinates, show angles normalized to 360 to match Chaotica.
-Fuse Count spinner now toggles between 15 and 100 when double clicking for easily checking the effect of the field.
-Added field for limiting the range in the x and y direction that the initial points are chosen from.
-Added a field called K2 which is an alternative way to set brightness, ignored when zero.
--This has no effect for many variations, but hs a noticeable effect for some.
-Added new variations:
arcsech
arcsech2
arcsinh
arctanh
asteria
block
bwraps_rand
circlecrop2
coth_spiral
crackle2
depth_blur
depth_blur2
depth_gaussian
depth_gaussian2
depth_ngon
depth_ngon2
depth_sine
depth_sine2
dragonfire
dspherical
dust
excinis
exp2
flipx
flowerdb
foci_p
gaussian
glynnia2
glynnsim4
glynnsim5
henon
henon
hex_rand
hex_truchet
hypershift
lazyjess
lens
lozi
lozi
modulusx
modulusy
oscilloscope2
point_symmetry
pointsymmetry
projective
pulse
rotate
scry2
shift
smartshape
spher
squares
starblur2
swirl3
swirl3r
tanh_spiral
target0
target2
tile_hlp
truchet_glyph
truchet_inv
truchet_knot
unicorngaloshen
vibration
vibration2
--hex_truchet, hex_rand should always use double. They are extremely sensitive.
--Bug fixes:
-Bounds sign was flipped for x coordinate of world space when center was not zero.
-Right clicking and dragging spinner showed menu on mouse up, even if it was very far away.
-Text boxes for size in final render dialog were hard to type in. Same bug as xform weight used to be so fix the same way.
-Fix spelling to be plural in toggle color speed box.
-Stop using the blank user palette to generate flames. Either put colored palettes in it, or exclude it from randoms.
-Clicking the random palette button for a palette file with only one palette in it would freeze the program.
-Clicking none scale in final render did not re-render the preview.
-Use less precision on random xaos. No need for 12 decimal places.
-The term sub batch is overloaded in the options dialog. Change the naming and tooltip of those settings for cpu and opencl.
--Also made clear in the tooltip for the default opencl quality setting that the value is per device.
-The arrows spinner in palette editor appears like a read-only label. Made it look like a spinner.
-Fix border colors for various spin boxes and table headers in the style sheet. Requires reload.
-Fix a bug in the bwraps variation which would produce different results than Chaotica and Apophysis.
-Synth was allowed to be selected for random flame generation when using an Nvidia card but it shouldn't have been because Nvidia has a hard time compiling synth.
-A casting bug in the OpenCL kernels for log scaling and density filtering was preventing successful compilations on Intel iGPUs. Fixed even though we don't support anything other than AMD and Nvidia.
-Palette rotation (click and drag) position was not being reset when loading a new flame.
-When the xform circles were hidden, opening and closing the options dialog would improperly reshow them.
-Double click toggle was broken on integer spin boxes.
-Fixed tab order of some controls.
-Creating a palette from a jpg in the palette editor only produced a single color.
--Needed to package imageformats/qjpeg.dll with the Windows installer.
-The basic memory benchmark test flame was not really testing memory. Make it more spread out.
-Remove the temporal samples field from the flame tab, it was never used because it's only an animation parameter which is specified in the final render dialog or on the command line with EmberAnimate.
--Code changes:
-Add IsEmpty() to Palette to determine if a palette is all black.
-Attempt to avoid selecting a blank palette in PaletteList::GetRandomPalette().
-Add function ScanForChaosNodes() and some associated helper functions in XmlToEmber.
-Make variation param name correction be case insensitive in XmlToEmber.
-Report error when assigning a variation param value in XmlToEmber.
-Add SubBatchPercentPerThread() method to RendererCL.
-Override enterEvent() and leaveEvent() in DoubleSpinBox and SpinBox to prevent the context menu from showing up on right mouse up after already leaving the spinner.
-Filtering the mouse wheel event in TableWidget no longer appears to be needed. It was probably an old Qt bug that has been fixed.
-Gui/ember syncing code in the final render dialog needed to be reworked to accommodate absolute sizes.
2019-04-13 22:00:46 -04:00
m_SheepTools - > Random ( ember , * filteredVariationsRef , static_cast < intmax_t > ( QTIsaac < ISAAC_SIZE , ISAAC_INT > : : LockedFrand < T > ( - 2 , 2 ) ) , 0 , 8 ) ;
2014-07-08 03:11:14 -04:00
ParamsToEmber ( ember ) ;
2014-10-14 11:53:15 -04:00
ember . m_Index = i ;
--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
ember . m_Name = m_EmberFile . m_Filename . toStdString ( ) + " _ " + ToString ( i + 1ULL ) . toStdString ( ) ;
2014-07-08 03:11:14 -04:00
m_EmberFile . m_Embers . push_back ( ember ) ;
}
m_LastSaveAll = " " ;
FillLibraryTree ( ) ;
}
/// <summary>
/// Create a new flock and assign the first ember as the current one.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionNewFlock ( bool checked )
{
2015-10-27 00:31:35 -04:00
m_Controller - > NewFlock ( m_Settings - > RandomCount ( ) ) ;
2016-04-13 23:59:57 -04:00
m_Controller - > SetEmber ( 0 , false ) ;
2014-07-08 03:11:14 -04:00
}
/// <summary>
/// Create and add a new empty ember in the currently opened file
/// and set it as the current one.
/// It will have one empty xform in it.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : NewEmptyFlameInCurrentFile ( )
{
Ember < T > ember ;
Xform < T > xform ;
QDateTime local ( QDateTime : : currentDateTime ( ) ) ;
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
2014-07-08 03:11:14 -04:00
ParamsToEmber ( ember ) ;
xform . m_Weight = T ( 0.25 ) ;
xform . m_ColorX = m_Rand . Frand01 < T > ( ) ;
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
xform . AddVariation ( m_VariationList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
2014-07-08 03:11:14 -04:00
ember . AddXform ( xform ) ;
2017-02-26 12:34:43 -05:00
ember . m_Palette = * m_PaletteList - > GetRandomPalette ( ) ;
2014-10-14 11:53:15 -04:00
ember . m_Name = EmberFile < T > : : DefaultEmberName ( m_EmberFile . Size ( ) + 1 ) . toStdString ( ) ;
ember . m_Index = m_EmberFile . Size ( ) ;
2014-07-08 03:11:14 -04:00
m_EmberFile . m_Embers . push_back ( ember ) ; //Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.
m_EmberFile . MakeNamesUnique ( ) ;
UpdateLibraryTree ( ) ;
2016-04-13 23:59:57 -04:00
SetEmber ( m_EmberFile . Size ( ) - 1 , false ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionNewEmptyFlameInCurrentFile ( bool checked ) { m_Controller - > NewEmptyFlameInCurrentFile ( ) ; }
/// <summary>
/// Create and add a new random ember in the currently opened file
/// and set it as the current one.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : NewRandomFlameInCurrentFile ( )
{
Ember < T > ember ;
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
m_SheepTools - > Random ( ember , m_FilteredVariations , static_cast < int > ( QTIsaac < ISAAC_SIZE , ISAAC_INT > : : LockedFrand < T > ( - 2 , 2 ) ) , 0 , 8 ) ;
2014-07-08 03:11:14 -04:00
ParamsToEmber ( ember ) ;
2014-10-14 11:53:15 -04:00
ember . m_Name = EmberFile < T > : : DefaultEmberName ( m_EmberFile . Size ( ) + 1 ) . toStdString ( ) ;
ember . m_Index = m_EmberFile . Size ( ) ;
2014-07-08 03:11:14 -04:00
m_EmberFile . m_Embers . push_back ( ember ) ; //Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.
m_EmberFile . MakeNamesUnique ( ) ;
UpdateLibraryTree ( ) ;
2016-04-13 23:59:57 -04:00
SetEmber ( m_EmberFile . Size ( ) - 1 , false ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionNewRandomFlameInCurrentFile ( bool checked ) { m_Controller - > NewRandomFlameInCurrentFile ( ) ; }
/// <summary>
/// Create and add a a copy of the current ember in the currently opened file
/// and set it as the current one.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : CopyFlameInCurrentFile ( )
{
2016-02-12 00:38:21 -05:00
auto ember = m_Ember ;
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
2014-10-14 11:53:15 -04:00
ember . m_Name = EmberFile < T > : : DefaultEmberName ( m_EmberFile . Size ( ) + 1 ) . toStdString ( ) ;
ember . m_Index = m_EmberFile . Size ( ) ;
2014-07-08 03:11:14 -04:00
m_EmberFile . m_Embers . push_back ( ember ) ; //Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.
m_EmberFile . MakeNamesUnique ( ) ;
UpdateLibraryTree ( ) ;
2016-04-13 23:59:57 -04:00
SetEmber ( m_EmberFile . Size ( ) - 1 , false ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionCopyFlameInCurrentFile ( bool checked ) { m_Controller - > CopyFlameInCurrentFile ( ) ; }
2020-02-17 21:45:02 -05:00
/// <summary>
/// Create a reference file containing one ember for every possible regular variation, plus one for post_smartcrop
/// since it only exists in post form.
/// This will replace whatever file the user has open.
/// Clears the undo state.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : CreateReferenceFile ( )
{
bool nv = false ;
size_t i ;
StopAllPreviewRenderers ( ) ;
auto temppal = m_Ember . m_Palette ;
m_EmberFile . Clear ( ) ;
m_EmberFile . m_Filename = QString ( " Reference_ " ) + EMBER_VERSION ;
auto varList = VariationList < T > : : Instance ( ) ;
auto & regVars = varList - > RegVars ( ) ;
auto count = regVars . size ( ) ;
auto addsquaresfunc = [ & ] ( size_t i , const Variation < T > * var )
{
Ember < T > ember ;
Xform < T > xf0 , xf1 , xf2 , xf3 , xf4 , xffinal ;
//
xf0 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_SQUARE , T ( 0.5 ) ) ) ;
//
xf1 . m_Affine . C ( T ( 0.5 ) ) ;
xf1 . m_Affine . F ( T ( 0.5 ) ) ;
xf1 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
//
xf2 . m_Affine . C ( T ( - 0.5 ) ) ;
xf2 . m_Affine . F ( T ( 0.5 ) ) ;
xf2 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
//
xf3 . m_Affine . C ( T ( - 0.5 ) ) ;
xf3 . m_Affine . F ( T ( - 0.5 ) ) ;
xf3 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
//
xf4 . m_Affine . C ( T ( 0.5 ) ) ;
xf4 . m_Affine . F ( T ( - 0.5 ) ) ;
xf4 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
//
xffinal . AddVariation ( var - > Copy ( ) ) ;
//
ember . AddXform ( xf0 ) ;
ember . AddXform ( xf1 ) ;
ember . AddXform ( xf2 ) ;
ember . AddXform ( xf3 ) ;
ember . AddXform ( xf4 ) ;
ember . SetFinalXform ( xffinal ) ;
ember . EqualizeWeights ( ) ;
ember . m_Index = i ;
ember . m_MaxRadDE = 0 ;
ember . m_Name = var - > Name ( ) + " Squares " ;
ember . m_Palette = temppal ;
m_EmberFile . m_Embers . push_back ( ember ) ;
} ;
auto addsbarsfunc = [ & ] ( size_t i , const Variation < T > * var )
{
Ember < T > ember ;
Xform < T > xf0 , xf1 , xf2 , xffinal ;
//
xf0 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_PRE_BLUR , T ( 100 ) ) ) ;
xf0 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_CYLINDER , T ( 0.1 ) ) ) ;
//
xf1 . m_Affine . C ( T ( 0.4 ) ) ;
xf1 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
//
xf2 . m_Affine . C ( T ( - 0.4 ) ) ;
xf2 . AddVariation ( varList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
//
xffinal . AddVariation ( var - > Copy ( ) ) ;
ember . AddXform ( xf0 ) ;
ember . AddXform ( xf1 ) ;
ember . AddXform ( xf2 ) ;
ember . SetFinalXform ( xffinal ) ;
ember . EqualizeWeights ( ) ;
ember . m_Index = i ;
ember . m_MaxRadDE = 0 ;
ember . m_Name = var - > Name ( ) + " Bars " ;
ember . m_Palette = temppal ;
m_EmberFile . m_Embers . push_back ( ember ) ;
} ;
for ( i = 0 ; i < count ; i + + )
{
addsquaresfunc ( i , regVars [ i ] ) ;
addsbarsfunc ( i , regVars [ i ] ) ;
}
addsquaresfunc ( i , varList - > GetVariation ( eVariationId : : VAR_POST_SMARTCROP ) ) ; //post_smartcrop is the only variation that exists only in post form, so it must be done manually here.
addsbarsfunc ( i , varList - > GetVariation ( eVariationId : : VAR_POST_SMARTCROP ) ) ;
m_LastSaveAll = " " ;
FillLibraryTree ( ) ;
}
void Fractorium : : OnActionCreateReferenceFile ( bool checked ) { m_Controller - > CreateReferenceFile ( ) ; }
2014-07-08 03:11:14 -04:00
/// <summary>
/// Open a list of ember Xml files, apply various values from the GUI widgets.
/// Either append these newly read embers to the existing open embers,
/// or clear the current ember file first.
/// When appending, add the new embers the the end of library tree.
/// When not appending, clear and populate the library tree with the new embers.
/// Set the current ember to the first one in the newly opened list.
/// Clears the undo state.
/// Resets the rendering process.
/// </summary>
/// <param name="filenames">A list of full paths and filenames</param>
/// <param name="append">True to append the embers in the new files to the end of the currently open embers, false to clear and replace them</param>
template < typename T >
2014-10-14 11:53:15 -04:00
void FractoriumEmberController < T > : : OpenAndPrepFiles ( const QStringList & filenames , bool append )
2014-07-08 03:11:14 -04:00
{
if ( ! filenames . empty ( ) )
{
size_t i ;
EmberFile < T > emberFile ;
XmlToEmber < T > parser ;
vector < Ember < T > > embers ;
2016-03-02 22:16:36 -05:00
vector < string > errors ;
2016-02-13 20:24:51 -05:00
uint previousSize = append ? uint ( m_EmberFile . Size ( ) ) : 0u ;
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
2014-07-08 03:11:14 -04:00
emberFile . m_Filename = filenames [ 0 ] ;
2016-02-02 20:51:58 -05:00
for ( auto & filename : filenames )
2014-07-08 03:11:14 -04:00
{
embers . clear ( ) ;
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
if ( parser . Parse ( filename . toStdString ( ) . c_str ( ) , embers , true ) & & ! embers . empty ( ) )
2014-07-08 03:11:14 -04:00
{
for ( i = 0 ; i < embers . size ( ) ; i + + )
{
2014-10-14 11:53:15 -04:00
ConstrainDimensions ( embers [ i ] ) ; //Do not exceed the max texture size.
2014-07-08 03:11:14 -04:00
//Also ensure it has a name.
if ( embers [ i ] . m_Name = = " " | | embers [ i ] . m_Name = = " No name " )
2014-12-11 00:50:15 -05:00
embers [ i ] . m_Name = ToString < qulonglong > ( i ) . toStdString ( ) ;
2014-07-08 03:11:14 -04:00
embers [ i ] . m_Quality = m_Fractorium - > m_QualitySpin - > value ( ) ;
embers [ i ] . m_Supersample = m_Fractorium - > m_SupersampleSpin - > value ( ) ;
}
m_LastSaveAll = " " ;
emberFile . m_Embers . insert ( emberFile . m_Embers . end ( ) , embers . begin ( ) , embers . end ( ) ) ;
2016-03-02 22:16:36 -05:00
errors = parser . ErrorReport ( ) ;
2014-07-08 03:11:14 -04:00
}
else
{
2016-03-02 22:16:36 -05:00
errors = parser . ErrorReport ( ) ;
2014-10-14 11:53:15 -04:00
m_Fractorium - > ShowCritical ( " Open Failed " , " Could not open file, see info tab for details. " ) ;
2014-07-08 03:11:14 -04:00
}
2016-03-02 22:16:36 -05:00
if ( ! errors . empty ( ) )
2016-04-03 21:55:12 -04:00
m_Fractorium - > ErrorReportToQTextEdit ( errors , m_Fractorium - > ui . InfoFileOpeningTextEdit , false ) ; //Concat errors from all files.
2014-07-08 03:11:14 -04:00
}
2016-01-04 19:50:15 -05:00
2014-07-08 03:11:14 -04:00
if ( append )
{
if ( m_EmberFile . m_Filename = = " " )
m_EmberFile . m_Filename = filenames [ 0 ] ;
m_EmberFile . m_Embers . insert ( m_EmberFile . m_Embers . end ( ) , emberFile . m_Embers . begin ( ) , emberFile . m_Embers . end ( ) ) ;
}
2016-04-03 21:55:12 -04:00
else if ( emberFile . Size ( ) > 0 ) //Ensure at least something was read.
m_EmberFile = std : : move ( emberFile ) ; //Move the temp to avoid creating dupes because we no longer need it.
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
else if ( ! m_EmberFile . Size ( ) )
{
//Loading failed, so fill it with a dummy.
Ember < T > ember ;
m_EmberFile . m_Embers . push_back ( ember ) ;
}
2014-07-08 03:11:14 -04:00
//Resync indices and names.
2016-04-03 21:55:12 -04:00
i = 0 ;
for ( auto & it : m_EmberFile . m_Embers )
it . m_Index = i + + ;
2014-07-08 03:11:14 -04:00
m_EmberFile . MakeNamesUnique ( ) ;
if ( append )
UpdateLibraryTree ( ) ;
else
FillLibraryTree ( append ? previousSize - 1 : 0 ) ;
ClearUndo ( ) ;
2019-06-11 22:25:21 -04:00
m_GLController - > ClearControl ( ) ;
2016-04-13 23:59:57 -04:00
SetEmber ( previousSize , false ) ;
2014-07-08 03:11:14 -04:00
}
}
/// <summary>
/// Show a file open dialog to open ember Xml files.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionOpen ( bool checked ) { m_Controller - > OpenAndPrepFiles ( SetupOpenXmlDialog ( ) , false ) ; }
2020-03-05 19:17:29 -05:00
/// <summary>
/// Show a file open dialog to open examples Xml files.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionOpenExamples ( bool checked ) { m_Controller - > OpenAndPrepFiles ( SetupOpenXmlDialog ( true ) , false ) ; }
2014-07-08 03:11:14 -04:00
/// <summary>
/// Save current ember as Xml, using the Xml saving template values from the options.
/// This will first save the current ember back to the opened file in memory before
/// saving it to disk.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : SaveCurrentAsXml ( )
{
2019-06-11 22:25:21 -04:00
QString filename ;
2016-02-12 00:38:21 -05:00
auto s = m_Fractorium - > m_Settings ;
2014-07-08 03:11:14 -04:00
2015-03-21 18:27:37 -04:00
if ( s - > SaveAutoUnique ( ) & & m_LastSaveCurrent ! = " " )
{
filename = EmberFile < T > : : UniqueFilename ( m_LastSaveCurrent ) ;
}
else if ( QFile : : exists ( m_LastSaveCurrent ) )
2014-07-08 03:11:14 -04:00
{
filename = m_LastSaveCurrent ;
}
else
{
2014-10-14 11:53:15 -04:00
if ( m_EmberFile . Size ( ) = = 1 )
2014-07-08 03:11:14 -04:00
filename = m_Fractorium - > SetupSaveXmlDialog ( m_EmberFile . m_Filename ) ; //If only one ember present, just use parent filename.
else
filename = m_Fractorium - > SetupSaveXmlDialog ( QString : : fromStdString ( m_Ember . m_Name ) ) ; //More than one ember present, use individual ember name.
}
2016-01-04 19:50:15 -05:00
2014-07-08 03:11:14 -04:00
if ( filename ! = " " )
{
2016-02-12 00:38:21 -05:00
auto ember = m_Ember ;
2014-07-08 03:11:14 -04:00
EmberToXml < T > writer ;
QFileInfo fileInfo ( filename ) ;
2016-02-12 00:38:21 -05:00
auto tempEdit = ember . m_Edits ;
2014-07-08 03:11:14 -04:00
SaveCurrentToOpenedFile ( ) ; //Save the current ember back to the opened file before writing to disk.
ApplyXmlSavingTemplate ( ember ) ;
2015-01-02 18:11:36 -05:00
ember . m_Edits = writer . CreateNewEditdoc ( & ember , nullptr , " edit " , s - > Nick ( ) . toStdString ( ) , s - > Url ( ) . toStdString ( ) , s - > Id ( ) . toStdString ( ) , " " , 0 , 0 ) ;
2014-07-08 03:11:14 -04:00
2015-10-27 00:31:35 -04:00
if ( tempEdit )
2014-07-08 03:11:14 -04:00
xmlFreeDoc ( tempEdit ) ;
2016-04-03 21:55:12 -04:00
if ( writer . Save ( filename . toStdString ( ) . c_str ( ) , ember , 0 , true , true ) )
2014-07-08 03:11:14 -04:00
{
s - > SaveFolder ( fileInfo . canonicalPath ( ) ) ;
2015-03-21 18:27:37 -04:00
if ( ! s - > SaveAutoUnique ( ) | | m_LastSaveCurrent = = " " ) //Only save filename on first time through when doing auto unique names.
m_LastSaveCurrent = filename ;
2014-07-08 03:11:14 -04:00
}
else
2014-10-14 11:53:15 -04:00
m_Fractorium - > ShowCritical ( " Save Failed " , " Could not save file, try saving to a different folder. " ) ;
2014-07-08 03:11:14 -04:00
}
2019-06-11 21:30:20 -04:00
2019-06-11 22:25:21 -04:00
m_GLController - > ClearControl ( ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionSaveCurrentAsXml ( bool checked ) { m_Controller - > SaveCurrentAsXml ( ) ; }
/// <summary>
/// Save entire opened file Xml, using the Xml saving template values from the options on each ember.
/// This will first save the current ember back to the opened file in memory before
/// saving all to disk.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : SaveEntireFileAsXml ( )
{
QString filename ;
2016-02-12 00:38:21 -05:00
auto s = m_Fractorium - > m_Settings ;
2014-07-08 03:11:14 -04:00
2015-03-21 18:27:37 -04:00
if ( s - > SaveAutoUnique ( ) & & m_LastSaveAll ! = " " )
filename = EmberFile < T > : : UniqueFilename ( m_LastSaveAll ) ;
else if ( QFile : : exists ( m_LastSaveAll ) )
2014-07-08 03:11:14 -04:00
filename = m_LastSaveAll ;
else
filename = m_Fractorium - > SetupSaveXmlDialog ( m_EmberFile . m_Filename ) ;
2016-01-04 19:50:15 -05:00
2014-07-08 03:11:14 -04:00
if ( filename ! = " " )
{
EmberFile < T > emberFile ;
EmberToXml < T > writer ;
QFileInfo fileInfo ( filename ) ;
SaveCurrentToOpenedFile ( ) ; //Save the current ember back to the opened file before writing to disk.
emberFile = m_EmberFile ;
2015-05-03 20:13:14 -04:00
for ( auto & ember : emberFile . m_Embers )
ApplyXmlSavingTemplate ( ember ) ;
2014-07-08 03:11:14 -04:00
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
if ( writer . Save ( filename . toStdString ( ) . c_str ( ) , emberFile . m_Embers , 0 , true , true , false , false , false ) )
2014-07-08 03:11:14 -04:00
{
2015-03-21 18:27:37 -04:00
if ( ! s - > SaveAutoUnique ( ) | | m_LastSaveAll = = " " ) //Only save filename on first time through when doing auto unique names.
m_LastSaveAll = filename ;
2014-07-08 03:11:14 -04:00
s - > SaveFolder ( fileInfo . canonicalPath ( ) ) ;
}
else
2014-10-14 11:53:15 -04:00
m_Fractorium - > ShowCritical ( " Save Failed " , " Could not save file, try saving to a different folder. " ) ;
2014-07-08 03:11:14 -04:00
}
2019-06-11 21:30:20 -04:00
2019-06-11 22:25:21 -04:00
m_GLController - > ClearControl ( ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionSaveEntireFileAsXml ( bool checked ) { m_Controller - > SaveEntireFileAsXml ( ) ; }
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
template < typename T >
void FractoriumEmberController < T > : : SaveCurrentFileOnShutdown ( )
{
EmberToXml < T > writer ;
auto path = GetDefaultUserPath ( ) ;
QDir dir ( path ) ;
if ( ! dir . exists ( ) )
dir . mkpath ( " . " ) ;
string filename = path . toStdString ( ) + " /lastonshutdown.flame " ;
writer . Save ( filename , m_EmberFile . m_Embers , 0 , true , true , false , false , false ) ;
}
2014-07-08 03:11:14 -04:00
/// <summary>
/// Show a file save dialog and save what is currently shown in the render window to disk as an image.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionSaveCurrentScreen ( bool checked )
{
2016-02-12 00:38:21 -05:00
auto filename = SetupSaveImageDialog ( m_Controller - > Name ( ) ) ;
--User changes
-Add support for multiple GPU devices.
--These options are present in the command line and in Fractorium.
-Change scheme of specifying devices from platform,device to just total device index.
--Single number on the command line.
--Change from combo boxes for device selection to a table of all devices in Fractorium.
-Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Bug fixes
-EmberAnimate, EmberRender, FractoriumSettings, FinalRenderDialog: Fix wrong order of arguments to Clamp() when assigning thread priority.
-VariationsDC.h: Fix NVidia OpenCL compilation error in DCTriangleVariation.
-FractoriumXformsColor.cpp: Checking for null pixmap pointer is not enough, must also check if the underlying buffer is null via call to QPixmap::isNull().
--Code changes
-Ember.h: Add case for FLAME_MOTION_NONE and default in ApplyFlameMotion().
-EmberMotion.h: Call base constructor.
-EmberPch.h: #pragma once only on Windows.
-EmberToXml.h:
--Handle different types of exceptions.
--Add default cases to ToString().
-Isaac.h: Remove unused variable in constructor.
-Point.h: Call base constructor in Color().
-Renderer.h/cpp:
--Add bool to Alloc() to only allocate memory for the histogram. Needed for multi-GPU.
--Make CoordMap() return a const ref, not a pointer.
-SheepTools.h:
--Use 64-bit types like the rest of the code already does.
--Fix some comment misspellings.
-Timing.h: Make BeginTime(), EndTime(), ElapsedTime() and Format() be const functions.
-Utils.h:
--Add new functions Equal() and Split().
--Handle more exception types in ReadFile().
--Get rid of most legacy blending of C and C++ argument parsing.
-XmlToEmber.h:
--Get rid of most legacy blending of C and C++ code from flam3.
--Remove some unused variables.
-EmberAnimate:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--If a render fails, exit since there is no point in continuing an animation with a missing frame.
--Pass variables to threaded save better, which most likely fixes a very subtle bug that existed before.
--Remove some unused variables.
-EmberGenome, EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
-EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--Only print values when not rendering with OpenCL, since they're always 0 in that case.
-EmberCLPch.h:
--#pragma once only on Windows.
--#include <atomic>.
-IterOpenCLKernelCreator.h: Add new kernel for summing two histograms. This is needed for multi-GPU.
-OpenCLWrapper.h:
--Move all OpenCL info related code into its own class OpenCLInfo.
--Add members to cache the values of global memory size and max allocation size.
-RendererCL.h/cpp:
--Redesign to accomodate multi-GPU.
--Constructor now takes a vector of devices.
--Remove DumpErrorReport() function, it's handled in the base.
--ClearBuffer(), ReadPoints(), WritePoints(), ReadHist() and WriteHist() now optionally take a device index as a parameter.
--MakeDmap() override and m_DmapCL member removed because it no longer applies since the histogram is always float since the last commit.
--Add new function SumDeviceHist() to sum histograms from two devices by first copying to a temporary on the host, then a temporary on the device, then summing.
--m_Calls member removed, as it's now per-device.
--OpenCLWrapper removed.
--m_Seeds member is now a vector of vector of seeds, to accomodate a separate and different array of seeds for each device.
--Added member m_Devices, a vector of unique_ptr of RendererCLDevice.
-EmberCommon.h
--Added Devices() function to convert from a vector of device indices to a vector of platform,device indices.
--Changed CreateRenderer() to accept a vector of devices to create a single RendererCL which will split work across multiple devices.
--Added CreateRenderers() function to accept a vector of devices to create multiple RendererCL, each which will render on a single device.
--Add more comments to some existing functions.
-EmberCommonPch.h: #pragma once only on Windows.
-EmberOptions.h:
--Remove --platform option, it's just sequential device number now with the --device option.
--Make --out be OPT_USE_RENDER instead of OPT_RENDER_ANIM since it's an error condition when animating. It makes no sense to write all frames to a single image.
--Add Devices() function to parse comma separated --device option string and return a vector of device indices.
--Make int and uint types be 64-bit, so intmax_t and size_t.
--Make better use of macros.
-JpegUtils.h: Make string parameters to WriteJpeg() and WritePng() be const ref.
-All project files: Turn off buffer security check option in Visual Studio (/Gs-)
-deployment.pri: Remove the line OTHER_FILES +=, it's pointless and was causing problems.
-Ember.pro, EmberCL.pro: Add CONFIG += plugin, otherwise it wouldn't link.
-EmberCL.pro: Add new files for multi-GPU support.
-build_all.sh: use -j4 and QMAKE=${QMAKE:/usr/bin/qmake}
-shared_settings.pri:
-Add version string.
-Remove old DESTDIR definitions.
-Add the following lines or else nothing would build:
CONFIG(release, debug|release) {
CONFIG += warn_off
DESTDIR = ../../../Bin/release
}
CONFIG(debug, debug|release) {
DESTDIR = ../../../Bin/debug
}
QMAKE_POST_LINK += $$quote(cp --update ../../../Data/flam3-palettes.xml $${DESTDIR}$$escape_expand(\n\t))
LIBS += -L/usr/lib -lpthread
-AboutDialog.ui: Another futile attempt to make it look correct on Linux.
-FinalRenderDialog.h/cpp:
--Add support for multi-GPU.
--Change from combo boxes for device selection to a table of all devices.
--Ensure device selection makes sense.
--Remove "FinalRender" prefix of various function names, it's implied given the context.
-FinalRenderEmberController.h/cpp:
--Add support for multi-GPU.
--Change m_FinishedImageCount to be atomic.
--Move CancelRender() from the base to FinalRenderEmberController<T>.
--Refactor RenderComplete() to omit any progress related functionality or image saving since it can be potentially ran in a thread.
--Consolidate setting various renderer fields into SyncGuiToRenderer().
-Fractorium.cpp: Allow for resizing of the options dialog to show the entire device table.
-FractoriumCommon.h: Add various functions to handle a table showing the available OpenCL devices on the system.
-FractoriumEmberController.h/cpp: Remove m_FinalImageIndex, it's no longer needed.
-FractoriumRender.cpp: Scale the interactive sub batch count and quality by the number of devices used.
-FractoriumSettings.h/cpp:
--Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Add multi-GPU support, remove old device,platform pair.
-FractoriumToolbar.cpp: Disable OpenCL toolbar button if there are no devices present on the system.
-FractoriumOptionsDialog.h/cpp:
--Add support for multi-GPU.
--Consolidate more assignments in DataToGui().
--Enable/disable CPU/OpenCL items in response to OpenCL checkbox event.
-Misc: Convert almost everything to size_t for unsigned, intmax_t for signed.
2015-09-12 21:33:45 -04:00
auto renderer = m_Controller - > Renderer ( ) ;
auto & pixels = * m_Controller - > FinalImage ( ) ;
2017-07-22 16:43:35 -04:00
auto rendererCL = dynamic_cast < RendererCLBase * > ( renderer ) ;
--User changes
-Add support for multiple GPU devices.
--These options are present in the command line and in Fractorium.
-Change scheme of specifying devices from platform,device to just total device index.
--Single number on the command line.
--Change from combo boxes for device selection to a table of all devices in Fractorium.
-Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Bug fixes
-EmberAnimate, EmberRender, FractoriumSettings, FinalRenderDialog: Fix wrong order of arguments to Clamp() when assigning thread priority.
-VariationsDC.h: Fix NVidia OpenCL compilation error in DCTriangleVariation.
-FractoriumXformsColor.cpp: Checking for null pixmap pointer is not enough, must also check if the underlying buffer is null via call to QPixmap::isNull().
--Code changes
-Ember.h: Add case for FLAME_MOTION_NONE and default in ApplyFlameMotion().
-EmberMotion.h: Call base constructor.
-EmberPch.h: #pragma once only on Windows.
-EmberToXml.h:
--Handle different types of exceptions.
--Add default cases to ToString().
-Isaac.h: Remove unused variable in constructor.
-Point.h: Call base constructor in Color().
-Renderer.h/cpp:
--Add bool to Alloc() to only allocate memory for the histogram. Needed for multi-GPU.
--Make CoordMap() return a const ref, not a pointer.
-SheepTools.h:
--Use 64-bit types like the rest of the code already does.
--Fix some comment misspellings.
-Timing.h: Make BeginTime(), EndTime(), ElapsedTime() and Format() be const functions.
-Utils.h:
--Add new functions Equal() and Split().
--Handle more exception types in ReadFile().
--Get rid of most legacy blending of C and C++ argument parsing.
-XmlToEmber.h:
--Get rid of most legacy blending of C and C++ code from flam3.
--Remove some unused variables.
-EmberAnimate:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--If a render fails, exit since there is no point in continuing an animation with a missing frame.
--Pass variables to threaded save better, which most likely fixes a very subtle bug that existed before.
--Remove some unused variables.
-EmberGenome, EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
-EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--Only print values when not rendering with OpenCL, since they're always 0 in that case.
-EmberCLPch.h:
--#pragma once only on Windows.
--#include <atomic>.
-IterOpenCLKernelCreator.h: Add new kernel for summing two histograms. This is needed for multi-GPU.
-OpenCLWrapper.h:
--Move all OpenCL info related code into its own class OpenCLInfo.
--Add members to cache the values of global memory size and max allocation size.
-RendererCL.h/cpp:
--Redesign to accomodate multi-GPU.
--Constructor now takes a vector of devices.
--Remove DumpErrorReport() function, it's handled in the base.
--ClearBuffer(), ReadPoints(), WritePoints(), ReadHist() and WriteHist() now optionally take a device index as a parameter.
--MakeDmap() override and m_DmapCL member removed because it no longer applies since the histogram is always float since the last commit.
--Add new function SumDeviceHist() to sum histograms from two devices by first copying to a temporary on the host, then a temporary on the device, then summing.
--m_Calls member removed, as it's now per-device.
--OpenCLWrapper removed.
--m_Seeds member is now a vector of vector of seeds, to accomodate a separate and different array of seeds for each device.
--Added member m_Devices, a vector of unique_ptr of RendererCLDevice.
-EmberCommon.h
--Added Devices() function to convert from a vector of device indices to a vector of platform,device indices.
--Changed CreateRenderer() to accept a vector of devices to create a single RendererCL which will split work across multiple devices.
--Added CreateRenderers() function to accept a vector of devices to create multiple RendererCL, each which will render on a single device.
--Add more comments to some existing functions.
-EmberCommonPch.h: #pragma once only on Windows.
-EmberOptions.h:
--Remove --platform option, it's just sequential device number now with the --device option.
--Make --out be OPT_USE_RENDER instead of OPT_RENDER_ANIM since it's an error condition when animating. It makes no sense to write all frames to a single image.
--Add Devices() function to parse comma separated --device option string and return a vector of device indices.
--Make int and uint types be 64-bit, so intmax_t and size_t.
--Make better use of macros.
-JpegUtils.h: Make string parameters to WriteJpeg() and WritePng() be const ref.
-All project files: Turn off buffer security check option in Visual Studio (/Gs-)
-deployment.pri: Remove the line OTHER_FILES +=, it's pointless and was causing problems.
-Ember.pro, EmberCL.pro: Add CONFIG += plugin, otherwise it wouldn't link.
-EmberCL.pro: Add new files for multi-GPU support.
-build_all.sh: use -j4 and QMAKE=${QMAKE:/usr/bin/qmake}
-shared_settings.pri:
-Add version string.
-Remove old DESTDIR definitions.
-Add the following lines or else nothing would build:
CONFIG(release, debug|release) {
CONFIG += warn_off
DESTDIR = ../../../Bin/release
}
CONFIG(debug, debug|release) {
DESTDIR = ../../../Bin/debug
}
QMAKE_POST_LINK += $$quote(cp --update ../../../Data/flam3-palettes.xml $${DESTDIR}$$escape_expand(\n\t))
LIBS += -L/usr/lib -lpthread
-AboutDialog.ui: Another futile attempt to make it look correct on Linux.
-FinalRenderDialog.h/cpp:
--Add support for multi-GPU.
--Change from combo boxes for device selection to a table of all devices.
--Ensure device selection makes sense.
--Remove "FinalRender" prefix of various function names, it's implied given the context.
-FinalRenderEmberController.h/cpp:
--Add support for multi-GPU.
--Change m_FinishedImageCount to be atomic.
--Move CancelRender() from the base to FinalRenderEmberController<T>.
--Refactor RenderComplete() to omit any progress related functionality or image saving since it can be potentially ran in a thread.
--Consolidate setting various renderer fields into SyncGuiToRenderer().
-Fractorium.cpp: Allow for resizing of the options dialog to show the entire device table.
-FractoriumCommon.h: Add various functions to handle a table showing the available OpenCL devices on the system.
-FractoriumEmberController.h/cpp: Remove m_FinalImageIndex, it's no longer needed.
-FractoriumRender.cpp: Scale the interactive sub batch count and quality by the number of devices used.
-FractoriumSettings.h/cpp:
--Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Add multi-GPU support, remove old device,platform pair.
-FractoriumToolbar.cpp: Disable OpenCL toolbar button if there are no devices present on the system.
-FractoriumOptionsDialog.h/cpp:
--Add support for multi-GPU.
--Consolidate more assignments in DataToGui().
--Enable/disable CPU/OpenCL items in response to OpenCL checkbox event.
-Misc: Convert almost everything to size_t for unsigned, intmax_t for signed.
2015-09-12 21:33:45 -04:00
auto stats = m_Controller - > Stats ( ) ;
2016-04-03 21:55:12 -04:00
auto comments = renderer - > ImageComments ( stats , 0 , true ) ;
2017-07-22 16:43:35 -04:00
auto settings = FractoriumSettings : : Instance ( ) ;
2014-07-08 03:11:14 -04:00
--User changes
-Add support for multiple GPU devices.
--These options are present in the command line and in Fractorium.
-Change scheme of specifying devices from platform,device to just total device index.
--Single number on the command line.
--Change from combo boxes for device selection to a table of all devices in Fractorium.
-Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Bug fixes
-EmberAnimate, EmberRender, FractoriumSettings, FinalRenderDialog: Fix wrong order of arguments to Clamp() when assigning thread priority.
-VariationsDC.h: Fix NVidia OpenCL compilation error in DCTriangleVariation.
-FractoriumXformsColor.cpp: Checking for null pixmap pointer is not enough, must also check if the underlying buffer is null via call to QPixmap::isNull().
--Code changes
-Ember.h: Add case for FLAME_MOTION_NONE and default in ApplyFlameMotion().
-EmberMotion.h: Call base constructor.
-EmberPch.h: #pragma once only on Windows.
-EmberToXml.h:
--Handle different types of exceptions.
--Add default cases to ToString().
-Isaac.h: Remove unused variable in constructor.
-Point.h: Call base constructor in Color().
-Renderer.h/cpp:
--Add bool to Alloc() to only allocate memory for the histogram. Needed for multi-GPU.
--Make CoordMap() return a const ref, not a pointer.
-SheepTools.h:
--Use 64-bit types like the rest of the code already does.
--Fix some comment misspellings.
-Timing.h: Make BeginTime(), EndTime(), ElapsedTime() and Format() be const functions.
-Utils.h:
--Add new functions Equal() and Split().
--Handle more exception types in ReadFile().
--Get rid of most legacy blending of C and C++ argument parsing.
-XmlToEmber.h:
--Get rid of most legacy blending of C and C++ code from flam3.
--Remove some unused variables.
-EmberAnimate:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--If a render fails, exit since there is no point in continuing an animation with a missing frame.
--Pass variables to threaded save better, which most likely fixes a very subtle bug that existed before.
--Remove some unused variables.
-EmberGenome, EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
-EmberRender:
--Support multi-GPU processing that alternates full frames between devices.
--Use OpenCLInfo instead of OpenCLWrapper for --openclinfo option.
--Remove bucketT template parameter, and hard code float in its place.
--Only print values when not rendering with OpenCL, since they're always 0 in that case.
-EmberCLPch.h:
--#pragma once only on Windows.
--#include <atomic>.
-IterOpenCLKernelCreator.h: Add new kernel for summing two histograms. This is needed for multi-GPU.
-OpenCLWrapper.h:
--Move all OpenCL info related code into its own class OpenCLInfo.
--Add members to cache the values of global memory size and max allocation size.
-RendererCL.h/cpp:
--Redesign to accomodate multi-GPU.
--Constructor now takes a vector of devices.
--Remove DumpErrorReport() function, it's handled in the base.
--ClearBuffer(), ReadPoints(), WritePoints(), ReadHist() and WriteHist() now optionally take a device index as a parameter.
--MakeDmap() override and m_DmapCL member removed because it no longer applies since the histogram is always float since the last commit.
--Add new function SumDeviceHist() to sum histograms from two devices by first copying to a temporary on the host, then a temporary on the device, then summing.
--m_Calls member removed, as it's now per-device.
--OpenCLWrapper removed.
--m_Seeds member is now a vector of vector of seeds, to accomodate a separate and different array of seeds for each device.
--Added member m_Devices, a vector of unique_ptr of RendererCLDevice.
-EmberCommon.h
--Added Devices() function to convert from a vector of device indices to a vector of platform,device indices.
--Changed CreateRenderer() to accept a vector of devices to create a single RendererCL which will split work across multiple devices.
--Added CreateRenderers() function to accept a vector of devices to create multiple RendererCL, each which will render on a single device.
--Add more comments to some existing functions.
-EmberCommonPch.h: #pragma once only on Windows.
-EmberOptions.h:
--Remove --platform option, it's just sequential device number now with the --device option.
--Make --out be OPT_USE_RENDER instead of OPT_RENDER_ANIM since it's an error condition when animating. It makes no sense to write all frames to a single image.
--Add Devices() function to parse comma separated --device option string and return a vector of device indices.
--Make int and uint types be 64-bit, so intmax_t and size_t.
--Make better use of macros.
-JpegUtils.h: Make string parameters to WriteJpeg() and WritePng() be const ref.
-All project files: Turn off buffer security check option in Visual Studio (/Gs-)
-deployment.pri: Remove the line OTHER_FILES +=, it's pointless and was causing problems.
-Ember.pro, EmberCL.pro: Add CONFIG += plugin, otherwise it wouldn't link.
-EmberCL.pro: Add new files for multi-GPU support.
-build_all.sh: use -j4 and QMAKE=${QMAKE:/usr/bin/qmake}
-shared_settings.pri:
-Add version string.
-Remove old DESTDIR definitions.
-Add the following lines or else nothing would build:
CONFIG(release, debug|release) {
CONFIG += warn_off
DESTDIR = ../../../Bin/release
}
CONFIG(debug, debug|release) {
DESTDIR = ../../../Bin/debug
}
QMAKE_POST_LINK += $$quote(cp --update ../../../Data/flam3-palettes.xml $${DESTDIR}$$escape_expand(\n\t))
LIBS += -L/usr/lib -lpthread
-AboutDialog.ui: Another futile attempt to make it look correct on Linux.
-FinalRenderDialog.h/cpp:
--Add support for multi-GPU.
--Change from combo boxes for device selection to a table of all devices.
--Ensure device selection makes sense.
--Remove "FinalRender" prefix of various function names, it's implied given the context.
-FinalRenderEmberController.h/cpp:
--Add support for multi-GPU.
--Change m_FinishedImageCount to be atomic.
--Move CancelRender() from the base to FinalRenderEmberController<T>.
--Refactor RenderComplete() to omit any progress related functionality or image saving since it can be potentially ran in a thread.
--Consolidate setting various renderer fields into SyncGuiToRenderer().
-Fractorium.cpp: Allow for resizing of the options dialog to show the entire device table.
-FractoriumCommon.h: Add various functions to handle a table showing the available OpenCL devices on the system.
-FractoriumEmberController.h/cpp: Remove m_FinalImageIndex, it's no longer needed.
-FractoriumRender.cpp: Scale the interactive sub batch count and quality by the number of devices used.
-FractoriumSettings.h/cpp:
--Temporal samples defaults to 100 instead of 1000 which was needless overkill.
--Add multi-GPU support, remove old device,platform pair.
-FractoriumToolbar.cpp: Disable OpenCL toolbar button if there are no devices present on the system.
-FractoriumOptionsDialog.h/cpp:
--Add support for multi-GPU.
--Consolidate more assignments in DataToGui().
--Enable/disable CPU/OpenCL items in response to OpenCL checkbox event.
-Misc: Convert almost everything to size_t for unsigned, intmax_t for signed.
2015-09-12 21:33:45 -04:00
if ( rendererCL & & renderer - > PrepFinalAccumVector ( pixels ) )
{
if ( ! rendererCL - > ReadFinal ( pixels . data ( ) ) )
{
ShowCritical ( " GPU Read Error " , " Could not read image from the GPU, aborting image save. " , false ) ;
return ;
}
}
2017-07-22 16:43:35 -04:00
m_Controller - > SaveCurrentRender ( filename , comments , pixels , renderer - > FinalRasW ( ) , renderer - > FinalRasH ( ) , settings - > Png16Bit ( ) , settings - > Transparency ( ) ) ;
2014-07-08 03:11:14 -04:00
}
/// <summary>
/// Save the current ember back to its position in the opened file.
2016-04-13 23:59:57 -04:00
/// This will not take any action if the previews are still rendering because
/// this writes to memory the preview renderer might be reading, and also stops the
/// preview renderer.
2014-07-08 03:11:14 -04:00
/// This does not save to disk.
/// </summary>
2016-06-07 23:37:15 -04:00
/// <param name="render">Whether to re-render the preview thumbnail after saving to the open file. Default: true.</param>
2014-07-08 03:11:14 -04:00
template < typename T >
2016-06-07 23:37:15 -04:00
uint FractoriumEmberController < T > : : SaveCurrentToOpenedFile ( bool render )
2014-07-08 03:11:14 -04:00
{
2016-04-03 21:55:12 -04:00
uint i = 0 ;
2014-07-08 03:11:14 -04:00
bool fileFound = false ;
2016-06-11 20:47:03 -04:00
if ( ! m_LibraryPreviewRenderer - > Running ( ) )
2014-07-08 03:11:14 -04:00
{
2016-04-13 23:59:57 -04:00
for ( auto & it : m_EmberFile . m_Embers )
2014-07-08 03:11:14 -04:00
{
2016-04-13 23:59:57 -04:00
if ( & it = = m_EmberFilePointer ) //Just compare memory addresses.
{
it = m_Ember ; //Save it to the opened file in memory.
fileFound = true ;
break ;
}
i + + ;
2014-07-08 03:11:14 -04:00
}
2016-04-03 21:55:12 -04:00
2016-04-13 23:59:57 -04:00
if ( ! fileFound )
{
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
2016-04-13 23:59:57 -04:00
m_EmberFile . m_Embers . push_back ( m_Ember ) ;
m_EmberFile . MakeNamesUnique ( ) ;
2016-06-07 23:37:15 -04:00
if ( render )
UpdateLibraryTree ( ) ;
2016-04-13 23:59:57 -04:00
}
2016-06-07 23:37:15 -04:00
else if ( render )
2016-06-11 20:47:03 -04:00
RenderLibraryPreviews ( i , i + 1 ) ;
2014-07-08 03:11:14 -04:00
}
2016-04-13 23:59:57 -04:00
return i ;
2014-07-08 03:11:14 -04:00
}
/// <summary>
/// Exit the application.
/// </summary>
/// <param name="checked">Ignore.</param>
void Fractorium : : OnActionExit ( bool checked )
{
2015-01-02 18:11:36 -05:00
closeEvent ( nullptr ) ;
2014-07-08 03:11:14 -04:00
QApplication : : exit ( ) ;
}
/// <summary>
/// Undoes this instance.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : Undo ( )
{
if ( m_UndoList . size ( ) > 1 & & m_UndoIndex > 0 )
{
2017-07-27 00:25:44 -04:00
bool forceFinal = m_Fractorium - > HaveFinal ( ) ;
auto current = CurrentXform ( ) ;
int index = m_Ember . GetTotalXformIndex ( current , forceFinal ) ;
2014-07-08 03:11:14 -04:00
m_LastEditWasUndoRedo = true ;
2016-02-13 20:24:51 -05:00
m_UndoIndex = std : : max < size_t > ( 0u , m_UndoIndex - 1u ) ;
2018-07-31 00:39:41 -04:00
SetEmber ( m_UndoList [ m_UndoIndex ] , true , false ) ; //Don't update pointer because it's coming from the undo list.
2016-01-04 19:50:15 -05:00
m_EditState = eEditUndoState : : UNDO_REDO ;
2018-07-31 00:39:41 -04:00
if ( index > = 0 & & index < m_Fractorium - > ui . CurrentXformCombo - > count ( ) )
2014-07-08 03:11:14 -04:00
m_Fractorium - > CurrentXform ( index ) ;
m_Fractorium - > ui . ActionUndo - > setEnabled ( m_UndoList . size ( ) > 1 & & ( m_UndoIndex > 0 ) ) ;
m_Fractorium - > ui . ActionRedo - > setEnabled ( m_UndoList . size ( ) > 1 & & ! ( m_UndoIndex = = m_UndoList . size ( ) - 1 ) ) ;
}
}
void Fractorium : : OnActionUndo ( bool checked ) { m_Controller - > Undo ( ) ; }
/// <summary>
/// Redoes this instance.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : Redo ( )
{
if ( m_UndoList . size ( ) > 1 & & m_UndoIndex < m_UndoList . size ( ) - 1 )
{
2017-07-27 00:25:44 -04:00
bool forceFinal = m_Fractorium - > HaveFinal ( ) ;
auto current = CurrentXform ( ) ;
int index = m_Ember . GetTotalXformIndex ( current , forceFinal ) ;
2014-07-08 03:11:14 -04:00
m_LastEditWasUndoRedo = true ;
2016-02-13 20:24:51 -05:00
m_UndoIndex = std : : min < size_t > ( m_UndoIndex + 1 , m_UndoList . size ( ) - 1 ) ;
2018-07-31 00:39:41 -04:00
SetEmber ( m_UndoList [ m_UndoIndex ] , true , false ) ; //Don't update pointer because it's coming from the undo list.
2016-01-04 19:50:15 -05:00
m_EditState = eEditUndoState : : UNDO_REDO ;
2018-07-31 00:39:41 -04:00
if ( index > = 0 & & index < m_Fractorium - > ui . CurrentXformCombo - > count ( ) )
2014-07-08 03:11:14 -04:00
m_Fractorium - > CurrentXform ( index ) ;
m_Fractorium - > ui . ActionUndo - > setEnabled ( m_UndoList . size ( ) > 1 & & ( m_UndoIndex > 0 ) ) ;
m_Fractorium - > ui . ActionRedo - > setEnabled ( m_UndoList . size ( ) > 1 & & ! ( m_UndoIndex = = m_UndoList . size ( ) - 1 ) ) ;
}
}
void Fractorium : : OnActionRedo ( bool checked ) { m_Controller - > Redo ( ) ; }
/// <summary>
/// Copy the current ember Xml to the clipboard.
/// Apply Xml saving settings from the options first.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : CopyXml ( )
{
2016-02-12 00:38:21 -05:00
auto ember = m_Ember ;
2014-07-08 03:11:14 -04:00
EmberToXml < T > emberToXml ;
2016-02-12 00:38:21 -05:00
auto settings = m_Fractorium - > m_Settings ;
2014-07-08 03:11:14 -04:00
ember . m_Quality = settings - > XmlQuality ( ) ;
ember . m_Supersample = settings - > XmlSupersample ( ) ;
ember . m_TemporalSamples = settings - > XmlTemporalSamples ( ) ;
2016-04-03 21:55:12 -04:00
QApplication : : clipboard ( ) - > setText ( QString : : fromStdString ( emberToXml . ToString ( ember , " " , 0 , false , true ) ) ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionCopyXml ( bool checked ) { m_Controller - > CopyXml ( ) ; }
/// <summary>
/// Copy the Xmls for all open embers as a single string to the clipboard, enclosed with the <flames> tag.
/// Apply Xml saving settings from the options first for each ember.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : CopyAllXml ( )
{
ostringstream os ;
EmberToXml < T > emberToXml ;
os < < " <flames> \n " ;
2015-05-03 20:13:14 -04:00
for ( auto & e : m_EmberFile . m_Embers )
2014-07-08 03:11:14 -04:00
{
2015-05-03 20:13:14 -04:00
Ember < T > ember = e ;
2014-10-14 11:53:15 -04:00
ApplyXmlSavingTemplate ( ember ) ;
2016-04-03 21:55:12 -04:00
os < < emberToXml . ToString ( ember , " " , 0 , false , true ) ;
2014-07-08 03:11:14 -04:00
}
os < < " </flames> \n " ;
QApplication : : clipboard ( ) - > setText ( QString : : fromStdString ( os . str ( ) ) ) ;
}
void Fractorium : : OnActionCopyAllXml ( bool checked ) { m_Controller - > CopyAllXml ( ) ; }
/// <summary>
/// Convert the Xml text from the clipboard to an ember, add it to the end
/// of the current file and set it as the current ember. If multiple Xmls were
/// copied to the clipboard and were enclosed in <flames> tags, then all of them will be added.
/// Clears the undo state.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : PasteXmlAppend ( )
{
2016-02-13 20:24:51 -05:00
size_t previousSize = m_EmberFile . Size ( ) ;
2014-07-08 03:11:14 -04:00
string s , errors ;
XmlToEmber < T > parser ;
vector < Ember < T > > embers ;
2016-02-12 00:38:21 -05:00
auto codec = QTextCodec : : codecForName ( " UTF-8 " ) ;
auto b = codec - > fromUnicode ( QApplication : : clipboard ( ) - > text ( ) ) ;
2014-07-08 03:11:14 -04:00
s . reserve ( b . size ( ) ) ;
2016-02-13 20:24:51 -05:00
for ( auto i = 0 ; i < b . size ( ) ; i + + )
2014-07-08 03:11:14 -04:00
{
2014-12-11 00:50:15 -05:00
if ( uint ( b [ i ] ) < 128u )
2014-07-08 03:11:14 -04:00
s . push_back ( b [ i ] ) ;
}
b . clear ( ) ;
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
parser . Parse ( reinterpret_cast < byte * > ( const_cast < char * > ( s . c_str ( ) ) ) , " " , embers , true ) ;
2014-07-08 03:11:14 -04:00
errors = parser . ErrorReportString ( ) ;
if ( errors ! = " " )
{
2014-10-14 11:53:15 -04:00
m_Fractorium - > ShowCritical ( " Paste Error " , QString : : fromStdString ( errors ) ) ;
2014-07-08 03:11:14 -04:00
}
if ( ! embers . empty ( ) )
{
2016-02-13 20:24:51 -05:00
for ( auto i = 0 ; i < embers . size ( ) ; i + + )
2014-07-08 03:11:14 -04:00
{
2014-10-14 11:53:15 -04:00
embers [ i ] . m_Index = m_EmberFile . Size ( ) ;
ConstrainDimensions ( embers [ i ] ) ; //Do not exceed the max texture size.
2016-01-04 19:50:15 -05:00
2014-07-08 03:11:14 -04:00
//Also ensure it has a name.
if ( embers [ i ] . m_Name = = " " | | embers [ i ] . m_Name = = " No name " )
2014-12-11 00:50:15 -05:00
embers [ i ] . m_Name = ToString < qulonglong > ( embers [ i ] . m_Index ) . toStdString ( ) ;
2014-07-08 03:11:14 -04:00
m_EmberFile . m_Embers . push_back ( embers [ i ] ) ; //Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.
}
m_EmberFile . MakeNamesUnique ( ) ;
UpdateLibraryTree ( ) ;
2016-04-13 23:59:57 -04:00
SetEmber ( previousSize , false ) ;
2014-07-08 03:11:14 -04:00
}
}
void Fractorium : : OnActionPasteXmlAppend ( bool checked ) { m_Controller - > PasteXmlAppend ( ) ; }
/// <summary>
/// Convert the Xml text from the clipboard to an ember, overwrite the
/// current file and set the first as the current ember. If multiple Xmls were
/// copied to the clipboard and were enclosed in <flames> tags, then the current file will contain all of them.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : PasteXmlOver ( )
{
2016-04-03 21:55:12 -04:00
size_t i = 0 ;
2014-07-08 03:11:14 -04:00
string s , errors ;
XmlToEmber < T > parser ;
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
list < Ember < T > > embers ;
auto backupEmber = * m_EmberFile . m_Embers . begin ( ) ;
2016-02-12 00:38:21 -05:00
auto codec = QTextCodec : : codecForName ( " UTF-8 " ) ;
auto b = codec - > fromUnicode ( QApplication : : clipboard ( ) - > text ( ) ) ;
2014-07-08 03:11:14 -04:00
s . reserve ( b . size ( ) ) ;
2016-01-04 19:50:15 -05:00
2016-02-13 20:24:51 -05:00
for ( auto i = 0 ; i < b . size ( ) ; i + + )
2014-07-08 03:11:14 -04:00
{
2014-12-11 00:50:15 -05:00
if ( uint ( b [ i ] ) < 128u )
2014-07-08 03:11:14 -04:00
s . push_back ( b [ i ] ) ;
}
b . clear ( ) ;
2016-06-11 20:47:03 -04:00
StopAllPreviewRenderers ( ) ;
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
parser . Parse ( reinterpret_cast < byte * > ( const_cast < char * > ( s . c_str ( ) ) ) , " " , embers , true ) ;
2014-07-08 03:11:14 -04:00
errors = parser . ErrorReportString ( ) ;
if ( errors ! = " " )
{
2014-10-14 11:53:15 -04:00
m_Fractorium - > ShowCritical ( " Paste Error " , QString : : fromStdString ( errors ) ) ;
2014-07-08 03:11:14 -04:00
}
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
if ( embers . size ( ) )
2014-07-08 03:11:14 -04:00
{
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
m_EmberFile . m_Embers = std : : move ( embers ) ; //Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.
2016-04-03 21:55:12 -04:00
for ( auto it : m_EmberFile . m_Embers )
2014-07-08 03:11:14 -04:00
{
2016-04-03 21:55:12 -04:00
it . m_Index = i + + ;
ConstrainDimensions ( it ) ; //Do not exceed the max texture size.
2016-01-04 19:50:15 -05:00
2014-07-08 03:11:14 -04:00
//Also ensure it has a name.
2016-04-03 21:55:12 -04:00
if ( it . m_Name = = " " | | it . m_Name = = " No name " )
it . m_Name = ToString < qulonglong > ( it . m_Index ) . toStdString ( ) ;
2014-07-08 03:11:14 -04:00
}
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
m_EmberFile . MakeNamesUnique ( ) ;
FillLibraryTree ( ) ;
SetEmber ( 0 , false ) ;
}
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionPasteXmlOver ( bool checked ) { m_Controller - > PasteXmlOver ( ) ; }
2015-05-19 22:31:33 -04:00
/// <summary>
/// Copy the selected xforms.
/// Note this will also copy final if selected.
/// If none selected, just copy current.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : CopySelectedXforms ( )
{
m_CopiedXforms . clear ( ) ;
m_CopiedFinalXform . Clear ( ) ;
--User changes
-No longer constrain pitch, yaw or depth spinners to -180 - 180.
--Bug fixes
-Properly set color index on padded xforms.
-Adding a padding final xform included a linear variation with a weight of zero to not appear empty. Made it have a weight of 1.
-Always write animate tag on final xform when saving to Xml.
-Motion was being applied to the wrong flame in SheepTools::Edge(), so apply it to the correct one.
-Prevent divide by zero when normalizing variation weights.
-Was accidentally adding the placeholder value of -9999 for motion_offset to varation weights and parameters when applying motion. Set to zero if no value present.
-Clamp flame rotation values to -180 - 180 when reading a flame from Xml.
-Events were not properly wired for user changes in the random rotations per blend controls in the sequencer.
-Fix major UI bugs with sequencer min/max random controls which made it nearly impossible to hand type values.
-Values from rotations per blend and rotations per blend max were not being saved to file between program runs.
-Checking animate for an xform was not applied to all flames even if Apply All was checked.
-Changing interpolation type, temporal filter width, temporal type, and affine interpolation type were not actually saving to the flame when changed.
-Grid on the main window was not being drawn at the right scale initially due to some OpenGL initialization occurring in the wrong order.
-Severe bugs in sequence generation code:
--Improperly detected padding xforms.
--When looking for specific variations during xform aligning, only presence was detected, when it should have been presence plus a weight greater than zero.
--When adding specific variations during xform aligning, must first remove any variations of that type.
--Two variables were unsigned when they should have been signed. This prevented large blocks of code from ever executing.
--When interpolating affines, an EPS that was too small was used, causing affine values to interpolate incorrectly. Instead use 1e-10 to ensure results equal to flam3.
--Code changes
-Modify FractoriumEmberController::UpdateXform() to pass the selected xform index as well as the absolute index to func().
2018-06-13 00:20:15 -04:00
UpdateXform ( [ & ] ( Xform < T > * xform , size_t xfindex , size_t selIndex )
2015-05-19 22:31:33 -04:00
{
if ( m_Ember . IsFinalXform ( xform ) )
m_CopiedFinalXform = * xform ;
else
2020-01-25 14:12:49 -05:00
m_CopiedXforms . emplace_back ( * xform , xfindex ) ;
2016-01-04 19:50:15 -05:00
} , eXformUpdate : : UPDATE_SELECTED , false ) ;
2015-05-19 22:31:33 -04:00
m_Fractorium - > ui . ActionPasteSelectedXforms - > setEnabled ( true ) ;
}
void Fractorium : : OnActionCopySelectedXforms ( bool checked )
{
m_Controller - > CopySelectedXforms ( ) ;
}
/// <summary>
/// Paste the selected xforms.
/// Note this will also paste/overwrite final if previously copied.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : PasteSelectedXforms ( )
{
Update ( [ & ] ( )
{
2020-03-11 09:49:29 -04:00
AddXformsWithXaos ( m_Ember , m_CopiedXforms , true , m_Fractorium - > GetXaosPasteStyleType ( ) ) ;
2015-05-19 22:31:33 -04:00
if ( ! m_CopiedFinalXform . Empty ( ) )
m_Ember . SetFinalXform ( m_CopiedFinalXform ) ;
FillXforms ( ) ;
} ) ;
}
void Fractorium : : OnActionPasteSelectedXforms ( bool checked )
{
m_Controller - > PasteSelectedXforms ( ) ;
}
2018-07-31 00:39:41 -04:00
/// <summary>
/// Copy the text of the OpenCL iteration kernel to the clipboard.
/// This performs no action if the renderer is not of type RendererCL.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : CopyKernel ( )
{
if ( auto rendererCL = dynamic_cast < RendererCL < T , float > * > ( m_Renderer . get ( ) ) )
QApplication : : clipboard ( ) - > setText ( QString : : fromStdString ( rendererCL - > IterKernel ( ) ) ) ;
}
void Fractorium : : OnActionCopyKernel ( bool checked ) { m_Controller - > CopyKernel ( ) ; }
2015-06-20 14:35:08 -04:00
/// <summary>
/// Reset dock widgets and tabs to their default position.
/// Note that there is a bug in Qt, where it will only move them all to the left side if at least
/// one is on the left side, or they are all floating. If one or more are docked right, and none are docked
/// left, then it will put them all on the right side. Hopefully this isn't too much of a problem.
/// </summary>
void Fractorium : : OnActionResetWorkspace ( bool checked )
{
QDockWidget * firstDock = nullptr ;
for ( auto dock : m_Docks )
{
dock - > setFloating ( true ) ;
dock - > setGeometry ( QRect ( 100 , 100 , dock - > width ( ) , dock - > height ( ) ) ) ; //Doesn't seem to have an effect.
dock - > setFloating ( false ) ;
dock - > show ( ) ;
if ( firstDock )
tabifyDockWidget ( firstDock , dock ) ;
firstDock = dock ;
}
ui . LibraryDockWidget - > raise ( ) ;
ui . LibraryDockWidget - > show ( ) ;
}
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
/// <summary>
/// Alternate between Editor/Image.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionAlternateEditorImage ( bool checked )
{
2020-01-25 18:50:53 -05:00
if ( DrawPreAffines ( ) | | DrawPostAffines ( ) )
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
{
2020-01-31 19:21:23 -05:00
SaveAffineState ( ) ;
2020-01-25 18:50:53 -05:00
ui . ActionDrawPreAffines - > setChecked ( false ) ;
ui . ActionDrawAllPreAffines - > setChecked ( false ) ;
ui . ActionDrawPostAffines - > setChecked ( false ) ;
ui . ActionDrawAllPostAffines - > setChecked ( false ) ;
ui . ActionDrawGrid - > setChecked ( false ) ;
ui . ActionDrawImage - > setChecked ( true ) ;
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
}
else
{
2020-01-25 18:50:53 -05:00
ui . ActionDrawImage - > setChecked ( false ) ;
ui . ActionDrawGrid - > setChecked ( true ) ;
SyncAffineStateToToolbar ( ) ;
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
}
ui . GLDisplay - > update ( ) ;
}
/// <summary>
/// Reset the scale used to draw affines, which was adjusted by zooming with the Alt key pressed.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionResetScale ( bool checked )
{
m_Controller - > InitLockedScale ( ) ;
ui . GLDisplay - > update ( ) ;
}
2014-07-08 03:11:14 -04:00
/// <summary>
/// Add reflective symmetry to the current ember.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : AddReflectiveSymmetry ( )
{
2017-07-27 00:25:44 -04:00
bool forceFinal = m_Fractorium - > HaveFinal ( ) ;
2015-04-27 01:11:56 -04:00
Update ( [ & ] ( )
{
m_Ember . AddSymmetry ( - 1 , m_Rand ) ;
2017-07-27 00:25:44 -04:00
auto index = m_Ember . TotalXformCount ( forceFinal ) - ( forceFinal ? 2 : 1 ) ; //Set index to the last item before final.
2016-02-13 20:24:51 -05:00
FillXforms ( int ( index ) ) ;
2015-04-27 01:11:56 -04:00
} ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionAddReflectiveSymmetry ( bool checked ) { m_Controller - > AddReflectiveSymmetry ( ) ; }
/// <summary>
/// Add rotational symmetry to the current ember.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : AddRotationalSymmetry ( )
{
2017-07-27 00:25:44 -04:00
bool forceFinal = m_Fractorium - > HaveFinal ( ) ;
2015-04-27 01:11:56 -04:00
Update ( [ & ] ( )
{
m_Ember . AddSymmetry ( 2 , m_Rand ) ;
2017-07-27 00:25:44 -04:00
auto index = m_Ember . TotalXformCount ( forceFinal ) - ( forceFinal ? 2 : 1 ) ; //Set index to the last item before final.
2016-02-13 20:24:51 -05:00
FillXforms ( int ( index ) ) ;
2015-04-27 01:11:56 -04:00
} ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionAddRotationalSymmetry ( bool checked ) { m_Controller - > AddRotationalSymmetry ( ) ; }
/// <summary>
/// Add both reflective and rotational symmetry to the current ember.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : AddBothSymmetry ( )
{
2017-07-27 00:25:44 -04:00
bool forceFinal = m_Fractorium - > HaveFinal ( ) ;
2015-04-27 01:11:56 -04:00
Update ( [ & ] ( )
{
m_Ember . AddSymmetry ( - 2 , m_Rand ) ;
2017-07-27 00:25:44 -04:00
auto index = m_Ember . TotalXformCount ( forceFinal ) - ( forceFinal ? 2 : 1 ) ; //Set index to the last item before final.
2016-02-13 20:24:51 -05:00
FillXforms ( int ( index ) ) ;
2015-04-27 01:11:56 -04:00
} ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionAddBothSymmetry ( bool checked ) { m_Controller - > AddBothSymmetry ( ) ; }
Numerous fixes
0.4.0.5 Beta 07/18/2014
--User Changes
Allow for vibrancy values > 1.
Add flatten and unflatten menu items.
Automatically flatten like Apophysis does.
Add plugin and new_linear tags to Xml to be compatible with Apophysis.
--Bug Fixes
Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho,
julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x,
sinusoidal, spherical, spherical3d, stripes.
Unique filename on final render was completely broken.
Two severe OpenCL bugs. Random seeds were biased and fusing was being
reset too often leading to results that differ from the CPU.
Subtle, but sometimes severe bug in the setup of the xaos weights.
Use properly defined epsilon by getting the value from
std::numeric_limits, rather than hard coding 1e-6 or 1e-10.
Omit incorrect usage of epsilon everywhere. It should not be
automatically added to denominators. Rather, it should only be used if
the denominator is zero.
Force final render progress bars to 100 on completion. Sometimes they
didn't seem to make it there.
Make variation name and params comparisons be case insensitive.
--Code Changes
Make ForEach and FindIf wrappers around std::for_each and std::find_if.
2014-07-19 02:33:18 -04:00
/// <summary>
/// Adds a FlattenVariation to every xform in the current ember.
/// Resets the rendering process.
/// </summary>
template < typename T >
2016-05-02 20:49:58 -04:00
void FractoriumEmberController < T > : : Flatten ( )
{
2018-04-13 20:45:31 -04:00
UpdateAll ( [ & ] ( Ember < T > & ember , bool isMain )
2016-05-02 20:49:58 -04:00
{
ember . Flatten ( XmlToEmber < T > : : m_FlattenNames ) ;
} , true , eProcessAction : : FULL_RENDER , m_Fractorium - > ApplyAll ( ) ) ;
2018-07-31 00:39:41 -04:00
FillVariationTreeWithCurrentXform ( ) ;
2016-05-02 20:49:58 -04:00
}
Numerous fixes
0.4.0.5 Beta 07/18/2014
--User Changes
Allow for vibrancy values > 1.
Add flatten and unflatten menu items.
Automatically flatten like Apophysis does.
Add plugin and new_linear tags to Xml to be compatible with Apophysis.
--Bug Fixes
Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho,
julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x,
sinusoidal, spherical, spherical3d, stripes.
Unique filename on final render was completely broken.
Two severe OpenCL bugs. Random seeds were biased and fusing was being
reset too often leading to results that differ from the CPU.
Subtle, but sometimes severe bug in the setup of the xaos weights.
Use properly defined epsilon by getting the value from
std::numeric_limits, rather than hard coding 1e-6 or 1e-10.
Omit incorrect usage of epsilon everywhere. It should not be
automatically added to denominators. Rather, it should only be used if
the denominator is zero.
Force final render progress bars to 100 on completion. Sometimes they
didn't seem to make it there.
Make variation name and params comparisons be case insensitive.
--Code Changes
Make ForEach and FindIf wrappers around std::for_each and std::find_if.
2014-07-19 02:33:18 -04:00
void Fractorium : : OnActionFlatten ( bool checked ) { m_Controller - > Flatten ( ) ; }
2016-01-04 19:50:15 -05:00
Numerous fixes
0.4.0.5 Beta 07/18/2014
--User Changes
Allow for vibrancy values > 1.
Add flatten and unflatten menu items.
Automatically flatten like Apophysis does.
Add plugin and new_linear tags to Xml to be compatible with Apophysis.
--Bug Fixes
Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho,
julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x,
sinusoidal, spherical, spherical3d, stripes.
Unique filename on final render was completely broken.
Two severe OpenCL bugs. Random seeds were biased and fusing was being
reset too often leading to results that differ from the CPU.
Subtle, but sometimes severe bug in the setup of the xaos weights.
Use properly defined epsilon by getting the value from
std::numeric_limits, rather than hard coding 1e-6 or 1e-10.
Omit incorrect usage of epsilon everywhere. It should not be
automatically added to denominators. Rather, it should only be used if
the denominator is zero.
Force final render progress bars to 100 on completion. Sometimes they
didn't seem to make it there.
Make variation name and params comparisons be case insensitive.
--Code Changes
Make ForEach and FindIf wrappers around std::for_each and std::find_if.
2014-07-19 02:33:18 -04:00
/// <summary>
/// Removes pre/reg/post FlattenVariation from every xform in the current ember.
/// Resets the rendering process.
/// </summary>
template < typename T >
2016-05-02 20:49:58 -04:00
void FractoriumEmberController < T > : : Unflatten ( )
{
2018-04-13 20:45:31 -04:00
UpdateAll ( [ & ] ( Ember < T > & ember , bool isMain )
2016-05-02 20:49:58 -04:00
{
ember . Unflatten ( ) ;
} , true , eProcessAction : : FULL_RENDER , m_Fractorium - > ApplyAll ( ) ) ;
2018-07-31 00:39:41 -04:00
FillVariationTreeWithCurrentXform ( ) ;
2016-05-02 20:49:58 -04:00
}
Numerous fixes
0.4.0.5 Beta 07/18/2014
--User Changes
Allow for vibrancy values > 1.
Add flatten and unflatten menu items.
Automatically flatten like Apophysis does.
Add plugin and new_linear tags to Xml to be compatible with Apophysis.
--Bug Fixes
Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho,
julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x,
sinusoidal, spherical, spherical3d, stripes.
Unique filename on final render was completely broken.
Two severe OpenCL bugs. Random seeds were biased and fusing was being
reset too often leading to results that differ from the CPU.
Subtle, but sometimes severe bug in the setup of the xaos weights.
Use properly defined epsilon by getting the value from
std::numeric_limits, rather than hard coding 1e-6 or 1e-10.
Omit incorrect usage of epsilon everywhere. It should not be
automatically added to denominators. Rather, it should only be used if
the denominator is zero.
Force final render progress bars to 100 on completion. Sometimes they
didn't seem to make it there.
Make variation name and params comparisons be case insensitive.
--Code Changes
Make ForEach and FindIf wrappers around std::for_each and std::find_if.
2014-07-19 02:33:18 -04:00
void Fractorium : : OnActionUnflatten ( bool checked ) { m_Controller - > Unflatten ( ) ; }
2014-07-08 03:11:14 -04:00
/// <summary>
/// Delete all but one xform in the current ember.
/// Clear that xform's variations.
/// Resets the rendering process.
/// </summary>
template < typename T >
void FractoriumEmberController < T > : : ClearFlame ( )
{
2015-04-27 01:11:56 -04:00
Update ( [ & ] ( )
2014-07-08 03:11:14 -04:00
{
2015-04-27 01:11:56 -04:00
while ( m_Ember . TotalXformCount ( ) > 1 )
m_Ember . DeleteTotalXform ( m_Ember . TotalXformCount ( ) - 1 ) ;
if ( m_Ember . XformCount ( ) = = 1 )
2014-07-08 03:11:14 -04:00
{
2016-02-02 20:51:58 -05:00
if ( auto xform = m_Ember . GetXform ( 0 ) )
2015-04-27 01:11:56 -04:00
{
xform - > Clear ( ) ;
--User changes
-Support 4k monitors, and in general, properly scale any monitor that is not HD.
-Allow for a spatial filter of radius zero, which means do not use a spatial filter.
-Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur.
-Use a new method for computing elliptic which is more precise. Developed by Discord user Claude.
-Remove the 8 variation per xform limitation on the GPU.
-Allow for loading the last flame file on startup, rather than randoms.
-Use two different default quality values in the interactive renderer, one each for CPU and GPU.
-Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once.
--Bug fixes
-No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes.
-Prevent crashing the program when adjusting a value on the main window while a final render is in progress.
-The xaos table was inverted.
--Code changes
-Convert projects to Visual Studio 2017.
-Change bad vals from +- 1e10 to +-1e20.
-Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed.
-Compiler will not let us use default values in templated member functions anymore.
2017-11-26 20:27:00 -05:00
xform - > AddVariation ( m_VariationList - > GetVariationCopy ( eVariationId : : VAR_LINEAR ) ) ;
2015-04-27 01:11:56 -04:00
xform - > ParentEmber ( & m_Ember ) ;
}
2014-07-08 03:11:14 -04:00
}
--User changes:
-Show common folder locations such as documents, downloads, pictures in the sidebar in all file dialogs.
-Warning message about exceeding memory in final render dialog now suggests strips as the solution to the problem.
-Strips now has a tooltip explaining what it does.
-Allow more digits in the spinners on the color section the flame tab.
-Add manually adjustable size spinners in the final render dialog. Percentage scale and absolute size are fully synced.
-Default prefix in final render is now the filename when doing animations (coming from sequence section of the library tab).
-Changed the elliptic variation back to using a less precise version for float, and a more precise version for double. The last release had it always using double.
-New applied xaos table that shows a read-only view of actual weights by taking the base xform weights and multiplying them by the xaos values.
-New table in the xaos tab that gives a graphical representation of the probability that each xform is chosen, with and without xaos.
-Add button to transpose the xaos rows and columns.
-Add support for importing .chaos files from Chaotica.
--Pasting back to Chaotica will work for most, but not all, variations due to incompatible parameter names in some.
-Curves are now splines instead of Bezier. This adds compatibility with Chaotica, but breaks it for Apophysis. Xmls are still pastable, but the color curves will look different.
--The curve editor on the palette tab can now add points by clicking on the lines and remove points by clicking on the points themselves, just like Chaotica.
--Splines are saved in four new xml fields: overall_curve, red_curve, green_curve and blue_curve.
-Allow for specifying the percentage of a sub batch each thread should iterate through per kernel call when running with OpenCL. This gives a roughly 1% performance increase due to having to make less kernel calls while iterating.
--This field is present for interactive editing (where it's not very useful) and in the final render dialog.
--On the command line, this is specified as --sbpctth for EmberRender and EmberAnimate.
-Allow double clicking to toggle the supersample field in the flame tab between 1 and 2 for easily checking the effect of the field.
-When showing affine values as polar coordinates, show angles normalized to 360 to match Chaotica.
-Fuse Count spinner now toggles between 15 and 100 when double clicking for easily checking the effect of the field.
-Added field for limiting the range in the x and y direction that the initial points are chosen from.
-Added a field called K2 which is an alternative way to set brightness, ignored when zero.
--This has no effect for many variations, but hs a noticeable effect for some.
-Added new variations:
arcsech
arcsech2
arcsinh
arctanh
asteria
block
bwraps_rand
circlecrop2
coth_spiral
crackle2
depth_blur
depth_blur2
depth_gaussian
depth_gaussian2
depth_ngon
depth_ngon2
depth_sine
depth_sine2
dragonfire
dspherical
dust
excinis
exp2
flipx
flowerdb
foci_p
gaussian
glynnia2
glynnsim4
glynnsim5
henon
henon
hex_rand
hex_truchet
hypershift
lazyjess
lens
lozi
lozi
modulusx
modulusy
oscilloscope2
point_symmetry
pointsymmetry
projective
pulse
rotate
scry2
shift
smartshape
spher
squares
starblur2
swirl3
swirl3r
tanh_spiral
target0
target2
tile_hlp
truchet_glyph
truchet_inv
truchet_knot
unicorngaloshen
vibration
vibration2
--hex_truchet, hex_rand should always use double. They are extremely sensitive.
--Bug fixes:
-Bounds sign was flipped for x coordinate of world space when center was not zero.
-Right clicking and dragging spinner showed menu on mouse up, even if it was very far away.
-Text boxes for size in final render dialog were hard to type in. Same bug as xform weight used to be so fix the same way.
-Fix spelling to be plural in toggle color speed box.
-Stop using the blank user palette to generate flames. Either put colored palettes in it, or exclude it from randoms.
-Clicking the random palette button for a palette file with only one palette in it would freeze the program.
-Clicking none scale in final render did not re-render the preview.
-Use less precision on random xaos. No need for 12 decimal places.
-The term sub batch is overloaded in the options dialog. Change the naming and tooltip of those settings for cpu and opencl.
--Also made clear in the tooltip for the default opencl quality setting that the value is per device.
-The arrows spinner in palette editor appears like a read-only label. Made it look like a spinner.
-Fix border colors for various spin boxes and table headers in the style sheet. Requires reload.
-Fix a bug in the bwraps variation which would produce different results than Chaotica and Apophysis.
-Synth was allowed to be selected for random flame generation when using an Nvidia card but it shouldn't have been because Nvidia has a hard time compiling synth.
-A casting bug in the OpenCL kernels for log scaling and density filtering was preventing successful compilations on Intel iGPUs. Fixed even though we don't support anything other than AMD and Nvidia.
-Palette rotation (click and drag) position was not being reset when loading a new flame.
-When the xform circles were hidden, opening and closing the options dialog would improperly reshow them.
-Double click toggle was broken on integer spin boxes.
-Fixed tab order of some controls.
-Creating a palette from a jpg in the palette editor only produced a single color.
--Needed to package imageformats/qjpeg.dll with the Windows installer.
-The basic memory benchmark test flame was not really testing memory. Make it more spread out.
-Remove the temporal samples field from the flame tab, it was never used because it's only an animation parameter which is specified in the final render dialog or on the command line with EmberAnimate.
--Code changes:
-Add IsEmpty() to Palette to determine if a palette is all black.
-Attempt to avoid selecting a blank palette in PaletteList::GetRandomPalette().
-Add function ScanForChaosNodes() and some associated helper functions in XmlToEmber.
-Make variation param name correction be case insensitive in XmlToEmber.
-Report error when assigning a variation param value in XmlToEmber.
-Add SubBatchPercentPerThread() method to RendererCL.
-Override enterEvent() and leaveEvent() in DoubleSpinBox and SpinBox to prevent the context menu from showing up on right mouse up after already leaving the spinner.
-Filtering the mouse wheel event in TableWidget no longer appears to be needed. It was probably an old Qt bug that has been fixed.
-Gui/ember syncing code in the final render dialog needed to be reworked to accommodate absolute sizes.
2019-04-13 22:00:46 -04:00
m_Ember . m_Curves . Init ( ) ;
2015-04-27 01:11:56 -04:00
FillXforms ( ) ;
--User changes:
-Show common folder locations such as documents, downloads, pictures in the sidebar in all file dialogs.
-Warning message about exceeding memory in final render dialog now suggests strips as the solution to the problem.
-Strips now has a tooltip explaining what it does.
-Allow more digits in the spinners on the color section the flame tab.
-Add manually adjustable size spinners in the final render dialog. Percentage scale and absolute size are fully synced.
-Default prefix in final render is now the filename when doing animations (coming from sequence section of the library tab).
-Changed the elliptic variation back to using a less precise version for float, and a more precise version for double. The last release had it always using double.
-New applied xaos table that shows a read-only view of actual weights by taking the base xform weights and multiplying them by the xaos values.
-New table in the xaos tab that gives a graphical representation of the probability that each xform is chosen, with and without xaos.
-Add button to transpose the xaos rows and columns.
-Add support for importing .chaos files from Chaotica.
--Pasting back to Chaotica will work for most, but not all, variations due to incompatible parameter names in some.
-Curves are now splines instead of Bezier. This adds compatibility with Chaotica, but breaks it for Apophysis. Xmls are still pastable, but the color curves will look different.
--The curve editor on the palette tab can now add points by clicking on the lines and remove points by clicking on the points themselves, just like Chaotica.
--Splines are saved in four new xml fields: overall_curve, red_curve, green_curve and blue_curve.
-Allow for specifying the percentage of a sub batch each thread should iterate through per kernel call when running with OpenCL. This gives a roughly 1% performance increase due to having to make less kernel calls while iterating.
--This field is present for interactive editing (where it's not very useful) and in the final render dialog.
--On the command line, this is specified as --sbpctth for EmberRender and EmberAnimate.
-Allow double clicking to toggle the supersample field in the flame tab between 1 and 2 for easily checking the effect of the field.
-When showing affine values as polar coordinates, show angles normalized to 360 to match Chaotica.
-Fuse Count spinner now toggles between 15 and 100 when double clicking for easily checking the effect of the field.
-Added field for limiting the range in the x and y direction that the initial points are chosen from.
-Added a field called K2 which is an alternative way to set brightness, ignored when zero.
--This has no effect for many variations, but hs a noticeable effect for some.
-Added new variations:
arcsech
arcsech2
arcsinh
arctanh
asteria
block
bwraps_rand
circlecrop2
coth_spiral
crackle2
depth_blur
depth_blur2
depth_gaussian
depth_gaussian2
depth_ngon
depth_ngon2
depth_sine
depth_sine2
dragonfire
dspherical
dust
excinis
exp2
flipx
flowerdb
foci_p
gaussian
glynnia2
glynnsim4
glynnsim5
henon
henon
hex_rand
hex_truchet
hypershift
lazyjess
lens
lozi
lozi
modulusx
modulusy
oscilloscope2
point_symmetry
pointsymmetry
projective
pulse
rotate
scry2
shift
smartshape
spher
squares
starblur2
swirl3
swirl3r
tanh_spiral
target0
target2
tile_hlp
truchet_glyph
truchet_inv
truchet_knot
unicorngaloshen
vibration
vibration2
--hex_truchet, hex_rand should always use double. They are extremely sensitive.
--Bug fixes:
-Bounds sign was flipped for x coordinate of world space when center was not zero.
-Right clicking and dragging spinner showed menu on mouse up, even if it was very far away.
-Text boxes for size in final render dialog were hard to type in. Same bug as xform weight used to be so fix the same way.
-Fix spelling to be plural in toggle color speed box.
-Stop using the blank user palette to generate flames. Either put colored palettes in it, or exclude it from randoms.
-Clicking the random palette button for a palette file with only one palette in it would freeze the program.
-Clicking none scale in final render did not re-render the preview.
-Use less precision on random xaos. No need for 12 decimal places.
-The term sub batch is overloaded in the options dialog. Change the naming and tooltip of those settings for cpu and opencl.
--Also made clear in the tooltip for the default opencl quality setting that the value is per device.
-The arrows spinner in palette editor appears like a read-only label. Made it look like a spinner.
-Fix border colors for various spin boxes and table headers in the style sheet. Requires reload.
-Fix a bug in the bwraps variation which would produce different results than Chaotica and Apophysis.
-Synth was allowed to be selected for random flame generation when using an Nvidia card but it shouldn't have been because Nvidia has a hard time compiling synth.
-A casting bug in the OpenCL kernels for log scaling and density filtering was preventing successful compilations on Intel iGPUs. Fixed even though we don't support anything other than AMD and Nvidia.
-Palette rotation (click and drag) position was not being reset when loading a new flame.
-When the xform circles were hidden, opening and closing the options dialog would improperly reshow them.
-Double click toggle was broken on integer spin boxes.
-Fixed tab order of some controls.
-Creating a palette from a jpg in the palette editor only produced a single color.
--Needed to package imageformats/qjpeg.dll with the Windows installer.
-The basic memory benchmark test flame was not really testing memory. Make it more spread out.
-Remove the temporal samples field from the flame tab, it was never used because it's only an animation parameter which is specified in the final render dialog or on the command line with EmberAnimate.
--Code changes:
-Add IsEmpty() to Palette to determine if a palette is all black.
-Attempt to avoid selecting a blank palette in PaletteList::GetRandomPalette().
-Add function ScanForChaosNodes() and some associated helper functions in XmlToEmber.
-Make variation param name correction be case insensitive in XmlToEmber.
-Report error when assigning a variation param value in XmlToEmber.
-Add SubBatchPercentPerThread() method to RendererCL.
-Override enterEvent() and leaveEvent() in DoubleSpinBox and SpinBox to prevent the context menu from showing up on right mouse up after already leaving the spinner.
-Filtering the mouse wheel event in TableWidget no longer appears to be needed. It was probably an old Qt bug that has been fixed.
-Gui/ember syncing code in the final render dialog needed to be reworked to accommodate absolute sizes.
2019-04-13 22:00:46 -04:00
FillCurvesControl ( ) ;
2015-04-27 01:11:56 -04:00
} ) ;
2014-07-08 03:11:14 -04:00
}
void Fractorium : : OnActionClearFlame ( bool checked ) { m_Controller - > ClearFlame ( ) ; }
/// <summary>
/// Re-render all previews.
/// </summary>
void Fractorium : : OnActionRenderPreviews ( bool checked )
{
2016-06-11 20:47:03 -04:00
m_Controller - > RenderLibraryPreviews ( ) ;
2014-07-08 03:11:14 -04:00
}
/// <summary>
/// Stop all previews from being rendered. This is handy if the user
/// opens a large file with many embers in it, such as an animation sequence.
/// </summary>
2016-06-11 20:47:03 -04:00
void Fractorium : : OnActionStopRenderingPreviews ( bool checked ) { m_Controller - > StopLibraryPreviewRender ( ) ; }
2014-07-08 03:11:14 -04:00
/// <summary>
/// Show the final render dialog as a modeless dialog to allow
/// the user to minimize the main window while doing a lengthy final render.
/// Note: The user probably should not be otherwise interacting with the main GUI
/// while the final render is taking place.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionFinalRender ( bool checked )
{
//First completely stop what the current rendering process is doing.
m_Controller - > DeleteRenderer ( ) ; //Delete the renderer, but not the controller.
2016-06-11 20:47:03 -04:00
m_Controller - > StopAllPreviewRenderers ( ) ;
2016-06-07 23:37:15 -04:00
m_Controller - > SaveCurrentToOpenedFile ( false ) ; //Save whatever was edited back to the current open file.
2014-07-08 03:11:14 -04:00
m_RenderStatusLabel - > setText ( " Renderer stopped. " ) ;
2019-12-31 00:12:10 -05:00
SetupFinalRenderDialog ( ) ;
if ( m_FinalRenderDialog )
m_FinalRenderDialog - > Show ( false ) ;
2014-07-08 03:11:14 -04:00
}
/// <summary>
/// Called when the final render dialog has been closed.
/// </summary>
/// <param name="result">Ignored</param>
void Fractorium : : OnFinalRenderClose ( int result )
{
m_RenderStatusLabel - > setText ( " Renderer starting... " ) ;
2017-07-22 16:43:35 -04:00
StartRenderTimer ( false ) ; //Re-create the renderer and start rendering again.
--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
ui . ActionStartStopRenderer - > setChecked ( false ) ; //Re-enable any controls that might have been disabled.
OnActionStartStopRenderer ( false ) ;
2019-12-31 00:12:10 -05:00
delete m_FinalRenderDialog ;
m_FinalRenderDialog = nullptr ;
2014-07-08 03:11:14 -04:00
}
/// <summary>
/// Show the final options dialog.
/// Restart rendering and sync options after the options dialog is dismissed with Ok.
/// Called when the options dialog is finished with ok.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionOptions ( bool checked )
{
2017-07-22 16:43:35 -04:00
bool ec = m_Settings - > EarlyClip ( ) ;
bool yup = m_Settings - > YAxisUp ( ) ;
bool trans = m_Settings - > Transparency ( ) ;
--User changes
-Add backward compatibility option for the following variations: cos, cosh, cot, coth, csc, csch, sec, sech, sin, sinh, tan, tanh.
-Add the ability to re-order variations by dragging them in the Info tab.
2020-03-05 01:30:08 -05:00
bool compat = m_Settings - > Flam3Compat ( ) ;
2017-07-22 16:43:35 -04:00
2014-07-08 03:11:14 -04:00
if ( m_OptionsDialog - > exec ( ) )
{
2017-07-22 16:43:35 -04:00
bool updatePreviews = ec ! = m_Settings - > EarlyClip ( ) | |
yup ! = m_Settings - > YAxisUp ( ) | |
--User changes
-Add backward compatibility option for the following variations: cos, cosh, cot, coth, csc, csch, sec, sech, sin, sinh, tan, tanh.
-Add the ability to re-order variations by dragging them in the Info tab.
2020-03-05 01:30:08 -05:00
trans ! = m_Settings - > Transparency ( ) | |
compat ! = m_Settings - > Flam3Compat ( ) ;
Compat : : m_Compat = m_Settings - > Flam3Compat ( ) ;
2015-07-29 20:25:02 -04:00
SyncOptionsToToolbar ( ) ; //This won't trigger a recreate, the call below handles it.
2017-07-22 16:43:35 -04:00
ShutdownAndRecreateFromOptions ( updatePreviews ) ; //This will recreate the controller and/or the renderer from the options if necessary, then start the render timer.
2014-07-08 03:11:14 -04:00
}
}
/// <summary>
/// Show the about dialog.
/// </summary>
/// <param name="checked">Ignored</param>
void Fractorium : : OnActionAbout ( bool checked )
{
m_AboutDialog - > exec ( ) ;
}
2014-12-11 00:50:15 -05:00
template class FractoriumEmberController < float > ;
# ifdef DO_DOUBLE
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
template class FractoriumEmberController < double > ;
2014-12-11 00:50:15 -05:00
# endif