ue4 材质表达式分类
https://api.unrealengine.com/CHN/Engine/Rendering/Materials/ExpressionReference/index.html
綠色節(jié)點(diǎn)
顏色 Color Desaturation
數(shù)學(xué) Math GO
字體 Font FontSample,FontSampleParameter
實(shí)用程序 Utility
- 常用: Desaturation(去飽和度),Distance(距離),Fresnel(菲涅爾,邊框),GIReplace(GI 替換,反射數(shù)據(jù)替換),LinearInterpolate(線性插值 Lerp)
- 優(yōu)化用:FeatureLevelSwitch(功能級(jí)別開(kāi)關(guān)),QualitySwitch(質(zhì)量開(kāi)關(guān))
- 蒙版:SphereMask(球體蒙版),AntialiasedTextureMask(抗鋸齒紋理蒙版)
- BumpOffset(視差貼圖):視差貼圖,本質(zhì)上,是一種位移貼圖(Displacement Mapping)。它的原理,是根據(jù)視線方向,對(duì)當(dāng)前看到的像素位置進(jìn)行一定的坐標(biāo)偏移,顯示偏移過(guò)后的像素顏色 https://www.jianshu.com/p/98c137baf855
- Noise(噪聲): 生成噪點(diǎn)。 注意:Position要的像素坐標(biāo)變3維會(huì)有些特別的效果
- RotateAboutAxis(繞軸旋轉(zhuǎn)): 1、設(shè)定好旋轉(zhuǎn)軸(0,0,1) 2、如果想移動(dòng)這個(gè)旋轉(zhuǎn)軸(100,100,0) 3、LocalPosition=WorldPosition TransformPosition Locatoin Space
- 網(wǎng)格距離場(chǎng):DistanceToNearestSurface(與最近表面的距離),DistanceFieldGradient(距離場(chǎng)梯度)...生成了網(wǎng)格距離場(chǎng)后這兩個(gè)函數(shù)就可使用了,有點(diǎn)像A*尋路里的格子,算距離很方便。
- 不常用:BlackBody(黑體),ConstantBiasScale(常量偏差比例),hlsl函數(shù) ddx ddy(往屏幕右邊走,是離光源更遠(yuǎn)還是更近,變化幅度由多大)。DepthOfFieldFunction(視野深度函數(shù))
- ??:LightmassReplace(光照系統(tǒng)替換 兩種輸入,在兩種使用階段)
DepthFade
紅色節(jié)點(diǎn)
常量 Const
- ??? 按實(shí)例消退、隨機(jī)
- 時(shí)間(period?周期?),雙面法線,VertexColor,ViewProperty(視野大小)
坐標(biāo) Coordinates
- 對(duì)象:ActorPositionWS,ObjectPositionWS,ObjectOrientatoin,ObjectRadius
- 像素:PixelNormalWS,WorldPosition
- 場(chǎng)景:ViewSize,SceneTexelSize,SceneColor,SceneDepth,ScenePosition //Texel:紋理元素 texture element
- 其他:ParticlePositionWS,VertexNormalWS,CameraPositionWS
WS是全局的意思。LightmapUVs:???。
綠節(jié)點(diǎn):Panner,Rotator
粒子 Particle
ParticleMotionBlurFade(粒子運(yùn)動(dòng)模糊的值) ParticleMacroUV(使用粒子拼好貼圖) SphericalParticleOpacity(利用透明度達(dá)到圓形) ParticleSubUV(粒子動(dòng)畫(huà)貼圖用)
其他
大氣 Atmosphere AtmosphericFogColor
深度 Depth DepthFade(深度消退) PixelDepth(像素深度) SceneDepth(場(chǎng)景深度)
其他
定制 Custom
自t定義HLSL代碼,CalcPixelMaterialInputs 最后一步計(jì)算函數(shù)
函數(shù) Function
多數(shù)與材質(zhì)函數(shù)配合使用,除TextureObject與TextureSample配合使用
材質(zhì)屬性 Material Attribute
BreakMaterialAttributes中斷材質(zhì)屬性 MakeMaterialAttributes建立材質(zhì)屬性
參數(shù) Paramaters
- CollectionParameter(參數(shù)文件) DynamicParameter(粒子系統(tǒng)用) FontSampleParameter TextureObjectParameter(紋理取樣用)
- StaticBoolParameter(編譯時(shí)用的) StaticComponentMaskParameter(編譯時(shí)用 蒙版)
- 材質(zhì)實(shí)例,代碼用:ScalarParameter VectorParameter
- 材質(zhì)實(shí)例,代碼用:TSP2D(功能與TextureSample相同),TSPSubUV(功能與ParticleSubUV相同) TSPCube(只接立方體貼圖) TSPMovie(只接電影貼圖) //TSP=TextureSampleParameter
景觀 Landscape
LandscapeLayerBlend:景觀模式專用的材質(zhì)表達(dá)式,可將多個(gè)材質(zhì)混合,按需涂到景觀上。
1、給景觀選擇材質(zhì) 2、在景觀模式的顏料下選擇層,涂到景觀上。要為每個(gè)層創(chuàng)建一個(gè)文件(Landscape Layer))。
三種混合模式:LB_ALphaBlend、LB_HeightBlend、LB_WeightBlend。
節(jié)點(diǎn):LandscapeLayerCoords,LandscapeLayerSwitch,LandscapeLayerWeight,LandscapeVisibilityMask
紋理 Texture
藍(lán)的節(jié)點(diǎn)
紅的節(jié)點(diǎn)
失量操作
ObjectOrientation(對(duì)象方向),ReflectionVectorWS(反射全局空間矢量:表面法線上的攝像機(jī)方向)
其他的與參考坐標(biāo)目錄
失量
AppendVector(追加矢量),ComponentMask(分量蒙版),CrossProduct(矢量積),Normalize(規(guī)范化),Transform(轉(zhuǎn)換 本地<->全局)
DeriveNormalZ(派生法線 Z。。根據(jù)X,Y值生成Z),DotProduct(標(biāo)量積。。參考向量投影,全局向量法線Dot相機(jī)相對(duì)表面向量 可做出類似菲涅爾效果)
材質(zhì)相關(guān)源代碼
Runtime/Engine/Classes/Material MaterialExpressionSceneTexture
轉(zhuǎn)載于:https://www.cnblogs.com/mattins/p/7843899.html
總結(jié)
以上是生活随笔為你收集整理的ue4 材质表达式分类的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: MySql数据库查询表信息/列信息(列I
- 下一篇: robotframework手机号随机产