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"

How to scale a texture's UV 'from' the center?

So, this is something I've run into several times... I'm trying to create a simple 'zoom' effect within a dynamic material and want to be able to scale a texture's UV's while it maintains its position, centered in the material (as opposed to locking to the top left corner and wrapping or tiling).

Does anyone know a way to do this?

alt text

Product Version: UE 4.10
scale¢eruv.gif (62.7 kB)
more ▼

asked Dec 02 '15 at 07:16 PM in Rendering

avatar image

163 14 20 32

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

1 answer: sort voted first

Hi SVR33 -

We have a Material Function in the Engine called ScaleUVsbyCenter which you can search for in the Material Editor.

Thank You

Eric Ketchum

more ▼

answered Dec 02 '15 at 08:00 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

avatar image SVR33 Dec 02 '15 at 08:02 PM

Holy smokes... I even looked in there for something named exactly like that! Not sure how I missed it. Thank you so much, Eric!

avatar image RobertRamsay Dec 07 '18 at 10:12 AM

would be interesting to know the math involved in that, I need it for something else.

avatar image Osiris2000 Mar 23 '19 at 02:32 PM

If your center = [0.5;0.5], then ((UV-[0.5;0.5])*Scale)+[0.5;0.5] Another words, you just move Center Point to [0;0], scale it and return it to its initial position.

avatar image TristanPiejn Feb 28 '19 at 04:44 PM

How would you scale UVs from a given position? As for example (0.7 , 0)?

avatar image SVR33 Feb 28 '19 at 05:03 PM

Take a look at the function Eric mentioned. I'm not at my computer at the moment, but I'm fairly certain it takes a vector 2 "position" input (which is 0.5, 0.5 by default)

avatar image SVR33 Feb 28 '19 at 07:32 PM

Got back to my computer to realize that wasn't right... try "ScaleUVsAroundPoint" function instead.

(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