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. 

Mobile Textures, reducing cost/shaders

Alright. So I made the mistake thinking that if I set in project settings that I was targeting Andriod, with basically everything set to the lowest settings, and kept mobile stats on, that UE would warn me if I was doing things that the devices wouldnt handle.

I spent a lot time learning to do my landcape and set up the layers. Had ton of problems with things going checkerboard etc. But Finally had it looking great. I did presume the area might be too big, and I might have to reduce size, cut down on details and lighting to get it to run decently etc. So after I had the "level" in place without any characters/npc etc I decided I would attempt packaging just as a test and let my friends side load and see what Happened. (packing failures) In process I learned how to do mobile shader previews, found a lot more mobile documentation than I had seen originally. etc.

After going back into my materials I have set them to "fully rough", activated HDR, and few other settings that I have no idea what they do but, the documentation recommended it for performance. This is what my shader preview look like: alt text

I dont really know WHAT cost is so high. I do understand the instance foliage (not supported according to documents, but I have seen post about it so documents are out dated or there is a work around?)

I did run the level in mobile preview and was very unhappy with how everything turned out. It took an extremely long time to load, with the compiling shaders counting up to about 12,000

(I would appreciate if anyone could explain, does it count UP to how many it has compiled or down by how many are left? I have it count both ways at times and I'm quite confused what's going on.) The building's materials load up, as do my character's. The foliage loads but, only at distance, looking green -yellow for flowers- far away then popping to grey as you approach. The landscape does not load at all. The water (a cube with the material from the water project M_lake applied, loads)

alt text

My Landscape is set up like I found for a tutorial (of course mostly meant for PC so i'm sure I have limits not described/addressed). And is set to fully rough in the final material.

All my materials that are plugged into that are pretty basic alt text

An albedo, a normal and MAYBE a couple constants if it was too shinny (plastic grass?!?) and set to wrap. I'm not sure how to make them LESS than this? Reduce cost? Get them to actually show in the ES shaders? There is another texture I will use. Has some values set in the RGB that I most frequently use for metallic and roughness (channel packing if I have done it right) and I will use the SAME texture in all those materials that dont use a constant of 1 or 0 When I run no alerts/warnings. When I compile everything goes fine, with is saying things like 30 shaders on my landscape (and clearly most complicated material since it has FOUR of the other materials put into it)

When I change preview to the mobile shaders, it take about 10 minutes and has to compile about 12K shaders. When I attempted to launch it to my phone, everything LOOKED great at first moving quick counting down from 300 shaders, then jumping to 1K, then 6K then it kept counting up untill it reached 24K. It seemed to freeze there for about 15 minutes. Then loaded up something about a static mesh, that move to 85% in about 10 seconds then froze for atleast 10 minutes (task manager and a process app show it was still doing it's thing with CPU and disk usage still moving up/down)

I gave up around that point. Went to bed. The GPU display looks fine. As far as I know how to read it. But of course that is on the computer, and as far as I can tell the most important materials arent loading at all.

How can I reduce their cost? Get them to actually show on mobile? alt text alt text

Product Version: UE 4.19
untitled2.png (165.8 kB)
untitled3.jpg (161.6 kB)
untitled3.jpg (337.4 kB)
untitled3.png (216.4 kB)
untitled.png (59.8 kB)
more ▼

asked Jul 11 '18 at 05:27 AM in Rendering

avatar image

43 4 4 11

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

1 answer: sort voted first
  1. You need to disable HDR anyway cuz it consume more perfomance .

  2. Making your material fully rough will save much computational power since will be no spec.

  3. make ur texture always around 512 to 1K .

  4. use jpg or png, since they are small in size . and pack your project mostly to ES2 format.

  5. material creating for mobile should be very simple, dont use more than 8 texture samplers , even 8 is too much for low end mobile gpus.

  6. make your lights static and bake it.

  7. your objects should be low poly bec higher number means more complexiting.

Follow this link for more reading and understanding. Mobile Optimization

more ▼

answered Jul 11 '18 at 08:39 AM

avatar image

Omar Vector
435 16 16 29

avatar image Cultusfit Jul 11 '18 at 08:51 AM

Yeah I found other documents that said the HDR was higher cost. When I read UE documents I felt it was saying that was better (it seems to look better without it any way?)

Most my materials are fully rough. There are few stragglers that I was just now cleaning up. Doesnt seem to help anything to be honest. I assumed setting it to fully rough I could remove roughness textures and Spec textures. But now the materials have that supid shine back that everything has by default.

you mean the actual texture size right? 512 to 1024? as 1024 is above the 1K you recommend I presume getting everything into 512 (power or 2) perfectly square would be best. And is easily done. I'll just open a image editor and resize them.

Everything is jpg or png as it is. I tend to use the png just because they edit bit easier, and i do almost everything in that in my program so it's default save.

Big question: how do I reduce it to 8 texture samplers? Is that per WHOLE level? or per material? I did recently find a post that said the Shared: Wrap should be default used. And it's just auto on texture because of the breaking of old materials. When I changed this on materials I noticed the compiling shaders dropped from ~250 to 30 for a material. Am I correct in using this? Can you explain when I would use each one please? I am COMPLETELY new to the material stuff

UGH. I was hoping for dynamic lighting. Game is based on undead/evil wizards. Was hoping to have a "time of day" thing based on when you loaded the game. Is it possible to bake lighting that changes colors? I might be able to get away with just having the hue/intensity change to simulate the same effect without any direction applied.

what's a good poly count for mobile? I've seen 65K is the top according to documents. and the closest I get to that is ~20K for the entire main character, clothes, face all together. Is that in the acceptable range?

avatar image Omar Vector Jul 11 '18 at 09:16 AM

For the material part , check this tutorial from epic games, I started from here too Introduction to materials. "btw, they also has more tutorials that cover much more , you have to take a look to them.

Every texture node or paramater node you add to your material , is act like a sampler. when creating material for mobile it should not perform much computation like sin and cos , lerping and multiplication unless its very important.

For dynamic lighting , simple words, mobile and dynamic lighting dont mix , otherwise use mixed model with is called "stationary " you can find also good documentation about it.

Polycount, 20K for an entire character , thats too too much, try to optimize it more and more , in general you can create one with 5K .

There is a long way to get use on unreal engine, but good news is there are a lot of online tutorials that will guide you, and dont expect you can make a game from first day . it gonna take a lot of time to make something touchy .

Best of luck .

avatar image Cultusfit Jul 11 '18 at 11:04 AM

You gave me a clue to a large problem. I have maths. Lots of maths. Aren't anything important. I could literally have opened a image editor and turned brightness or contrast bit to fix it. I had assumed things like *.1 are so easy it wouldn't matter. But if they can be a problem then the number of times I did it is BAD. I've done quite few tutorials. They are so long though and leave out stuff I have no clue on or talk about things so far above me. I need a nice middle ground where we cover things beyond default settings and explain WHY (I just turned all my texcoord nodes to index zero, I saw ONE tutorial where he set it to one, no idea why, and have been doing it since. ) Getting character down to 5k. I know I can cut a lot (like parts of arms/legs/clothing INSIDE clothing,I can use smoothing. I've gotten better, I use less poly to make things too. I was taking 10x the amount to get same effect Stationary is more what I wanted any way. Can be moved by the game but stays put, got errors when trying to use it. INTENDED to use something like a blob shadow settings (from what I read there isn't one in UE) and retrieve system date on level loading and use it to set the sun's color (yellowih for day blueish for moon) and angle then just stay there until level was finished. Looking at a skylight now and just changing intensity and color. Should be close enough to effect I want. Is that okay? No landscape!?! Whole idea was to make "levels" in the landscapes (which after ton problems importing static meshes and reading post talking about how easy it was/prefered I went to them) then make a world map lanscape which uses like 1/20th scaled height map on the same resolution (so looks similar but not as detailed and world map was same size as a level map) to go and choose levels. What should I look into as the alt?

avatar image Omar Vector Jul 11 '18 at 09:19 AM

and one more thing, try to avoid using terrain on mobile, unless its also necessarily

avatar image Cultusfit Jul 11 '18 at 11:11 AM

Alright. I'm gonna mark as answered since I have enough to work at and look into. Now. I noticed it has the mobile shader thing during time after you press "apply" with my highest so far being 3/8 (I can't imagine a whole level being under 8 for some these good looking games!)

I'll remove my maths, there quite few things I can cull down. I'll get it done. Then repost if have any new/more problems!

Thank you very much for answering me and answering again etc. I'll stop picking your brain for now.

avatar image Cultusfit Jul 11 '18 at 12:24 PM

alt text Shader complexity after removing maths, and setting everything to shared wrap, unlit.

DRAMATIC drop we see. Landcape texture still didnt load but when compiling shaders it went from 12K+ to 600 as the displayed number. Quite the drop

untitled3.png (26.4 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