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"

World Composition Landscape 1 Material per tile blueprint?

Hello my friends!

We are a team working on a huge landscape pipeline-project in UE4, Right now we have 600 heightmaps (1km each), So we are working with World composition to load the 600xheightmaps to make the tiles making up the landscape. My college who generated the tiles also generated a ortophoto/texture for each tile + a material ID mask for stuff like grass/trees/mountain etc.

The problem: We want 1 Landscape material instance per tile = 600 Materials(instances of master mat).

My first approach was to create a blueprint to loop the tiles creating a Dynamic Material Instance for each tile and use the name of the tile to lookup the texture and set the diffuse texture parameter of the Dynamic Material Instance to the right texture. Super easy stuff right? It turns out that Landscapes does not support Dynamic Material Instances.. I tried this both with Call in Editor and at runtime.

My next try was to do some editor scripting(blueprint and Call in Editor) and create Material Instance Constants in the content browser. So I manage to loop the tiles, create a new material instance in the content browser and assign them to each tiles. Im now stuck on a way to script change the texture parameter of each Material Instance Constant in the content browser since doing things one-by-one is not an option in our pipeline since we are working with so many tiles. So this got me very close, 1 mat instance per tile and they are all assigned to the right tile, just cant change the Texture parameter of each mat, so I have unique mats on all the tiles but they are all the same since I cant change the texture input of them^^ (see picture) alt text Any Ideas or other solutions?

we also had a idea of MEL-script the creation of the materials in Maya/Max with the right textures and then drag and drop import them into UE4, that would get us all the 600 mats with the right textures and the just loop assign them to the right tiles but this would not work since we need them to be Instances of the Landscape Master materials so we can spawn trees and do some advanced Material actions

I need the big brains of the community on this one!

TL;DR we have a tile based world composition landscape made up of 600 tiles (1km each) and we have 600 textures, one for each, how do we make a blueprint/script to create material instances of our Landscape Master Material, hook up the right texture and assign them to each tile. Doing things by hand is not an option, needs to be automated. Dynamic Material Instances does not work with landscapes(?)

Product Version: UE 4.20
forum-question.png (163.5 kB)
more ▼

asked Oct 17 '18 at 05:16 AM in Blueprint Scripting

avatar image

1 1

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

0 answers: sort voted first
Be the first one to answer this question
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