Grid material

I would like to create a grid material very similar to the default one, but coloured. I would prefer not to rely on UV mapping or a bitmap texture. Do you know how I could make such a material ?

Thanks.

116619-2016-11-28+12_04_23-arn_map+-+unreal+editor.png

You have to use the world position or the local position to calculate what colour it should have.

This is just for black and white, but you can simply use the values to lerp between colours of your choosing.

http://puu.sh/sx6IQ/30149090d2.jpg

Thanks. Iā€™m very close to the desired materal. However the grid is not visible on the whole object, do you know why ?

116637-2016-11-28+13_39_17-arn_map+-+unreal+editor.png

Thanks for the help. I have a material that looks how I want now :slight_smile:

1 Like

Because if the way the modulo works. It only caps on the positive values. You can go as low as you want and still not worry about the modulo. So 15%10 = 5. -15%10 = -15. That is why you get that error. To combat it, just add 10^6 to the world position vector.

Hi I have the problem that this grid is not shown correctly in my world.

Do you know a solution to this problem?

This should be its own question. Ill help you there.

I also have this problem and would like to know how to solve it. Thanks !