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"

ViewSize and ViewProperty.RenderTargetSize arent matching

I have version 4.9 (Radeon 6970 if that matters, some old Samsung monitor 1920x1200) and friend tested this on 4.10.

To my knowledge the viewSize and Rendertarget size should match when there is no RT resampling. Drag around the viewport window and drop it so the render updates. In my editor the color is changing -> the view size and RT size arent the same.

I came across this when trying to create screen space regular pattern as blendable. alt text

Product Version: UE 4.9
Tags:
more ▼

asked Mar 03 '16 at 07:09 PM in Bug Reports

avatar image

Felreach
11 3 5 9

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

1 answer: sort voted first

Hi Mtrx -

The RenderTargetSize is dynamically resized to match the requested render size and takes into account (at least in editor all open viewports, in game mode it will take into account only the game window itself. Also the View Size will dynamically change based on the currently assigned viewport (Material Editor or Level Viewport).

You can set how the RenderTargetSize resizes with teh COnsole Variable r.RenderTargetResizeMethod:

 Control the scene render target resize method:
 (This value is only used in game mode and on windowing platforms.)
 0: Resize to match requested render size (Default) (Least memory use, can cause stalls when size changes e.g. ScreenPercentage)
 1: Fixed to screen resolution.
 2: Expands to encompass the largest requested render dimension. (Most memory use, least prone to allocation stalls.)

Thank You

Eric Ketchum

more ▼

answered Mar 10 '16 at 08:26 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

avatar image Felreach Mar 10 '16 at 11:39 PM

I understand what the RTsize should be, but i dont understand the ViewSize value. Why is the ViewSize different in the preview window? They are also different in Play in Window. I created checker pattern (alternating black and white) based on pixel position. When i used ScreenPosition/RTSize i got correct coordinates, but when i used ScreenPosition/ViewSize the pattern wasnt correct.

avatar image Lovecraft_K ♦♦ STAFF Mar 11 '16 at 02:35 PM

Hi Mtrx -

The View Size node outputs the size of the currently selected window. So if your Material Editor Preview Window is 720x320 pixels and your Level Viewport is 1330x976, then the view size node in the Material will output the value of the Material Editor Preview Window when that is in focus and the Level Viewport when that is in focus. And again when you are in Standalone or PIE in a New Window the Material will call that Viewports size, usually the default 1280x720, when rendering out the material in that scene.

View Size is used primarily to make adjustments to materials based on the user's individual screen size.

https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Coordinates/index.html#viewsize

Thank You

Eric Ketchum

(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