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"

How to mix two or more textures with tiling

Hello, I've decided to rewrite my previous question and made it a lot simpler.

I have two textures and I want them to be tiled alternately on my material, how can I achieve these effects:

1) Simple Chessboard tiling

2) Randomized Chessboard tiling

3) Randomized and Smoothly Blended Chessboard tiling

For an illustrations take a look at the picture below:

alt text

As you can see I want to have some kind of randomly generated terrain material, if possible with more than just two textures and in the best case I would have some blending effect between the different tiles.

I'm thankful for any advice on that.

Thanks for any help!

Product Version: UE 4.11
more ▼

asked Apr 27 '16 at 08:42 AM in Rendering

avatar image

133 31 30 34

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

1 answer: sort voted first

I dont know about the random/blended one, though with some decent math might be doable. There is a checkerpattern node in the material editor. (and its tiling can be controlled by a texturecoordinate node) you then drag off a multiply and connect that with desired texture. also drag off another wire into a oneminus, multiply that with the 2nd desired texture.

alt text

If you combine a few checkerpatterns with different tiling sizes.. you might be able to decently randomize which one ends up being texture one, or texture two.

You might need some math/or modify the checkerpattern material function to make it blending though.

more ▼

answered Apr 27 '16 at 09:06 AM

avatar image

9.2k 283 63 330

avatar image GullJemonStudios Apr 27 '16 at 03:03 PM

Thanks a lot! I'm still very unfamiliar with the material editor could you elaborate what the "Add" node at the end is, I don't seem to find a blue one, also what's the node that say "1-x"? I would really appreciate your help. Thanks for your effort!

avatar image GullJemonStudios Apr 27 '16 at 03:25 PM

So I've made some progress. Instead of the blue "Add" node I used the green one and it seems to work. But as I said I don't know my way around the material editor.. maybe I'm just going to make a new question about this but still: How can I randomize this now and how can I change the size (and maybe even rotation of the different tiles?

avatar image Luos Apr 27 '16 at 03:41 PM

If you rightclick on a preview node, it turns blue. 1-x is a one-minus node, and basically inverts the output. (so white becomes black, black becomes white)

The randomization, unless you know loads of math, could be created by creating a few variations of the checkerpattern, and lerping a multitude of them.

I cant help you with the rotation, and you can change the size by adding a vec2 (hold down "2" and left mouse click) put in a value, and connect it to the "tiling (v2)" input of the checkerpattern.

(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