From 170ef5639e637cd518684d2ecab0e10541992093 Mon Sep 17 00:00:00 2001 From: Jacob Molin Date: Fri, 10 Jun 2022 16:51:13 -0600 Subject: [PATCH] [WIP] Velocity works but something's off with the units --- .../network/networkengine.cpp | 5 + .../pointdatamessagehandler.cpp | 39 ++++ .../pointdatamessagehandler.h | 1 + .../rendering/renderablepointscloud.cpp | 193 +++++++++++++++++- .../rendering/renderablepointscloud.h | 14 +- .../softwareintegration/shaders/point_fs.glsl | 1 + .../softwareintegration/shaders/point_ge.glsl | 18 +- .../softwareintegration/shaders/point_vs.glsl | 29 ++- modules/softwareintegration/utils.h | 4 + openspace.cfg | 17 +- 10 files changed, 302 insertions(+), 19 deletions(-) diff --git a/modules/softwareintegration/network/networkengine.cpp b/modules/softwareintegration/network/networkengine.cpp index 30ff58752d..26bc50596a 100644 --- a/modules/softwareintegration/network/networkengine.cpp +++ b/modules/softwareintegration/network/networkengine.cpp @@ -177,6 +177,11 @@ void NetworkEngine::handleIncomingMessage(IncomingMessage incomingMessage) { _pointDataMessageHandler.handlePointDataMessage(message, connectionPtr); break; } + case simp::MessageType::VelocityData: { + LDEBUG("Message recieved.. velocity data"); + _pointDataMessageHandler.handleVelocityDataMessage(message, connectionPtr); + break; + } case simp::MessageType::RemoveSceneGraphNode: { LDEBUG(fmt::format("Message recieved.. Remove SGN")); _pointDataMessageHandler.handleRemoveSGNMessage(message, connectionPtr); diff --git a/modules/softwareintegration/pointdatamessagehandler.cpp b/modules/softwareintegration/pointdatamessagehandler.cpp index b6e62b4c98..a98fa546d0 100644 --- a/modules/softwareintegration/pointdatamessagehandler.cpp +++ b/modules/softwareintegration/pointdatamessagehandler.cpp @@ -85,6 +85,45 @@ void PointDataMessageHandler::handlePointDataMessage(const std::vector& me addCallback(identifier, { reanchorCallback, { storage::Key::DataPoints }, "reanchorCallback" }); } +void PointDataMessageHandler::handleVelocityDataMessage(const std::vector& message, std::shared_ptr connection) { + LWARNING(fmt::format("PointDataMessageHandler::handleVelocityDataMessage()")); + size_t messageOffset = 0; + std::string identifier; + + checkRenderable(message, messageOffset, connection, identifier); + + size_t nVelocities; + size_t dimensionality; + std::vector velocities; + + try { + // The following order of creating variables is the exact order they are received + // in the message. If the order is not the same, the global variable + // 'message offset' will be wrong + nVelocities = static_cast(simp::readIntValue(message, messageOffset)); + dimensionality = static_cast(simp::readIntValue(message, messageOffset)); + simp::readPointData(message, messageOffset, nVelocities, dimensionality, velocities); + } + catch (const simp::SimpError& err) { + LERROR(fmt::format("Error when reading point data message: {}", err.message)); + return; + } + + // Use the renderable identifier as the data key + auto module = global::moduleEngine->module(); + module->storeData(identifier, storage::Key::VelocityData, std::move(velocities)); + auto callback = [identifier] { + global::scriptEngine->queueScript( + fmt::format( + "openspace.setPropertyValueSingle('Scene.{}.Renderable.MotionEnabled', {});", + identifier, "true" + ), + scripting::ScriptEngine::RemoteScripting::Yes + ); + }; + addCallback(identifier, { callback, { storage::Key::VelocityData }, "Enable motion mode, wait for VelocityData" }); +} + void PointDataMessageHandler::handleFixedColorMessage(const std::vector& message, std::shared_ptr connection) { size_t messageOffset = 0; std::string identifier; diff --git a/modules/softwareintegration/pointdatamessagehandler.h b/modules/softwareintegration/pointdatamessagehandler.h index 8a4f45644c..4711d3cb8f 100644 --- a/modules/softwareintegration/pointdatamessagehandler.h +++ b/modules/softwareintegration/pointdatamessagehandler.h @@ -46,6 +46,7 @@ class PointDataMessageHandler { public: void handlePointDataMessage(const std::vector& message, std::shared_ptr connection); + void handleVelocityDataMessage(const std::vector& message, std::shared_ptr connection); void handleFixedColorMessage(const std::vector& message, std::shared_ptr connection); void handleColormapMessage(const std::vector& message, std::shared_ptr connection); void handleAttributeDataMessage(const std::vector& message, std::shared_ptr connection); diff --git a/modules/softwareintegration/rendering/renderablepointscloud.cpp b/modules/softwareintegration/rendering/renderablepointscloud.cpp index 52519002db..55f6744210 100644 --- a/modules/softwareintegration/rendering/renderablepointscloud.cpp +++ b/modules/softwareintegration/rendering/renderablepointscloud.cpp @@ -42,15 +42,17 @@ #include #include +int TIME_COUNTER = 0; + namespace { constexpr const char* _loggerCat = "PointsCloud"; - constexpr const std::array UniformNames = { + constexpr const std::array UniformNames = { "color", "opacity", "size", "modelMatrix", "cameraUp", "screenSize", "cameraViewProjectionMatrix", "eyePosition", "sizeOption", "colormapTexture", "colormapMin", "colormapMax", "cmapNaNMode", "cmapNaNColor", "colormapEnabled", "linearSizeMin", "linearSizeMax", - "linearSizeEnabled" + "linearSizeEnabled", "motionEnabled", "theTime" }; constexpr openspace::properties::Property::PropertyInfo ColorInfo = { @@ -131,6 +133,12 @@ namespace { "Boolean to determine whether to use linear size or not." }; + constexpr openspace::properties::Property::PropertyInfo MotionEnabledInfo = { + "MotionEnabled", + "Motion enabled", + "Boolean to determine whether to use motion or not." + }; + struct [[codegen::Dictionary(RenderablePointsCloud)]] Parameters { // [[codegen::verbatim(ColorInfo.description)]] std::optional color; @@ -138,6 +146,7 @@ namespace { // [[codegen::verbatim(SizeInfo.description)]] std::optional size; + // TODO: This can be removed? Not in use anymore? // [[codegen::verbatim(DataInfo.description)]] std::optional> data; @@ -168,6 +177,9 @@ namespace { // [[codegen::verbatim(LinearSizeEnabledInfo.description)]] std::optional linearSizeEnabled; + // [[codegen::verbatim(MotionEnabledInfo.description)]] + std::optional motionEnabled; + enum class SizeOption : uint32_t { Uniform, NonUniform @@ -198,7 +210,8 @@ RenderablePointsCloud::RenderablePointsCloud(const ghoul::Dictionary& dictionary , _colormapEnabled(ColormapEnabledInfo, false) , _linearSizeMax(LinearSizeMinInfo) , _linearSizeMin(LinearSizeMaxInfo) - , _linearSizeEnabled(LinearSizeEnabledInfo) + , _linearSizeEnabled(LinearSizeEnabledInfo, false) + , _motionEnabled(MotionEnabledInfo, false) { const Parameters p = codegen::bake(dictionary); @@ -275,6 +288,10 @@ RenderablePointsCloud::RenderablePointsCloud(const ghoul::Dictionary& dictionary _linearSizeMax.setVisibility(properties::Property::Visibility::Hidden); _linearSizeMax.onChange(linearSizeMinMaxChecker); addProperty(_linearSizeMax); + + _motionEnabled = p.motionEnabled.value_or(_motionEnabled); + _motionEnabled.onChange([this] { checkIfMotionCanBeEnabled(); }); + addProperty(_motionEnabled); } bool RenderablePointsCloud::isReady() const { @@ -367,6 +384,12 @@ void RenderablePointsCloud::render(const RenderData& data, RendererTasks&) { _shaderProgram->setUniform(_uniformCache.linearSizeMax, _linearSizeMax); _shaderProgram->setUniform(_uniformCache.linearSizeEnabled, _linearSizeEnabled); + _shaderProgram->setUniform(_uniformCache.motionEnabled, _motionEnabled); + _shaderProgram->setUniform( + _uniformCache.theTime, + static_cast(data.time.j2000Seconds()) + ); + _shaderProgram->setUniform(_uniformCache.color, _color); _shaderProgram->setUniform(_uniformCache.opacity, _opacity); @@ -415,6 +438,7 @@ void RenderablePointsCloud::update(const UpdateData&) { auto pointDataSlice = getDataSlice(DataSliceKey::Points); auto colormapAttrDataSlice = getDataSlice(DataSliceKey::ColormapAttributes); auto linearSizeAttrDataSlice = getDataSlice(DataSliceKey::LinearSizeAttributes); + auto velocityDataSlice = getDataSlice(DataSliceKey::Velocity); if (pointDataSlice->empty()) return; @@ -431,14 +455,28 @@ void RenderablePointsCloud::update(const UpdateData&) { bufferData.push_back(colormapAttrDataSlice->at(i)); } else { - bufferData.push_back(0.0); + bufferData.push_back(0.0); // TODO: We might not want to put 0.0 here. How is this rendered? } if (linearSizeAttrDataSlice->size() > i) { bufferData.push_back(linearSizeAttrDataSlice->at(i)); } else { - bufferData.push_back(0.0); + bufferData.push_back(0.0); // TODO: We might not want to put 0.0 here. How is this rendered? + } + + if (velocityDataSlice->size() > (j + 2)) { + bufferData.push_back(velocityDataSlice->at(j)); + bufferData.push_back(velocityDataSlice->at(j + 1)); + bufferData.push_back(velocityDataSlice->at(j + 2)); + } + else { + bufferData.push_back(std::nan("0")); // TODO: We might not want to put 0.0 here. How is this rendered? Maybe push NAN? + bufferData.push_back(std::nan("0")); // TODO: We might not want to put 0.0 here. How is this rendered? Maybe push NAN? + bufferData.push_back(std::nan("0")); // TODO: We might not want to put 0.0 here. How is this rendered? Maybe push NAN? + // bufferData.push_back(0.0); // TODO: We might not want to put 0.0 here. How is this rendered? Maybe push NAN? + // bufferData.push_back(0.0); // TODO: We might not want to put 0.0 here. How is this rendered? Maybe push NAN? + // bufferData.push_back(0.0); // TODO: We might not want to put 0.0 here. How is this rendered? Maybe push NAN? } } @@ -451,7 +489,7 @@ void RenderablePointsCloud::update(const UpdateData&) { // ============================================================================================== // ========================================= VAO stuff ========================================= - GLsizei stride = static_cast(sizeof(GLfloat) * 5); + GLsizei stride = static_cast(sizeof(GLfloat) * _nValuesForVAOStride); GLint positionAttribute = _shaderProgram->attributeLocation("in_position"); glEnableVertexAttribArray(positionAttribute); glVertexAttribPointer( @@ -488,6 +526,19 @@ void RenderablePointsCloud::update(const UpdateData&) { reinterpret_cast(sizeof(GLfloat) * 4) ); } + + if (_hasLoadedVelocityData) { + GLint velocityAttribute = _shaderProgram->attributeLocation("in_velocity"); + glEnableVertexAttribArray(velocityAttribute); + glVertexAttribPointer( + velocityAttribute, + 3, + GL_FLOAT, + GL_FALSE, + stride, + reinterpret_cast(sizeof(GLfloat) * 5) + ); + } // ============================================================================================== glBindBuffer(GL_ARRAY_BUFFER, 0); @@ -522,6 +573,11 @@ bool RenderablePointsCloud::checkDataStorage() { loadLinearSizeAttributeData(softwareIntegrationModule); updatedDataSlices = true; } + + if (softwareIntegrationModule->isDataDirty(_identifier.value(), storage::Key::VelocityData)) { + loadVelocityData(softwareIntegrationModule); + updatedDataSlices = true; + } return updatedDataSlices; } @@ -537,7 +593,7 @@ void RenderablePointsCloud::loadData(SoftwareIntegrationModule* softwareIntegrat auto pointDataSlice = getDataSlice(DataSliceKey::Points); pointDataSlice->clear(); - pointDataSlice->reserve(fullPointData.size() * 3); + pointDataSlice->reserve(fullPointData.size() * 3); // TODO: Do we really need *3 here? // Create data slice auto addPosition = [&](const glm::vec4& pos) { @@ -616,7 +672,7 @@ void RenderablePointsCloud::loadCmapAttributeData(SoftwareIntegrationModule* sof } _hasLoadedColormapAttributeData = true; - LDEBUG("Rerendering colormap attribute data"); + LDEBUG("Rerendering with colormap attribute data"); } void RenderablePointsCloud::loadLinearSizeAttributeData(SoftwareIntegrationModule* softwareIntegrationModule) { @@ -634,7 +690,7 @@ void RenderablePointsCloud::loadLinearSizeAttributeData(SoftwareIntegrationModul "There is a mismatch in the amount of linear size attribute scalars ({}) and the amount of points ({})", linearSizeAttributeData.size(), pointDataSlice->size() / 3 )); - _colormapEnabled = false; + _linearSizeEnabled = false; return; } @@ -647,9 +703,108 @@ void RenderablePointsCloud::loadLinearSizeAttributeData(SoftwareIntegrationModul } _hasLoadedLinearSizeAttributeData = true; - LDEBUG("Rerendering linear size attribute data"); + LDEBUG("Rerendering with linear size attribute data"); } +void RenderablePointsCloud::loadVelocityData(SoftwareIntegrationModule* softwareIntegrationModule) { + // Fetch data from module's centralized storage + auto velocityData = softwareIntegrationModule->fetchData(_identifier.value(), storage::Key::VelocityData); + + if (velocityData.empty()) { + LWARNING("There was an issue trying to fetch the velocity data from the centralized storage."); + return; + } + + auto pointDataSlice = getDataSlice(DataSliceKey::Points); + + if (pointDataSlice->size() != velocityData.size()) { + LWARNING(fmt::format( + "There is a mismatch in the amount of velocity data ({}) and the amount of points ({})", + velocityData.size() / 3, pointDataSlice->size() / 3 + )); + _motionEnabled = false; + return; + } + + auto velocityDataSlice = getDataSlice(DataSliceKey::Velocity); + velocityDataSlice->clear(); + velocityDataSlice->reserve(velocityData.size() * 3); // TODO: Do we really need *3 here? + + // ========================================= + int nNans = 0; + int prevNNans = 0; + int nPointsContainingNans = 0; + // Create velocity data slice + auto addPosition = [&](const glm::vec4& pos) { + for (glm::vec4::length_type j = 0; j < glm::vec4::length() - 1; ++j) { + if (isnan(pos[j])) { + nNans++; + } + velocityDataSlice->push_back(pos[j]); + } + if (prevNNans < nNans) { + nPointsContainingNans++; + prevNNans = nNans; + } + }; + + for (size_t i = 0; i < velocityData.size(); i += 3) { + glm::dvec4 transformedPos = { + velocityData[i + 0], + velocityData[i + 1], + velocityData[i + 2], + 1.0 + }; + // W-normalization + transformedPos /= transformedPos.w; + transformedPos *= distanceconstants::Parsec; // TODO: Is this converting parsec => meter? + + addPosition(transformedPos); + } + + LWARNING(fmt::format("Points: {}. Velocity points: {}. Velocity points w/ nans {}. Velocity nans in total: {}", pointDataSlice->size()/3, velocityData.size()/3, nPointsContainingNans, nNans)); + // ========================================= + + + _hasLoadedVelocityData = true; + LDEBUG("Rerendering with motion based on velocity data"); +} + +// void RenderablePointsCloud::loadData(SoftwareIntegrationModule* softwareIntegrationModule) { +// // Fetch data from module's centralized storage +// auto fullPointData = softwareIntegrationModule->fetchData(_identifier.value(), storage::Key::DataPoints); + +// if (fullPointData.empty()) { +// LWARNING("There was an issue trying to fetch the point data from the centralized storage."); +// return; +// } + +// auto pointDataSlice = getDataSlice(DataSliceKey::Points); +// pointDataSlice->clear(); +// pointDataSlice->reserve(fullPointData.size() * 3); + +// // Create data slice +// auto addPosition = [&](const glm::vec4& pos) { +// for (glm::vec4::length_type j = 0; j < glm::vec4::length() - 1; ++j) { +// pointDataSlice->push_back(pos[j]); +// } +// }; + +// for (size_t i = 0; i < fullPointData.size(); i += 3) { +// glm::dvec4 transformedPos = { +// fullPointData[i + 0], +// fullPointData[i + 1], +// fullPointData[i + 2], +// 1.0 +// }; +// // W-normalization +// transformedPos /= transformedPos.w; +// transformedPos *= distanceconstants::Parsec; + +// addPosition(transformedPos); +// } +// } + std::shared_ptr RenderablePointsCloud::getDataSlice(DataSliceKey key) { if (!_dataSlices.count(key)) { _dataSlices.insert({ key, std::make_shared() }); @@ -699,6 +854,24 @@ void RenderablePointsCloud::checkIfLinearSizeCanBeEnabled() { } } +void RenderablePointsCloud::checkIfMotionCanBeEnabled() { + if (!global::windowDelegate->isMaster()) return; + + // This can happen if the user checks the "MotionEnabled" checkbox in the GUI + auto velocityData = getDataSlice(DataSliceKey::Velocity); + if (_motionEnabled.value() && velocityData->empty()) { + LINFO("Velocity data not loaded. Has it been sent from external software?"); + global::scriptEngine->queueScript( + fmt::format( + "openspace.setPropertyValueSingle('Scene.{}.Renderable.MotionEnabled', {});", + _identifier.value(), "false" + ), + scripting::ScriptEngine::RemoteScripting::Yes + ); + } + LINFO(fmt::format("checkIfMotionCanBeEnabled(): MotionEnabled = {}", _motionEnabled)); +} + void RenderablePointsCloud::checkColormapMinMax() { float min = std::any_cast(_colormapMin.get()); float max = std::any_cast(_colormapMax.get()); diff --git a/modules/softwareintegration/rendering/renderablepointscloud.h b/modules/softwareintegration/rendering/renderablepointscloud.h index c34762f875..5cd22a38ce 100644 --- a/modules/softwareintegration/rendering/renderablepointscloud.h +++ b/modules/softwareintegration/rendering/renderablepointscloud.h @@ -67,11 +67,13 @@ protected: void loadColormap(SoftwareIntegrationModule* softwareIntegrationModule); void loadCmapAttributeData(SoftwareIntegrationModule* softwareIntegrationModule); void loadLinearSizeAttributeData(SoftwareIntegrationModule* softwareIntegrationModule); + void loadVelocityData(SoftwareIntegrationModule* softwareIntegrationModule); bool checkDataStorage(); void checkIfColormapCanBeEnabled(); void checkIfLinearSizeCanBeEnabled(); + void checkIfMotionCanBeEnabled(); void checkColormapMinMax(); std::unique_ptr _shaderProgram = nullptr; @@ -80,7 +82,7 @@ protected: cameraViewProjectionMatrix, eyePosition, sizeOption, colormapTexture, colormapMin, colormapMax, cmapNaNMode, cmapNaNColor, colormapEnabled, linearSizeMin, linearSizeMax, - linearSizeEnabled + linearSizeEnabled, motionEnabled, theTime ) _uniformCache; properties::FloatProperty _size; @@ -97,17 +99,25 @@ protected: properties::IntProperty _cmapNaNMode; properties::Vec4Property _cmapNaNColor; + properties::BoolProperty _motionEnabled; + std::optional _identifier = std::nullopt; bool _hasLoadedColormapAttributeData = false; bool _hasLoadedColormap = false; bool _hasLoadedLinearSizeAttributeData = false; + + bool _hasLoadedVelocityData = false; + + // This is determined by nrAttributes + size for each attribute + const size_t _nValuesForVAOStride = 8; enum class DataSliceKey : size_t { Points = 0, ColormapAttributes, - LinearSizeAttributes + LinearSizeAttributes, + Velocity }; using DataSlice = std::vector; std::unordered_map> _dataSlices; diff --git a/modules/softwareintegration/shaders/point_fs.glsl b/modules/softwareintegration/shaders/point_fs.glsl index 715d919f61..41ff774d3e 100644 --- a/modules/softwareintegration/shaders/point_fs.glsl +++ b/modules/softwareintegration/shaders/point_fs.glsl @@ -33,6 +33,7 @@ in vec2 coords; flat in float ge_screenSpaceDepth; flat in vec4 ge_positionViewSpace; in float ta; +// in vec4 ge_gPosition; uniform vec4 color; uniform float opacity; diff --git a/modules/softwareintegration/shaders/point_ge.glsl b/modules/softwareintegration/shaders/point_ge.glsl index 46105d232a..5185d5277f 100644 --- a/modules/softwareintegration/shaders/point_ge.glsl +++ b/modules/softwareintegration/shaders/point_ge.glsl @@ -26,12 +26,17 @@ #include "PowerScaling/powerScalingMath.hglsl" +// const float EPS = 1e-5; + layout(points) in; layout(triangle_strip, max_vertices = 4) out; in float vs_colormapAttributeScalar[]; flat in float vs_linearSizeAttributeScalar[]; +// in vec4 vs_gPosition[]; +// out vec4 ge_gPosition; + flat out float ge_screenSpaceDepth; out float ta; out vec4 ge_positionViewSpace; @@ -96,15 +101,26 @@ void main() { ta = 1.0; + + // // Discard geometry if star has no position (but wasn't a nullArray). + // // Or if observed distance is above threshold set by cutOffThreshold. + // // By discarding in gs instead of fs we save computations for when nothing is visible. + // vec4 position = gl_in[0].gl_Position; + // if (length(position) < EPS) { + // return; + // } + vec3 pos = gl_in[0].gl_Position.xyz; dvec4 modelPos = modelMatrix * dvec4(pos, 1.0); double scaleMultiply = 1.0e17 * size; + scaleMultiply *= 15; // TODO: FIX POINT SIZE, NOW IT'S ARBRITRARY + if (linearSizeEnabled) { float interpolatedSizeAtt = 1.0; - // TODO: colormapAttributeScalar should be linearSizeAttributeScalar??? + // TODO: "colormapAttributeScalar" should be "linearSizeAttributeScalar"??? float colormapAttributeScalar = vs_linearSizeAttributeScalar[0]; if (colormapAttributeScalar < linearSizeMin) { interpolatedSizeAtt = 0.0; diff --git a/modules/softwareintegration/shaders/point_vs.glsl b/modules/softwareintegration/shaders/point_vs.glsl index 99eaea0c69..08a2656f53 100644 --- a/modules/softwareintegration/shaders/point_vs.glsl +++ b/modules/softwareintegration/shaders/point_vs.glsl @@ -26,16 +26,43 @@ #include "PowerScaling/powerScaling_vs.hglsl" +const float Parsec = 3.0856776e16; + layout(location = 0) in vec3 in_position; in float in_colormapAttributeScalar; in float in_linearSizeAttributeScalar; +in vec3 in_velocity; +// out vec4 vs_gPosition; + out float vs_colormapAttributeScalar; flat out float vs_linearSizeAttributeScalar; +uniform bool motionEnabled; +uniform float theTime; + void main() { vs_colormapAttributeScalar = in_colormapAttributeScalar; vs_linearSizeAttributeScalar = in_linearSizeAttributeScalar; + + // Don't show points with no value for velocity + // if (motionEnabled && (isnan(in_velocity[0]) || isnan(in_velocity[1]) || isnan(in_velocity[2]))) { + // vs_gPosition = vec4(0.0); + // gl_Position = vec4(0.0); + // return; + // } - gl_Position = vec4(in_position, 1.0); + vec4 objectPosition = vec4(in_position, 1.0); + + // Add velocity if applicable + if (motionEnabled) { + // TODO: How to handle NaN velocity values??? + if (!isnan(in_velocity[0]) || !isnan(in_velocity[1]) || !isnan(in_velocity[2])) { + // vec4 objectPosition = vec4(in_position * 1000 * Parsec, 1.0); + objectPosition.xyz += 10*theTime/Parsec * in_velocity; + } + // objectPosition.xyz += theTime * vec3(500000.0, 500000.0, 500000.0); + } + + gl_Position = objectPosition; } diff --git a/modules/softwareintegration/utils.h b/modules/softwareintegration/utils.h index cf616852ca..2458126308 100644 --- a/modules/softwareintegration/utils.h +++ b/modules/softwareintegration/utils.h @@ -35,6 +35,7 @@ namespace storage { enum class Key : uint32_t { DataPoints = 0, + VelocityData, Colormap, ColormapAttrData, LinearSizeAttrData, @@ -43,6 +44,7 @@ enum class Key : uint32_t { const std::unordered_map _keyStringFromKey { {"DataPoints", Key::DataPoints}, + {"VelocityData", Key::VelocityData}, {"Colormap", Key::Colormap}, {"ColormapAttributeData", Key::ColormapAttrData}, {"LinearSizeAttributeData", Key::LinearSizeAttrData}, @@ -65,6 +67,7 @@ const char SEP = ';'; enum class MessageType : uint32_t { Connection = 0, PointData, + VelocityData, RemoveSceneGraphNode, Color, Colormap, @@ -95,6 +98,7 @@ enum class ErrorCode : uint32_t { const std::unordered_map _messageTypeFromSIMPType { {"CONN", MessageType::Connection}, {"PDAT", MessageType::PointData}, + {"VDAT", MessageType::VelocityData}, {"RSGN", MessageType::RemoveSceneGraphNode}, {"FCOL", MessageType::Color}, {"LCOL", MessageType::Colormap}, diff --git a/openspace.cfg b/openspace.cfg index c40975290c..0f47b35259 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -8,12 +8,17 @@ -- or a dome cluster system -- A regular 1280x720 window -SGCTConfig = sgct.config.single{vsync=false} +--SGCTConfig = sgct.config.single{vsync=false} --SGCTConfig = "${CONFIG}/sci_powerwall_7nodes.json" +--SGCTConfig = "${CONFIG}/sci_powerwall_7nodes_laptop.json" +--SGCTConfig = "${CONFIG}/sci_powerwall01_node_scixopenspace.json" +--SGCTConfig = "${CONFIG}/sci_powerwall02_node_scixopenspace.json" -- A regular 1920x1080 window --- SGCTConfig = sgct.config.single{1920, 1080} +SGCTConfig = sgct.config.single{1920, 1080} +-- A regular 1280x720 window +--SGCTConfig = sgct.config.single{1280, 720} -- A windowed 1920x1080 fullscreen ---SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}} +-- SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}} -- A 1k fisheye rendering -- SGCTConfig = sgct.config.fisheye{1024, 1024} -- A 4k fisheye rendering in a 1024x1024 window @@ -62,9 +67,11 @@ SGCTConfig = sgct.config.single{vsync=false} -- Variable: Profile -- Sets the profile that should be loaded by OpenSpace. -Profile = "default" +Profile = "jacobs" +--Profile = "gaia_dr2" +--Profile = "default" -- Profile = "default_full" --- Profile = "gaia" +--Profile = "gaia" -- Profile = "insight" -- Profile = "juno" -- Profile = "jwst"