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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Gradient material on Cylinder


I'm trying to achieve this kind of color on a cylinder mesh:

alt text

But when I apply it, in the game world it has this colored top:

alt text

Any idea how to fix this?

Regards, Damir

Product Version: UE 4.10
capture1.png (237.6 kB)
capture2.png (270.8 kB)
more ▼

asked Nov 20 '15 at 08:09 PM in Using UE4

avatar image

Damir Porobic
211 12 8 20

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

2 answers: sort voted first

If you want an solution independent of the Mesh UV's you could try to go for a world/object based gradient. I recently needed similar on a candle/cylinder like object to fake the subsurface scattering of candle light. I'm not saying this is the best approach and it for sure can be optimised improved. But this will give you a gradient like you want independent of Mesh uv's. You can adjust position of gradient, feathering etc with the scalar parameters. There are more ways to approach this than the one provided in the image. Thought the node set up below does exactly what you want. alt text

more ▼

answered Apr 29 '17 at 01:55 PM

avatar image

46 3 5 7

avatar image JasonPowell May 02 '17 at 07:06 PM

What is the the component between the subtract and mask on the top chain?

avatar image Mfatal May 05 '17 at 09:47 PM

One minus, or press O key and left mouse click. this inverses the gradient. I actually needed mine without One minus, where the gradient would be full on at the top. But in the original question the opposite was asked. Its good to remember the one minus its a very common and extremely useful mathematical node. In my case I needed it without the one minus.alt text

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

Hi Damir!

I'm a bit rusty at the moment so I'm sorry if I'm not that helpful. Have you tried making a cylinder in a 3d software and UV unwrapped it? You could use those UVs to make a texture to mask the top face off of you cylinder, or just add two different materials for the mesh, one for the bottom (however you want the bottom face to appear) and top faces and one for the rest of the model. Make the first material just a simple red color and whatever opacity you want on that and the second material just like you have on your original material. This way you won't get the unwanted effect on your top face. I hope this was helpful!:)

more ▼

answered Nov 20 '15 at 09:19 PM

avatar image

89 22 22 23

avatar image Damir Porobic Nov 20 '15 at 09:34 PM

Hi EliasPa,

Thanks for the suggestion, I've been thinking myself to go in that direction but I have literally zero knowledge about 3d software so I though it should be somehow possible to do in UE4 as it seems pretty simple... I find it strange that the preview is showing one behavior and in the real world something different.

Regards, Damir

avatar image EliasPa Nov 20 '15 at 09:48 PM

Yea no problem. It should be something really simple i think but as i said I'm not the best at this stuff so i can't really think of any other solution, sorry. As to why the result is different in game, i think the preview mesh has really simple UVs and they differ with the actual starter content's cylinder mesh's UVs. The 3D modeling solution is really quite simple if you want to that with just a little bit of studying a 3D software. But i understand if you don't want to do that, I'm sure someone else will provide you with a little bit more information on how to do it in the engine:)

(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