Tiling texture scale based on actor scale
Hi, im looking to use a single material instance with a tiled texture that changes its tiling based on the actors scale its placed on (e.g. on a rock mesh that has been scaled up also scales up the size of the tiling texture which isn't always good). Is there a way that you can get the actors scale transform and use it in the material to multiply against the tex coordinate?
asked Jul 09 '14 at 04:41 PM in Using UE4
There are many ways to do this. Some of them are:
A) Use the "ObjectScale" node. The problem with this is that it isn't compatible with the pixel shader.
B) Use the "ObjectRadius" Node. Divide/Multiply Object Radius to a scalar parameter so you can control its effect, then multiply it with a Texture Coordinate input.
C) If you want different values per object, you can use a Dynamic Material Instance in blueprints. Simply use "Get Actor Scale" and use that to control a Scalar Parameter in the material linked to the texture coordinates.
Hope this helps you.
The "WorldAlignedTexture" node can do that. The texture size will be constant no matter how big the mesh gets.
Here is an image to get you started :)
answered Jul 09 '14 at 05:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here