Possible to change color scale?
 
Notifications
Clear all

Possible to change color scale?  

  RSS
CarVac
(@carvac)
Member
Possible to change color scale?

I've run into this issue which I found existed on GitHub already: https://github.com/prusa3d/prusaslicer/issues/14954

The g-code visualizer in PrusaSlicer uses vertex shading to color its polygons, which leads to issues when interpolating between different colors.

When a g-code line starts at the slowest speed (blue) and reaches the fastest speed (red), it goes straight from blue to red without hitting any of the intermediate colors of green, yellow, and orange.

This causes a lot of visual artifacts where there shouldn't be, such as when on adjacent layers there are lines that get subdivided differently. The interpolation then goes to the subdivided color, which is different depending on where the subdivision is.

 

All of these lines should be fairly similar looking.

My backend solution for this is to have the color scale be grayscale so that interpolation works properly (make sure you're doing it in a linear color space!) and then use a LUT to map the grayscale to colors for display.

The frontend solution for this would be to have the user be able to set alternate color scales. I believe that the current one isn't colorblind-friendly, for one thing.

 

Thoughts?

Napsal : 08/02/2026 6:22 pm
Share: