If Else Material Statement

I have a scene with several arch pillars and I want each pillar to have a different image projected onto it.

All of the pillars are instances of a single blueprint, so instead of deleting the blueprint and rebuilding the scene I wanted to make a single material that would display a different image based on the pillars position in the world.

So the logic basically looks something like this:

int pillarPosition = world position on the Y axis;
int threshold = my desired threshold;
int threshold2 = my desired threshold for second division;

If (pillarPosition >= threshold){
 Display Image 1;
}else{
 Display Image 2;
}else (pillarPosition >= threshhold2){
 Display Image 3;
}

In the material editor using the if statement I can only build enough logic to get up to “image 2”, because the “if statement” available in the editor doesn’t have an else command.

Is there anyway to do this?

Please see my screen shots below. The first one shows my scene with the pillars that I want to display images on highlighted in white. The second one is a screenshot of my material editor.
232503-

1 Like