Capture Gamma set, Preset weathers fixed

This commit is contained in:
FPerez 2018-10-17 19:28:49 +02:00
parent 268bb2f4a0
commit 711e04fc53
3 changed files with 18 additions and 15 deletions

View File

@ -12,20 +12,20 @@ namespace rpc {
using WP = WeatherParameters;
// cloudyness precip. prec.dep. wind azimuth altitude
WP WP::ClearNoon = { 20.0f, 0.0f, 00.0f, 0.35f, 0.0f, 80.0f};
WP WP::CloudyNoon = { 90.0f, 0.0f, 00.0f, 0.35f, 0.0f, 80.0f};
WP WP::WetNoon = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 80.0f};
WP WP::WetCloudyNoon = { 90.0f, 0.0f, 50.0f, 0.35f, 0.0f, 80.0f};
WP WP::MidRainyNoon = { 90.0f, 60.0f, 50.0f, 0.40f, 0.0f, 80.0f};
WP WP::HardRainNoon = { 90.0f, 90.0f, 100.0f, 1.0f, 0.0f, 80.0f};
WP WP::SoftRainNoon = { 70.0f, 30.0f, 50.0f, 0.35f, 0.0f, 80.0f};
WP WP::ClearSunset = { 20.0f, 0.0f, 00.0f, 0.35f, 0.0f, 20.0f};
WP WP::CloudySunset = { 90.0f, 0.0f, 00.0f, 0.35f, 0.0f, 20.0f};
WP WP::WetSunset = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 20.0f};
WP WP::WetCloudySunset = { 90.0f, 0.0f, 50.0f, 0.35f, 0.0f, 20.0f};
WP WP::MidRainSunset = { 90.0f, 60.0f, 50.0f, 0.40f, 0.0f, 20.0f};
WP WP::HardRainSunset = { 90.0f, 90.0f, 100.0f, 1.0f, 0.0f, 20.0f};
WP WP::SoftRainSunset = { 70.0f, 30.0f, 50.0f, 0.35f, 0.0f, 20.0f};
WP WP::ClearNoon = { 0.0f, 0.0f, 00.0f, 0.35f, 0.0f, 75.0f};
WP WP::CloudyNoon = { 80.0f, 0.0f, 00.0f, 0.35f, 0.0f, 75.0f};
WP WP::WetNoon = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 75.0f};
WP WP::WetCloudyNoon = { 80.0f, 0.0f, 50.0f, 0.35f, 0.0f, 75.0f};
WP WP::MidRainyNoon = { 80.0f, 30.0f, 50.0f, 0.40f, 0.0f, 75.0f};
WP WP::HardRainNoon = { 90.0f, 60.0f, 100.0f, 1.0f, 0.0f, 75.0f};
WP WP::SoftRainNoon = { 70.0f, 15.0f, 50.0f, 0.35f, 0.0f, 75.0f};
WP WP::ClearSunset = { 0.0f, 0.0f, 00.0f, 0.35f, 0.0f, 15.0f};
WP WP::CloudySunset = { 80.0f, 0.0f, 00.0f, 0.35f, 0.0f, 15.0f};
WP WP::WetSunset = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 15.0f};
WP WP::WetCloudySunset = { 90.0f, 0.0f, 50.0f, 0.35f, 0.0f, 15.0f};
WP WP::MidRainSunset = { 80.0f, 30.0f, 50.0f, 0.40f, 0.0f, 15.0f};
WP WP::HardRainSunset = { 80.0f, 60.0f, 100.0f, 1.0f, 0.0f, 15.0f};
WP WP::SoftRainSunset = { 90.0f, 15.0f, 50.0f, 0.35f, 0.0f, 15.0f};
} // namespace rpc
} // namespace carla

View File

@ -115,7 +115,7 @@ class World(object):
self.vehicle = carla_world.spawn_actor(blueprint, START_POSITION)
self.camera_manager = CameraManager(self.vehicle, self.hud)
self.controller = None
self._weather_presets = ["Clear Noon", "Cloudy Noon", "Wet Noon", "Clear Sunset", "Wet Sunset"]
self._weather_presets = ["Clear Noon", "Cloudy Noon", "Wet Noon", "Clear Sunset", "Wet Sunset", "Soft Rain Noon", "Hard Rain Noon"]
def next_weather(self):
weather_name = self._weather_presets.pop(0)

View File

@ -133,6 +133,9 @@ void ASceneCaptureSensor::BeginPlay()
// Setup render target.
const bool bInForceLinearGamma = !bEnablePostProcessingEffects;
if (bEnablePostProcessingEffects) {
CaptureRenderTarget->TargetGamma = 1.5f;
}
CaptureRenderTarget->InitCustomFormat(ImageWidth, ImageHeight, PF_B8G8R8A8, bInForceLinearGamma);
check(IsValid(CaptureComponent2D) && !CaptureComponent2D->IsPendingKill());