--User changes

-Remove the Type field from the variations tree and instead just put the type indicator icon next to the variation name.
 -Double clicking to toggle variation parameter spinners now resets the value to the default if there is one, else it uses zero. If it is already using the default, it is toggled to 0.
 -Add a new button to toggle xaos on and off.
 -When duplicating a flame, insert it immediately after the one being duplicated instead of at the end of the file.
 -When switching between flames in a file, keep the same xform index selected rather than resetting it to the first xform each time.
 -Create a threaded writer for the final render and EmberAnimate so the rendering process does not get delayed by file saving which may take a long time.
 -Remove warning which said "Frames per rot cannot be greater than one while Rotations is zero" when generating a sequence.
 -Add the Circle_Rand variation from Chaotica.
 -Add tool tips to clarify the following items:
 --Auto Unique Filenames checkbox in the options dialog.
 --Xaos table headers.

--Bug fixes
 -Generating sequences using the following variations would be done incorrectly: circletrans1, collideoscope, crob, curlsp, glynnsim1, glynnsim2, hypercrop, julian, julian, mobiusn, nblur, waves2, wavesn.
 -Adding/removing nodes from the color curve had accidentally been disabled.
 -The applied xaos weight table was not showing normalized weight values.
 -Changing the size of a flame was not observing the Apply To All checkbox.
 -Do not clamp the Rotate field to +/-180, because this causes the rotation to switch from CW to CCW during sequence generation. Instead, leave it exactly as the user entered it so the rotations proceed in the same direction.
This commit is contained in:
Person
2023-11-21 22:58:22 -07:00
parent 1a1cb8b0f2
commit 745f06d29d
47 changed files with 616 additions and 326 deletions

View File

@ -496,8 +496,7 @@ bool EmberAnimate(int argc, _TCHAR* argv[], EmberOptions& opt)
EmberStats stats;
EmberImageComments comments;
Ember<T> centerEmber;
vector<v4F> finalImages[2];
std::thread writeThread;
ThreadedWriter threadedWriter(16);
os.imbue(std::locale(""));
//The conditions of this loop use atomics to synchronize when running on multiple GPUs.
@ -600,8 +599,10 @@ bool EmberAnimate(int argc, _TCHAR* argv[], EmberOptions& opt)
}
renderer->Reset();
auto threadIndex = threadedWriter.Increment();
auto threadImage = threadedWriter.GetImage(opt.ThreadedWrite() ? threadIndex : 0);
if ((renderer->Run(finalImages[finalImageIndex], localTime) != eRenderStatus::RENDER_OK) || renderer->Aborted() || finalImages[finalImageIndex].empty())
if ((renderer->Run(*threadImage, localTime) != eRenderStatus::RENDER_OK) || renderer->Aborted() || threadImage->empty())
{
cout << "Error: image rendering failed, aborting.\n";
renderer->DumpErrorReport();//Something went wrong, print errors.
@ -644,19 +645,19 @@ bool EmberAnimate(int argc, _TCHAR* argv[], EmberOptions& opt)
//Run image writing in a thread. Although doing it this way duplicates the final output memory, it saves a lot of time
//when running with OpenCL. Call join() to ensure the previous thread call has completed.
Join(writeThread);
//Join(writeThread);
const auto threadVecIndex = finalImageIndex;//Cache before launching thread.
if (opt.ThreadedWrite())//Copies of all but the first parameter are passed to saveFunc(), to avoid conflicting with those values changing when starting the render for the next image.
{
writeThread = std::thread(saveFunc, std::ref(finalImages[threadVecIndex]), baseFilename, comments, renderer->FinalRasW(), renderer->FinalRasH(), renderer->NumChannels());
finalImageIndex ^= 1;//Toggle the index.
auto writeThread = std::thread(saveFunc, std::ref(*threadImage), baseFilename, comments, renderer->FinalRasW(), renderer->FinalRasH(), renderer->NumChannels());
threadedWriter.SetThread(threadIndex, writeThread);
}
else
saveFunc(finalImages[threadVecIndex], baseFilename, comments, renderer->FinalRasW(), renderer->FinalRasH(), renderer->NumChannels());//Will always use the first index, thereby not requiring more memory.
saveFunc(*threadImage, baseFilename, comments, renderer->FinalRasW(), renderer->FinalRasH(), renderer->NumChannels());//Will always use the first index, thereby not requiring more memory.
}
Join(writeThread);//One final check to make sure all writing is done before exiting this thread.
threadedWriter.JoinAll();//One final check to make sure all writing is done before exiting this thread.
};
threadVec.reserve(renderers.size());