您的位置:首页 > 产品设计 > UI/UE

UE4 WorldPositionOffset

2015-08-24 16:00 591 查看


WorldPositionOffset

Material
Function Reference

On this page:

WorldPositionOffset
Functions

SimpleGrassWind
SplineThicken
CameraOffset
ObjectPivotPoint
ObjectScale
PivotAxis
RotateAboutWorldAxis_cheap
StaticMeshMorphTargets
Wind

The WorldPositionOffset category contains special functions for applying manipulating vertices of a mesh via world position offset. These functions can be chained together for additive effects.


WorldPositionOffset Functions

The following is a list of all the functions underneath the WorldPositionOffset category.


SimpleGrassWind

This function applies a basic wind operator to foliage, giving the ability to specify a weight map and wind strength. This is a non-directional wind that just gives a very general movement to foliage. This should be the last WPO node you add.
ItemDescription
Inputs

WindIntensity (Scalar)Controls how much the wind affects the mesh.
WindWeight (Scalar)This is a grayscale map that controls how much the mesh's vertices will respond to the wind.
AdditionalWPO (Vector3)Takes in any additional world position offset networks or functions.



SplineThicken

The SplineThicken function serves as a way to make very thin polygons look thicker at render time. This is perfect for cables, hair, grass, and other such objects.

Objects using this function should be extremely thin and should be imported with "Remove Degenerate Triangles" disabled.

ItemDescription
Inputs

WidthBase (Scalar)This sets the width of a single polygon object at its base.
WorldPosition (Vector3)World Position takes in any existing world position offset functions and adds this function to them.
WidthTip (Scalar)Sets the width of a polygon object at its tip.
TexCoord (Vector2)Add a texture coordinate to use in the expansion of the spline. This defaults to texture coordinate 0.
Expand U or V UV Channel (StaticBool)Sets whether to expand the mesh in U or V. Defaults to true, which is U.
Outputs

WorldPositionOffsetThis is the output that you can add to other world position offset calculations.
NormalThe outgoing normal of the adjusted geometry.


CameraOffset

The CameraOffset function is great to assist with depth sorting, as it allows you to move an object in camera space, either toward or away from the camera.
ItemDescription
Inputs

OffsetAmount (Scalar)Enter a negative or positive number to offset your model in the direction of the camera. Note that positive values will bring the model closer to the camera and cause rendering errors if the mesh greatly exceeds the models bounding box.
ObjectCenter (Vector3)Enter the model's center point to be used in the creation the offset vector. Default Value = Object World Position.


ObjectPivotPoint

The ObjectPivotPoint function returns the object's pivot point in world space. This is not compatible with the pixel shader.
ItemDescription
Outputs

Object Pivot LocationReturns the object's pivot point in world space. This only works with the vertex shader and is incompatible with the pixel shader.



ObjectScale

The ObjectScale function returns the object's XYZ scale together and seperately. This is not compatible with the pixel shader.
ItemDescription
Outputs

Scale XYZReturns a float3 value that is equal to the objects XYZ scale. This is not compatible with the pixel shader.
Scale XReturns a scalar value that is equal to the object's X-scale. This is not compatible with the pixel shader.
Scale YReturns a scalar value that is equal to the object's Y-scale. This is not compatible with the pixel shader.
Scale ZReturns a scalar value that is equal to the object's Z-scale. This is not compatible with the pixel shader.



PivotAxis

The PivotAxis function creates a common pivot location on arbitrary axes. This is helpful for creating flag motion. Instead of using a single pivot point near the top of the flag, use a shared Z point and unique X and Y location data to create a more realistic
connection along the object's width.

This shader node only supports uniform scaling. Also, the rotate about axis axis and the pivot axis/pos should not coincide.

ItemDescription
Inputs

Pivot Axis/Pos (Vector3)Enter a number to use as both your local axis line axis and position. If you would like to lock off your model, enter on its local z axis near its pivot enter (0,0,1). If you would like to lock of the top of the model, enter your model's height in as (0,0,model
height).
Outputs

PivotThis can be used as the pivot point in the rotate about axis node.


RotateAboutWorldAxis_cheap

This function cheaply rotates objects around world axes. Input the angle you would like to use and attach the output to world position offset.
ItemDescription
Inputs

Rotation Amount (Scalar)A value of one is equal to one full rotation.
PivotPoint (Vector3)World space location of individual vertices. The WorldPosition node is typically used.
WorldPosition (Vector3)World space location of pivot point to rotate around. The default value is the model's pivot point.
Outputs

X-AxisCheaply rotates the object around the world X-axis.
Y-AxisCheaply rotates the object around the world Y-axis.
Z-AxisCheaply rotates the object around the world Z-axis.



StaticMeshMorphTargets

The StaticMeshMorphTargets function unpacks morph target data that was added into a via 3ds Max's Morph Packer MAXScript.
ItemDescription
Outputs

Morph Target 1 NormalsThe surface normals that are associated with Morph Target 1.
Morph Target 1 WPOWorld position offset for Morph Target 1.
Morph Target 2 WPOWorld position offset for Morph Target 2.



Wind

The Wind function provides separate outputs for wind strength, speed multiplied by time and a normalized wind vector.
ItemDescription
Inputs

WindActor (Vector4)This will take in a Wind actor (in development). At this time you may use a Vector4 to designate direction and strength of the wind.
Outputs

Normalized Wind VectorThe wind vector, normalized to 0-1 space.
WindStrengthReturns wind strength. The magnitude of the wind vector found by calculating distance from the wind vector to 0.
WindSpeedWind speed multiplied by time.
WindActorStandard WindActor node.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: