2020-08-18 07:38:24 +12:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
//******************************************************************
|
|
|
|
|
// Iwa FractalNoise Fx
|
|
|
|
|
// An Fx emulating Fractal Noise effect in Adobe AfterEffect
|
|
|
|
|
//******************************************************************
|
|
|
|
|
|
|
|
|
|
#ifndef IWA_FRACTALNOISEFX_H
|
|
|
|
|
#define IWA_FRACTALNOISEFX_H
|
|
|
|
|
|
|
|
|
|
#include "tfxparam.h"
|
|
|
|
|
#include "tparamset.h"
|
|
|
|
|
#include "stdfx.h"
|
|
|
|
|
|
|
|
|
|
class Iwa_FractalNoiseFx final : public TStandardZeraryFx {
|
|
|
|
|
FX_PLUGIN_DECLARATION(Iwa_FractalNoiseFx)
|
|
|
|
|
|
|
|
|
|
enum FractalType {
|
|
|
|
|
Basic = 0,
|
|
|
|
|
TurbulentSmooth,
|
|
|
|
|
TurbulentBasic,
|
|
|
|
|
TurbulentSharp,
|
|
|
|
|
Dynamic,
|
|
|
|
|
DynamicTwist,
|
|
|
|
|
Max,
|
|
|
|
|
Rocky,
|
|
|
|
|
FractalTypeCount
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum NoiseType { Block = 0, Smooth, NoiseTypeCount };
|
|
|
|
|
|
|
|
|
|
struct FNParam {
|
|
|
|
|
FractalType fractalType;
|
|
|
|
|
NoiseType noiseType;
|
|
|
|
|
bool invert;
|
|
|
|
|
double rotation;
|
|
|
|
|
TDimensionD scale;
|
|
|
|
|
TPointD offsetTurbulence;
|
|
|
|
|
bool perspectiveOffset;
|
|
|
|
|
double complexity;
|
|
|
|
|
double subInfluence;
|
|
|
|
|
double subScaling;
|
|
|
|
|
double subRotation;
|
|
|
|
|
TPointD subOffset;
|
|
|
|
|
double evolution;
|
|
|
|
|
bool cycleEvolution;
|
|
|
|
|
double cycleEvolutionRange;
|
|
|
|
|
double dynamicIntensity;
|
2022-01-06 15:05:24 +13:00
|
|
|
|
|
|
|
|
|
bool doConical;
|
|
|
|
|
double conicalEvolution;
|
|
|
|
|
double conicalAngle;
|
|
|
|
|
double cameraFov;
|
|
|
|
|
double zScale;
|
|
|
|
|
|
2020-08-18 07:38:24 +12:00
|
|
|
|
bool alphaRendering;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
protected:
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Fractal Type <20>t<EFBFBD><74><EFBFBD>N<EFBFBD>^<5E><><EFBFBD>̎<EFBFBD><CC8E>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TIntEnumParamP m_fractalType;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Noise Type <20>m<EFBFBD>C<EFBFBD>Y<EFBFBD>̎<EFBFBD><CC8E>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TIntEnumParamP m_noiseType;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Invert <20><><EFBFBD>]
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TBoolParamP m_invert;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
/// Contrast <20>R<EFBFBD><52><EFBFBD>g<EFBFBD><67><EFBFBD>X<EFBFBD>g
|
|
|
|
|
/// Brightness <20><><EFBFBD>邳
|
|
|
|
|
/// Overflow <20>I<EFBFBD>[<5B>o<EFBFBD>[<5B>t<EFBFBD><74><EFBFBD>[
|
2020-08-18 07:38:24 +12:00
|
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
//- - - Transform <20>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>t<EFBFBD>H<EFBFBD>[<5B><> - - -
|
|
|
|
|
// Rotation <20><>]
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_rotation;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Uniform Scaling<6E>@<40>c<EFBFBD><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Œ<EFBFBD>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TBoolParamP m_uniformScaling;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Scale <20>X<EFBFBD>P<EFBFBD>[<5B><>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_scale;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Scale Width <20>X<EFBFBD>P<EFBFBD>[<5B><><EFBFBD>̕<EFBFBD>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_scaleW;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Scale Height <20>X<EFBFBD>P<EFBFBD>[<5B><><EFBFBD>̍<EFBFBD><CC8D><EFBFBD>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_scaleH;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Offset Turbulence <20><><EFBFBD>C<EFBFBD><43><EFBFBD>̃I<CC83>t<EFBFBD>Z<EFBFBD>b<EFBFBD>g
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TPointParamP m_offsetTurbulence;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Perspective Offset <20><><EFBFBD>߃I<DF83>t<EFBFBD>Z<EFBFBD>b<EFBFBD>g
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TBoolParamP m_perspectiveOffset;
|
|
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Complexity <20><><EFBFBD>G<EFBFBD>x
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_complexity;
|
|
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
//- - - Sub Settings <20>T<EFBFBD>u<EFBFBD>ݒ<EFBFBD> - - -
|
|
|
|
|
// Sub Influence <20>T<EFBFBD>u<EFBFBD>e<EFBFBD><65><EFBFBD>i<EFBFBD><69><EFBFBD>j
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_subInfluence;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Sub Scaling<6E>@<40>T<EFBFBD>u<EFBFBD>X<EFBFBD>P<EFBFBD>[<5B><>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_subScaling;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Sub Rotation <20>T<EFBFBD>u<EFBFBD><75>]
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_subRotation;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Sub Offset <20>T<EFBFBD>u<EFBFBD>̃I<CC83>t<EFBFBD>Z<EFBFBD>b<EFBFBD>g
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TPointParamP m_subOffset;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Center Subscale <20>T<EFBFBD>u<EFBFBD>X<EFBFBD>P<EFBFBD>[<5B><><EFBFBD>𒆐S
|
2020-08-18 07:38:24 +12:00
|
|
|
|
/// TBoolParamP m_centerSubscale;
|
|
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Evolution <20>W<EFBFBD>J
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_evolution;
|
|
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
//- - - Evolution Options <20>W<EFBFBD>J<EFBFBD>̃I<CC83>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD> - - -
|
|
|
|
|
// Cycle Evolution <20>T<EFBFBD>C<EFBFBD>N<EFBFBD><4E><EFBFBD>W<EFBFBD>J
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TBoolParamP m_cycleEvolution;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// Cycle (in Evolution) <20>T<EFBFBD>C<EFBFBD>N<EFBFBD><4E><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD><EFBFBD>j
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_cycleEvolutionRange;
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
/// Random Seed <20><><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD>V<EFBFBD>[<5B>h
|
|
|
|
|
/// Opacity <20>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>x
|
|
|
|
|
/// Blending Mode <20>`<60>惂<EFBFBD>[<5B>h
|
2020-08-18 07:38:24 +12:00
|
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// <20>_<EFBFBD>C<EFBFBD>i<EFBFBD>~<7E>b<EFBFBD>N<EFBFBD>̓x<CC93><78><EFBFBD><EFBFBD>
|
2020-08-18 07:38:24 +12:00
|
|
|
|
TDoubleParamP m_dynamicIntensity;
|
|
|
|
|
|
2022-01-06 15:05:24 +13:00
|
|
|
|
//- - - Conical Noise - - -
|
|
|
|
|
TBoolParamP m_doConical;
|
|
|
|
|
TDoubleParamP m_conicalEvolution;
|
|
|
|
|
TDoubleParamP m_conicalAngle;
|
|
|
|
|
TDoubleParamP m_cameraFov;
|
|
|
|
|
TDoubleParamP m_zScale;
|
|
|
|
|
|
2020-08-18 07:38:24 +12:00
|
|
|
|
// - - - additional parameters - - -
|
|
|
|
|
TBoolParamP m_alphaRendering;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Iwa_FractalNoiseFx();
|
|
|
|
|
bool canHandle(const TRenderSettings &info, double frame) override {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
bool doGetBBox(double frame, TRectD &bBox,
|
|
|
|
|
const TRenderSettings &ri) override;
|
|
|
|
|
void doCompute(TTile &tile, double frame, const TRenderSettings &ri) override;
|
|
|
|
|
|
|
|
|
|
void obtainParams(FNParam ¶m, const double frame, const TAffine &aff);
|
|
|
|
|
|
|
|
|
|
template <typename RASTER, typename PIXEL>
|
|
|
|
|
void outputRaster(const RASTER outRas, double *out_buf, const FNParam ¶m);
|
|
|
|
|
|
|
|
|
|
void getParamUIs(TParamUIConcept *&concepts, int &length) override;
|
|
|
|
|
|
|
|
|
|
// For Dynamic and Dynamic Twist patterns, the position offsets using gradient
|
|
|
|
|
// / rotation of the parent pattern
|
2022-01-06 15:05:24 +13:00
|
|
|
|
TPointD getSamplePos(double x, double y, const TDimension outDim,
|
2020-08-18 07:38:24 +12:00
|
|
|
|
const double *out_buf, const int gen, const double scale,
|
|
|
|
|
const FNParam ¶m);
|
|
|
|
|
// convert the noise
|
|
|
|
|
void convert(double *buf, const FNParam ¶m);
|
|
|
|
|
// composite the base noise pattern
|
|
|
|
|
void composite(double *out, double *buf, const double influence,
|
|
|
|
|
const FNParam ¶m);
|
Fix various typos
Found via `codespell -q 3 -S *.ts,thirdparty, -L appy,ba,chunck,datas,forse,inbetween,inly,inout,pevent,possibile,upto`
2021-11-22 08:54:40 +13:00
|
|
|
|
// finalize pattern (converting the color space)
|
2020-08-18 07:38:24 +12:00
|
|
|
|
void finalize(double *out, const FNParam ¶m);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|