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"

black mesh on mobile

I am using a spline to create a underground tunnel "in game". I am using one box mask so above the level is transparent, during the level is coloured and below the level is transparent. This works fine in editor and when deployed to IOS. alt text

I wanted to add a second background below the first one with the spline colour transitioning at the same point as the new background. I added another box mask and this works fine in the editor though the mesh is black when deployed to IOS. alt text

I have been stuck on this for weeks. Any suggestions - please help!

Product Version: UE 4.13
image1.png (133.2 kB)
image2.png (205.8 kB)
more ▼

asked Oct 03 '16 at 10:58 AM in Rendering

avatar image

5 2 4 4

avatar image Deathrey Oct 03 '16 at 11:05 AM

I do not think it is exactly clear what are you trying to achieve and what you are getting instead. Isn't it the same question as here?

avatar image davidaxelrod Oct 03 '16 at 11:13 AM

yes similar, that was also my question :-) I though I would try and make it clearer but I think I have failed. The 2nd example above is exactly what I'm looking for but when I deploy to ios, the mesh is black. The first one is also adequate, it works on IOS but it means I cannot change the background when I go deeper underground. I'm not sure why the first one works on IOS and the 2nd is black. Maybe you cannot have two masks on IOS?

avatar image Deathrey Oct 03 '16 at 11:30 AM

So, do you want to just fill the tunnel with red color below ground and black color above ground?

avatar image davidaxelrod Oct 03 '16 at 12:15 PM

Hi, In the second diagram to the right is how I wanted it to look like.Transparent above ground, brown below ground until you get to a specific point when the material changes color inline with the background (harder rock) (grey). Then to maintain this color until you get to end of the background at which point the mesh will be transparent again. It is working as I wanted in the editor which is illustrated in the 2nd diagram with the material set up and game editor illustration. The problem is when I deploy to IOS the mesh is rendered completely black.

thanks for your help


avatar image Deathrey Oct 03 '16 at 03:30 PM

For simplicity, you could just check position on one axis to get the effect, instead of using box mask.

Regarding it rendering black, meanwhile you wait for someone keen on iOS to drop by this question,you could try removing parts of your material graph one by one and localize the part, that is causing the issue. I bet it has something to do with WS position node inside the box mask. Might be also worth to check the logs.

avatar image davidaxelrod Oct 03 '16 at 03:38 PM

Thanks for your comments. I am happy to use any method that gets the same effect. Could you expand a bit more on your first suggestion? How would I go about checking the position on an axis and applying the effect?

thanks loads

avatar image davidaxelrod Oct 04 '16 at 08:48 AM

Thanks loads for you help. I managed to get it working on mobile with the set up you gave. I was still drawn back to using a mask to make the areas above ground translucent but it works. alt text

thanks loads again

image.png (167.3 kB)
avatar image Deathrey Oct 04 '16 at 08:57 AM

It still would be nice to know the root cause of the issue, why it was rendering black on iOS. Just for anyone, who might look up this post with the same problem.

Also, you can use the same graph for opacity of areas above ground. Just duplicate it, change the height value, and if you need to invert the mask, you can use "One Minus" node, before plugging it in the opacity slot. The whole reason for hassle around not using box mask is because it performs extra operations, that you do not need. It is not critical, but just slightly better. Anyway, if you consider your problem solved, feel free to upvote the answer and mark your question as resolved. :)

avatar image davidaxelrod Oct 04 '16 at 10:41 AM

I thought about using the same set up for the opacity on the way to work this morning. I will give it a try later. many thanks again, very much appreciated your help.

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

1 answer: sort voted first

alt text

It gives you horizontal black and white mask, with sharp transition at specified height.

more ▼

answered Oct 03 '16 at 03:52 PM

avatar image

7.9k 130 31 293

(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