diff --git a/LibCarla/source/carla/rpc/WeatherParameters.cpp b/LibCarla/source/carla/rpc/WeatherParameters.cpp index fd10e1937..d7a9e36ad 100644 --- a/LibCarla/source/carla/rpc/WeatherParameters.cpp +++ b/LibCarla/source/carla/rpc/WeatherParameters.cpp @@ -11,22 +11,22 @@ namespace rpc { using WP = WeatherParameters; - // cloudiness precip. prec.dep. wind azimuth altitude fog dens. fog dist wetness - WP WP::Default = { -1.0f, -1.0f, -1.0f, -1.00f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f}; - WP WP::ClearNoon = { 15.0f, 0.0f, 0.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f}; - WP WP::CloudyNoon = { 80.0f, 0.0f, 0.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f}; - WP WP::WetNoon = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f}; - WP WP::WetCloudyNoon = { 80.0f, 0.0f, 50.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f}; - WP WP::MidRainyNoon = { 80.0f, 30.0f, 50.0f, 0.40f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f}; - WP WP::HardRainNoon = { 90.0f, 60.0f, 100.0f, 1.00f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f}; - WP WP::SoftRainNoon = { 70.0f, 15.0f, 50.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f}; - WP WP::ClearSunset = { 15.0f, 0.0f, 0.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f}; - WP WP::CloudySunset = { 80.0f, 0.0f, 0.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f}; - WP WP::WetSunset = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f}; - WP WP::WetCloudySunset = { 90.0f, 0.0f, 50.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f}; - WP WP::MidRainSunset = { 80.0f, 30.0f, 50.0f, 0.40f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f}; - WP WP::HardRainSunset = { 80.0f, 60.0f, 100.0f, 1.00f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f}; - WP WP::SoftRainSunset = { 90.0f, 15.0f, 50.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f}; + // cloudiness precip. prec.dep. wind azimuth altitude fog dens fog dist fog fall wetness + WP WP::Default = { -1.0f, -1.0f, -1.0f, -1.00f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f}; + WP WP::ClearNoon = { 15.0f, 0.0f, 0.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::CloudyNoon = { 80.0f, 0.0f, 0.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::WetNoon = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::WetCloudyNoon = { 80.0f, 0.0f, 50.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::MidRainyNoon = { 80.0f, 30.0f, 50.0f, 0.40f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::HardRainNoon = { 90.0f, 60.0f, 100.0f, 1.00f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::SoftRainNoon = { 70.0f, 15.0f, 50.0f, 0.35f, 0.0f, 75.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::ClearSunset = { 15.0f, 0.0f, 0.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::CloudySunset = { 80.0f, 0.0f, 0.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::WetSunset = { 20.0f, 0.0f, 50.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::WetCloudySunset = { 90.0f, 0.0f, 50.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::MidRainSunset = { 80.0f, 30.0f, 50.0f, 0.40f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::HardRainSunset = { 80.0f, 60.0f, 100.0f, 1.00f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + WP WP::SoftRainSunset = { 90.0f, 15.0f, 50.0f, 0.35f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f, 0.0f}; } // namespace rpc } // namespace carla diff --git a/PythonAPI/carla/source/libcarla/Weather.cpp b/PythonAPI/carla/source/libcarla/Weather.cpp index 59bc3f9e2..efe0602f0 100644 --- a/PythonAPI/carla/source/libcarla/Weather.cpp +++ b/PythonAPI/carla/source/libcarla/Weather.cpp @@ -29,7 +29,7 @@ void export_weather() { namespace cr = carla::rpc; auto cls = class_("WeatherParameters") - .def(init( + .def(init( (arg("cloudiness")=0.0f, arg("precipitation")=0.0f, arg("precipitation_deposits")=0.0f, @@ -38,7 +38,7 @@ void export_weather() { arg("sun_altitude_angle")=0.0f, arg("fog_density")=0.0f, arg("fog_distance")=0.0f, - arg("fog_falloff")=0.2f, + arg("fog_falloff")=0.0f, arg("wetness")=0.0f))) .def_readwrite("cloudiness", &cr::WeatherParameters::cloudiness) .def_readwrite("precipitation", &cr::WeatherParameters::precipitation) @@ -48,6 +48,7 @@ void export_weather() { .def_readwrite("sun_altitude_angle", &cr::WeatherParameters::sun_altitude_angle) .def_readwrite("fog_density", &cr::WeatherParameters::fog_density) .def_readwrite("fog_distance", &cr::WeatherParameters::fog_distance) + .def_readwrite("fog_falloff", &cr::WeatherParameters::fog_falloff) .def_readwrite("wetness", &cr::WeatherParameters::wetness) .def("__eq__", &cr::WeatherParameters::operator==) .def("__ne__", &cr::WeatherParameters::operator!=) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp index 26a5c7bc5..3ea451703 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp @@ -28,6 +28,7 @@ void AWeather::ApplyWeather(const FWeatherParameters &InWeather) UE_LOG(LogCarla, Log, TEXT(" - SunAltitudeAngle = %.2f"), Weather.SunAltitudeAngle); UE_LOG(LogCarla, Log, TEXT(" - FogDensity = %.2f"), Weather.FogDensity); UE_LOG(LogCarla, Log, TEXT(" - FogDistance = %.2f"), Weather.FogDistance); + UE_LOG(LogCarla, Log, TEXT(" - FogFalloff = %.2f"), Weather.FogFalloff); UE_LOG(LogCarla, Log, TEXT(" - Wetness = %.2f"), Weather.Wetness); #endif // CARLA_WEATHER_EXTRA_LOG