Offset level with material

Hello!

I’m trying to make a 10x10 grid of blocks have different elevation levels using a material or another very simple method of doing this rather than actually moving them up and down or going into noise generation

I’m not sure if this is possible but I’m very open to any suggestions on how to make this or other methods of doing similar things work!

Example texture where if i were to use a texture to offset the tiles the blue boxes would indicate a 100 unit movement upwards to essentially make walls in the level.

I originally thought of using a texture and World Position Offset so i could draw simple maps on a 10x10 pixel image and have this translate to each block dipending on their world position.

I’m not entirely sure how i would acheive this so any help is appreciated!

Thank you!

Do you want to be in control of which block goes up or down? Or do you want it to be randomly generated? If you want to be in control then your material idea is interesting and would work, or you could create a mouse click linetrace tool that adds 100 units to the clicked box. For random generation you could makes the boxes into a blueprint that uses a weighted bool to random choose if it should add 100 units to its Z or not.

The idea was to be in control, so i could for instance create a 100x100 texture where 10x10 is being offset on the cubes at any time, and so the level could ‘progress’ and change dipending on which direction the player was walking. For example the player was always in the center and the map around him moves.

Or just have the 10x10 levels load when a wave was completed

That’s really just a game design decision you need to make, either would work. But its more about how you want it to work.

Either method would work for what i’m doing, i’m focusing on the texture offsetting the blocks. But i don’t know how i would go on about doing it, which is why i started this question :slight_smile:

You can use world offset in the material to have it move the blocks up a certain amount but I would suggest having it instead sample from the material and move individual blocks up rather than deform a sheet of blocks.

The way i have it setup right now is that each block is an individual actor, there are 10x10 of them placed in a grid. The idea was to use 1 material with a 10x10 texture and have each block correspond to 1 pixel on the texture and if the pixel was filled it would offset 100 blocks vertically. That way i just need to change the texture for the entire map to get altered through one material.