Density estimator controls for flam3 renderer added.
This commit is contained in:
parent
489f4fa1be
commit
c0b9aedea3
@ -124,6 +124,8 @@ type
|
|||||||
pulse: array[0..1, 0..1] of double; // [i][0]=magnitute [i][1]=frequency */
|
pulse: array[0..1, 0..1] of double; // [i][0]=magnitute [i][1]=frequency */
|
||||||
wiggle: array[0..1, 0..1] of double; // frequency is /minute, assuming 30 frames/s */
|
wiggle: array[0..1, 0..1] of double; // frequency is /minute, assuming 30 frames/s */
|
||||||
|
|
||||||
|
estimator, estimator_min, estimator_curve, jitters: double; // density estimator.
|
||||||
|
|
||||||
PropTable: array of TXForm;//Integer;
|
PropTable: array of TXForm;//Integer;
|
||||||
FAngle: Double;
|
FAngle: Double;
|
||||||
FTwoColorDimensions: Boolean;
|
FTwoColorDimensions: Boolean;
|
||||||
|
@ -3,8 +3,8 @@ object ExportDialog: TExportDialog
|
|||||||
Top = 276
|
Top = 276
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Export Flame'
|
Caption = 'Export Flame'
|
||||||
ClientHeight = 270
|
ClientHeight = 325
|
||||||
ClientWidth = 424
|
ClientWidth = 419
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -17,9 +17,9 @@ object ExportDialog: TExportDialog
|
|||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object btnOK: TButton
|
object btnOK: TButton
|
||||||
Left = 336
|
Left = 326
|
||||||
Top = 178
|
Top = 182
|
||||||
Width = 75
|
Width = 89
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = '&OK'
|
Caption = '&OK'
|
||||||
Default = True
|
Default = True
|
||||||
@ -28,9 +28,9 @@ object ExportDialog: TExportDialog
|
|||||||
OnClick = btnOKClick
|
OnClick = btnOKClick
|
||||||
end
|
end
|
||||||
object btnCancel: TButton
|
object btnCancel: TButton
|
||||||
Left = 336
|
Left = 326
|
||||||
Top = 210
|
Top = 210
|
||||||
Width = 75
|
Width = 89
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
@ -41,7 +41,7 @@ object ExportDialog: TExportDialog
|
|||||||
Top = 5
|
Top = 5
|
||||||
Width = 408
|
Width = 408
|
||||||
Height = 57
|
Height = 57
|
||||||
Caption = 'Destination'
|
Caption = ' Destination '
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object btnBrowse: TSpeedButton
|
object btnBrowse: TSpeedButton
|
||||||
Left = 368
|
Left = 368
|
||||||
@ -108,7 +108,7 @@ object ExportDialog: TExportDialog
|
|||||||
Top = 66
|
Top = 66
|
||||||
Width = 200
|
Width = 200
|
||||||
Height = 105
|
Height = 105
|
||||||
Caption = 'Rendering'
|
Caption = ' Quality '
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 10
|
Left = 10
|
||||||
@ -174,7 +174,7 @@ object ExportDialog: TExportDialog
|
|||||||
Top = 66
|
Top = 66
|
||||||
Width = 200
|
Width = 200
|
||||||
Height = 105
|
Height = 105
|
||||||
Caption = 'Size'
|
Caption = ' Size '
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 10
|
Left = 10
|
||||||
@ -241,8 +241,8 @@ object ExportDialog: TExportDialog
|
|||||||
Left = 8
|
Left = 8
|
||||||
Top = 176
|
Top = 176
|
||||||
Width = 313
|
Width = 313
|
||||||
Height = 89
|
Height = 145
|
||||||
Caption = 'hqi/flam3'
|
Caption = ' flam3 parameters '
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object Label6: TLabel
|
object Label6: TLabel
|
||||||
Left = 10
|
Left = 10
|
||||||
@ -265,6 +265,37 @@ object ExportDialog: TExportDialog
|
|||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Strips:'
|
Caption = 'Strips:'
|
||||||
end
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 88
|
||||||
|
Width = 43
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Estimator'
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 112
|
||||||
|
Width = 49
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Estimator min.'
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 160
|
||||||
|
Top = 80
|
||||||
|
Width = 57
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Estimator curve'
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 160
|
||||||
|
Top = 112
|
||||||
|
Width = 57
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Temporal samples'
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
object txtBatches: TEdit
|
object txtBatches: TEdit
|
||||||
Left = 64
|
Left = 64
|
||||||
Top = 20
|
Top = 20
|
||||||
@ -329,6 +360,42 @@ object ExportDialog: TExportDialog
|
|||||||
Position = 1
|
Position = 1
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
|
object txtJitters: TEdit
|
||||||
|
Left = 224
|
||||||
|
Top = 116
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 6
|
||||||
|
Text = '1'
|
||||||
|
OnChange = txtJittersChange
|
||||||
|
end
|
||||||
|
object txtEstimator: TEdit
|
||||||
|
Left = 64
|
||||||
|
Top = 84
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 7
|
||||||
|
Text = '5'
|
||||||
|
OnChange = txtEstimatorChange
|
||||||
|
end
|
||||||
|
object txtEstimatorMin: TEdit
|
||||||
|
Left = 64
|
||||||
|
Top = 116
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 8
|
||||||
|
Text = '0'
|
||||||
|
OnChange = txtEstimatorMinChange
|
||||||
|
end
|
||||||
|
object txtEstimatorCurve: TEdit
|
||||||
|
Left = 224
|
||||||
|
Top = 84
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 9
|
||||||
|
Text = '0.6'
|
||||||
|
OnChange = txtEstimatorCurveChange
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object SaveDialog: TSaveDialog
|
object SaveDialog: TSaveDialog
|
||||||
DefaultExt = 'jpg'
|
DefaultExt = 'jpg'
|
||||||
|
@ -56,6 +56,14 @@ type
|
|||||||
Label8: TLabel;
|
Label8: TLabel;
|
||||||
txtStrips: TEdit;
|
txtStrips: TEdit;
|
||||||
udStrips: TUpDown;
|
udStrips: TUpDown;
|
||||||
|
Label9: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
Label12: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
txtJitters: TEdit;
|
||||||
|
txtEstimator: TEdit;
|
||||||
|
txtEstimatorMin: TEdit;
|
||||||
|
txtEstimatorCurve: TEdit;
|
||||||
procedure btnBrowseClick(Sender: TObject);
|
procedure btnBrowseClick(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure btnOKClick(Sender: TObject);
|
procedure btnOKClick(Sender: TObject);
|
||||||
@ -67,13 +75,17 @@ type
|
|||||||
procedure txtOversampleChange(Sender: TObject);
|
procedure txtOversampleChange(Sender: TObject);
|
||||||
procedure txtBatchesChange(Sender: TObject);
|
procedure txtBatchesChange(Sender: TObject);
|
||||||
procedure cmbDepthChange(Sender: TObject);
|
procedure cmbDepthChange(Sender: TObject);
|
||||||
|
procedure txtEstimatorChange(Sender: TObject);
|
||||||
|
procedure txtEstimatorMinChange(Sender: TObject);
|
||||||
|
procedure txtEstimatorCurveChange(Sender: TObject);
|
||||||
|
procedure txtJittersChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
FloatFormatSettings: TFormatSettings;
|
||||||
public
|
public
|
||||||
Filename: string;
|
Filename: string;
|
||||||
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
|
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
|
||||||
Sample_Density, Filter_Radius: double;
|
Sample_Density, Filter_Radius: double;
|
||||||
{ Public declarations }
|
Estimator, EstimatorMin, EstimatorCurve, Jitters: double;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -122,6 +134,16 @@ begin
|
|||||||
txtOversample.text := IntToSTr(Oversample);
|
txtOversample.text := IntToSTr(Oversample);
|
||||||
udOversample.Position := Oversample;
|
udOversample.Position := Oversample;
|
||||||
Ratio := ImageWidth / ImageHeight;
|
Ratio := ImageWidth / ImageHeight;
|
||||||
|
Estimator := 5.0;
|
||||||
|
EstimatorMin := 0.0;
|
||||||
|
EstimatorCurve := 0.6;
|
||||||
|
Jitters := 1;
|
||||||
|
txtEstimator.Text := '5.0';
|
||||||
|
txtEstimatorMin.Text := '0.0';
|
||||||
|
txtEstimatorCurve.Text := '0.6';
|
||||||
|
txtJitters.Text := '1';
|
||||||
|
|
||||||
|
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TExportDialog.btnOKClick(Sender: TObject);
|
procedure TExportDialog.btnOKClick(Sender: TObject);
|
||||||
@ -212,5 +234,41 @@ begin
|
|||||||
txtBatches.text := IntToStr(1);
|
txtBatches.text := IntToStr(1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtEstimatorChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Estimator := 0;
|
||||||
|
try
|
||||||
|
Estimator := StrToFloat(txtEstimator.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtEstimatorMinChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
EstimatorMin := 0;
|
||||||
|
try
|
||||||
|
EstimatorMin := StrToFloat(txtEstimatorMin.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtEstimatorCurveChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
EstimatorCurve := 0;
|
||||||
|
try
|
||||||
|
EstimatorCurve := StrToFloat(txtEstimatorCurve.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtJittersChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Jitters := 0;
|
||||||
|
try
|
||||||
|
Jitters := StrToFloat(txtJitters.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -127,6 +127,7 @@ var
|
|||||||
SheepServer, SheepNick, SheepURL, SheepPW, HqiPath: string;
|
SheepServer, SheepNick, SheepURL, SheepPW, HqiPath: string;
|
||||||
ExportBatches, ExportOversample, ExportWidth, ExportHeight, ExportFileFormat: Integer;
|
ExportBatches, ExportOversample, ExportWidth, ExportHeight, ExportFileFormat: Integer;
|
||||||
ExportFilter, ExportDensity: Double;
|
ExportFilter, ExportDensity: Double;
|
||||||
|
ExportEstimator, ExportEstimatorMin, ExportEstimatorCurve, ExportJitters: double;
|
||||||
OpenFileType: TFileType;
|
OpenFileType: TFileType;
|
||||||
ResizeOnLoad: Boolean;
|
ResizeOnLoad: Boolean;
|
||||||
ShowProgress: Boolean;
|
ShowProgress: Boolean;
|
||||||
|
@ -1329,7 +1329,12 @@ begin
|
|||||||
format('" background="%g %g %g" ', [cp1.background[0] / 255, cp1.background[1] / 255, cp1.background[2] / 255]) +
|
format('" background="%g %g %g" ', [cp1.background[0] / 255, cp1.background[1] / 255, cp1.background[2] / 255]) +
|
||||||
format('brightness="%g" ', [cp1.brightness]) +
|
format('brightness="%g" ', [cp1.brightness]) +
|
||||||
format('gamma="%g" ', [cp1.gamma]) +
|
format('gamma="%g" ', [cp1.gamma]) +
|
||||||
format('vibrancy="%g" ', [cp1.vibrancy]) + hue + url + nick + '>');
|
format('vibrancy="%g" ', [cp1.vibrancy]) +
|
||||||
|
format('estimator="%g" ', [cp1.estimator]) +
|
||||||
|
format('estimator_minimum="%g" ', [cp1.estimator_min]) +
|
||||||
|
format('estimator_curve="%g" ', [cp1.estimator_curve]) +
|
||||||
|
format('temporal_samples="%g" ', [cp1.jitters]) +
|
||||||
|
hue + url + nick + '>');
|
||||||
|
|
||||||
{ Write transform parameters }
|
{ Write transform parameters }
|
||||||
t := cp1.NumXForms;
|
t := cp1.NumXForms;
|
||||||
@ -3618,7 +3623,10 @@ var
|
|||||||
begin
|
begin
|
||||||
if (MainCp.NumXForms > 12) or
|
if (MainCp.NumXForms > 12) or
|
||||||
(MainCP.HasNewVariants) then begin
|
(MainCP.HasNewVariants) then begin
|
||||||
showMessage('This flame will not be correctly rendered this way. Please use the internal renderer.');
|
showMessage('WARNING: This flame will not be correctly rendered '#10#13+
|
||||||
|
'by the flam3 version < 2.7b4.'#10#13+
|
||||||
|
'Please use the 2.7b4 version or newer '#10#13+
|
||||||
|
'or use the internal renderer.');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not FileExists(HqiPath) then
|
if not FileExists(HqiPath) then
|
||||||
@ -3661,12 +3669,20 @@ begin
|
|||||||
ExportFilter := ExportDialog.Filter_Radius;
|
ExportFilter := ExportDialog.Filter_Radius;
|
||||||
ExportOversample := ExportDialog.Oversample;
|
ExportOversample := ExportDialog.Oversample;
|
||||||
ExportBatches := ExportDialog.Batches;
|
ExportBatches := ExportDialog.Batches;
|
||||||
|
ExportEstimator := ExportDialog.Estimator;
|
||||||
|
ExportEstimatorMin := ExportDialog.EstimatorMin;
|
||||||
|
ExportEstimatorCurve := ExportDialog.EstimatorCurve;
|
||||||
|
ExportJitters := ExportDialog.Jitters;
|
||||||
cp1.sample_density := ExportDensity;
|
cp1.sample_density := ExportDensity;
|
||||||
cp1.spatial_oversample := ExportOversample;
|
cp1.spatial_oversample := ExportOversample;
|
||||||
cp1.spatial_filter_radius := ExportFilter;
|
cp1.spatial_filter_radius := ExportFilter;
|
||||||
cp1.nbatches := ExportBatches;
|
cp1.nbatches := ExportBatches;
|
||||||
if (cp1.width <> ExportWidth) or (cp1.Height <> ExportHeight) then
|
if (cp1.width <> ExportWidth) or (cp1.Height <> ExportHeight) then
|
||||||
cp1.AdjustScale(ExportWidth, ExportHeight);
|
cp1.AdjustScale(ExportWidth, ExportHeight);
|
||||||
|
cp1.estimator := ExportEstimator;
|
||||||
|
cp1.estimator_min := ExportEstimatorMin;
|
||||||
|
cp1.estimator_curve := ExportEstimatorCurve;
|
||||||
|
cp1.jitters := ExportJitters;
|
||||||
FileList.Text := FlameToXML(cp1, false);
|
FileList.Text := FlameToXML(cp1, false);
|
||||||
FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame'));
|
FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame'));
|
||||||
FileList.Clear;
|
FileList.Clear;
|
||||||
|
Loading…
Reference in New Issue
Block a user