diff --git a/CMakeLists.txt b/CMakeLists.txt index ce2970248..9a991d26b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) set(NAME BIOEXPLORER) -set(PACKAGE_VERSION 1.1.0) +set(PACKAGE_VERSION 1.1.1) project(${NAME} VERSION ${PACKAGE_VERSION}) add_subdirectory(bioexplorer/core) diff --git a/bioexplorer/core/CMakeLists.txt b/bioexplorer/core/CMakeLists.txt index c583a132c..1bda36d3f 100644 --- a/bioexplorer/core/CMakeLists.txt +++ b/bioexplorer/core/CMakeLists.txt @@ -31,13 +31,15 @@ find_package(OpenMP) set(CGAL_FOUND 0) option(${NAME}_USE_CGAL "Use CGAL meshing features" ON) if(${${NAME}_USE_CGAL}) - find_package(CGAL) + find_package(CGAL REQUIRED) endif() set(PQXX_FOUND 0) option(${NAME}_USE_PQXX "Use PostgreSQL database" ON) if(${${NAME}_USE_PQXX}) - find_package(PQXX) + unset(PQXX_INCLUDE_DIRECTORIES CACHE) + unset(PQXX_LIBRARIES CACHE) + find_package(PQXX REQUIRED) endif() include(ispc) diff --git a/bioexplorer/core/module/ispc/render/AdvancedRenderer.ispc b/bioexplorer/core/module/ispc/render/AdvancedRenderer.ispc index 0e0a355ae..59879190a 100644 --- a/bioexplorer/core/module/ispc/render/AdvancedRenderer.ispc +++ b/bioexplorer/core/module/ispc/render/AdvancedRenderer.ispc @@ -829,6 +829,8 @@ inline vec3f AdvancedRenderer_shadeRay( const uniform AdvancedRenderer* uniform self, varying ScreenSample& sample) { Ray ray = sample.ray; + float maxt = self->fogStart + self->fogThickness; + vec4f color = make_vec4f(0.f); vec3f bgColor = make_vec3f(0.f); if (self->showBackground) @@ -839,7 +841,8 @@ inline vec3f AdvancedRenderer_shadeRay( uint32 depth = 0; float oldlocalRefraction = 1.f; - sample.z = inf; + sample.z = maxt; + ray.t = maxt; bool moreRebounds = true; while (moreRebounds && depth < self->maxBounces && color.w < 0.95f) @@ -950,7 +953,8 @@ inline vec3f AdvancedRenderer_shadeRay( ++depth; } - ray.t = inf - ray.t; + maxt -= ray.t; + ray.t = maxt; ray.primID = -1; ray.geomID = -1; ray.instID = -1; diff --git a/bioexplorer/core/plugin/common/Logs.h b/bioexplorer/core/plugin/common/Logs.h index df140d707..d894939b1 100644 --- a/bioexplorer/core/plugin/common/Logs.h +++ b/bioexplorer/core/plugin/common/Logs.h @@ -23,31 +23,28 @@ #include "GeneralSettings.h" #include -#include namespace bioexplorer { namespace common { -#define PLUGIN_ERROR(message) \ - std::cerr << "[" << std::this_thread::get_id() \ - << "] [ERROR] [BIO_EXPLORER] " << message << std::endl; -#define PLUGIN_WARN(message) \ - std::cerr << "[" << std::this_thread::get_id() \ - << "] [WARN ] [BIO_EXPLORER] " << message << std::endl; -#define PLUGIN_INFO(message) \ - if (common::GeneralSettings::getInstance()->getLoggingEnabled()) \ - { \ - std::cout << "[" << std::this_thread::get_id() \ - << "] [INFO ] [BIO_EXPLORER] " << message << std::endl; \ - } +#define PLUGIN_PREFIX "BE" + +#define PLUGIN_ERROR(message) \ + std::cerr << "E [" << PLUGIN_PREFIX << "] " << message << std::endl; +#define PLUGIN_WARN(message) \ + std::cerr << "W [" << PLUGIN_PREFIX << "] " << message << std::endl; +#define PLUGIN_INFO(message) \ + std::cout << "I [" << PLUGIN_PREFIX << "] " << message << std::endl; #ifdef NDEBUG -#define PLUGIN_DEBUG(message) +#define PLUGIN_DEBUG(message) ; #else -#define PLUGIN_DEBUG(message) \ - std::cout << "[" << std::this_thread::get_id() \ - << "] [DEBUG] [BIO_EXPLORER] " << message << std::endl; +#define PLUGIN_DEBUG(message) \ + std::cout << "D [" << PLUGIN_PREFIX << "] " << message << std::endl; #endif +#define PLUGIN_TIMER(__time, __msg) \ + std::cout << "T [" << PLUGIN_PREFIX << "] [" << __time << "] " << __msg \ + << std::endl; #define PLUGIN_THROW(message) \ { \ diff --git a/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py b/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py index 33fde6a95..03e1b05c1 100644 --- a/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py +++ b/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py @@ -350,7 +350,8 @@ def import_from_cache(self, filename): raise RuntimeError(result["contents"]) return result - def export_to_xyz(self, filename, file_format): + def export_to_xyz(self, filename, file_format, low_bounds=Vector3(-1e38, -1e38, -1e38), + high_bounds=Vector3(1e38, 1e38, 1e38)): """ Exports current scene to file as a XYZ file @@ -361,6 +362,8 @@ def export_to_xyz(self, filename, file_format): """ params = dict() params["filename"] = filename + params["lowBounds"] = low_bounds.to_list() + params["highBounds"] = high_bounds.to_list() params["fileFormat"] = file_format result = self._client.rockets_client.request( method=self.PLUGIN_API_PREFIX + "export-to-xyz", params=params) diff --git a/bioexplorer/pythonsdk/bioexplorer/version.py b/bioexplorer/pythonsdk/bioexplorer/version.py index fac9eedf2..a0b55a5ec 100644 --- a/bioexplorer/pythonsdk/bioexplorer/version.py +++ b/bioexplorer/pythonsdk/bioexplorer/version.py @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along with # this program. If not, see . -VERSION = '1.1.0' +VERSION = '1.1.1' diff --git a/bioexplorer/pythonsdk/setup.cfg b/bioexplorer/pythonsdk/setup.cfg index 019f2480d..4c71c7aa5 100644 --- a/bioexplorer/pythonsdk/setup.cfg +++ b/bioexplorer/pythonsdk/setup.cfg @@ -1,5 +1,5 @@ [metadata] -version = 1.1.0 +version = 1.1.1 name = bioexplorer summary = Blue Brain BioExplorer python API long_description = file: README.md diff --git a/extras/MediaMaker/CMakeLists.txt b/extras/MediaMaker/CMakeLists.txt index febc9b236..c43864c96 100644 --- a/extras/MediaMaker/CMakeLists.txt +++ b/extras/MediaMaker/CMakeLists.txt @@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) # Project # ============================================================================== set(NAME MEDIAMAKER) -set(LIBRARY_NAME mediaMaker) +set(LIBRARY_NAME MediaMaker) project(${NAME} VERSION ${PACKAGE_VERSION}) set(${NAME}_VERSION_ABI 1) diff --git a/extras/MediaMaker/plugin/common/Logs.h b/extras/MediaMaker/plugin/common/Logs.h index 0642bfcaa..a52ed342b 100644 --- a/extras/MediaMaker/plugin/common/Logs.h +++ b/extras/MediaMaker/plugin/common/Logs.h @@ -21,30 +21,28 @@ #pragma once #include -#include namespace bioexplorer { namespace mediamaker { -#define PLUGIN_ERROR(message) \ - std::cerr << "[" << std::this_thread::get_id() \ - << "] [ERROR] [MEDIA_MAKER] " << message << std::endl; -#define PLUGIN_WARN(message) \ - std::cerr << "[" << std::this_thread::get_id() \ - << "] [WARN ] [MEDIA_MAKER] " << message << std::endl; -#define PLUGIN_INFO(message) \ - { \ - std::cout << "[" << std::this_thread::get_id() \ - << "] [INFO ] [MEDIA_MAKER] " << message << std::endl; \ - } +#define PLUGIN_PREFIX "MM" + +#define PLUGIN_ERROR(message) \ + std::cerr << "E [" << PLUGIN_PREFIX << "] " << message << std::endl; +#define PLUGIN_WARN(message) \ + std::cerr << "W [" << PLUGIN_PREFIX << "] " << message << std::endl; +#define PLUGIN_INFO(message) \ + std::cout << "I [" << PLUGIN_PREFIX << "] " << message << std::endl; #ifdef NDEBUG -#define PLUGIN_DEBUG(message) +#define PLUGIN_DEBUG(message) ; #else -#define PLUGIN_DEBUG(message) \ - std::cout << "[" << std::this_thread::get_id() \ - << "] [DEBUG] [MEDIA_MAKER] " << message << std::endl; +#define PLUGIN_DEBUG(message) \ + std::cout << "D [" << PLUGIN_PREFIX << "] " << message << std::endl; #endif +#define PLUGIN_TIMER(__time, __msg) \ + std::cout << "T [" << PLUGIN_PREFIX << "] [" << __time << "] " << __msg \ + << std::endl; #define PLUGIN_THROW(message) \ { \