UE4 Position

Absolute World Postion

its the position of the surface in world space. if you were to subtract world position from the location of the camera then get the length of that vector it would give you the distance to that surface. but on its own its just the coordinate of that pixel in world space.

Object Postion

The ObjectPositionWS expression outputs the world-space center position of the object's bounds. For example, this is useful for creating spherical lighting for foliage.

Actor Position

ActorPositionWS outputs Vector3 (RGB) data representing the location of the object with this material on it in world-space.

Camera Position

The CameraWorldPosition expression outputs a three-channel vector value representing the camera's position in world space.

Camera Vector

The CameraVector expression outputs a three-channel vector value representing the direction of the camera with respect to the surface, in other words, the direction from the pixel to the camera.

Absolute world position,Object position, Actor position

其中Object position返回的是材质赋予的Object的Bounds的中心点(坐标轴在的位置),是一个坐标值

跟Actor position的区别是, Actor Postion返回的物体的实际坐标。

而 absolute world position返回的是 the position of the current pixel in world space,也就是说每个像素点在空间内的坐标.

 

 

reference: https://docs.unrealengine.com/en-US/Engine/Rendering/Materials/ExpressionReference/Coordinates/index.html

 

posted @ 2020-10-26 15:38  Cullchestar  阅读(409)  评论(0编辑  收藏  举报