x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Colour gradient like photoshop

Hi - alt text how can I get and Unreal Linear Gradient material to look more like a Photoshop gradient. In the pix, the Unreal one seems to be white in the middle whereas the Photoshop on has more color.

alt text

Product Version: UE 4.19
Tags:
more ▼

asked Sep 09 '18 at 03:28 PM in Blueprint Scripting

avatar image

Gibson_Martelli
14 5 4 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

I have heard that the dark gradient in PS happens because the color values are stored as their roots and later squared. The gradient function works with the root values instead of the actual ones, which causes the colors to become darker. I speculate that the gradient function of UE4 uses the regular values instead of the roots to interpolate the color.

It might be possible to simulate the PS gradient, if you take the roots of the individual channels, calculate their gradients, square the results and put them together again. (I am not at a pc with UE4 at the moment so I can not test if this answer will work or not).

more ▼

answered Sep 09 '18 at 05:27 PM

avatar image

UDKAP
464 29 42 64

avatar image Danny88881 Sep 09 '18 at 10:32 PM

alt text

gradienttest.png (358.4 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hello,

Probably, most of this difference is because you selected wrong colors:

  1. The pink is not (0.835, 0.00955, 0.538) but something like (0.922, 0, 1).

  2. The green is not (0, 0.561, 0.08648) but (0, 1, 0.00913).

My values are not perfect too but much closer to the PS, because I used the color picker:

alt text

Also keep in mind that the preview scene is not a Texture/Image, it is a scene, it has a light etc and this changes the final preview result. Press L and Left Mouse Button to see how light direction is affecting the result.

ue4-colorpicker.png (258.3 kB)
more ▼

answered Sep 09 '18 at 05:48 PM

avatar image

XevotPhoenix
36 2 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Actually I started using a Photoshop Black & White gradient as the Lerp input rather that the Lerp node, this gives better results. And XevotPhoenix I wasnt trying to replicate the colours exactly, i just wanted all my colours in Unreal to better simulate the Photoshop saturated look. Good point about lighting in the scene. I am using unlit material, however.

more ▼

answered Sep 09 '18 at 08:01 PM

avatar image

Gibson_Martelli
14 5 4 9

avatar image XevotPhoenix Sep 09 '18 at 09:38 PM

Well I didn't notice your material settings... UDKAP with his post gave me the idea to add a power(x,2) after the lerp. It is a bit closer to the PS result:

alt text

test.png (4.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question