Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: gettin a handle on r g b on a color laser and etherdream...

  1. #1
    Join Date
    Nov 2017
    Location
    Seattle, WA
    Posts
    97

    Default gettin a handle on r g b on a color laser and etherdream...

    ok it's me again. my apologies.

    I've got a x-laser_mobile_beat_mirage. I love the thing. But I'm angryy at it's colors.

    They are great colors, but I'm used to raster displays where the colors are ALREADY FRICKIN balanced and i don't gotta do nothin.

    So here's what I'm tryin. Please tell me where i'm messin up...

    So the EtherDream DAC expects 2 byte integers for r,g, and b. And .ild files have bytes. No biggie.

    Blue is the weakest color (right??).
    - So I find the minimum value where it lights.
    - I find the lowest value that I can determine is still the max brightness (at least according to my 53 year old eyes)
    - I try messing around with red and green with blue set at it's max level in order to get white best i can.
    - so far i now have max b, r, and g
    - then with min b set, mess around with r and g to get white again
    - now i have MAX white r,g,b and MIN r,g,b

    I mean, I dunno if i can just range between these min/maxes...
    Probably not. Per my experiments...

    I know how to convert hue,sat,value into r,g,b.
    From what I "get", this laser has only hue.

    Ain't no black, right? That'd only come from a black background.
    And when the laser power gets low enough, it goes from pretty visible straight to OFF.

    So i definitely know lasers are weird.
    And i definitely know that just scaling between min and max doesn't work.

    Whaaat am i missin herez ??

    Thanks for any ideas and tips and stuffs.

    I am an algebra guy. Not a calculus guy.

  2. #2
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Actually, I spent a considerable amount of time adding functionality to LaserBoy to try to tame non-linear laser modulation.

    It's called color rescaling. It only works when you convert a frame set into a wave file designed for playback on a modified 6 or 8 channel sound device aka a LaserBoy DAC.

    https://laserboy.org/forum/index.php?topic=561.0

    Basically you create a table of 256 unique numeric values in a text file. The values must be even so the least significant bit is not set and they must be between 0 and 32766. Essentially you get 14 bits of resolution since the lowest bit must be left alone and the highest bit is the sign bit and should always be zero (a positive signed 16-bit number).

    The individual RGB byte values are used to look up the 16-bit signed integer in the table and that is what gets written into the coresponding color channel of the wave.

    The tables must have exactly 256 values. They must all be even and between 0 and 32766 and all unique. Zero must map to zero, because laser off is laser off!

    LaserBoy stores these tables (one for each color channel) in the header of the wave file so that when LaserBoy opens the wave file to load it back in as a frame set it can convert backwards and give you back the right RGB byte values.
    Last edited by james; 01-22-2019 at 20:39.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  3. #3
    Join Date
    Nov 2017
    Location
    Seattle, WA
    Posts
    97

    Default

    ok per my laser's docs, iiiif i were using QuickShow-XL, I'd set the color settings to...

    3 color RGB "analog with log response".

    the min and max voltages are just 0-100% for all 3 (r,g,b)...

    So I'm guessing I put logarithmic values in my 256 element array of 2 byte unsigned integers.

    I guess the 1st is 0, the last is 65535, and in between step logarithmically...

    I'll try it and see what happens i spose.

    But blue definitely is more faint than the other 2... weird...


    So James you're using a totally custom DAC, right?

  4. #4
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,446

    Default

    He's using a multi-channel sound card that has had the DC filtering caps removed on the outputs + a correction amplifier that boosts the signal level and generates the differential X and Y signals.

    So, yeah, it's sort of a "custom" DAC, but really it's a common sound card that has been re-purposed. It's a common way to get output from a computer to a laser projector, and it's one of the most affordable DACs available. (Interestingly, some of the early commercial laser show controllers, like the X-29 and Full-Auto boards, were actually re-purposed ISA sound cards!)

    Since Laserboy is designed to output wave files it can talk directly to the sound card. However, some of the other laser show software packages can also output to a modified-sound card DAC, assuming you have the right plug-in installed. (I know LSX supports this, and I think there's a work-around for Mamba as well.)

    And I should point out that the correction amp is a required component. There used to be a couple different versions available, but I don't know if anyone is still selling them these days.

    Adam

  5. #5
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    I have correction amp kits that I designed myself (this time) and they are the best you can get!

    https://laserboy.org/forum/index.php?topic=561.0

    Actually they do two things at once. They add a controllable amount of negative voltage to each DAC channel to null out the DC offset and they provide voltage gain to get the signals up to the right voltages. They are not differential. They are singe-ended.

    James.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  6. #6
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    Quote Originally Posted by buffo View Post
    He's using a multi-channel sound card that has had the DC filtering caps removed on the outputs + a correction amplifier that boosts the signal level and generates the differential X and Y signals.

    So, yeah, it's sort of a "custom" DAC, but really it's a common sound card that has been re-purposed. It's a common way to get output from a computer to a laser projector, and it's one of the most affordable DACs available. (Interestingly, some of the early commercial laser show controllers, like the X-29 and Full-Auto boards, were actually re-purposed ISA sound cards!)

    Since Laserboy is designed to output wave files it can talk directly to the sound card. However, some of the other laser show software packages can also output to a modified-sound card DAC, assuming you have the right plug-in installed. (I know LSX supports this, and I think there's a work-around for Mamba as well.)

    And I should point out that the correction amp is a required component. There used to be a couple different versions available, but I don't know if anyone is still selling them these days.

    Adam
    ~
    I beg to differ with you Sir, Respectively...
    ~
    X29's board was a industrial grade DA board made by a company in Taiwan from the start as high speed digital output card. The fact that it could do synchronous transfer like a sound card was merely a feature. Bob had a small mod done to the firmware by the factory. The daughter card added on by NML was just a user replaceable buffer op-amp to provide some protection against ground loops.
    ~
    Steve
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  7. #7
    Join Date
    Nov 2017
    Location
    Seattle, WA
    Posts
    97

    Default

    Quote Originally Posted by stephenhazel View Post
    ok per my laser's docs, iiiif i were using QuickShow-XL, I'd set the color settings to...

    3 color RGB "analog with log response".

    the min and max voltages are just 0-100% for all 3 (r,g,b)...

    So I'm guessing I put logarithmic values in my 256 element array of 2 byte unsigned integers.

    Actually, 32767 is what EtherDream wants for the max of r,g,b.
    So 256 element lookup table, first element 0, last 32767, and logarithmic values in between i gueeeess...

    Weeeee shall seee...

  8. #8
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    keep in mind that the standard way to convert an RGB unsigned char to signed 16-bit short int is to bit-shift it up 7 bits.

    That's the same as multiplying it by 128.

    255 * 128 is not 32767.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  9. #9
    Join Date
    Nov 2017
    Location
    Seattle, WA
    Posts
    97

    Default

    Quote Originally Posted by james View Post
    keep in mind that the standard way to convert an RGB unsigned char to signed 16-bit short int is to bit-shift it up 7 bits.

    That's the same as multiplying it by 128.

    255 * 128 is not 32767.

    Right - that's what i've beeeeen doin tho. That's "linear" aaand it dun't werk.

    I think the logarithmic thing is what i'm missin. I'll find out in hopefully less than an hour sigh.

  10. #10
    Join Date
    Jul 2008
    Posts
    768

    Default

    Quote Originally Posted by stephenhazel View Post
    Right - that's what i've beeeeen doin tho. That's "linear" aaand it dun't werk.

    I think the logarithmic thing is what i'm missin. I'll find out in hopefully less than an hour sigh.
    Maybe you're just looking for Gamma Correction.

    For each RGB channel where Gamma > 0

    A Gamma of 1 is a null op, greater brightens mid-tones, lesser darkens.

    For a scale of 0-255:

    InvGamma = 1/Gamma
    ColorOutput = 255 * (ColorInput/255) ^ InvGamma

    This more cryptic form iterates much faster:

    LN255 = LOG(255)
    ColorOutput = EXP(LOG(ColorInput - LN255) * InvGamma + LN255)
    Last edited by dchammonds; 01-23-2019 at 18:02.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •