19 Commits

Author SHA1 Message Date
Ghostkeeper
71b217c624
Fix colour calculations if spectrum is entirely one value
If the range of the colour spectrum is 0, i.e. there is only one value for the current colour spectrum, then this would previously give a division by 0 in the shader, causing the final colour to become black. This is unexpected and makes the layer view hard to read. Instead, we'll now use the middle of the range then.
This was likely a problem for a long time but only really became visible due to the colour spectrum now showing only the range of values for the visible structures. Previously it was a problem e.g. for layer thickness if all layers had the same thickness (i.e. initial layer height == layer height).
2021-04-03 17:29:33 +02:00
Ghostkeeper
2c33ebdd05
Document part of the vertex positions generated here
Encountered as I made a failed attempt at solving the issue with rendering transparent support. I tried to order vertices appropriately but failed miserably.
2021-03-21 23:15:15 +01:00
Ghostkeeper
dc68fbc94a
Add colour scheme for line width
Implements CURA-7741.
2021-02-19 10:10:16 +01:00
bas
f6badcaeca Added starts color to theme, and support in shader / simulationpass 2020-11-11 13:44:21 +01:00
bas
757d7eee50 layers3d.shader now detects and draws 'starts' as boxes
Also adds a "show starts" option to the SimulationViewMenuComponent and corresponding logic

SimulationPass.py adds a prev_line_types attribute to the shader, which the shader uses to compare with its line_type to detect starts.
2020-10-28 09:49:26 +01:00
Kostas Karmas
6ffd250965 Format spacing
CURA-7426
2020-05-07 14:10:45 +02:00
Remco Burema
99e99e4650
Layerview can now deal with visibility extruder nrs. 4+
part of CURA-7426
2020-05-06 18:03:32 +02:00
Remco Burema
b0418716fd
Rename 'Feedrate' to 'Speed'.
At least in the interface. Even though Feedrate is congruent with the CNCdefinition thereof, Speed is less confusing for the user.
2020-02-11 13:03:27 +01:00
Remco Burema
2e88c172c1 Reduced amount of matrix multiplication in geometry shaders. 2019-04-19 23:00:26 +02:00
Remco Burema
ed6db6c9b0 Move multiplication from Python to shaders. (Needs the same-named Uranium branch.) 2019-04-19 16:58:38 +02:00
Jaime van Kessel
ffce9bd172 Ensure that the primetower gets drawn in the right color again
CURA-5932
2019-01-04 14:59:26 +01:00
Ghostkeeper
a8493ee35d
Give black materials at least some albedo
Otherwise you can't see the diffuse reflections and the entire thing just becomes a black silhouette.
2018-09-25 11:24:48 +02:00
Diego Prado Gesto
0328050548 Change layer thickness colormap to parula-like (https://es.mathworks.com/help/matlab/ref/parula.html) 2018-01-21 17:16:18 +01:00
Ghostkeeper
1aebe32ba6
Fix winding order of left endpoint triangles
Otherwise the left side is invisible due to backface culling.
2018-01-02 16:16:52 +01:00
Ruben D
f69375691f
Reduce vertices per tube by 1
Since the tubes are symmetrical, instead of using an extra vertex to flip the winding order, I just mirror all horizontal coordinates so that the triangles flip inside out.
2017-12-13 18:58:05 +01:00
Ruben D
e36099a380
Draw backside of travel lines inverted
This adds a front-facing primitive towards the back side of every travel line, causing those lines to be visible from both sides regardless of backface culling. This doubles the number of vertices for travel moves, but due to backface culling it comes down to approximately the same performance as the original.
2017-12-13 01:44:05 +01:00
Ruben D
3666b35ff3
Fix winding order of 3D tubes
Adding a copy of the first vertex causes the winding order to reverse.
2017-12-13 01:41:36 +01:00
Diego Prado Gesto
fa00a17c78 Make UI changes in the Simulation View for adapting the color gradient
in the Feedrate color scheme. Due to the travel speed is normally very
high compared with the other speeds in the model, the gradient is now
gradual instead of linear in order to show more changes in the low
values and less changes in the high values.
Adapt also the button styles and themes' colors.
Set the play/pause button to the left and reduce the size.
2017-11-26 21:21:18 +01:00
Diego Prado Gesto
2df06bbbb9 CURA-4526 Add Simulation View plugin 2017-11-21 10:51:57 +01:00