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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Layer blend node broken in mobile shader?

Been stuck a LONG time. After several trouble shootings and redos I have gotten down to something pretty simple

I have a single green/brown grass texture 64x64 Connected into a make materials attribute node. Into a "layers blend" node Into the material output set to use the material attributes.

It renders in the PC shaders 5 or 4. But will not display in the mobile shaders.

I have a more complex landscape material I will eventually use but, it wouldn't render so I created a small landscape and went through. Everything works fine displaying until I put the layer blend node in there.

I have tried setting it to alpha, height and weight. I set the auto weights to different numbers (currently 1)

So it appears the layer blend node blocks it during mobile preview (I have tried the high end and Android)

If anyone can share ideas on what to look at next and/or screen shots of settings they have used to make it work I would much appreciate it. I have literally been stuck months

Product Version: UE 4.20
more ▼

asked Sep 25 '18 at 07:51 AM in Rendering

avatar image

43 4 4 11

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

2 answers: sort voted first

I returned the out put into the normal material node (untick the use material attributes.) Deleted all the make material attribute nodes

Copy and pasted the layer blend node for each input (normal, rough etc) that Was used for anything. And put them all in the appropriate spots.

fixed it.

more ▼

answered Dec 10 '18 at 02:01 PM

avatar image

43 4 4 11

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

I'm in the opposite situation. My project works on high end mobile preview but not on sm5. I've also located the problem "within layerblend", shader doc indicates that "there is no texture input". the version is also 4.20.

wtf is wrong with this layerblend node

more ▼

answered Sep 25 '18 at 10:05 AM

avatar image

1 1 4

avatar image Cultusfit Sep 25 '18 at 10:54 AM

I dont know. I was having the same trouble right before 4.20 in 4.19

I did have a lot of things not quite right being the first project, texture sizes and numbers. But I know with my current test of a single 64x64 texture that I went node by node the problem happens when I add in the layer blend.

When I get a chance (today is busy so probably tomorrow) at home I'll take bunch screen shots and post them. Maybe if you do too we can figure out what the two of us are doing different and work it out?

avatar image darktemplar Sep 25 '18 at 01:06 PM

yeah, we do should work together. Those landscape materials giving me trouble, were imported from an v4.19 project..... another similarity.

But the funny thing is: It works in v4.19, it's not black. So, there might be sth different between 4.19 and 4.20. Since I'm not an experienced player with unreal, this problem is really giving me hell.

I'm guessing, there is sth wrong with the shader code generation, maybe sth cached for "high end moble" in my case. cause I look into RenderDoc, there is no texture unit of any of those terrain textures. there is no input at all. But I can't find the exact line of shader code which is responsible for this.

may the force be with you~

avatar image darktemplar Sep 25 '18 at 01:54 PM

alt text

left side: code generated with layerblend right side: code generated with my custom blend

you can see: there is no texture sampling code on the left side! the terrain textures are not sampled at all, so it's black ........

blendcompare.png (126.2 kB)
avatar image darktemplar Sep 25 '18 at 01:58 PM

alt text

upper: layerblend lower: my custom blend

I just need to figure out which vertex attribute did unreal used as blend weight for layerblending.

nodescompare.png (108.1 kB)
avatar image Cultusfit Sep 25 '18 at 04:02 PM

Oh...i have no idea what most oalt textf you lines of stuff is. I can't code. I've gone several times to pick it up but, it just doesnt really stick very well. I can do the easy stuff then suddenly I dont understand a thing.

alt text

alt text

Here is my set up right now i'm working with. Doesn't get much easier than that. A single 64x64 (so square and power of 2) testure Set to fully rough I have it set to wrap right now. But have tried the others just to be sure. It is set to fully rough. (i've also tried unlit)

Unless something has happened I have all the settings turned down as low as I could. Where several of the shaders used for lighting and stuff are disabled... Entire level is just a 4x4 landscape set with 2 sections per. A skylight, and atmosphere fog (in shader 5 the black was annoying me), a cube, and a point light. That way I could make sure the lighting was working, and all that (as I've had it show up black on black too)

The mobile stats button is now gone. And i was playing with the stats. Got a warning I need an offline compiler. I will have to look into this and see if it effects anything.

basicrendering.png (192.1 kB)
shader5.png (330.6 kB)
mobileshader.png (151.5 kB)
avatar image darktemplar Sep 25 '18 at 04:29 PM

as an update, I found sth wierd during the shader generation. I'm comparing "sm5 compilation" with "high end mobile compilation". It' gonna take me some time and it's late now(00:27). I'm gonna continue the dig in tomorrow. Wish me luck. Anything I found shall be shared with you for sure. :)

avatar image Cultusfit Sep 25 '18 at 04:12 PM

alt text

This is new. I never saw it on 4.19 and it's where it used to say mobile stats. I might try downloading some of these offline compilers it speaks of. If it turns out that I just dont even have the shaders in the first place....

stats.png (32.6 kB)
avatar image darktemplar Sep 26 '18 at 06:04 AM

good luck with that, might sovle your problem :)

avatar image Cultusfit Sep 26 '18 at 06:10 AM

Turns out I did have the shaders, installed to proper file and everything. Seems when I updated just some project settings may have gotten bit tweeked. I got the nice "this is already installed at..." Message.

So today will be going back through project settings and making sure they are set right.

Everything on stats shows good though. Shaders are bit high for one texture, so I presume some of the lighting ones and stuff I had turned off are back on. 4/8 used for one image.

No errors. Nothing in logs. I just don't know...

avatar image darktemplar Sep 26 '18 at 06:11 AM

alt text this is how my material editor looks

avatar image Cultusfit Sep 26 '18 at 06:14 AM

Mine was the same. I already had the one from documents installed. I just had to reference the .exe there to get it turned back on. Having gotten that months ago I had just completely forgotten and probably the update messed with some of my settings.

Here is the one from the documents: https://developer.arm.com/products/software-development-tools/graphics-development-tools/mali-offline-compiler/downloads

avatar image darktemplar Sep 26 '18 at 12:26 PM

so, your problem is gone now? if so? congratuations!

Mine, on the other hand, more complicated. I found the direct reason but not the way to sovle it...

When I'm done, I'm gonna post it here

avatar image Cultusfit Sep 26 '18 at 02:42 PM

Nope. Still doesn't compile. It actually made it more frustrating. Having the stats say that everything is OKAY and it STILL not work is more upsettingalt text

newstuff.jpg (31.2 kB)
avatar image darktemplar Sep 28 '18 at 06:11 AM

Sorry,for the delay. I solved mine the day before yesterday.

The problem on my side is: When I migrated those landscape from the original 4.19 project to 4.20 project, parameters(for sm5) are lost for those material instances. the hlsltranslator finds no params for it to generate sampler code. so no texture is sampled and those landscapes are black.

The difficulty which took me so much time is: I don't know how to generate them. They were handled during the editing proccess, I got stocked.

And finally I just took a wild guess "may be I make an new instance of the broken material on sm5 shall force the editor to generate those params for me". It worked. WTF! alt text

15379663179969.png (713.3 kB)
avatar image darktemplar Sep 28 '18 at 06:17 AM

do you have programmer friend? your problem is very much related to your develp enviroment. Maybe ask him/her to have a look at your env? offer him/her a beer? :)

avatar image Cultusfit Sep 28 '18 at 06:20 AM

My friends can barely tie their shoes. I spent 20 minutes today helping one post a photo to Facebook.

I have a few I chat with on discord as "friends" They have looked at what I have and can't come up with anything wrong. One has several small endless runners and stuff on Google play even. Swapped all the settings to same. They use and nothing.

Something somewhere.... Ahhhhh

avatar image darktemplar Sep 28 '18 at 07:28 AM

have you tried to compile the unreal engine editor your self? It's very easy and "it downloads the dependencies automaticly". May solve your problem.

only thing you need is visual studio 2017, it's free.

after you download the unreal src code, follow those pics below

alt text

alt text

avatar image darktemplar Sep 28 '18 at 07:30 AM

unreal src code can be downloaded with those instructions


this chinese version, but you can modify zh-CN to en to get english version

I shall be around :)

avatar image darktemplar Sep 28 '18 at 07:36 AM

forget to mention, after you launched UE4.sln, press f5 to generate unreal4 engine exes, It takes time.

avatar image Cultusfit Sep 29 '18 at 03:21 PM

Oh geez... I just want a landscape with couple layers on mobile...what were you saying to do to make the English version?

avatar image darktemplar Sep 30 '18 at 08:22 AM
avatar image Cultusfit Oct 06 '18 at 06:10 AM

Nothing seems to work. I tried all that. Realized also my android SDK were only partially installed (think it got lost in that whole update thing.) So i reinstalled them. Then made sure that preferences were pointing to the right files. Updated it to target newer android devices setting few things like it said in the documentation I was rereading

only thing it changed was the shader previews. I now get this weird brown ![alt text][1]

when i look at the stats I notices there is a lot of things applied to the landscape from the layer blends. I am wondering if it uses samplers and causes it to go over. ![alt text][2]

might be a certain way i need to apply the layers rather than that node? [1]: /storage/temp/255790-complexity.jpg [2]: /storage/temp/255811-textstat.png

complexity.jpg (26.1 kB)
textstat.png (100.6 kB)
(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