UE4 WorldPositionOffset

本文详细介绍了世界位置偏移(World Position Offset)类别下的多种功能,包括SimpleGrassWind、SplineThicken、CameraOffset等,并解释了这些功能如何操纵网格顶点的位置,实现如风效、模型增厚及摄像机偏移等效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

WorldPositionOffset

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.

Item Description

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.

SimpleGrassWind

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.

Item Description

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

WorldPositionOffset This is the output that you can add to other world position offset calculations.
Normal The 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.

Item Description

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.

Item Description

Outputs

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

ObjectPivotPoint

ObjectScale

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

Item Description

Outputs

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

ObjectScale

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.

Item Description

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

Pivot This 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.

Item Description

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-Axis Cheaply rotates the object around the world X-axis.
Y-Axis Cheaply rotates the object around the world Y-axis.
Z-Axis Cheaply rotates the object around the world Z-axis.

RotateAboutWorldAxis_Cheap

StaticMeshMorphTargets

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

Item Description

Outputs

Morph Target 1 Normals The surface normals that are associated with Morph Target 1.
Morph Target 1 WPO World position offset for Morph Target 1.
Morph Target 2 WPO World position offset for Morph Target 2.

StaticMeshMorphTargets

Wind

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

Item Description

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 Vector The wind vector, normalized to 0-1 space.
WindStrength Returns wind strength. The magnitude of the wind vector found by calculating distance from the wind vector to 0.
WindSpeed Wind speed multiplied by time.
WindActor Standard WindActor node.

Wind

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值