Skip to content

Commit

Permalink
Merge branch 'release/3.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
naavis committed May 7, 2021
2 parents c4eab39 + 933e318 commit 022a0d1
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 21 deletions.
47 changes: 37 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,25 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 3.3.0 - 2021-05-07

### Changed

- When typing values into spinboxes, the change only takes effect after pressing
enter or moving focus elsewhere.
- Increased maximum value of image brightness slider

### Fixed

- Fixed bug where typing decimals into spinboxes wasn't working
- Fixed bug where sky was shown a second time outside field of view with
equidistant and equal area camera projections
- Fixed missing prism face distances from save files
- Fixed bug with slightly incorrect crystal geometry causing uneven brightness
distribution with Parry crystal halos

## 3.2.0 - 2021-03-24

Expand All @@ -13,20 +31,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed bug where pyramid apex angle was set incorrectly based on crystal edge angle rather than face angle
- Fixed bug where pyramid apex angle was set incorrectly based on crystal edge
angle rather than face angle

## 3.1.0 - 2021-02-21

### Changed

- Improved logging and error messages in case shader compilation fails
- Population weight was changed from an integer to a decimal number for more granular control
- Population weight was changed from an integer to a decimal number for more
granular control

## 3.0.0 - 2021-02-21

### Added

- Created a realistic sky and sun model based on Hosek-Wilkie and Preetham papers
- Created a realistic sky and sun model based on Hosek-Wilkie and Preetham
papers
- Simulation rate shown in status bar
- Ice crystals now have adjustable pyramidal caps
- Possibility to save and load simulations
Expand All @@ -37,13 +58,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Forced application to use native desktop OpenGL instead of ANGLE or software renderer
- Forced application to use native desktop OpenGL instead of ANGLE or software
renderer
- Build system switched to qmake from CMake
- Rewrote most of the GUI code to use Qt model/view architecture
- Triangle normals are now cached during raytracing
- The settings groups in the side panel are now collapsible
- Adjusting sliders with arrow kys now uses smaller steps
- Light is now allowed to bounce inside ice crystal for a 100 times instead of 10
- Light is now allowed to bounce inside ice crystal for a 100 times instead
of 10

### Fixed

Expand Down Expand Up @@ -88,14 +111,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Disabled "Remove population" button when there is only one population in simulation
- Disabled "Remove population" button when there is only one population in
simulation
- Added multiple crystal populations by default

## 2.1.1 - 2019-07-08

### Fixed

- Fixed bug where removing the only crystal population caused the UI controls not to work anymore
- Fixed bug where removing the only crystal population caused the UI controls
not to work anymore

## 2.1.0 - 2019-07-07

Expand All @@ -108,11 +133,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Made sidebar scrollable when the window is small enough
- Made UI show field of view in degrees
- Limited field of view for stereographic, rectilinear and orthographic projections
- Limited field of view for stereographic, rectilinear and orthographic
projections

### Fixed

- Fixed bug where field of view sometimes did not update correctly when choosing a new projection
- Fixed bug where field of view sometimes did not update correctly when choosing
a new projection

## 2.0.0 - 2019-07-02

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.2.0-{build}"
version: "3.3.0-{build}"
branches:
only:
- master
Expand Down
1 change: 1 addition & 0 deletions src/haloray-core/gui/components/sliderSpinBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SliderSpinBox::SliderSpinBox(QWidget *parent) : QWidget(parent), m_value(0.0)

m_spinBox = new QDoubleSpinBox();
m_spinBox->setSingleStep(0.1);
m_spinBox->setKeyboardTracking(false);

auto layout = new QHBoxLayout(this);
layout->addWidget(m_slider);
Expand Down
2 changes: 2 additions & 0 deletions src/haloray-core/gui/crystalSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ void CrystalSettingsWidget::setupUi()
m_upperApexAngleSpinBox->setMinimum(0.0);
m_upperApexAngleSpinBox->setMaximum(180.0);
m_upperApexAngleSpinBox->setSuffix("°");
m_upperApexAngleSpinBox->setKeyboardTracking(false);

m_upperApexHeightAverageSlider = new SliderSpinBox(0.0, 1.0);

Expand All @@ -194,6 +195,7 @@ void CrystalSettingsWidget::setupUi()
m_lowerApexAngleSpinBox->setMinimum(0.0);
m_lowerApexAngleSpinBox->setMaximum(180.0);
m_lowerApexAngleSpinBox->setSuffix("°");
m_lowerApexAngleSpinBox->setKeyboardTracking(false);

m_lowerApexHeightAverageSlider = new SliderSpinBox(0.0, 1.0);

Expand Down
3 changes: 3 additions & 0 deletions src/haloray-core/gui/generalSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,21 @@ void GeneralSettingsWidget::setupUi()
m_sunDiameterSpinBox->setSingleStep(0.1);
m_sunDiameterSpinBox->setMinimum(0.01);
m_sunDiameterSpinBox->setMaximum(30.0);
m_sunDiameterSpinBox->setKeyboardTracking(false);

m_raysPerFrameSpinBox = new QSpinBox();
m_raysPerFrameSpinBox->setSingleStep(1000);
m_raysPerFrameSpinBox->setMinimum(1);
m_raysPerFrameSpinBox->setMaximum(m_viewModel->getRaysPerFrameUpperLimit());
m_raysPerFrameSpinBox->setGroupSeparatorShown(true);
m_raysPerFrameSpinBox->setKeyboardTracking(false);

m_maximumFramesSpinBox = new QSpinBox();
m_maximumFramesSpinBox->setSingleStep(60);
m_maximumFramesSpinBox->setMinimum(1);
m_maximumFramesSpinBox->setMaximum(1000000000);
m_maximumFramesSpinBox->setGroupSeparatorShown(true);
m_maximumFramesSpinBox->setKeyboardTracking(false);

m_multipleScatteringSlider = new SliderSpinBox();
m_multipleScatteringSlider->setMinimum(0.0);
Expand Down
30 changes: 23 additions & 7 deletions src/haloray-core/gui/stateSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ void StateSaver::SaveState(QString filename, SimulationEngine *engine, CrystalPo

settings.beginGroup("CrystalPopulations");
settings.beginWriteArray("pop");
for (auto i = 0u; i < crystals->getCount(); ++i)
for (auto popIndex = 0u; popIndex < crystals->getCount(); ++popIndex)
{
settings.setArrayIndex(i);
settings.setValue("Weight", crystals->getWeight(i));
auto population = crystals->get(i);
settings.setArrayIndex(popIndex);
settings.setValue("Weight", crystals->getWeight(popIndex));
auto population = crystals->get(popIndex);

settings.setValue("Name", QString::fromStdString(crystals->getName(i)));
settings.setValue("Name", QString::fromStdString(crystals->getName(popIndex)));
settings.setValue("Enabled", population.enabled);

settings.setValue("CaRatioAverage", (double)population.caRatioAverage);
Expand All @@ -50,6 +50,14 @@ void StateSaver::SaveState(QString filename, SimulationEngine *engine, CrystalPo
settings.setValue("LowerApexAngle", (double)population.lowerApexAngle);
settings.setValue("LowerApexHeightAverage", (double)population.lowerApexHeightAverage);
settings.setValue("LowerApexHeightStd", (double)population.lowerApexHeightStd);

settings.beginWriteArray("PrismFaceDistances");
for (auto prismFaceIndex = 0u; prismFaceIndex < 6; ++prismFaceIndex)
{
settings.setArrayIndex(prismFaceIndex);
settings.setValue("Average", (double)population.prismFaceDistances[prismFaceIndex]);
}
settings.endArray();
}
settings.endArray();
settings.endGroup();
Expand Down Expand Up @@ -92,9 +100,9 @@ void StateSaver::LoadState(QString filename, SimulationStateModel *simState, Cry

crystalModel->clear();
auto crystalPopulationCount = settings.beginReadArray("CrystalPopulations/pop");
for (auto i = 0; i < crystalPopulationCount; ++i)
for (auto popIndex = 0; popIndex < crystalPopulationCount; ++popIndex)
{
settings.setArrayIndex(i);
settings.setArrayIndex(popIndex);
auto pop = CrystalPopulation::createRandom();
pop.enabled = settings.value("Enabled", pop.enabled).toBool();

Expand All @@ -120,6 +128,14 @@ void StateSaver::LoadState(QString filename, SimulationStateModel *simState, Cry
auto name = settings.value("Name", "Default name").toString();
double weight = settings.value("Weight", 1.0).toDouble();

settings.beginReadArray("PrismFaceDistances");
for (auto prismFaceIndex = 0u; prismFaceIndex < 6; ++prismFaceIndex)
{
settings.setArrayIndex(prismFaceIndex);
pop.prismFaceDistances[prismFaceIndex] = settings.value("Average", pop.prismFaceDistances[prismFaceIndex]).toFloat();
}
settings.endArray();

crystalModel->addRow(pop, weight, name);
}
settings.endArray();
Expand Down
2 changes: 1 addition & 1 deletion src/haloray-core/gui/viewSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void ViewSettingsWidget::setupUi()

m_brightnessSlider = new SliderSpinBox();
m_brightnessSlider->setMinimum(0.1);
m_brightnessSlider->setMaximum(15.0);
m_brightnessSlider->setMaximum(30.0);

m_hideSubHorizonCheckBox = new QCheckBox();

Expand Down
4 changes: 2 additions & 2 deletions src/haloray-core/resources/shaders/raytrace.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ ivec3 triangles[] = ivec3[](
ivec3(15, 16, 10),

// Face 7 (prism)
ivec3(10, 16, 17),
ivec3(10, 16, 11),
ivec3(16, 17, 11),

// Face 8 (prism)
ivec3(11, 17, 12),
ivec3(11, 17, 6),
ivec3(17, 12, 6)
);

Expand Down
2 changes: 2 additions & 0 deletions src/haloray-core/resources/shaders/sky.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ void main(void)
projectedAngle = asin(polar.x / camera.focalLength);
}

if (projectedAngle > PI) return;

float x = sin(projectedAngle) * cos(polar.y);
float y = sin(projectedAngle) * sin(polar.y);
float z = -cos(projectedAngle);
Expand Down

0 comments on commit 022a0d1

Please sign in to comment.