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"

Overcoming ES2 limitations

Hello! First post here, nice to meet y'all!

I am having a problem packaging a scene for html5. The scene doesn't use anything fancy, but uses default grass from the Open World collection (M_FieldGrass). During packaging I'm getting an error:

 M_FieldGrass_Inst_01_LOD1.uasset: Failed to compile Material Instance with Base M_FieldGrass_01 for platform GLSL_ES2_WEBGL, Default Material will be used in game.

and I'm seeing a default material blob when looking at the grass from near in the packaged version (in the editor everything is fine).

I read this and this answers and as far as I understand this may be some inherent problem of html5 which unreal cannot solve on its own.

  1. Do I understand correctly that this limitation is still a problem? From what I'm reading webgl 2, that supports ES3 is supported since 4.16. How do I use it?

  2. If there's no way to make the grass as it is, is there an easy (automated!) way of setting the packaging such that it uses some less fancy version of the grass when packaging html5? As far as I understand I can edit the material myself (but as a beginner not really sure how I should do this) and then package, but I'd like to have a high-quality version in the editor that I can package for linux/windows and a lower-quality version for html5 without changing the materials every time I package for a different platform.

Is it possible? Thanks!

Product Version: UE 4.21
more ▼

asked Feb 27 '19 at 06:20 PM in Packaging & Deployment

avatar image

1 1 3

avatar image nick.shin STAFF Mar 13 '19 at 09:35 PM

i'm not sure what M_FieldGrass actually is from the Open World collection -- but if i had to guess, (from the error message you're seeing) that one might be using a shader that's not fully supported on WebGL2 (ES3).

we're in talks with a number of the browser makers and there was hope that full support for shaders would go in for webgl2.1 -- but, that's been dropped in favor of moving the advanced shader features to something called webGPU (this is still being standardized).

that said, to get your "basic grass" in the scene -- i'd recommend checking out the "content examples" project (see landscape examples).

as for setting materials based on platforms -- there's a way to do this for textures:

hope this helps!

avatar image sygiii Mar 18 '19 at 08:56 PM

Thank you for your answer. The ContentExamples are cool, thank you for pointing me there. I found there a different version of the grass that works with ES3.

NB: it would be nice to have the possibility to preview in ES3, as otherwise it's hard to know whether a given asset works in ES3, or only in ES3.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