Automatic creation of color-grading palette for UE - unreal-engine4

I'm trying to mimic colors of a real camera in the instance of USceneCaptureComponent2D using its postprocessing feature called "Color grading lookup table".
The official manual describes how to create the lookup table for that feature by manually adjusting an image and visually controlling how it looks.
I’ve got a pair of images of a photographic color grading palette (like one of these).
One image was captured by a real photo camera, and another one comes from the scene capture component.
I’ve got the PDF file with that palette, and to get the latter image I’ve put it on a wall texture inside a UE level.
Is there any method to automatically create LUT?
My main issue is the color interpolation. Physical palettes contain about 20-50 colors, but the LUT includes 16x16x16 = 4096 colors.

Related

volumetric shader won't show color

I have some volumes that I made using stacks of images and I can see them just fine in the editor preview window when clicking on the .asset file But when I try to get any shaders to work and have that view in the real window I can't figure it out! All of the volumetric rendering things I find either don't allow for transparency or they are for viewing medical data and the colors become density values and only show with no color. I added some images below to show what I am seeing. (I know my data is cloudy it's just a test set)
medical viewer data
No transparency
What i want it to look like

Which approach should I take to implementing this concept?

I'm planning on creating a simple color lookup table-based painting software in Flutter (one color palette can define colors for every image in a set, the canvas defines a source coordinate and a palette coordinate for each pixel, the color at the palette coordinate gives the color of the displayed canvas), and I'm torn between two approaches due to gaps in my knowledge.
In one approach, I can represent the canvas as cells of a GridView. This would allow me to lookup the color in the palette per-pixel, but I'm not sure how I would take the final info for the layout image and its palette and convert them to an image file format.
In another, I can represent the canvas as an Image widget and use the image library to draw upon it, later converting it to an image with image's functionality. However, I don't know how to implement a lookup per-pixel.
Any help would be appreciated. If I can call an event per pixel on Canvas/CustomPaint I'd be open to that as well. Thanks in advance!

Trouble with using Text Mesh in Unity

So the problem is that I want create such an idea. There are a table and a sheet of paper (just a Plane). I want to place some text on this sheet of paper. I read about Text Mesh and I thought that I would use it but I had a problem about it. I need to limit my text on this sheet of paper but I haven't found any borders I can place there. How can I set borders to Text Mesh? Or are there any decision I can use to handle this situation?
TextMesh does not have borders
Instead, you are probably interested in a World Space Canvas and using UI text instead. Unity has a great tutorial in the manual for setting up a world space canvas, which pretty much amounts to "set the Canvas to world space, decide on a resolution, decide on a in-game size, and position it."
For text, you actually have two options: UI Text and Text Mesh Pro. TMP used to be an asset on the asset store, but Unity has integrated it into a semi-standard package now (just create a TMP object and you'll be prompted to do the importing). TMP has several additional features and options that standard UI Text does not have, including in-line sprites, margins, text alignment, better rich-text, and so on. It might be overkill, but it is available.

GUI Layout Toolbox - Strange display with card panel object

Context
Using the GUI Layout toolbox I have created an interface which basically is divided in two parts:
A toolbar area where the user selects the way he want to see data
A preview area to display data upon selected mode in the toolbar
For the preview area I used a uietxras.CardPanel object to switch between the view modes.
Problem
After some investigations, I discovered that if I display things in 3D (or 2D) in one of the preview card using surf (or pcolor) then it alters the display in the second card. If I display data in 1D only using plot commands I have not issue!
The issue I have when using pcolor/surf in one of the preview card:
Titles and labels seem to overlay in Preview 1
Axis borders are not displayed correctly in preview 2
Legend borders (when displayed) are altered also
If I only use plot commands in both preview modes I have no issue at all and cards are switching nicely.
Test case
My real code is really long, I have thus reduced it to the minimum so you can reproduce the issue:
https://gist.github.com/CitizenInsane/54f3c1eba2293d0e5264#file-guilayoutbug-m
Simply run the code and check the checkbox "Do 3D plot in preview 1" to see the issue happening when switching between the two preview modes:
Notes
As far I know, I'm using latest version of the GUI Layout toolbox (1.17).
I'm using R2013b for Matlab
I came across this issue as well. I'm afraid I never quite worked out what the cause was exactly, and it didn't appear in a very consistent way. The issue seems to be that plots on non-selected cards are not hidden properly, and get overlaid just behind and around the edges of the plots on the selected card.
I would encourage you to raise the issue with the authors of GUI Layout Toolbox via the comments on the toolbox's page at MATLAB Central, as I do think it's a bug.
Nevertheless, the reason I never followed it up myself is that I found a fairly straightforward workaround, which may also work for you. Each time the selected card is changed, I ran a simple function that deleted all children of all cards, and then re-plotted whatever I wanted on the selected card. It seemed a bit annoying to have to do that, but it worked, and removed any of the display issues you've come across.
Ok got it, the issue has nothing to do with CardPanel themselves, it is linked to the renderer of the figure.
Trying simple code below:
figure(42);
subplot(1,2,1);
plot(rand(1,12));
subplot(1,2,2);
peaks;
shading flat;
If the figure's renderer is set to 'OpenGL' (the default) ==> there are some glitches:
If the figure's renderer is set to 'zbuffer' ==> there is no glitch:
Setting the renderer to 'zbuffer' fixes the problem.
NB: Maybe OpenGL rendering can be fixed by fine tuning graphic card acceleration settings, but I don't know ... I issued opengl software and opengl hardware commands in Matlab and software rendering is worst than hardware rendering on my machine.
EDIT: Side notes
Transparency effects are only available if the renderer is set to 'openGL'. It is thus not possible to visualize at the same time both 1D and transparent-3D data without glitches (at least with hg version 1 in R2013b).
HG2 has no issue:

What are the differences between APNG and MNG?

I know that APNG is an extension of PNG, while MNG is more of its own format (albeit developed by the original PNG developers). MNG is barely supported in any browser at all, while APNG almost only has native support in Firefox (for various backward compatibility- and decoding-related reasons, it seems).
Except all of these behind-the-scenes things, what are the differences between APNG and MNG? Does one have features the other doesn't (for example, storing only parts that are modified instead of always whole frames)? Does one have better performance or file size than the other?
APNG can create a new frame by replacing the entire image or by overlaying or blending a smaller image over part of it. To display a "pong" game you'd need a new image of the ball in each different location. APNG has essentially the same capabilities as animated GIF, but also allowing 24bit RGB and 8-bit alpha.
MNG can do that, plus it can also retrieve an image that was previously defined in the datastream and place it over the previous frame in a new location. To display your "pong" game you'd only need to transmit one image of the ball and use it like a sprite.
Much more detail is available in the specifications:
apng: (https://wiki.mozilla.org/APNG_Specification‎)
mng: (http://www.libpng.org/pub/mng/spec/mng-lc.html)