Emergency 20 Dokumentation  4.2.0
SupervisorCompositingComponent.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
15 #include <qsf/job/JobProxy.h>
20 
21 
22 //[-------------------------------------------------------]
23 //[ Namespace ]
24 //[-------------------------------------------------------]
25 namespace em5
26 {
27 
28 
29  //[-------------------------------------------------------]
30  //[ Classes ]
31  //[-------------------------------------------------------]
43  {
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public definitions ]
48  //[-------------------------------------------------------]
49  public:
50  static const uint32 COMPONENT_ID;
51  // Shader based animation // TODO(co) Find a better home for this properties (environment component is out of the question because this in here is already highly shader specialiced)
61  // Environment
68  static const uint32 FOGGED_SKY;
69  // Global intensity
73  static const uint32 CLOUDS_INTENSITY;
74  // HDR
75  static const uint32 HDR_EXPOSURE;
76  static const uint32 HDR_KEY;
77  // Depth grading
82  // Post processing
84  static const uint32 BLOOM_INTENSITY;
85  static const uint32 VIGNETTE_RADIUS;
86  static const uint32 VIGNETTE_DARKNESS;
87  static const uint32 COLOR_GRADING_LUT_0;
88  static const uint32 COLOR_GRADING_LUT_1;
90  static const uint32 COLOR_GRADING_BLEND;
91  static const uint32 BLEND_COLOR;
92  static const uint32 BLEND_INTENSITY;
93  // Wet surfaces/Rain
96  static const uint32 RAIN_INTENSITY;
97 
98 
99  //[-------------------------------------------------------]
100  //[ Public methods ]
101  //[-------------------------------------------------------]
102  public:
110  explicit SupervisorCompositingComponent(qsf::Prototype* prototype);
111 
116  inline virtual ~SupervisorCompositingComponent();
117 
118  // Shader based animation
119  inline float getGlobalAnimationSpeed() const;
120  inline void setGlobalAnimationSpeed(float globalAnimationSpeed);
121 
122  inline float getWaterAnimationSpeed() const;
123  inline void setWaterAnimationSpeed(float waterAnimationSpeed);
124 
125  inline float getFireAnimationSpeed() const;
126  inline void setFireAnimationSpeed(float fireAnimationSpeed);
127 
128  inline float getVegetationAnimationSpeed() const;
129  inline void setVegetationAnimationSpeed(float vegetationAnimationSpeed);
130 
131  inline float getVegetationAnimationFrequency() const;
132  inline void setVegetationAnimationFrequency(float vegetationAnimationFrequency);
133 
134  inline float getVegetationAnimationWeight() const;
135  inline void setVegetationAnimationWeight(float vegetationAnimationWeight);
136 
137  inline float getVegetationAnimationBending() const;
138  inline void setVegetationAnimationBending(float vegetationAnimationBending);
139 
140  inline float getVegetationAnimationIndividuality() const;
141  inline void setVegetationAnimationIndividuality(float vegetationAnimationIndividuality);
142 
143  inline float getVegetationAnimationCrosswind() const;
144  inline void setVegetationAnimationCrosswind(float vegetationAnimationCrosswind);
145 
146  // Environment
147  inline const qsf::AssetProxy& getGlobalReflectionMap0() const;
148  inline void setGlobalReflectionMap0(const qsf::AssetProxy& globalReflectionMap0);
149  inline float getGlobalReflectionMap0Intensity() const;
150  inline void setGlobalReflectionMap0Intensity(float globalReflectionMap0Intensity);
151  inline const qsf::AssetProxy& getGlobalReflectionMap1() const;
152  inline void setGlobalReflectionMap1(const qsf::AssetProxy& globalReflectionMap1);
153  inline float getGlobalReflectionMap1Intensity() const;
154  inline void setGlobalReflectionMap1Intensity(float globalReflectionMap1Intensity);
155  inline float getGlobalReflectionMapFactor() const;
156  inline void setGlobalReflectionMapFactor(float globalReflectionMapFactor);
157  inline float getGlobalReflectionSaturation() const;
158  inline void setGlobalReflectionSaturation(float globalReflectionSaturation);
159  inline bool getFoggedSky() const;
160  inline void setFoggedSky(bool foggedSky);
161 
162  // Global intensity
163  inline float getGlobalSpecularIntensity() const;
164  inline void setGlobalSpecularIntensity(float globalSpecularIntensity);
165  inline float getGlobalGlossinessIntensity() const;
166  inline void setGlobalGlossinessIntensity(float globalGlossinessIntensity);
167  inline float getGlobalSsaoIntensity() const;
168  inline void setGlobalSsaoIntensity(float globalSsaoIntensity);
169  inline float getCloudsIntensity() const;
170  inline void setCloudsIntensity(float cloudsIntensity);
171 
172  // HDR
173  inline float getHdrExposure() const;
174  inline void setHdrExposure(float hdrExposure);
175  inline float getHdrKey() const;
176  inline void setHdrKey(float hdrKey);
177 
178  // Depth grading
179  inline const qsf::Color3& getDepthGradingNearColor() const;
180  inline void setDepthGradingNearColor(const qsf::Color3& depthGradingNearColor);
181  inline const qsf::Color3& getDepthGradingFarColor() const;
182  inline void setDepthGradingFarColor(const qsf::Color3& depthGradingFarColor);
183 
184  // Post processing
185  inline float getLensBlendIntensity() const;
186  inline void setLensBlendIntensity(float lensBlendIntensity);
187  inline float getBloomIntensity() const;
188  inline void setBloomIntensity(float bloomIntensity);
189  inline float getVignetteRadius() const;
190  inline void setVignetteRadius(float vignetteRadius);
191  inline float getVignetteDarkness() const;
192  inline void setVignetteDarkness(float vignetteDarkness);
193  inline const qsf::AssetProxy& getColorGradingLut0() const;
194  inline void setColorGradingLut0(const qsf::AssetProxy& colorGradingLut0);
195  inline const qsf::AssetProxy& getColorGradingLut1() const;
196  inline void setColorGradingLut1(const qsf::AssetProxy& colorGradingLut1);
197  inline float getColorGradingLutFactor() const;
198  inline void setColorGradingLutFactor(float colorGradingLutFactor);
199  inline float getColorGradingBlend() const;
200  inline void setColorGradingBlend(float colorGradingBlend);
201  inline const qsf::Color3& getBlendColor() const;
202  inline void setBlendColor(const qsf::Color3& blendColor);
203  inline float getBlendIntensity() const;
204  inline void setBlendIntensity(float blendIntensity);
205 
206  // Rain/Wet Surfaces
207  inline bool isWetSurfacesEnabled() const;
208  inline void setWetSurfacesEnabled(bool enabled);
209  inline float getWetSurfacesIntensity() const;
210  inline void setWetSurfacesIntensity(float wetSurfacesIntensity);
211  inline float getRainIntensity() const;
212  inline void setRainIntensity(float rainIntensity);
213 
214 
215  //[-------------------------------------------------------]
216  //[ Public virtual qsf::CompositingComponent methods ]
217  //[-------------------------------------------------------]
218  public:
219  virtual std::string getCompositorWorkspaceDefinitionName() const override;
220  virtual void onPreCompositorWorkspaceUpdate(const qsf::CameraComponent& cameraComponent) override;
221 
222 
223  //[-------------------------------------------------------]
224  //[ Protected virtual qsf::Component methods ]
225  //[-------------------------------------------------------]
226  protected:
227  inline virtual bool implementsOnComponentPropertyChange() const override { return true; }
228 
229 
230  //[-------------------------------------------------------]
231  //[ Private data ]
232  //[-------------------------------------------------------]
233  private:
234  // Connected to the CAMP reflection system
235  // Shader based animation
236  float mGlobalAnimationSpeed;
237  float mFireAnimationSpeed;
238  float mWaterAnimationSpeed;
239  float mVegetationAnimationSpeed;
240  float mVegetationAnimationFrequency;
241  float mVegetationAnimationWeight;
242  float mVegetationAnimationBending;
243  float mVegetationAnimationIndividuality;
244  float mVegetationAnimationCrosswind;
245  // Environment
246  qsf::AssetProxy mGlobalReflectionMap0;
247  float mGlobalReflectionMap0Intensity;
248  qsf::AssetProxy mGlobalReflectionMap1;
249  float mGlobalReflectionMap1Intensity;
250  float mGlobalReflectionMapFactor;
251  float mGlobalReflectionSaturation;
252  bool mFoggedSky;
253  // Global intensity
254  float mGlobalSpecularIntensity;
255  float mGlobalGlossinessIntensity;
256  float mGlobalSsaoIntensity;
257  float mCloudsIntensity;
258  // HDR
259  float mHdrExposure;
260  float mHdrKey;
261  // Depth grading
262  qsf::Color3 mDepthGradingNearColor;
263  qsf::Color3 mDepthGradingFarColor;
264  // Post processing
265  float mLensBlendIntensity;
266  float mBloomIntensity;
267  float mVignetteRadius;
268  float mVignetteDarkness;
269  qsf::AssetProxy mColorGradingLut0;
270  qsf::AssetProxy mColorGradingLut1;
271  float mColorGradingLutFactor;
272  float mColorGradingBlend;
273  qsf::Color3 mBlendColor;
274  float mBlendIntensity;
275  // Wet surfaces/Rain
276  bool mWetSurfacesEnabled;
277  float mWetSurfacesIntensity;
278  float mRainIntensity;
279 
280 
281  //[-------------------------------------------------------]
282  //[ CAMP reflection system ]
283  //[-------------------------------------------------------]
284  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
285 
286 
287  };
288 
289 
290 //[-------------------------------------------------------]
291 //[ Namespace ]
292 //[-------------------------------------------------------]
293 } // em5
294 
295 
296 //[-------------------------------------------------------]
297 //[ Implementation ]
298 //[-------------------------------------------------------]
300 
301 
302 //[-------------------------------------------------------]
303 //[ CAMP reflection system ]
304 //[-------------------------------------------------------]
static const uint32 GLOBAL_REFLECTION_MAP_FACTOR
"GlobalReflectionMapFactor" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:66
Definition: ActionPriority.h:13
static const uint32 WET_SURFACES_ENABLED
"WetSurfacesEnabled" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:94
static const uint32 VIGNETTE_RADIUS
"VignetteRadius" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:85
static const uint32 GLOBAL_REFLECTION_SATURATION
"GlobalReflectionSaturation" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:67
static const uint32 VEGETATION_ANIMATION_WEIGHT
"VegetationAnimationWeight" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:57
static const uint32 GLOBAL_ANIMATION_SPEED
"GlobalAnimationSpeed" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:52
static const uint32 HDR_EXPOSURE
"Exposure" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:75
static const uint32 FIRE_ANIMATION_SPEED
"FireAnimationSpeed" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:53
unsigned int uint32
Definition: PlatformTypes.h:181
static const uint32 BLEND_COLOR
"BlendColor" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:91
static const uint32 WET_SURFACES_INTENSITY
"WetSurfacesIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:95
Abstract compositing component.
Definition: CompositingComponent.h:42
static const uint32 GLOBAL_REFLECTION_MAP_0_INTENSITY
"GlobalReflectionMap0Intensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:63
#define EM5_API_EXPORT
Definition: Export.h:28
Camera component class.
Definition: CameraComponent.h:50
static const uint32 VEGETATION_ANIMATION_BENDING
"VegetationAnimationBending" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:58
EMERGENCY 5 supervisor compositing component interface.
Definition: SupervisorCompositingComponent.h:42
static const uint32 GLOBAL_GLOSSINESS_INTENSITY
"GlobalGlossinessIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:71
static const uint32 VEGETATION_ANIMATION_CROSSWIND
"VegetationAnimationCrosswind" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:60
Color class with red, green and blue component.
Definition: Color3.h:30
static const uint32 GLOBAL_SPECULAR_INTENSITY
"GlobalSpecularIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:70
static const uint32 LENS_BLEND_INTENSITY
"LensBlendIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:83
static const uint32 DEPTH_GRADING_NEAR_COLOR
"DepthGradingNearColor" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:78
static const uint32 VEGETATION_ANIMATION_INDIVIDUALITY
"VegetationAnimationIndividuality" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:59
static const qsf::Color3 DEFAULT_DEPTH_GRADING_NEAR_COLOR
Default depth grading near color.
Definition: SupervisorCompositingComponent.h:79
static const uint32 COLOR_GRADING_LUT_1
"ColorGradingLut1" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:88
static const uint32 BLOOM_INTENSITY
"BloomIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:84
static const uint32 COMPONENT_ID
"qsf::SupervisorCompositingComponent" unique component ID
Definition: SupervisorCompositingComponent.h:50
Asset proxy class.
Definition: AssetProxy.h:57
virtual bool implementsOnComponentPropertyChange() const override
Signal whether this component needs the "onComponentPropertyChange" callback at all.
Definition: SupervisorCompositingComponent.h:227
static const uint32 WATER_ANIMATION_SPEED
"WaterAnimationSpeed" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:54
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
static const uint32 FOGGED_SKY
"FoggedSky" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:68
static const uint32 CLOUDS_INTENSITY
"CloudsIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:73
static const uint32 COLOR_GRADING_BLEND
"ColorGradingBlend" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:90
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
static const uint32 VEGETATION_ANIMATION_SPEED
"VegetationAnimationSpeed" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:55
static const uint32 GLOBAL_REFLECTION_MAP_1_INTENSITY
"GlobalReflectionMap1Intensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:65
static const qsf::Color3 DEFAULT_DEPTH_GRADING_FAR_COLOR
Default depth grading far color.
Definition: SupervisorCompositingComponent.h:81
static const uint32 GLOBAL_REFLECTION_MAP_1
"GlobalReflectionMap1" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:64
static const uint32 VIGNETTE_DARKNESS
"VignetteDarkness" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:86
Prototype class.
Definition: Prototype.h:100
static const uint32 GLOBAL_REFLECTION_MAP_0
"GlobalReflectionMap0" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:62
static const uint32 DEPTH_GRADING_FAR_COLOR
"DepthGradingFarColor" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:80
static const uint32 VEGETATION_ANIMATION_FREQUENCY
"VegetationAnimationFrequency" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:56
static const uint32 COLOR_GRADING_LUT_0
"ColorGradingLut0" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:87
static const uint32 RAIN_INTENSITY
"RainIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:96
static const uint32 HDR_KEY
"Key" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:76
static const uint32 BLEND_INTENSITY
"BlendIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:92
static const uint32 GLOBAL_SSAO_INTENSITY
"GlobalSsaoIntensity" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:72
static const uint32 COLOR_GRADING_LUT_FACTOR
"ColorGradingLutFactor" unique class property ID inside the class
Definition: SupervisorCompositingComponent.h:89