Announcement

Collapse
No announcement yet.

Only some instances of the same material load correctly in build

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Only some instances of the same material load correctly in build

    I'm creating a simple VR game and I'm using Text Render Components in some places where I'd like to show text inside the game world attached to some actors (like tutorial texts in the level) so as not to create a separate widget for each separate sentence of text and then attach it. To make the text there look similar to how the default outlined Roboto looks in widgets (which I also use, for UI, so consistency was important), I have a material for text that looks like this:

    Click image for larger version

Name:	ue4_material.PNG
Views:	160
Size:	304.4 KB
ID:	1716271

    And while it works perfectly in editor, as soon as I build it for Android (as mobile devices are my main target), a peculiar thing happens - namely, some instances of this material work fine while some become all black:

    Click image for larger version

Name:	ue4_ingame.jpg
Views:	75
Size:	168.9 KB
ID:	1716272

    The interesting thing here is that the two actors you see above are basically the same thing. They inherit from the same class, they both consist of a flipbook and text render component with the material from above. There's also a second pair of objects in the scene, which are completely different - and there, it's the same situation - one works, one is black.

    Why is that so? I read that masked materials should be refrained from for mobile platforms but here it's not the case of performance (it's only a few sentences here and there, which is why I decided to go for it even though they're computationally expensive) but rather them not working at all in some situations.

    #2
    No ideas?

    Comment


      #3
      Or maybe I'd be just better off scrapping this solution and just creating a custom widget containing only the text and attaching them to the panels?

      Comment


        #4
        Okay, here's the solution which works like a charm here: https://answers.unrealengine.com/questions/657850/text-render-is-black-when-placed-in-shadow.html

        Comment

        Working...
        X