How to make a material that turns a cube mesh into a grass bilboard?

How can I do something like this?


I want to make a material that will turn a cube mesh into a bilboard thing.

Hi! There is a material node called InteriorCubemap. I think you can adjust settings to get desired result. 100 UE4 Tips and Tricks | Unreal Fest Europe 2019 | Unreal Engine - YouTube This is video from UE4 conference a take a look.

I’m not really good with the material editor so I’m not really sure how to do that even with that node

As I understand, you want to take a cube and change its shape so it looks like the combination of 2 intersecting 2-sided quads.

Assuming the cube is broken along the edges, you need to:

  • Multiply the vertex normal with negative half cube edge length
  • Connect the result to World Position Offset

Also, we’ll get rid of the top and bottom faces:

Since this is for grass, I guess you are already using a masked material. So, masking makes sense. You can multpily your current mask with 1-abs(Z component of vertex normal) to mask them.

Thank you!