UnrealVietnam
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Các option trong Material Editor đây

2 posters

Go down

Các option trong Material Editor đây Empty Các option trong Material Editor đây

Bài gửi  honglong99 Thu Jul 08, 2010 11:11 am

Phần này hy vọng giúp cho các bạn nghiên cứu làm Material tuyệt đẹp, và để làm được điều ấy thì hãy đọc qua để biết các option của nó nhé. Cái này có sẵn trên đây rồi http://udn.epicgames.com/Three/MaterialsCompendium.html Mình chỉ post lại thôi.
Abs

Abs is an abbreviation for the mathematical term "absolute value". Abs turns negative numbers into positive numbers by knocking off the minus sign. Positive numbers aren't touched.
Examples: Abs of -0.7 is 0.7; Abs of -1.0 is 1.0; Abs of 1.0 is also 1.0
Example Usage: Abs is commonly used with DotProduct. DotProduct goes from -1..0..1, while taking the Abs of DotProduct will go from 1..0..1.
Các option trong Material Editor đây Abs

Add

Similar to Photoshop's screen layer blend, the Add node takes two inputs, adds them together and outputs the result. The addition happens per channel.
Examples: Add of 0.2 and 0.4 is 0.6; Add of (0.2,-0.4,0.6) and (0.1,0.5,1.0) is (0.3,0.1,1.6); Add of (0.2,-0.4,0.6) and 1.0 is (1.2,0.6,1.6)
Example Usage: Add is often used to brighten/darken colors and offset UVs.
Các option trong Material Editor đây AddExample

AntialiasedTextureMask

This material expression allows to create a material with a soft (anti-aliased) transition mask. The mask can be used to blend between two complex material properties or to fade out a alpha blended material (works well with SoftMasked). Simple specify a texture with the mask specified in one channel (red, green, blue or alpha), set the used channel in the expression and specify the comparison value. Assuming the channel stores a grayscale value in the range 0=black to 1=white the comparison function defines if the resulting mask should be 0 or 1.

Pseudo code:

Result = 1
if TextureLookup < Threshold then Result = 0

The actual implementation is quite a bit more complicated as it tries to return values between 0 and 1 depending on the actual pixel coverage to avoid aliasing.

Example (this tiny 128x128 texture, uncompressed for best quality):
Các option trong Material Editor đây ULogoLowBlurred
Was used as as normal texture (left top) and used with the described material expres​sion(bottom right):
Các option trong Material Editor đây AAMaskExample
The technique works best in magnification and with blurred input content. Compressed hurts the quality a lot so try to use uncompressed low resolution textures.

AppendVector

As with a full color RGB image created from three different greyscales, AppendVector allows you to combine channels together to create a vector with more channels than the original. For example, you can two individual numbers (Constants) and append them to make a two-channel value (Constant2Vector).

Examples: Append of 0.2 and 0.4 is (0.2,0.4); Append of (0.2,0.4) and (1.6) is (0.2,0.4,1.6).
Các option trong Material Editor đây AppendVectorExample

BumpOffset

BumpOffset is the Unreal Engine 3 term for what is commonly known as 'parallax mapping'. BumpOffset materials give the illusion of depth without the need for additional geometry. BumpOffset materials use a heightmap to give depth information. The brighter the value in the heightmap, the more 'popped out' the material will be; these areas will parallax (shift) as a camera moves across the surface. Darker areas in the heightmap are 'further away' and will shift the least. BumpOffset nodes have the following properties:

HeightRatio: Multiplies the depth. The bigger the value, the more extreme the depth will be. Typical values range from .02 to .1

ReferencePlane: Specifies the approximate height in texture space to apply the effect. A value of 0 will appear to distort the texture completely off the surface, whereas a value of 0.5 (the default) means that some of the surface will pop off while some areas will be sunken.
Các option trong Material Editor đây BumpOffsetExample

CameraVector

CameraVector is a three-channel value representing the direction of the camera with respect to the surface.

Example Usage: CameraVector is often used to fake environment maps by connecting the CameraVector to a ComponentMask and use the x and y channels of the CameraVector as texture coordinates.
Các option trong Material Editor đây CameraVectorExample

CameraWorldPosition

CameraWorldPosition is the camera's position in world space.

The preview sphere changes color as the camera rotates.
Các option trong Material Editor đây CameraWorldPosition

Ceil

Ceil will round values up to the next integer. See also Floor and Frac.

Examples: Ceil of 0.2 is 1.0; Ceil of (0.2,1.6) is (1.0,2.0).
Các option trong Material Editor đây CeilExample

Clamp

Clamp is used to constrain values to a specified range, defined by a minimum (Min) and maximum (Max) value. "Min 0.0, max 0.5" means that the resulting value will never be less than 0.0 and never greater than 0.5.

Examples: Clamping 0.3 with Min 0.0 and Max 1.0 yields 0.3; Clamping 1.3 with Min 0.0 and Max 1.0 yields 1.0;
Các option trong Material Editor đây ClampExample

ComponentMask

ComponentMask allows you to strip away channels, or select out only a subset of channels. ComponentMask has four checkboxes representing each channel (R, G, B, and A) which, when checked, will pass that channel through to the final result.

Examples: ComponentMask with an input of (0.2,0.8,1.4) and the R and B channels checked will output (0.2,1.4).
Các option trong Material Editor đây ComponentMaskExample


Được sửa bởi honglong99 ngày Thu Jul 08, 2010 10:07 pm; sửa lần 1.

honglong99

Tổng số bài gửi : 24
Join date : 08/07/2010

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Các option trong Material Editor đây (2)

Bài gửi  honglong99 Thu Jul 08, 2010 11:20 am

Constant

One of the most commonly used material nodes, a Constant is a number. Constants aren't limited to whole numbers; they can have decimal places and be negative numbers.

Examples: 0.7, -0.24, 1.1
Các option trong Material Editor đây ConstantExample

Constant2Vector

Constant2Vector is a 2-channel value -- in other words, two constants numbers.

Examples: (0.4, 0.6), (1.05, -0.3)
Các option trong Material Editor đây Constant2Example

Constant3Vector

Constant3Vector is a 3-channel value -- in other words, three constant numbers. An RGB color can be thought of as a Constant3Vector, where each channel is assigned to a color (red, green, blue).

Examples: (0.4, 0.6, 0.0), (1.05, -0.3, 0.3)
Các option trong Material Editor đây Constant3Example

Constant4Vector

Constant3Vector is a 4-channel value -- in other words, four constant numbers. An RGBA color can be thought of as a Constant4Vector, where each channel is assigned to a color (red, green, blue, alpha).

Examples: (0.4, 0.6, 0.0, 1.0), (1.05, -0.3, 0.3, 0.5)
Các option trong Material Editor đây Constant4Example

ConstantBiasScale

This is a convenience function that multiplies the input by Scale and then adds Bias. So for example, to convert input data from [0,1] to [-1,1] you would set Scale=2 and bias = -1.

ConstantClamp

Performs the same function as Clamp but uses fixed inputs included in the node itself for simplicity and ease of use. Works well when you have min and max clamp values (say clamping an output from 0 to 1) that do not need to be variable over time.

Cosine

Cosine is a node that outputs a cosine waveform as a function its input, which is typically connected to a Time node. Cosine nodes have a 'Period' property for setting the period ('repeat rate') of the signal

CrossProduct

CrossProduct computes the cross product of two input 3-vectors. given two lines in space, cross product outputs a line which is perpendicular to these two

Example Usage: CrossProduct is often used to compute directions which are perpendicular to two other directions.
Các option trong Material Editor đây CrossProductExample

Custom

Custom allows you to write custom HLSL shader code.

Warning! Using the custom node prevents constant folding and may use significantly more instructions than an equivalent version done with built in nodes! Constant folding is an optimization that UE3 employs under the hood to reduce shader instruction count when necessary. For example, an expression chain of 'Time->Sin->Mul by parameter->Add to something' can and will be collapsed by UE3 into a single instruction, the final add. This is possible because all of the inputs of that expres​sion(Time, parameter) are constant for the whole draw call, they do not change per-pixel. UE3 cannot collapse anything in a custom node, which can produce less efficient shaders than an equivalent version made out of existing nodes. As a result, it's best to only use the custom node when it gives you access to functionality not possible with the existing nodes.

Another Warning: shader code written in a custom node is compiled 'as is' for the target platform. This means that if the shader is being compiled for PC, it is assumed to be valid HLSL. If compiling for PS3, it is assumed to be valid Cg.

Add as many inputs as you need to the Inputs array, and name them. You can then write code in the Code property. You can type either a full function body with return statements as shown in the example, or a simple expression such as "Input.bgr". You must also specify the output data type in OutputType.
Các option trong Material Editor đây Custom

CustomTexture

CustomTexture allows you to refer to a texture from HLSL code inside a Custom node, typically to sample it inside the HLSL.

It's possible to use a regular TextureSample as input to a Custom node, but in that case the sample is being calculated outside the Custom node and the result passed in as a float4 value. This is not flexible enough for the case where you would like to sample the same texture multiple times in a loop, or to use other sampling instructions such as tex2Dbias, tex2Dlod, tex2Dproj (see HLSL documentation for the purpose of these).
Các option trong Material Editor đây Customtex

honglong99

Tổng số bài gửi : 24
Join date : 08/07/2010

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Các option trong Material Editor đây (3)

Bài gửi  honglong99 Thu Jul 08, 2010 11:25 am

DepthBiasBlend

DepthBiasBlend is slower and less flexible than the other depth-biased blending nodes; use DepthBiasAlpha instead.

DepthBiasBlend is most commonly used in materials on sprite particles to remove the sharp edges occurring when the sprite intersects other geometry. Depth-biased blending compares the depth of src and dst pixels and uses a bias to determine the alpha to use for drawing the pixel. See DepthBiasBlendUsage for more information.

Programmers: DepthBiasBlend is the least preferred of the depth-biased blending nodes because 1) it samples color and depth from the most recent frame/depthbuffer resolves (slow); 2) the blend is performed in shader code rather than via hardware blending (slow); and 3) DepthBiasBlend's texture input is via the Texture property rather than an arbitrary expression input.

DepthBiasAlpha

DepthBiasAlpha is the preferred node to use for depth-biased blending.

DepthBiasAlpha is most commonly used in materials on sprite particles to remove the sharp edges occurring when the sprite intersects other geometry. Depth-biased blending compares the depth of src and dst pixels and uses a bias to determine the alpha to use for drawing the pixel. See DepthBiasBlendUsage for more information.

Programmers: DepthBiasAlpha is the preferred way to do depth-biased blending because the blend is performed in hardware rather than in the shader.

DepthBiasedBlend

DepthBiasedBlend is slower DepthBiasAlpha; use DepthBiasAlpha instead.

DepthBiasedBlend is most commonly used in materials on sprite particles to remove the sharp edges occurring when the sprite intersects other geometry. Depth-biased blending compares the depth of src and dst pixels and uses a bias to determine the alpha to use for drawing the pixel. See DepthBiasBlendUsage for more information.

Programmers: DepthBiasedBlend is the least preferred of the depth-biased blending nodes because 1) it samples color and depth from the most recent frame/depthbuffer resolves (slow); and 2) the blend is performed in shader code rather than via hardware blending (slow).

DeriveNormalZ

This is a convenience node that derives the z component of a tangent space normal given the x and y. The input (InXY) is the x and y of the tangent space normal, and the output is the 3 component tangent space normal. Z is calculated as Z = sqrt(1 - (x * x + y * y));

Desaturation

A Desaturation node will desaturate its input based a certain percentage specified by the Percent input. Percent can range from 0.0 (fully desaturated) to 1.0 (full original color, no desaturation). The Luminance property of the node specifies the amount of desaturation per channel.

Programmers: Define desaturated color D, input color I and luminance factor L. The output will be O = (1-Percent)*(D.dot(I)) + Percent*I
Các option trong Material Editor đây DesaturationExample

DestColor

DestColor samples the existing color behind the pixel currently being drawn.

Example Usage: A water material can use DestColor to sample the color of the rocks under the water.

DestDepth

DestColor samples the existing depth behind the pixel currently being drawn.

Example Usage: A water material can use DestDepth to give water a "thickness" or fog color, where the deeper the water (the greater the depth), the more the water obscures the rocks under the water

Programmers: DestDepth returns a raw depth value (integer from 0 to 2^24-1). This non-leaner depth can be normalized as follows:

MaxZ = 16777215
NormalizedDepth = 1 - MaxZ / (DestDepth + MaxZ)

The resulting normalized depth is linear in the 0.0 to 1.0 range.

Distance

Distance computed the (Euclidian) distance between two points/colors/positions/vectors. This works on one, two, three and four component vectors.

Pseudo code: Result = length(A - B)

Low level HLSL code: float Result = sqrt(dot(A-B, A-B))

Divide

Divide takes two inputs A and B, outputting the result of A divided by B. The division happens per channel.

Examples: The output of a Divide with A=(1.0,0.5,-0.4) and B=(2.0,2.0,4.0) is (0.5,0.25,-0.1)
Các option trong Material Editor đây DivideExample

DotProduct

DotProduct computes the dot product of two inputs, and is used by many techniques for computing falloff. DotProduct requires both two inputs to have the same number of channels.
Các option trong Material Editor đây DotProductExample

DynamicParameter

A DynamicParameter node provides material parameters per-particle for particle emitters. These values are set in Cascade via a ParameterDynamic module placed on an emitter.

honglong99

Tổng số bài gửi : 24
Join date : 08/07/2010

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Các option trong Material Editor đây (4)

Bài gửi  honglong99 Thu Jul 08, 2010 11:37 am

FlipBookSample

A FlipBookSample node is the TextureSample node for flipbook textures. Textures that were imported as flipbook texture need to use a FlipBookSample node. Under the hood, FlipBookSample performs the necessary UV manipulation to render the subimages of a flipbook texture, based on the HorizontalImages, VerticalImages and FrameRate properties of the flipbook texture.
Các option trong Material Editor đây Flipbook

Floor

Ceil will round values down to the last integer. See also Ceil and Frac

Examples: Floor of 0.2 is 0.0; Floor of (0.2,1.6) is (0.0, 1.0).
Các option trong Material Editor đây FloorExample

FMod

Returns the floating-point remainder of A/B.

FoliageNormalizedRotationAxisAndAngle

This node is designed to be used in conjunction with RotateAboutAxis, and the value is automatically set by code when the material is applied to a InteractiveFoliageActor. RGB contains the normalized axis to rotate about in order to apply the InteractiveFoliageActor spring offset. Alpha contains the angle, in radians, of the rotation to apply the spring offset. See InteractiveFoliageActor for an example.

FoliageImpulseDirection

The value of this node is automatically set by code when the material is applied to a InteractiveFoliageActor, and it provides raw access to the InteractiveFoliageActor spring offset. See InteractiveFoliageActor for an example.

FontSampler

Allows you to sample the texture pages out of a font resource as regular 2D textures.

The alpha channel of the font will contain the font outline value. Only valid font pages are allowed to be specified.

See also FontSamplerParameter.
Các option trong Material Editor đây FontSampler

Frac

Frac outputs the decimal part of a number. See also Ceil and Frac

Examples: Frac of 0.2 is 0.2; Frac of (0.0,1.6) is (0.0, 0.6)
Các option trong Material Editor đây FracExample

Fresnel

takes a normal. Exponent = higher the value, the "tighter" the falloff along the edge the result is clamped to 0,1 so you don't have any negative color in the center
Các option trong Material Editor đây Fresnel

If

The If node compares two inputs, A and B; the output is chosen based on the result of the comparison:

If A is less than B, the output is ALessThanB.
If A is the same as B, the output is AEqualsB.
If A is greater than B, the output is AGreaterThanB.

Example Usage: The 'If' node can be used

Các option trong Material Editor đây IfExample

LensFlareIntensity

This node provides the 'ConeStrength' of a lens flare that is rendering. The cone strength is provided to allow for determining the intensity of the flare w.r.t. the position of the view in relation to the flare source. The cone strength will be 0.0 if the flare source is located outside of the radius of the lens flare. (If the radius of the lens flare is set to 0.0f, then it is considered to be always on.) If it is inside the radius, it will be 1.0f. If the lens flare is setup with a directional cone, the ConeStrength will be 1.0f if the view is located in the inner cone and looking towards the flare. It will fall off to 0.0f when moving through the outer cone.

LensFlareOcclusion

This node provides the occlusion value of a lens flare that is rendering. The value is determined by the primitive coverage percentage being used as the look-up value into the ScreenPercentageMap of the lens flare.

LensFlareRadialDistance

This node provides the radial distance of the element being rendered from the center of the screen. This value can be normalized to be a 0.0f (center) to 1.0f (edge) value using the bNormalizeRadialDistance property of the lens flare element. Otherwise, the value will typically be in the 0.0f (center) to 1.0f (vertical or horizontal edge) to 1.4f (corner of the screen). The 1.4f will be the ratio of the screen width and height.

LensFlareRayDistance

This node provides the ray distance that is set for the flare element that is being rendered.

LensFlareSourceDistance

This node provides the distance of the element being rendered from the source in screen space.

LightmapUVs

Gives the lightmap UV coordinates. If lightmap UVs are unavailable, it will return 0,0.

honglong99

Tổng số bài gửi : 24
Join date : 08/07/2010

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Các option trong Material Editor đây (5)

Bài gửi  honglong99 Thu Jul 08, 2010 11:43 am

LightmassReplace

The LightmassReplace node simply passes through the Realtime input when compiling the material for normal rendering purposes, and passes through the Lightmass input when exporting the material to Lightmass for global illumination. This is useful to workaround material expressions that the exported version can't handle correctly, for example WorldPosition.

LightVector

LightVector is a three-channel value representing the direction of the light with respect to the surface.

Example Usage: LightVector can be used to "project" textures from lights onto surfaces as the light passes over a surface.

ALERT! Note: The LightVector expression is not valid while evaluating the Emissive output.

LightVector is important for CustomLighting.

LinearInterpolate

LinearInterpolate can be thought of as a mask to define transitions between two textures, like a layer mask Photoshop. LinearInterpolate takes three inputs: A and B (the input textures/colors) and Alpha (the mask). The intensity of the mask Alpha determines the ratio of color to take from textures A and B. If Alpha is 1.0/white, A is used. If Alpha is 0.0/black, B is used. If Alpha is grey (somewhere between 0.0 and 1.0, the output is a blend between A and B.

Keep in mind that the blend happens per channel. So, if Alpha is an RGB color, Alpha's red channel value defines the blend between A and B's red channels independently of Alpha's green channel, which defines the blend between A and B's green channels.

Programmers: LinearInterpolate does a per-channel lerp between A and B based on the parametric value Alpha.
Các option trong Material Editor đây LinInterpExample

MeshEmitterVertexColor

Materials used on mesh particles must use this node!

A MeshEmitterVertexColor node is the access point for the material to the outputs of color modules affecting mesh particles emitters. Each mesh rendered as a particle by a mesh emitter has a color available to it -- this is that color.

Programmers: This color is communicated to the shader as a constant, and is not a per-vertex color for mesh particles.
Các option trong Material Editor đây MeshEmitterVColor

MeshSubUV

Like ParticleSubUV for meshes instead of sprites This needs to be used to avoid repacking the texture coordinates for a mesh particle every frame.
Các option trong Material Editor đây MeshSubUV

Multiply

Similar to Photoshop's multiply layer blend, a Multiply node takes two inputs, multiplies them together and outputs the result. The multiplication happens per channel.

Don't forget that materials in UE3 are not limited to [0,1]! If colors/values are greater than 1, Multiply will actually brighten colors.

Examples: Multiply of 0.4 and 0.5 is 0.2; Multiply of (0.2,-0.4,0.6) and (0.0,2.0,1.0) is (0.0,-0.8,0.6); Multiply of (0.2,-0.4,0.6) and 0.5 is (0.2,-0.4,0.6)

Example Usage: Multiply is often used to brighten or darken colors/textures.
Các option trong Material Editor đây MultiplyExample

Normalize

Normalize will normalize its input -- in other words, each component is divided by the L-2 norm of the vector.

TIP Note: It is not necessary to normalize an expression which plugs into the Normal material output.
Các option trong Material Editor đây NormalizeExample

ObjectOrientation

World space up vector of the object.

ObjectRadius

World space radius of the object's bounds. You can preview the bounds of any object by enabling the 'show bounds' viewmode for the active viewport (under the down arrow at the top of the viewport), then selecting an object. See ObjectWorldPosition for an example.

ObjectWorldPosition

World space center position of the object's bounds. This is useful for creating spherically lighting for foliage, for example.

This particle system is using object position, world position and object radius to make a gradient that has a value of 1 at object position, and 0 at the object radius using the node setup below.
Các option trong Material Editor đây ObjectPosition
Các option trong Material Editor đây ObjectPositionNodes

honglong99

Tổng số bài gửi : 24
Join date : 08/07/2010

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Các option trong Material Editor đây (6)

Bài gửi  honglong99 Thu Jul 08, 2010 11:56 am

OcclusionPercentage

Gives the occlusion percentage of the object being rendered.

Only used by ParticleSystems (that have OcclusionBoundMethod other than None) and by LensFlares.

OneMinus

OneMinus takes an input value and outputs one minus that value.

Examples: OneMinus of 0.4 is 0.6; OneMinus of (0.2,0.5,1.0) is (0.8,0.5,0.0); OneMinus of (0.0,-0.4,1.6) is (1.0,1.4,-0.6)

Example Usage: When the input colors are in the range [0,1], OneMinus has the same effect as what is commonly called "invert" -- that is, OneMinus returns the complimentary color that when added to the input will produce white.
Các option trong Material Editor đây OneMinus

Panner

Panner is used to create panning textures. The horizontal and vertical texture panning speeds can be controlled independently with the SpeedX and SpeedY properties.

Panner generates UVs that change according to the Time input. The Coordinate input can be used to manipulate (e.g. offset) the UVs generated by the Panner node.
Các option trong Material Editor đây PannerExample

ParticleMacroUV

ParticleMacroUV is a texture coordinate that can be used to map any 2d texture onto the entire particle system in a continuous way, meaning the texture will be seamless across particles. The UVs will be centered around MacroUVPosition (specified in Cascade on the ParticleSystem, under the MacroUV category) and MacroUVRadius determines the world space radius that the UVs should tile at. The ParticleMacroUV node is useful for mapping continuous noise onto particles to break up the pattern introduced by mapping a texture onto each particle with normal texture coordinates.
Các option trong Material Editor đây MacroUV
ParticleMacroUV has an option called bUseViewSpace, which effectively offsets the coordinates based on the depth of each sprite and creates a parallax effect, which can be useful for giving explosions a radial blur look.
Các option trong Material Editor đây MacroUVViewSpace

ParticleSubUV

ParticleSubUV is used to render subimages of a texture to a particle. ParticleSubUV is similar to a flipbook, except that ParticleSubUV allows the texture animation to be manipulated in Cascade?.

The UV input of ParticleSubUV is ignored and does nothing.
Các option trong Material Editor đây ParticleSubUV

PerInstanceRandom

Float for random per static mesh instance. InstancedStaticMeshComponent sets a random float for instance, which is exposed so that it can be used for whatever is desired (e.g. random light level behind a window). It is constant, but different, for each instance of the mesh.

PixelDepth

PixelDepth nodes output the depth of the pixel currently being rendered. For details on using the value, consult DestDepth.

Power

The Power node takes two inputs, Base and Exp. The output is Base raised to the Exp power -- in other words, Base multiplied by itself Exp times.

Examples: Power of Base 0.5, Exp 2.0 is 0.25;

Example Usage: If the colors you pass to Power are in [0,1], Power can behave as a contrast adjustment, where only the brighter values remain.
Các option trong Material Editor đây Power

ReflectionVector

ReflectonVector is similar in spirit to CameraVector. The output of a ReflectionVector is the camera direction reflected across the surface normal.

Example Usage: ReflectionVector is commonly used in environment maps, where the x/y components of the reflection vector are used as UVs into a cubemap texture.
Các option trong Material Editor đây ReflectionVectorExample

Rotator

Rotator used to create rotating textures. The rotation speed can be controlled with the Speed property, and the center of rotation can be chosen with the CenterX and CenterY properties.

Rotator generates UVs that change according to the Time input. The Coordinate input can be used to manipulate (e.g. offset) the UVs generated by the rotator node.
Các option trong Material Editor đây RotatorExample

RotateAboutAxis

This node rotates the Position input given the rotation axis, a point on the axis, and the angle to rotate. It is useful for animations using WorldPositionOffset that have better quality than simple shears. See InteractiveFoliageActor for an example.

TextureCoordinate

The TextureCoordinate node allows materials to use different UV channels and otherwise operate on the UVs of a mesh. For example, TextureCoordinate has a Tiling property which indicates the number of times to tile the texture coordinates.

Example Usage: To access the second UV channel of a mesh, create a TextureCoordinate node, set its CoordinateIndex to 1 (0 - first channel, 1 - second channel, etc), and connect it to the UVs input of a TextureSample node.
Các option trong Material Editor đây TextureCoordinateExample

TextureSample

A TextureSample is a node that represents a texture. Plain and simple.

To set the texture used by a TextureSample node, first select a texture in the Generic Browser. Then, select the Texture property in the node's property window and click the 'Use Current Selection' button.

The outputs of TextureSample node can be used to connect individual color channels to the inputs of other nodes. From top to bottom, TextureSample's outputs are RGBA, red, green, blue, and alpha.

If a texture does not contain an alpha channel, connecting the 'alpha' channel to something, while not technically illegal, will always result in zero (black).

By default, TextureSample nodes use the texture coordinates of the mesh the material is applied to. These texture coordinates can be modified by connecting another node to the UVs input. For example, a Panner node can be connected to the UVs input to created a panning texture.

If the TextureSample represents a cubemap texture, the UVs coordinate must be a three-channel value rather than just a two-channel value.
Các option trong Material Editor đây TextureSampleExample
TextureSampleParameter2D

Like a ScalarParameter, except that exposed value is a texture instead of a single value.

TextureSampleParameterCube

Like a ScalarParameter, except that exposed value is a cubemap texture instead of a single value.

TextureSampleParameterMovie

Like a ScalarParameter, except that exposed value is a movie texture instead of a single value.

TextureSampleParameterNormal

See the NormalMapFormats document for an explanation of why this node is prefereable to a TextureSampleParameter2D when specifying a parameter that is used for a normal map.
Transform

Warning: VertexColor is mutually exclusive with the Transform node due to limited interpolators. If you use both a Transform node and VertexColor, then VertexColor will come out all white.

Warning: The transform node currently does not handle non-uniform scaling correctly.

By default, all shader calculations in a material are done in tangent space. The vector constants, camera vector, light vector, etc are all transformed to tangent space before being used in a material.

The Transform node allows any 3-vector value to be transformed to other spaces. The TransformType property specifies the target space, and is one of world, view, or local space.

The Transform node accounts for mirrored UVs, thus allowing, for example, highlights that only affect the right edge of a character.

The Transform node is useful for generating world space normals for sampling a cubemap. A normal map can be transformed to world space. Below is an example of transforming normals to world space in order to sample a cubemap:
Các option trong Material Editor đây TransformExample1
Transforming normals to view space can be used for creating edge-on effects. This can be achieved by using mesh normals to generate texture coordinates (commonly referred to as "Sphere Mapping"). With this method, normals facing directly at the camera will map to the center of the texture coordinates, and normals facing perpendicular to the camera will map at the edge of the texture coordinates. Here is an example of Sphere Mapping:
Các option trong Material Editor đây CT_SphereMap01
This material is located at: UDKGame\Content\TestPackages\UDN_ExampleMaterials\CoordinateTransform\Mat erials\ M_UDN_EM_CoordinateTransform_Materials_SphereMap01

A constant3vector with a value of (0,0,1) is fed into the Transform with TRANSFORM_View set, which is then passed through a ComponentMask (Passing

through only R and G). Since the Transform will output a range of values from -1 to 1, we must bias the values to put them into the 0-1 range. This

is done by multiplying by 0.5, and then adding 0.5. Then simply plug that into the Coordinates of a texture. Any texture will work; I made one with

three rings so that the effect is obvious.
Các option trong Material Editor đây CT_SphereMap_Texture01
To use this effect with a normal map, simply substitute the Constant3Vector with a normal map texture.

Here is an example of this spheremap material applied to a blob-like rock mesh:
Các option trong Material Editor đây CT_BlobMesh01
VectorParameter

Like a ScalarParameter, except that exposed value is a multi-channel value instead of a single value.
Các option trong Material Editor đây VectorParameterExample
VertexColor

Like a MeshEmitterVertexColor except for sprite particles.

Warning: VertexColor is mutually exclusive with the Transform node due to limited interpolators. If you use both a Transform node and VertexColor, then VertexColor will come out all white.

Programmers: For sprite particles, colors are communicated to the shader per vertex, whereas colors for mesh particles are set as shader constants.


Được sửa bởi honglong99 ngày Thu Jul 08, 2010 12:33 pm; sửa lần 1.

honglong99

Tổng số bài gửi : 24
Join date : 08/07/2010

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Re: Các option trong Material Editor đây

Bài gửi  Admin Thu Jul 08, 2010 11:59 am

Anh có thể post phần này vào phần Hướng dẫn đồ họa, những tài liệu gốc thì anh không cần post lại ,chỉ cần post link.

Em đã chuyển phần này vào box hướng dẫn đồ họa. Anh có thể tiếp tục chuyên mục trong box đó.
Admin
Admin
Admin

Tổng số bài gửi : 61
Join date : 22/02/2010
Age : 32
Đến từ : Hà Nội City

https://unrealvietnam.forumvi.com

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Re: Các option trong Material Editor đây

Bài gửi  honglong99 Thu Jul 08, 2010 12:06 pm

uhm, anh định post để tạm thời có bài và để họ khỏi phải chuyển qua link gốc, nếu họ muốn thì họ vào đây xem rồi cần gì giải đáp luôn, trên là những phần thường hay xài hay quan trọng. Còn 1 số phần còn lại ^_^ mọi người lên link gôc xem nhé ( ít xài lắm )

honglong99

Tổng số bài gửi : 24
Join date : 08/07/2010

Về Đầu Trang Go down

Các option trong Material Editor đây Empty Re: Các option trong Material Editor đây

Bài gửi  Sponsored content


Sponsored content


Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết