![]() ![]() That's actually a pretty impressive Easter Egg! Ya know, if they did this intentionally to model how a real CRT display requires gamma correction. I like to think of the LUA display being the dotted curve on this chart and we need to apply a 1.0/2.2 CRT gamma correction to fix it. The most relevant bit from the wiki is the description of the formula itself:Īnother helpful chart related to CRT displays. If you'd like to see a more detailed discussion of Gamma Correction and the formula you can start at the wiki page here: It eventually led me to color correction and I finally came across the power function I was looking for: Gamma Correction So then I went in search of a reference for what this power curve formula in a 3D shader might be. That red line was the power curve embedded in the formula that my friend had just shown to me. I was shocked! If you take a look at the chart again you'll notice a red line on top of my blue plotted results. Out of curiosity, I tweaked it a bit and dropped the curve formula onto my chart. I noticed the 3D shader formula included a power curve. He then shared a formula that he noticed someone was using in an attempt to model a 3D shader. I guess it's not too surprising that a 40% adjustment factor doesn't fix the problem.Īs luck would have it, I mentioned my LUA color display issues to a friend and shared this chart indicating a power curve function. I checked the RGB values of the screenshots of the reds and plotted the results of LUA red and RGB red to produce the following XY Chart.Ĭlearly there's a power curve relationship here between what LUA displays and the actual RGB colors. I took some screen shots of progressively darker shades of red cycling through in increments of 16. This time I focused on the single primary color red and just input the RGB value (255,0,0). I reverted back to the non-adjusted RGB values and ran them through LUA again to see if I could derive a proper formulaic adjustment. The 40% adjustment didn't really solve my LUA RGB color problem. Not really the vibrant blue/orange display I was hoping for but I guess it will have to do. Well, once again the Lua RGB for dark orange looks nothing like dark orange. So we'll just grab the RGB colors again for that darker orange color on the left side of our editor (255, 127, 39) and drop those into Lua. Let's go ahead and change the white buttons on our "Power" page to something more powerful looking! Maybe a nice dark orange color. It's so dark, the value I assigned of 126 (half of 255) just doesn't seem to be registering correctly.Īh well, we'll come back to fix the alpha later. So it should appear as though it's half-transparent. ![]() Still not quite right, but it does look blue-er-er, so good enough! That selected button though, the background fill is supposed to be the same color blue with an alpha setting of 50%. I change my RGB values to: 0, 36, 102 and we get this: After chatting-up the topic in Discord someone suggests a simple fix! Just multiply all the RGB values by 0.4. So what's going on with the Lua colors here? I search the forums a bit and see others seem to have a similar problem with Lua RGB colors. ![]() I guess it is blue-ish? Maybe more like a teal? What's going on here? Did I input the RGB values wrong? This is not the blue color I was expecting.Īfter double-checking my data entry skills, it turns out I did in fact manage to get the RGB values entered correctly. We happily spawn in our craft and like magic (presto!) we get the following: Now we'll just take those RGB values for blue over to our Lua code and drop them in so our main menu pages at left appear as a nice medium blue. ![]() So we go to the color selector in the editor and select that blue to see the RGB values of: 0, 89, 255 Perfect! That blue block on the top of the display looks pretty nice. I think for the main menu of pages at left I'd like to use a nice blue. Now I'm at the point where I realize the display needs some color. In our example above we are using some simple draw commands in Lua to set the color and draw the shapes, fills, and text. Just to get the drawing correct we start with a basic (r,g,b) color of: (100,100,100) using simple draw commands in Lua. Now suppose we want to design a MFD (Multi-Function Display) for our latest creation! We start by creating the framework for our menu selector system in Lua with some default values for RGB. The left column of colors are along the bottom of the display, and the right column is at the top. I chose the two columns of colors at left for our reference. For reference, I'm also going to add an array of 14 color blocks from our standard color choices in the editor. To begin, we're going to add a large Lua display screen to our test bench build area. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |