0.4.1.6 Beta 11/29/2014

--User Changes
 None.

--Bug Fixes
 Fix broken continuity of randomness in OpenCL when using strips, broken in last build.
 Fix broken density filtering dimensions in OpenCL which left black lines, broken in last build.
 Fix broken preview update on when the only change is scale.
 Update density filtering progress bar to 100% in final render dialog when DE radius is 0 (disabled).

--Code Changes
 Make RendererBase::RandVec() virtual.
This commit is contained in:
mfeemster 2014-11-29 09:44:23 -08:00
parent b29bedec38
commit 4777ab52bc
16 changed files with 81 additions and 34 deletions

View File

@ -6,7 +6,7 @@
<ProductVersion>3.7</ProductVersion> <ProductVersion>3.7</ProductVersion>
<ProjectGuid>{c8096c47-e358-438c-a520-146d46b0637d}</ProjectGuid> <ProjectGuid>{c8096c47-e358-438c-a520-146d46b0637d}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>Fractorium_Beta_0.4.1.5</OutputName> <OutputName>Fractorium_Beta_0.4.1.6</OutputName>
<OutputType>Package</OutputType> <OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductVersion="0.4.1.5" ?> <?define ProductVersion="0.4.1.6" ?>
<?define ProductName="Fractorium Beta $(var.ProductVersion) ($(var.GpuType))" ?> <?define ProductName="Fractorium Beta $(var.ProductVersion) ($(var.GpuType))" ?>
<?define UpgradeCode="{4714cd15-bfba-44f6-8059-9e1466ebfa6e}"?> <?define UpgradeCode="{4714cd15-bfba-44f6-8059-9e1466ebfa6e}"?>
<?define Manufacturer="Fractorium"?> <?define Manufacturer="Fractorium"?>
@ -13,7 +13,7 @@
<!-- <!--
Change this for every release. Change this for every release.
--> -->
<?define ProductCode="{9C24521C-6721-490F-A21C-49AF87EE7074}"?> <?define ProductCode="{9C36E0DB-FFC8-43BE-9B29-A7178DA7FBF1}"?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)"> <Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package <Package

View File

@ -1,3 +1,16 @@
0.4.1.6 Beta 11/29/2014
--User Changes
None.
--Bug Fixes
Fix broken continuity of randomness in OpenCL when using strips, broken in last build.
Fix broken density filtering dimensions in OpenCL which left black lines, broken in last build.
Fix broken preview update on when the only change is scale.
Update density filtering progress bar to 100% in final render dialog when DE radius is 0 (disabled).
--Code Changes
Make RendererBase::RandVec() virtual.
0.4.1.5 Beta 11/28/2014 0.4.1.5 Beta 11/28/2014
--User Changes --User Changes
Remove limit on the number of xforms allowable on the GPU. This was previously 21. Remove limit on the number of xforms allowable on the GPU. This was previously 21.

View File

@ -36,7 +36,7 @@ namespace EmberNs
extern void sincos(float x, float *s, float *c); extern void sincos(float x, float *s, float *c);
#endif #endif
#define EMBER_VERSION "0.4.1.5" #define EMBER_VERSION "0.4.1.6"
#define EPS6 T(1e-6) #define EPS6 T(1e-6)
#define EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way. #define EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.
#define ISAAC_SIZE 4 #define ISAAC_SIZE 4

View File

@ -99,7 +99,6 @@ public:
void ChangeVal(std::function<void(void)> func, eProcessAction action); void ChangeVal(std::function<void(void)> func, eProcessAction action);
size_t MemoryRequired(size_t strips, bool includeFinal); size_t MemoryRequired(size_t strips, bool includeFinal);
vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>> RandVec(); vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>> RandVec();
bool RandVec(vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>>& randVec);
bool PrepFinalAccumVector(vector<unsigned char>& pixels); bool PrepFinalAccumVector(vector<unsigned char>& pixels);
//Virtual processing functions. //Virtual processing functions.
@ -109,6 +108,7 @@ public:
virtual void SetEmber(vector<Ember<float>>& embers) { } virtual void SetEmber(vector<Ember<float>>& embers) { }
virtual void SetEmber(Ember<double>& ember, eProcessAction action = FULL_RENDER) { } virtual void SetEmber(Ember<double>& ember, eProcessAction action = FULL_RENDER) { }
virtual void SetEmber(vector<Ember<double>>& embers) { } virtual void SetEmber(vector<Ember<double>>& embers) { }
virtual bool RandVec(vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>>& randVec);
//Abstract processing functions. //Abstract processing functions.
virtual bool CreateDEFilter(bool& newAlloc) = 0; virtual bool CreateDEFilter(bool& newAlloc) = 0;

View File

@ -49,8 +49,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,1,5 FILEVERSION 0,4,1,6
PRODUCTVERSION 0,4,1,5 PRODUCTVERSION 0,4,1,6
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -67,12 +67,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Open Source" VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Renders fractal flames as animations with motion blur" VALUE "FileDescription", "Renders fractal flames as animations with motion blur"
VALUE "FileVersion", "0.4.1.5" VALUE "FileVersion", "0.4.1.6"
VALUE "InternalName", "EmberAnimate.rc" VALUE "InternalName", "EmberAnimate.rc"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3"
VALUE "OriginalFilename", "EmberAnimate.rc" VALUE "OriginalFilename", "EmberAnimate.rc"
VALUE "ProductName", "Ember Animate" VALUE "ProductName", "Ember Animate"
VALUE "ProductVersion", "0.4.1.5" VALUE "ProductVersion", "0.4.1.6"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -52,14 +52,8 @@ RendererCL<T>::RendererCL(unsigned int platform, unsigned int device, bool share
m_PaletteFormat.image_channel_data_type = CL_FLOAT; m_PaletteFormat.image_channel_data_type = CL_FLOAT;
m_FinalFormat.image_channel_order = CL_RGBA; m_FinalFormat.image_channel_order = CL_RGBA;
m_FinalFormat.image_channel_data_type = CL_UNORM_INT8;//Change if this ever supports 2BPC outputs for PNG. m_FinalFormat.image_channel_data_type = CL_UNORM_INT8;//Change if this ever supports 2BPC outputs for PNG.
m_Seeds.resize(IterGridKernelCount());
FillSeeds();
for (size_t i = 0; i < m_Seeds.size(); i++)
{
m_Seeds[i].x = m_Rand[0].Rand();
m_Seeds[i].y = m_Rand[0].Rand();
}
Init(platform, device, shared, outputTexID);//Init OpenCL upon construction and create programs that will not change. Init(platform, device, shared, outputTexID);//Init OpenCL upon construction and create programs that will not change.
} }
@ -498,6 +492,27 @@ vector<string> RendererCL<T>::ErrorReport()
return ours; return ours;
} }
/// <summary>
/// Set the vector of random contexts.
/// Call the base, and reset the seeds vector.
/// </summary>
/// <param name="randVec">The vector of random contexts to assign</param>
/// <returns>True if the size of the vector matched the number of threads used for rendering and writing seeds to OpenCL succeeded, else false.</returns>
template <typename T>
bool RendererCL<T>::RandVec(vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>>& randVec)
{
bool b = Renderer<T, T>::RandVec(randVec);
const char* loc = __FUNCTION__;
if (m_Wrapper.Ok())
{
FillSeeds();
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SeedsBufferName, (void*)m_Seeds.data(), SizeOf(m_Seeds)))) { m_ErrorReport.push_back(loc); }
}
return b;
}
/// <summary> /// <summary>
/// Protected virtual functions overridden from Renderer. /// Protected virtual functions overridden from Renderer.
/// </summary> /// </summary>
@ -912,6 +927,9 @@ eRenderStatus RendererCL<T>::RunLogScaleFilter()
m_ErrorReport.push_back(loc); m_ErrorReport.push_back(loc);
} }
if (b && m_Callback)
m_Callback->ProgressFunc(m_Ember, m_ProgressParameter, 100.0, 1, 0.0);
return b ? RENDER_OK : RENDER_ERROR; return b ? RENDER_OK : RENDER_ERROR;
} }
@ -996,9 +1014,9 @@ eRenderStatus RendererCL<T>::RunDensityFilter()
} }
} }
#else #else
OpenCLWrapper::MakeEvenGridDims(blockSizeW, blockSizeH, gridW, gridH);
gridW /= chunkSizeW; gridW /= chunkSizeW;
gridH /= chunkSizeH; gridH /= chunkSizeH;
OpenCLWrapper::MakeEvenGridDims(blockSizeW, blockSizeH, gridW, gridH);
for (unsigned int rowChunk = 0; b && !m_Abort && rowChunk < chunkSizeH; rowChunk++) for (unsigned int rowChunk = 0; b && !m_Abort && rowChunk < chunkSizeH; rowChunk++)
{ {
@ -1432,4 +1450,21 @@ CarToRasCL<T> RendererCL<T>::ConvertCarToRas(const CarToRas<T>& carToRas)
return carToRasCL; return carToRasCL;
} }
/// <summary>
/// Fill seeds buffer which gets passed to the iteration kernel.
/// Note, WriteBuffer() must be called after this to actually copy the
/// data from the host to the device.
/// </summary>
template <typename T>
void RendererCL<T>::FillSeeds()
{
m_Seeds.resize(IterGridKernelCount());
for (size_t i = 0; i < m_Seeds.size(); i++)
{
m_Seeds[i].x = m_Rand[0].Rand();
m_Seeds[i].y = m_Rand[0].Rand();
}
}
} }

View File

@ -93,6 +93,7 @@ public:
virtual eRendererType RendererType() const override; virtual eRendererType RendererType() const override;
virtual string ErrorReportString() override; virtual string ErrorReportString() override;
virtual vector<string> ErrorReport() override; virtual vector<string> ErrorReport() override;
virtual bool RandVec(vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>>& randVec) override;
#ifndef TEST_CL #ifndef TEST_CL
protected: protected:
@ -118,6 +119,7 @@ private:
int MakeAndGetDensityFilterProgram(size_t ss, unsigned int filterWidth); int MakeAndGetDensityFilterProgram(size_t ss, unsigned int filterWidth);
int MakeAndGetFinalAccumProgram(T& alphaBase, T& alphaScale); int MakeAndGetFinalAccumProgram(T& alphaBase, T& alphaScale);
int MakeAndGetGammaCorrectionProgram(); int MakeAndGetGammaCorrectionProgram();
void FillSeeds();
//Private functions passing data to OpenCL programs. //Private functions passing data to OpenCL programs.
DensityFilterCL<T> ConvertDensityFilter(); DensityFilterCL<T> ConvertDensityFilter();

View File

@ -49,8 +49,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,1,5 FILEVERSION 0,4,1,6
PRODUCTVERSION 0,4,1,5 PRODUCTVERSION 0,4,1,6
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -67,12 +67,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Open Source" VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Manipulates fractal flames parameter files" VALUE "FileDescription", "Manipulates fractal flames parameter files"
VALUE "FileVersion", "0.4.1.5" VALUE "FileVersion", "0.4.1.6"
VALUE "InternalName", "EmberGenome.rc" VALUE "InternalName", "EmberGenome.rc"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3"
VALUE "OriginalFilename", "EmberGenome.rc" VALUE "OriginalFilename", "EmberGenome.rc"
VALUE "ProductName", "Ember Genome" VALUE "ProductName", "Ember Genome"
VALUE "ProductVersion", "0.4.1.5" VALUE "ProductVersion", "0.4.1.6"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -49,8 +49,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,1,5 FILEVERSION 0,4,1,6
PRODUCTVERSION 0,4,1,5 PRODUCTVERSION 0,4,1,6
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -67,12 +67,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Open Source" VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Renders fractal flames as single images" VALUE "FileDescription", "Renders fractal flames as single images"
VALUE "FileVersion", "0.4.1.5" VALUE "FileVersion", "0.4.1.6"
VALUE "InternalName", "EmberRender.rc" VALUE "InternalName", "EmberRender.rc"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3"
VALUE "OriginalFilename", "EmberRender.rc" VALUE "OriginalFilename", "EmberRender.rc"
VALUE "ProductName", "Ember Render" VALUE "ProductName", "Ember Render"
VALUE "ProductVersion", "0.4.1.5" VALUE "ProductVersion", "0.4.1.6"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -52,7 +52,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Fractorium 0.4.1.5 Beta&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br/&gt;A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Matt Feemster&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Fractorium 0.4.1.6 Beta&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br/&gt;A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Matt Feemster&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::RichText</enum> <enum>Qt::RichText</enum>

View File

@ -118,7 +118,7 @@ FinalRenderEmberController<T>::FinalRenderEmberController(FractoriumFinalRenderD
m_PreviewEmber.m_FinalRasW = max<size_t>(1, min<size_t>(maxDim, size_t(scalePercentage * m_Ember->m_FinalRasW)));//Ensure neither is zero. m_PreviewEmber.m_FinalRasW = max<size_t>(1, min<size_t>(maxDim, size_t(scalePercentage * m_Ember->m_FinalRasW)));//Ensure neither is zero.
m_PreviewEmber.m_FinalRasH = max<size_t>(1, min<size_t>(maxDim, size_t(scalePercentage * m_Ember->m_FinalRasH))); m_PreviewEmber.m_FinalRasH = max<size_t>(1, min<size_t>(maxDim, size_t(scalePercentage * m_Ember->m_FinalRasH)));
m_PreviewEmber.m_PixelsPerUnit = scalePercentage * m_Ember->m_PixelsPerUnit; m_PreviewEmber.m_PixelsPerUnit = scalePercentage * m_Ember->m_PixelsPerUnit;
m_FinalPreviewRenderer->EarlyClip(m_FinalRenderDialog->EarlyClip()); m_FinalPreviewRenderer->EarlyClip(m_FinalRenderDialog->EarlyClip());
m_FinalPreviewRenderer->YAxisUp(m_FinalRenderDialog->YAxisUp()); m_FinalPreviewRenderer->YAxisUp(m_FinalRenderDialog->YAxisUp());
m_FinalPreviewRenderer->Transparency(m_FinalRenderDialog->Transparency()); m_FinalPreviewRenderer->Transparency(m_FinalRenderDialog->Transparency());

Binary file not shown.

View File

@ -101,6 +101,7 @@ FractoriumEmberController<T>::FractoriumEmberController(Fractorium* fractorium)
{ {
Ember<T> ember = m_EmberFile.m_Embers[i]; Ember<T> ember = m_EmberFile.m_Embers[i];
ember.SyncSize();
ember.SetSizeAndAdjustScale(PREVIEW_SIZE, PREVIEW_SIZE, false, SCALE_WIDTH); ember.SetSizeAndAdjustScale(PREVIEW_SIZE, PREVIEW_SIZE, false, SCALE_WIDTH);
ember.m_TemporalSamples = 1; ember.m_TemporalSamples = 1;
ember.m_Quality = 25; ember.m_Quality = 25;

View File

@ -62,8 +62,6 @@ void FractoriumEmberController<T>::NewFlock(unsigned int count)
m_SheepTools->Random(ember); m_SheepTools->Random(ember);
ParamsToEmber(ember); ParamsToEmber(ember);
ember.m_Index = i; ember.m_Index = i;
ember.m_OrigFinalRasW = ember.m_FinalRasW;
ember.m_OrigFinalRasH = ember.m_FinalRasH;
ember.m_Name = m_EmberFile.m_Filename.toStdString() + "-" + ToString(i + 1).toStdString(); ember.m_Name = m_EmberFile.m_Filename.toStdString() + "-" + ToString(i + 1).toStdString();
m_EmberFile.m_Embers.push_back(ember); m_EmberFile.m_Embers.push_back(ember);
} }
@ -97,8 +95,6 @@ void FractoriumEmberController<T>::NewEmptyFlameInCurrentFile()
StopPreviewRender(); StopPreviewRender();
ParamsToEmber(ember); ParamsToEmber(ember);
ember.m_OrigFinalRasW = ember.m_FinalRasW;
ember.m_OrigFinalRasH = ember.m_FinalRasH;
xform.m_Weight = T(0.25); xform.m_Weight = T(0.25);
xform.m_ColorX = m_Rand.Frand01<T>(); xform.m_ColorX = m_Rand.Frand01<T>();
ember.AddXform(xform); ember.AddXform(xform);
@ -126,8 +122,6 @@ void FractoriumEmberController<T>::NewRandomFlameInCurrentFile()
StopPreviewRender(); StopPreviewRender();
m_SheepTools->Random(ember); m_SheepTools->Random(ember);
ParamsToEmber(ember); ParamsToEmber(ember);
ember.m_OrigFinalRasW = ember.m_FinalRasW;
ember.m_OrigFinalRasH = ember.m_FinalRasH;
ember.m_Name = EmberFile<T>::DefaultEmberName(m_EmberFile.Size() + 1).toStdString(); ember.m_Name = EmberFile<T>::DefaultEmberName(m_EmberFile.Size() + 1).toStdString();
ember.m_Index = m_EmberFile.Size(); ember.m_Index = m_EmberFile.Size();
m_EmberFile.m_Embers.push_back(ember);//Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync. m_EmberFile.m_Embers.push_back(ember);//Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.

View File

@ -614,6 +614,8 @@ void FractoriumEmberController<T>::ParamsToEmber(Ember<T>& ember)
ember.m_TemporalSamples = m_Fractorium->m_TemporalSamplesSpin->value(); ember.m_TemporalSamples = m_Fractorium->m_TemporalSamplesSpin->value();
ember.m_AffineInterp = (eAffineInterp)m_Fractorium->m_AffineInterpTypeCombo->currentIndex(); ember.m_AffineInterp = (eAffineInterp)m_Fractorium->m_AffineInterpTypeCombo->currentIndex();
ember.m_Interp = (eInterp)m_Fractorium->m_InterpTypeCombo->currentIndex(); ember.m_Interp = (eInterp)m_Fractorium->m_InterpTypeCombo->currentIndex();
ember.SyncSize();
} }
/// <summary> /// <summary>