Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] 8 bit grey scale image for dl2p format #899

Closed
Veenxz opened this issue Jul 8, 2024 · 5 comments
Closed

[FEATURE REQUEST] 8 bit grey scale image for dl2p format #899

Veenxz opened this issue Jul 8, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@Veenxz
Copy link

Veenxz commented Jul 8, 2024

Is your feature request related to a problem?

Hi,

I am working on 4D printing for hydrogels, now I can only get 16 grey values using UV Tool. Would it be possbile for me define more light intensity on my pattern?

Thanks for the wounderful tool!

Describe the solution you'd like

  • Add LayerImageColorTable for 8 bit

Files

UVtools.Core/FileFormats/PhotonWorkshopFile.cs

    public sealed class LayerImageColorTable
    {
        [FieldOrder(0)] public uint UseFullGreyscale { get; set; }
        [FieldOrder(1)] public uint GreyMaxCount { get; set; } = 16;
        [FieldOrder(2)] [FieldCount(nameof(GreyMaxCount))] public byte[] Grey { get; set; } = {
            // AA16: 255, 239, 223, 207, 191, 175, 159, 143, 127, 111, 95, 79, 63, 47, 31, 15
            15, 31, 47,    // 1,2,3
            63, 79, 95,    // 4,5,6
            111, 127, 143, // 7,8,9
            159, 175, 191, // 10,11,12
            207, 223, 239, // 13,14,15
            byte.MaxValue  // 16
        };

        [FieldOrder(3)] public uint Unknown { get; set; }

        public override string ToString()
        {
            return $"{nameof(UseFullGreyscale)}: {UseFullGreyscale}, {nameof(GreyMaxCount)}: {GreyMaxCount}, {nameof(Grey)}: {Grey}, {nameof(Unknown)}: {Unknown}";
        }
    }
@Veenxz Veenxz added the enhancement New feature or request label Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

This is your first time submitting an issue with UVtools 🥳Please review your issue and ensure that the submit template was followed, the information is complete, and not related to any other open issue. It will be reviewed shortly. Debugging is very important and make the program better. Thanks for contributing and making the software better! 🙌

@sn4k3
Copy link
Owner

sn4k3 commented Jul 8, 2024

Anycubic uses fake AA each level is time fractions of exposure time and not real grey values. (LCD always lit full white pixel but with less time for AA)
If you want to use more than 16 values you can set set higher AA level and the table will adjust accordingly by the slicer.
I don't know if firmware will accept anything more than 16x, you would need to test it.

If you require real grey shift away from anycubic machines or adapt mSLA klipper firmware to get full control over it.

@Veenxz
Copy link
Author

Veenxz commented Jul 9, 2024

I'm using the Anycubic D2 DLP printer, I have tested the machine and could adjust the exposure intensity according to the grey scale. The max brightness in UVTools is 255, I didn't find how to set a higher AA level in the software.
BTW, could I adjust the exposure time and greyscale in one slice?

If I import this file in UVTools, the saved file will only get 16 greyscales. Intensity_test.zip

The dl2p file: 0-100-delta2_light_1.zip

You can also see, in the test, that some patterns have converged to the same greyscale.

Grey_test
layer36

@sn4k3
Copy link
Owner

sn4k3 commented Jul 9, 2024

The dl2p file: 0-100-delta2_light_1.zip
You can also see, in the test, that some patterns have converged to the same greyscale.

That file uses AA=1 defined on file, if it does gray values firmware may ignore all information on it and convert grays directly.

The max brightness in UVTools is 255

Thats the max pixel color of every lcd, color or mono max is 255 per pixel. You can't use higher values.

I didn't find how to set a higher AA level in the software.

Every slicer uses a max of 16x.
Anycubic sets a table of 16x no matter the AA level.

@Veenxz
Copy link
Author

Veenxz commented Jul 9, 2024

Got it. Thanks for your reply!

@Veenxz Veenxz closed this as completed Jul 9, 2024
sn4k3 added a commit that referenced this issue Jul 30, 2024
- **File formats:**
  - (Add) File format: Klipper zip
  - (Add) Properties:
    - `Pause` and `ChangeResin` to layers
    - `BottomLiftAcceleration`
    - `BottomLiftAcceleration2`
    - `LiftAcceleration`
    - `LiftAcceleration2`
    - `BottomRetractAcceleration`
    - `BottomRetractAcceleration2`
    - `RetractAcceleration`
    - `RetractAcceleration2`
  - (Add) PrusaSlicer Keywords:
    - `FILECLASS_xxx` to define the file class directly instead of a file extension
    - `BottomLiftAcceleration`
    - `BottomLiftAcceleration2`
    - `BottomRetractAcceleration`
    - `BottomRetractAcceleration2`
    - `LiftAcceleration`
    - `LiftAcceleration2`
    - `RetractAcceleration`
    - `RetractAcceleration2`
  - (Add) Property `HaveTiltingVat` to know if the printer have a tilting vat
  - (Add) Compatibility with tilting vat Saturn 4 Ultra which also fixes print time estimate (#906)
  - (Add) Encrypted CTB: Tries to predict tilting vat printers from set parameters
  - (Change) CWS: Append `;<Slice>` as first line in the layer instead when required
  - (Change) VDT: Move FTL previews to top to be used as first in conversion
  - (Improvement) Anycubic: Write the image color table based on the AntiAliasing level (#899)
  - (Improvement) Encrypted CTB: Implement the `ModifiedTimestampMinutes` and `AntiAliasLevel` field
  - (Fix) nanoDLP `slicer.json` deserialize problem on some files
  - (Fix) SL1: The keyword `TransitionLayerCount_xxx` not being set on the file (#902)
  - (Fix) PHZ: Generated invalid thumbnail data (#903)
- **Tools:**
  - (Improvement) Pixel arithmetic: Add extra checks to ignore empty size and layers
  - (Change) Edit print parameters: Allow set lift and retract speeds to 0 (#906)
- **UI:**
  - (Add) Menu - File - Copy parameters to files: Allow to copy parameters from current file to another file(s) (#852)
  - (Improvement) Menu - File - Reset layer properties: Hold SHIFT key to also rebuild layers position with the file layer height (#870)
  - (Improvement) Save as and convert file save dialog: Force the correct file extension if been tampered (#909)
  - (Improvement) Exposure time finder: Disable incompatible panels instead of hide them
  - (Add) Layer preview shortcuts: A/W/S/D to pan the layer image and Q/E to go to previous/next layer (#871)
  - (Fix) Prevent CTRL + SHIFT + Up/Down (Issue navigation shortcut) from change layer
- (Add) PrusaSlicer printer: Elegoo Saturn 4 Ultra
- (Fix) Linux AppImage: Failed to change to directory "~" (No such file of directory) (#891)
- (Upgrade) OpenCV from 4.8.0 to 4.9.0
- (Upgrade) AvaloniaUI from 11.0.10 to 11.1.1 (Fixes #872)
- (Upgrade) .NET from 6.0.29 to 6.0.32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants