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"

How can I flip a material upside down?

I followed the UE4 tutorials on the paper 2d project. There is a part where he shows you how to have a material repeat. I made my own texture to try this out and I have one problem. My texture has a certain position it needs to be in and when I follow the tutorial my texture is upside down. Other than that it works fine. I am unsure on how to flip the texture in that noding. alt text

Thanks in advance!

Product Version: Not Selected
Tags:
materialloop.jpg (182.2 kB)
more ▼

asked Oct 06 '14 at 09:06 PM in Blueprint Scripting

avatar image

VigeoJames
116 34 28 42

avatar image RA3ID Nov 22 '17 at 03:04 AM

This is ridiculous. I have to do all this blueprint work just to flip the diffuse of a texture? Why is there no 'flip' for UVs in UE4? Dumb.

avatar image RA3ID Nov 22 '17 at 03:06 AM

I just flipped the texture in PS, and re-exported it. Done. May not work for everyone, but for my issue, this was acceptable.

avatar image Innadiated Nov 22 '17 at 03:21 AM

There is now a 'WorldAlignedTexture' node in the materials which tiles properly for you.

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

6 answers: sort voted first

Why not just fix the coordinate system? Take the connection between the product of the AbsoluteWorldPosition node and the TextureSample (in my case, SpriteTexture), and add a second multiplication to a constant Vector2 of value (1,-1). This effectively flips the inverted vertical coordinate-system back to upright.

alt text

justdothis.png (110.7 kB)
more ▼

answered Mar 23 '17 at 07:12 PM

avatar image

AlmightyArchR
66 2 8 5

avatar image AJ_Graphix Apr 19 '17 at 07:42 PM

Thanks, that worked perfect!!

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

If you need to flip (mirror) any texture, you just need textcoords and a constant2 node (-1, 1 or 1, -1) going into a multiply node and it'll flip either horizontally or vertically alt text

more ▼

answered Mar 20 '19 at 04:34 AM

avatar image

Element808
31 3 9

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

I just encountered this issue as well. For anyone else reading this the solution I found was to use the "OneMinus" node on the product of the value derived from the absolute world position and plug the result of that into the texture sample instead. This is needed as UV inputs gradient from right to left, and from bottom to top, which is why the texture appears upside down. Subtracting the value from 1.0 reorders the values from left to right, and top to bottom, as you would expect.

more ▼

answered Aug 11 '16 at 09:36 PM

avatar image

Innadiated
0 1 1

avatar image AlmightyArchR Mar 23 '17 at 06:54 PM

That inverts horizontally as well, which fixes vertical, but breaks horizontal. =/

avatar image monodrobe Apr 19 '17 at 08:13 PM

use a component mask to sepeperate the r or g channel ( u or v) and flip the one you want, then recombine using and append vector or make float 2

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

This is ridiculous. I have to do all this blueprint work just to flip the diffuse of a texture? Why is there no 'flip' for UVs in UE4? Dumb.

more ▼

answered Nov 22 '17 at 03:03 AM

avatar image

RA3ID
0 1

avatar image Everynone Nov 22 '17 at 08:09 AM

All this? 2 nodes?

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

Hey VigeoJames-

You could add a Texture Coordinate node and wire it into the Texture Sample. If you then change the UTiling/VTiling on the texture coordinate node you can flip the texture along the x/y axis respectively. However this is rather performance heavy. If you're trying to optimize performance your best bet would be to edit the texture directly in another program (Photoshop for instance).

Cheers

Doug Wilson

more ▼

answered Oct 06 '14 at 09:19 PM

avatar image VigeoJames Oct 06 '14 at 09:23 PM

Haha wow. The photoshop idea is probably the best way to go about it. Don't know why I didn't think of that. Thanks!

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

What do you all think of this? (Invert output from G mask to flip on Horizontal axis)

alt text

flipmat.png (131.3 kB)
more ▼

answered Aug 30 '18 at 09:50 PM

avatar image

Alex O ♦♦ STAFF
2.5k 4 8 9

(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