x

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. 

Material to make hollow cube?

Hi all,

I'm currently trying to make a grid like material for a cube that masks the top and bottom faces (i.e. only the four walls of the cube are grid like, all other sides are hollow). See the figure below, where the blue check marks are good, and the red x needs to be masked.

alt text

I'm using a custom material which cuts the gameobject into a grid by using its world and object position, and then inverts the material to create a grid-like opacity mask. See figure below: alt text

Anyways, I'm a little stuck on this and does anyone have any recommendations? (Would also love to find a way to remove the glitching that occurs when the grid size is overlapping, see preview window top side of cube by material of blueprint).

Thank you for your time!

Product Version: UE 4.21
Tags:
capture.png (308.4 kB)
c1.png (483.8 kB)
more ▼

asked Feb 21 '19 at 07:18 PM in Rendering

avatar image

anoxxi-dis
6 1 2

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

1 answer: sort voted first

if you aren't rotating the cube the vertex normal vector for the top face is 0,0,1 the other the side faces are something,something,0. I think the bottom face is 0,0,-1 so I think if you took the vertexnormalws then use a component mask so you only get the blue channel, then use and abs node, you should get a mask for the top and bottom of the cube.

more ▼

answered Feb 22 '19 at 05:58 AM

avatar image

IndieGameCove
1.2k 8 4 10

avatar image anoxxi-dis Feb 22 '19 at 05:20 PM

It worked, thank you so much @IndieGameCove!!! alt text

capture.png (261.8 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