-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutility_classes.h
138 lines (114 loc) · 4.52 KB
/
utility_classes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//
// utility_classes.h
// yaluxplug
//
// Created by Daniel Bui on 5/5/15.
// Copyright (c) 2015 Daniel Bui. All rights reserved.
//
#ifndef __yaluxplug__utility_classes__
#define __yaluxplug__utility_classes__
#include "dzoptionsframe.h"
#include "dzrendersettings.h"
#include "dzrenderoptions.h"
#include "dzprogress.h"
#include "dzrenderhandler.h"
#include "dznode.h"
#include <QtCore/QThread>
#include "dztexture.h"
const QStringList LXSfilm = QStringList() <<
"Film \"fleximage\"\n" <<
"\t\"integer outlierrejection_k\"\t[1]\n" <<
//"\t\"bool premultiplyalpha\"\t[\"false\"]\n" <<
//"\t\"float gamma\"\t[2.2]\n" <<
//"\t\"integer displayinterval\"\t[12]\n" <<
"\t\"integer writeinterval\"\t[10]\n" <<
"\t\"integer flmwriteinterval\"\t[10]\n" <<
"\t\"string ldr_clamp_method\"\t[\"lum\"]\n" <<
//png
"\t\"bool write_png\"\t[\"true\"]\n" <<
//flm
"\t\"bool write_resume_flm\"\t[\"true\"]\n" <<
//"\t\"bool restart_resume_flm\"\t[\"false\"]";
//"\t\"bool write_png_16bit\"\t[\"false\"]\n" <<
//"\t\"bool write_png_gamutclamp\"\t[\"true\"]\n" <<
//tga...
//"\t\"bool write_tga\"\t[\"false\"]\n" <<
//exr...
"\t\"bool write_exr\"\t[\"true\"]\n" <<
"\t\"string write_exr_compressiontype\"\t[\"PIZ (lossless)\"]\n" <<
"\t\"string write_exr_zbuf_normalizationtype\"\t[\"None\"]\n" <<
"\t\"bool write_exr_ZBuf\"\t[\"true\"]\n";
const QStringList LXSpixelfilter = QStringList() <<
"PixelFilter \"mitchell\"\n";
//"\t\"float xwidth\"\t[1.5]\n" <<
//"\t\"float ywidth\"\t[1.5]\n" <<
//"\t\"float B\"\t[0.3333]\n" <<
//"\t\"float C\"\t[0.3333]\n" <<
//"\t\"bool supersample\"\t[\"true\"]\n";
const QStringList LXSaccelerator = QStringList() <<
"Accelerator \"qbvh\"\n";
//"\t\"integer maxprimsperleaf\"\t[4]\n" <<
//"\t\"integer fullsweepthreshold\"\t[16]\n" <<
//"\t\"integer skipfactor\"\t[1]\n";
const QStringList LXSsampler = QStringList() <<
"Sampler \"metropolis\"\n" <<
//"\t\"float largemutationprob\"\t[0.40]\n" <<
"\t\"bool noiseaware\"\t[\"true\"]\n" <<
"\t\"bool usevariance\"\t[\"true\"]\n" <<
"\t\"bool usecooldown\"\t[\"false\"]\n";
const QStringList LXSsurfaceintegrator = QStringList() <<
"SurfaceIntegrator \"path\"\n";
//"\t\"integer maxdepth\"\t[16]\n" <<
//"\t\"string lightstrategy\"\t[\"auto\"]\n" <<
//"\t\"bool directlightsampling\"\t[\"true\"]\n" <<
//"\t\"float rrcontinueprob\"\t[0.65]\n" <<
//"\t\"bool includeenvironment\"\t[\"true\"]\n";
const QStringList LXSvolumeintegrator = QStringList() <<
"VolumeIntegrator \"multi\"\n";
//"\t\"float stepsize\"\t[1.0]\n";
const QStringList classNamesProperties = QStringList() << "DzStringProperty" << "DzBoolProperty" << "DzColorProperty" << "DzFloatProperty" << "DzIntProperty" << "DzNodeProperty" << "DzImageProperty" ;
const QStringList areaLightPlane = QStringList() <<
"Shape \"mesh\"\n" <<
"\t\"point P\" [-2 -2 0 2 -2 0 2 2 0 -2 2 0]\n" <<
"\t\"normal N\" [0 0 1 0 0 1 0 0 1 0 0 1]\n" <<
//"\t\"float uv\" [0 0 1 0 1 1 0 1]\n" <<
"\t\"integer quadindices\" [0 1 2 3]\n";
const QStringList spotLightPlane = QStringList() <<
"Shape \"mesh\"\n" <<
"\t\"point P\" [-0.01 -0.01 0 0.01 -0.01 0 0.01 0.01 0 -0.01 0.01 0]\n" <<
"\t\"normal N\" [0 0 1 0 0 1 0 0 1 0 0 1]\n" <<
//"\t\"float uv\" [0 0 1 0 1 1 0 1]\n" <<
"\t\"integer quadindices\" [0 1 2 3]\n";
const QStringList distantLightPlane = QStringList() <<
"Shape \"mesh\"\n" <<
"\t\"point P\" [-5 -5 -10 5 -5 -10 5 5 -10 -5 5 -10]\n" <<
"\t\"normal N\" [0 0 1 0 0 1 0 0 1 0 0 1]\n" <<
//"\t\"float uv\" [0 0 1 0 1 1 0 1]\n" <<
"\t\"integer quadindices\" [0 1 2 3]\n";
QString LuxProcessObject(DzObject *daz_obj, QString &mesg);
QString LuxProcessGenMaterial(DzMaterial *material, QString &mesg, QString matLabel);
QString LuxProcessGlossyMaterial(DzMaterial *material, QString &mesg, QString matLabel);
QString LuxProcessMatteMaterial(DzMaterial *material, QString &mesg, QString matLabel);
QString LuxProcessProperties(DzElement *el, QString &mesg);
QString LuxProcessLight(DzLight *currentLight, QString &mesg);
QString LuxMakeSceneFile(QString filenameLXS, DzRenderer *r, DzCamera *camera, const DzRenderOptions &opt);
class WorkerPrepareImage : public QObject
{
Q_OBJECT
public:
WorkerPrepareImage(const DzTexture *arg_image, const QString &arg_filename)
{
img = arg_image;
filename = arg_filename;
};
QThread *myThread;
public slots:
void doPrepareImage();
signals:
void prepareImageComplete( WorkerPrepareImage *worker, const DzTexture *img, const QString &filename);
void finished();
private:
const DzTexture *img;
QString filename;
};
#endif /* defined(__yaluxplug__utility_classes__) */