diff --git a/data/scene/digitaluniverse/milkyway/milkyway.mod b/data/scene/digitaluniverse/milkyway/milkyway.mod index 88a39c5cc0..42e2261b3b 100644 --- a/data/scene/digitaluniverse/milkyway/milkyway.mod +++ b/data/scene/digitaluniverse/milkyway/milkyway.mod @@ -8,21 +8,13 @@ return { Enabled = true, Color = { 1.0, 1.0, 1.0 }, Transparency = 0.90, - ScaleFactor = 2.3, + ScaleFactor = 2.8, File = "speck/galaxy.speck", TexturePath = "textures", Luminosity = "size", - ScaleLuminosity = 1.0, - --[[ - TransformationMatrix = { - -0.7357425748, 0.67726129641, 0.0, 0.0, - -0.074553778365, -0.080991471307, 0.9939225904, 0.0, - 0.67314530211, 0.73127116582, 0.11008126223, 0.0, - 0.0, 0.0, 0.0, 1.0 - }, - ]] + ScaleLuminosity = 1.0, -- Fade in value in the same unit as "Unit" - FadeInThreshould = 0.1, + FadeInThreshould = 119441, PlaneMinSize = 5.0, Unit = "pc", }, diff --git a/ext/ghoul b/ext/ghoul index 2b350ca6a6..ecb186c4ec 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 2b350ca6a63111ce585f6969202ba1a4e0ad704b +Subproject commit ecb186c4eca7feeff3d970234d6e3b4b213a640a diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index 1ff90cf0f5..c2074874d3 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -355,7 +355,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di , _drawElements(DrawElementsInfo, true) , _drawLabels(DrawLabelInfo, false) , _colorOption(ColorOptionInfo, properties::OptionProperty::DisplayType::Dropdown) - , _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.1, 100.0) + , _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.0, 100.0) , _disableFadeInDistance(DisableFadeInInfo, true) , _billboardMaxSize(BillboardMaxSizeInfo, 400.0, 0.0, 1000.0) , _billboardMinSize(BillboardMinSizeInfo, 0.0, 0.0, 100.0) @@ -1413,6 +1413,7 @@ void RenderableBillboardsCloud::createDataSlice() { } } + float biggestCoord = -1.0f; for (size_t i = 0; i < _fullData.size(); i += _nValuesPerAstronomicalObject) { glm::dvec4 transformedPos = _transformationMatrix * glm::dvec4(_fullData[i + 0], _fullData[i + 1], _fullData[i + 2], 1.0); glm::vec4 position(glm::vec3(transformedPos), static_cast(_unit)); @@ -1420,6 +1421,7 @@ void RenderableBillboardsCloud::createDataSlice() { if (_hasColorMapFile) { for (auto j = 0; j < 4; ++j) { _slicedData.push_back(position[j]); + biggestCoord = biggestCoord < position[j] ? position[j] : biggestCoord; } // Finds from which bin to get the color. // Note: the first color in the colormap file @@ -1445,6 +1447,8 @@ void RenderableBillboardsCloud::createDataSlice() { } } } + + _fadeInDistance.setMaxValue(10.0f * biggestCoord); } void RenderableBillboardsCloud::createPolygonTexture() { diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 13200f9635..e123072d0c 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -583,6 +583,10 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&, _program->setUniform("galaxyTexture", unit); int currentTextureIndex = -1; for (auto renderingPlane : _renderingPlanesArray) { + // For planes with undefined textures references + if (renderingPlane.planeIndex == -1) { + continue; + } glm::dvec4 vertex0(renderingPlane.vertexData[0], renderingPlane.vertexData[1], renderingPlane.vertexData[2], renderingPlane.vertexData[3]); @@ -1216,7 +1220,7 @@ void RenderablePlanesCloud::createPlanes() { // JCC: Ask Abbott about these points refeering to a non-existing texture. if (plane.planeIndex == 30) { //std::cout << "--- Creating planes - index: " << plane.planeIndex << std::endl; - plane.planeIndex = 0; + plane.planeIndex = -1; } glGenVertexArrays(1, &plane.vao);