Skip to content

Commit

Permalink
Merge branch 'release_0.7.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
paperManu committed May 28, 2018
2 parents 14cd112 + 2a32479 commit 679cb03
Show file tree
Hide file tree
Showing 97 changed files with 2,209 additions and 1,795 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cmake_minimum_required(VERSION 3.2)
project(
splash
VERSION 0.7.16
VERSION 0.7.18
LANGUAGES C CXX
)

Expand Down
20 changes: 20 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
Splash release notes
===================

Splash 0.7.18 (2018-05-28)
--------------------------
New features:
- Added an alias to objects, which is modifiable by the user and displayed in the GUI

Improvements:
- Object color is used when no texture is linked to it
- Added a \"Reset camera\" button
- Separated PythonEmbedded and PythonSink (SPLASH-424)
- Cleaned up Attributes

Bugs fixed:
- Fixed V4l2 freezing randomly at startup, and projects not updating configuration path
- Fixed issue in replaceObject
- Fixed a leak of glFences (SPLASH-412)
- Fixed issue with Probe node in Blender addon
- Fixed memory leak in image_ffmpeg
- Fixed an issue with name registry and multiple Scenes
- Fixed configuration file upgrade check

Splash 0.7.16 (2018-04-19)
--------------------------
Improvements:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ Introduction
### About
Splash is a free (as in GPL) modular mapping software. Provided that the user creates a 3D model with UV mapping of the projection surface, Splash will take care of calibrating the videoprojectors (intrinsic and extrinsic parameters, blending and color), and feed them with the input video sources. Splash can handle multiple inputs, mapped on multiple 3D models, and has been tested with up to eight outputs on two graphic cards. It currently runs on a single computer but support for multiple computers mapping together is planned.

Splash has been primarily targeted toward fulldome mapping, and has been extensively tested in this context. Two fulldomes have been mapped: a small dome (3m wide) with 4 projectors, and a big one (20m wide) with 8 projectors. It has also been tested sucessfully as a more regular video-mapping software to project on buildings. Focus has been made on optimization: as of yet Splash can handle flawlessly a 3072x3072@30Hz live video input, and 4096x4096@60Hz on eight outputs (two graphic cards) with a powerful enough cpu and the [HapQ](http://vdmx.vidvox.net/blog/hap) video codec (on a SSD as this codec needs a very high bandwidth). Due to its architecture, higher resolutions are more likely to run smoothly when a single graphic card is used, although nothing higher than 4096x4096@60Hz has been tested yet (well, we tested 6144x6144@60Hz but the drive throughput was not enough to sustain the video bitrate).
Although Splash was primarily targeted toward fulldome mapping and has been extensively tested in this context, it can be used for virtually any surface provided that a 3D model of the geometry is available. Multiple fulldomes have been mapped, either by the authors of this software (two small dome (3m wide) with 4 projectors, a big one (20m wide) with 8 projectors) or by other teams. It has also been tested sucessfully as a more regular video-mapping software to project on buildings, or [onto moving objects](https://vimeo.com/268028595).

Splash can read videos from various sources amoung which video files (most common format and Hap variations), video input (such as video cameras and capture cards), Syphon on OSX, and Shmdata (a shared memory library used to make softwares from the SAT Metalab communicate between each others). An addon for Blender is included which allows for exporting draft configurations and update in real-time the meshes. It also handles automatically a few things:
Regarding performances, our tests show that Splash can handle flawlessly a 3072x3072@60Hz live video input, or a 4096x4096@60Hz video while outputting to eight outputs (through two graphic cards) with a high end cpu and the [HapQ](http://vdmx.vidvox.net/blog/hap) video codec (on a SSD as this codec needs a very high bandwidth). Due to its architecture, higher resolutions are more likely to run smoothly when a single graphic card is used, although nothing higher than 4096x4096@60Hz has been tested yet (well, we tested 6144x6144@60Hz but the drive throughput was not sufficient to sustain the video bitrate).

Splash can read videos from various sources amoung which video files (most common format and Hap variations), video input (such as video cameras and capture cards), and Shmdata (a shared memory library used to make softwares from the SAT Metalab communicate between each others). An addon for Blender is included which allows for exporting draft configurations and update in real-time the meshes. It also handles automatically a few things:
- semi automatic geometric calibration of the video-projectors,
- automatic calibration of the blending between them,
- automatic colorimetric calibration (with a gPhoto compatible camera)
- experimental automatic colorimetric calibration (with a gPhoto compatible camera)

### License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Expand Down
2 changes: 1 addition & 1 deletion addons/blender/splash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
bl_info = {
"name": "Splash output",
"author": "Emmanuel Durand",
"version": (0, 7, 16),
"version": (0, 7, 18),
"blender": (2, 72, 0),
"location": "3D View > Toolbox, File > Export",
"description": "Utility tools to connect Blender to the Splash videomapper",
Expand Down
1 change: 1 addition & 0 deletions addons/blender/splash/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ def draw_buttons(self, context, layout):
def init(self, context):
self.inputs.new('NodeSocketInt', 'Render width').default_value = 2048
self.inputs.new('NodeSocketInt', 'Render height').default_value = 2048
self.inputs.new('NodeSocketString', 'Object').default_value = ""
self.inputs.new('SplashLinkSocket', "Input link")
self.outputs.new('SplashLinkSocket', "Output link")

Expand Down
2 changes: 1 addition & 1 deletion data/config/splash-launcher.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.7.16
Version=0.7.18
Name=Splash
Exec=splash
Type=Application
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ target_sources(splash-${API_VERSION} PRIVATE
core/base_object.cpp
core/buffer_object.cpp
core/factory.cpp
core/graph_object.cpp
core/imagebuffer.cpp
core/link.cpp
core/name_registry.cpp
core/root_object.cpp
core/scene.cpp
controller/controller.cpp
Expand Down Expand Up @@ -220,11 +222,13 @@ endif()
if (PYTHONLIBS_FOUND)
set_source_files_properties(
controller/controller_pythonembedded.cpp
controller/python/python_sink.cpp
PROPERTIES COMPILE_FLAGS -Wno-missing-field-initializers
)

target_sources(splash-${API_VERSION} PRIVATE
controller/controller_pythonembedded.cpp
controller/python/python_sink.cpp
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/controller/colorcalibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ RgbValue ColorCalibrator::equalizeWhiteBalancesMaximizeMinLum()
/*************/
void ColorCalibrator::registerAttributes()
{
BaseObject::registerAttributes();
ControllerObject::registerAttributes();

addAttribute("colorSamples",
[&](const Values& args) {
Expand Down
30 changes: 26 additions & 4 deletions src/controller/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Splash
{

/*************/
shared_ptr<BaseObject> ControllerObject::getObject(const string& name) const
shared_ptr<GraphObject> ControllerObject::getObject(const string& name) const
{
auto scene = dynamic_cast<Scene*>(_root);
if (!scene)
Expand All @@ -20,6 +20,28 @@ shared_ptr<BaseObject> ControllerObject::getObject(const string& name) const
return scene->getObject(name);
}

/*************/
string ControllerObject::getObjectAlias(const std::string& name) const
{
auto object = getObject(name);
if (object)
return object->getAlias();
else
return {};
}

/*************/
unordered_map<string, string> ControllerObject::getObjectAliases() const
{
auto objectNames = getObjectNames();
unordered_map<string, string> objectAliases;

for (const auto& name : objectNames)
objectAliases[name] = getObjectAlias(name);

return objectAliases;
}

/*************/
vector<string> ControllerObject::getObjectNames() const
{
Expand Down Expand Up @@ -139,7 +161,7 @@ string ControllerObject::getDescription(const string& type) const
}

/*************/
vector<string> ControllerObject::getTypesFromCategory(const BaseObject::Category& category) const
vector<string> ControllerObject::getTypesFromCategory(const GraphObject::Category& category) const
{
Factory factory;
return factory.getObjectsOfCategory(category);
Expand All @@ -165,13 +187,13 @@ map<string, string> ControllerObject::getObjectTypes() const
}

/*************/
list<shared_ptr<BaseObject>> ControllerObject::getObjectsOfType(const string& type) const
list<shared_ptr<GraphObject>> ControllerObject::getObjectsOfType(const string& type) const
{
auto scene = dynamic_cast<Scene*>(_root);
if (!scene)
return {};

auto objects = list<shared_ptr<BaseObject>>();
auto objects = list<shared_ptr<GraphObject>>();
for (auto& obj : scene->_objects)
if (obj.second->getType() == type || type == "")
objects.push_back(obj.second);
Expand Down
27 changes: 20 additions & 7 deletions src/controller/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,23 @@

#include "./core/attribute.h"
#include "./core/coretypes.h"
#include "./core/graph_object.h"
#include "./core/scene.h"
#include "./userinput/userinput.h"

namespace Splash
{

/*************/
class ControllerObject : public BaseObject
class ControllerObject : public GraphObject
{
public:
/**
* \brief Constructor
* \param root RootObject
*/
ControllerObject(RootObject* root)
: BaseObject(root)
explicit ControllerObject(RootObject* root)
: GraphObject(root)
{
registerAttributes();
}
Expand All @@ -59,7 +60,19 @@ class ControllerObject : public BaseObject
* Get a ptr to the named object
* \return The object
*/
shared_ptr<BaseObject> getObject(const std::string& name) const;
shared_ptr<GraphObject> getObject(const std::string& name) const;

/**
* Get the alias for the given object
* \return Return the alias
*/
std::string getObjectAlias(const std::string& name) const;

/**
* Get the aliases for all objects
* \return Return a map of the aliases
*/
std::unordered_map<std::string, std::string> getObjectAliases() const;

/**
* \brief Get a list of the object names
Expand Down Expand Up @@ -127,14 +140,14 @@ class ControllerObject : public BaseObject
* \param category Category to look for
* \return Return a list of all types of the given category
*/
std::vector<std::string> getTypesFromCategory(const BaseObject::Category& category) const;
std::vector<std::string> getTypesFromCategory(const GraphObject::Category& category) const;

/**
* \brief Get all object of given type. If empty, get all objects.
* \param type Type to look for
* \return Return a list of all objects of the given type
*/
std::list<std::shared_ptr<BaseObject>> getObjectsOfType(const std::string& type) const;
std::list<std::shared_ptr<GraphObject>> getObjectsOfType(const std::string& type) const;

/**
* Get all objects of the given base type, including derived types
Expand Down Expand Up @@ -198,7 +211,7 @@ class ControllerObject : public BaseObject
/**
* \brief Register new functors to modify attributes
*/
void registerAttributes() { BaseObject::registerAttributes(); }
void registerAttributes() { GraphObject::registerAttributes(); }
};

/*************/
Expand Down
6 changes: 3 additions & 3 deletions src/controller/controller_blender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ void Blender::update()

auto isMaster = scene->isMaster();

auto getObjLinkedToCameras = [&]() -> vector<shared_ptr<BaseObject>> {
vector<shared_ptr<BaseObject>> objLinkedToCameras{};
auto getObjLinkedToCameras = [&]() -> vector<shared_ptr<GraphObject>> {
vector<shared_ptr<GraphObject>> objLinkedToCameras{};

auto cameras = getObjectsOfType("camera");
auto links = getObjectLinks();
Expand Down Expand Up @@ -191,7 +191,7 @@ void Blender::registerAttributes()
return true;
});
setAttributeDescription("blendingUpdated", "Message sent by the master Scene to notify that a new blending has been computed");
setAttributeSyncMethod("blendingUpdated", AttributeFunctor::Sync::force_sync);
setAttributeSyncMethod("blendingUpdated", Attribute::Sync::force_sync);
}

} // end of namespace
8 changes: 4 additions & 4 deletions src/controller/controller_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void Gui::setMouseState(const vector<UserInput::State>& state)

for (auto& s : state)
{
auto parentIt = find_if(_parents.begin(), _parents.end(), [&](const BaseObject* p) { return s.window == p->getName(); });
auto parentIt = find_if(_parents.begin(), _parents.end(), [&](const GraphObject* p) { return s.window == p->getName(); });
if (parentIt == _parents.end())
{
_mouseHoveringWindow = false;
Expand Down Expand Up @@ -453,7 +453,7 @@ void Gui::mouseScroll(double /*xoffset*/, double yoffset)
}

/*************/
bool Gui::linkTo(const shared_ptr<BaseObject>& obj)
bool Gui::linkTo(const shared_ptr<GraphObject>& obj)
{
// Mandatory before trying to link
if (!ControllerObject::linkTo(obj))
Expand All @@ -470,12 +470,12 @@ bool Gui::linkTo(const shared_ptr<BaseObject>& obj)
}

/*************/
void Gui::unlinkFrom(const shared_ptr<BaseObject>& obj)
void Gui::unlinkFrom(const shared_ptr<GraphObject>& obj)
{
if (dynamic_pointer_cast<Object>(obj).get() != nullptr)
_guiCamera->unlinkFrom(obj);

BaseObject::unlinkFrom(obj);
GraphObject::unlinkFrom(obj);
}

/*************/
Expand Down
8 changes: 4 additions & 4 deletions src/controller/controller_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ class Gui : public ControllerObject
void mouseScroll(double xoffset, double yoffset);

/**
* \brief Try to link the given BaseObject to this object
* \brief Try to link the given GraphObject to this object
* \param obj Shared pointer to the (wannabe) child object
*/
bool linkTo(const std::shared_ptr<BaseObject>& obj) final;
bool linkTo(const std::shared_ptr<GraphObject>& obj) final;

/**
* \brief Try to unlink the given BaseObject from this object
* \brief Try to unlink the given GraphObject from this object
* \param obj Shared pointer to the (supposed) child object
*/
void unlinkFrom(const std::shared_ptr<BaseObject>& obj) final;
void unlinkFrom(const std::shared_ptr<GraphObject>& obj) final;

/**
* \brief Render this gui
Expand Down
Loading

0 comments on commit 679cb03

Please sign in to comment.