tahoma2d/toonz/sources/stdfx/iwa_fractalnoisefx.h
Jeremy Bullock dd1976c5d8
Update with Current OpenToonz changes as of 8-12-20 (#119)
* add multi arc mockup

* implement mutli arc

* add join and smooth option

* reset multiarc and arc when deactivated

* create self loop if the last point is the same as the first

* make join option in multiarc consistent with tape tool

* fix a bug where thickness don't affect mutliarc in vector level

* remove join option in geometric tool

* stop mutliarc after closing shape

* double click can also end multi arc

* fix a bug where multiArc will produce buggy stroke

* fix a bug where geometric tools is not deactivated

* add multiArc shortcut

* rewrite multiArc

* revert changes to tvectorimage

* add undo data for multiArc

* Paste as Copy Command for XSheet

* Remove unneeded code

* Bug fix

* prevent guide lines from jumping around in MultiArc

* make stroke color consistent in MultiArc

* remove color in MultiArc's undo data

* make color consistent in MultiArc with previous version

* Fix single image raster levels

* fix compilation error

* fix a bug where multiArc might generate bugged stroke

* Remove ICONV dep (#3304)

* fix crash on saving studio palette

* Move to Paste Special Menu

* Don't Set Fixed Width if Docking a Floating Panel

* Update how_to_build_win.md

New draft of pr for requested changes to windows build instructions.

* fix geometric tool multiarc smooth option

* fix level saving failure

* fix wrong warning after saving palette

* fix a bug where moving a control point while holding alt has unintended result

* fix travis-install (#3389)

* Fix assert debug crash in flipconsole.cpp

Fix crash when using the viewer controls in the console (debug)

* Redraw Audio Waveform

Fills the waveform rather than outlines it.

* fix undo data when drawing arc and mutliarc

* fix overwriting raster drawing palette (#3387)

* mode sensitive fx settings

* Create New Style Command Button (#3394)

* Create New Style Command Button

This PR creates a new button in the pallette editor that creates a new style.  Button is large and easy access for a faster and easier workflow.  Original code developed by Turtletooth for Tahoma.  Given permission to develop within Openoonz.

Co-Authored-By: Jeremy Bullock <turtletooth@users.noreply.github.com>

* Update paletteviewergui.cpp

Made changes to the PR per request by Shun.

* Fixed a space within the code that wasn't suppose to be there.

Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com>

* tahoma license (#3396)

* new style button optional

* fix loading pegbars (removing updateKeyframes)

* periodic random expression

* add fx in linear color space
this commit is based on source for the ComposeAdd plugin fx by DWANGO Co., Ltd.
in dwango_opentoonz_plugins and opentoonz_plugin_utility repositories.

* fractal noise iwa fx

* skip unnecessary icon invalidation

* fix frame range fill with tablet

* stop function editor to open by dbl clicking key

* Expanding the radius of the rotation handle.

This just changes when the cursor transforms into the rotation tool.

(cherry picked from commit 7722ae989bbdc6aa5cb48df7a4c08bae1fe6ea39)

Co-authored-by: pojienie <pojienie@gmail.com>
Co-authored-by: rim <11380091+rozhuk-im@users.noreply.github.com>
Co-authored-by: shun-iwasawa <shun.iwasawa@ghibli.jp>
Co-authored-by: Rodney <rodney.baker@gmail.com>
Co-authored-by: DoctorRyan <65507211+DoctorRyan@users.noreply.github.com>
Co-authored-by: shun-iwasawa <shun-iwasawa@users.noreply.github.com>
Co-authored-by: Kite <konero@users.noreply.github.com>
Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com>
Co-authored-by: DoctorRyan <doctorryan1969.gmail.com>
2020-08-17 13:38:24 -06:00

142 lines
No EOL
3.9 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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;
bool alphaRendering;
};
protected:
// Fractal Type フラクタルの種類
TIntEnumParamP m_fractalType;
// Noise Type ノイズの種類
TIntEnumParamP m_noiseType;
// Invert 反転
TBoolParamP m_invert;
/// Contrast コントラスト
/// Brightness 明るさ
/// Overflow オーバーフロー
//- - - Transform トランスフォーム - - -
// Rotation 回転
TDoubleParamP m_rotation;
// Uniform Scaling 縦横比を固定
TBoolParamP m_uniformScaling;
// Scale スケール
TDoubleParamP m_scale;
// Scale Width スケールの幅
TDoubleParamP m_scaleW;
// Scale Height スケールの高さ
TDoubleParamP m_scaleH;
// Offset Turbulence 乱気流のオフセット
TPointParamP m_offsetTurbulence;
// Perspective Offset 遠近オフセット
TBoolParamP m_perspectiveOffset;
// Complexity 複雑度
TDoubleParamP m_complexity;
//- - - Sub Settings サブ設定 - - -
// Sub Influence サブ影響(%)
TDoubleParamP m_subInfluence;
// Sub Scaling サブスケール
TDoubleParamP m_subScaling;
// Sub Rotation サブ回転
TDoubleParamP m_subRotation;
// Sub Offset サブのオフセット
TPointParamP m_subOffset;
// Center Subscale サブスケールを中心
/// TBoolParamP m_centerSubscale;
// Evolution 展開
TDoubleParamP m_evolution;
//- - - Evolution Options 展開のオプション - - -
// Cycle Evolution サイクル展開
TBoolParamP m_cycleEvolution;
// Cycle (in Evolution) サイクル(周期)
TDoubleParamP m_cycleEvolutionRange;
/// Random Seed ランダムシード
/// Opacity 不透明度
/// Blending Mode 描画モード
// ダイナミックの度合い
TDoubleParamP m_dynamicIntensity;
// - - - 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 &param, const double frame, const TAffine &aff);
template <typename RASTER, typename PIXEL>
void outputRaster(const RASTER outRas, double *out_buf, const FNParam &param);
void getParamUIs(TParamUIConcept *&concepts, int &length) override;
// For Dynamic and Dynamic Twist patterns, the position offsets using gradient
// / rotation of the parent pattern
TPointD getSamplePos(int x, int y, const TDimension outDim,
const double *out_buf, const int gen, const double scale,
const FNParam &param);
// convert the noise
void convert(double *buf, const FNParam &param);
// composite the base noise pattern
void composite(double *out, double *buf, const double influence,
const FNParam &param);
// finalize pattern (coverting the color space)
void finalize(double *out, const FNParam &param);
};
#endif