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"

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?


Product Version: Not Selected
more ▼

asked Jul 09 '14 at 04:41 PM in Using UE4

avatar image

1 2 3 5

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

2 answers: sort voted first

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.

more ▼

answered Jul 09 '14 at 07:58 PM

avatar image

1k 42 28 65

avatar image mikeesupercrunchy Jul 11 '14 at 02:28 PM

Cheers this helped a lot.

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

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 :) alt text

more ▼

answered Jul 09 '14 at 05:09 PM

avatar image

9.3k 286 65 332

avatar image mikeesupercrunchy Jul 09 '14 at 05:34 PM

Cheers for the answer wasn't aware of this node, looks like it only works with texture object nodes and not Parameter Texture Sample nodes which is more what I need for a master material (forgot to mention that sorry).

avatar image Niberspace Jul 13 '18 at 01:34 AM

A texture object can be a parameter as well. Just use TextureObjectParameters instead of TextureObject

(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