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"

SceneTexture UVs

I have a post process volume material and I'm trying to understand how the UVs given to a SceneTexture:PostProcessInput0 node interact with texture UVs. Here is my material:

alt text

The texture shown in the image is an image I made in which the red value increases from 0 to 1, left to right, and the green value does likewise up and down. From my understanding, UVs go from 0 to 1, so I would expect the following material to do more or less nothing. A pixel on the top left of the screen (0, 0) will sample the texture at (0, 0) and get R and G values of (0, 0), and then give the SceneTexture node UVs of (0, 0). A pixel on the bottom right of the screen should give (1, 1) to the texture, which gives (1, 1) to the scene texture, etc. There should be basically no change to the rendered frame, right?

However, what's actually happening is that the rendered scene becomes very distorted at the top and left. It curves and stretches the scene and adds a "fuzziness":

alt text

What's going on here? Clearly I do not quite understand how these nodes are interacting. I suspect it may have something to do with my texture having a different resolution than the game window, but if UVs are all normalized from 0 to 1 as I thought they were then that shouldn't matter.

Product Version: UE 4.18
texture.png (131.7 kB)
distort.png (2.4 MB)
more ▼

asked Nov 12 '17 at 08:16 AM in Rendering

avatar image

3 2 5

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

1 answer: sort voted first

While thinking about getting identical results, you should keep in mind, that you need to sample your texture linearly, not in sRGB, as it most likely defaulted to. On top of that, be aware of the texture compression artifacts and limits of precision in 8bpc texture formats. You might need to use uncompressed texture with higher precision for this purpose.

more ▼

answered Nov 12 '17 at 02:40 PM

avatar image

7.9k 130 31 293

avatar image S-ed Nov 12 '17 at 05:11 PM

In addition to that you have to spent one texture sampler pass. Procedural uv's probably will perform better in most cases. Well, it always depends on needs.

avatar image Sycosquirl18 Nov 13 '17 at 02:58 AM

Thank you, the warping problem was indeed because of using the wrong color space. There is no more warping after disabling the sRGB option in the texture settings. You're also right about the precision... 24 bit color is not enough to smoothly interpolate across my entire screen.

(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