2015-10-15 12:25:55 wag2765 阅读数 120
  • 从这里开始虚幻4-Editor介绍 v4.18

    本课程系列取名英译系列,是录制人员参考国外英文原版经典教程,结合中国人的习惯录制而成。希望能够给大家以帮助。从这里开始虚幻4系列教程,是Unreal的官方发布的入门教学,非常经典,是学习Unreal的佳入口。

    2392 人正在学习 去看看 杨石兴

编辑器中控制视角最方便的快捷键:
按住鼠标右键不放,然后再按W、A、S、D、Q、E

 

转自官方文档:http://docs.unrealengine.com/latest/INT/Engine/UI/LevelEditor/Viewports/ViewportControls/index.html

 

For the purposes of this document, you should assume the following abbreviations:

 
Control Abbreviation
Left Mouse Button LMB
Right Mouse Button RMB
Middle Mouse Button MMB

Standard

These controls represent the default behavior when clicking and dragging in the viewports with no other keys or buttons pressed. These are also the only controls that can be used to navigate the orthographic viewports.

 
Control Action

Perspective

LMB + Drag Moves the camera forward and backward and rotates left and right.
RMB + Drag Rotates the viewport camera.
LMB + RMB + Drag Moves up and down.

Orthographic (Top, Front, Side)

LMB + Drag Creates a marquee selection box.
RMB + Drag Pans the viewport camera.
LMB + RMB + Drag Zooms the viewport camera in and out.

Focusing

F Focuses the camera on the selected object. This is essential to make the most out of tumbling the camera.

Magic Mouse and Magic Trackpad

On a Mac, after enabling Secondary click in System Preference -> Mouse for the Magic Mouse, or enabling Secondary click with two fingers in System Preference -> Trackpad for the Magic Trackpad, the following controls are available.

 
Magic Mouse Magic Trackpad Action

Persepctive

LMB + Drag 1 Finger Click + Drag Moves the camera forward and backward and rotates left and right.
RMB + Drag 2 Finger Click + Drag Rotates the viewport camera.
1 Finger Touch + Drag 2 Finger Touch + Drag Rotates the viewport camera.

Orthographic (Top, Front, Side)

LMB + Drag 1 Finger Click + Drag Creates a marquee selection box.
RMB + Drag 2 Finger Click + Drag Pans the viewport camera.
1 Finger Touch + Drag 2 Finger Touch + Drag Pans the viewport camera.

Focusing

F F Focuses the camera on the selected object. This is essential to make the most out of tumbling the camera.

Game-style

The WASD controls will feel natural to those who are used to playing shooter games on the PC. They are enabled by default and can be used whenever you are holding RMB. This means you will still use RMB to turn the camera while navigating in this way.

These controls are mirrored on the arrow keys and num pad to provide alternate access to them.

All of these controls are only valid in a Perspective viewport, and by default you must hold RMB to use the WASD game-style controls.

 
Control Action
W | Numpad8 | Up Moves the camera forward.
S | Numpad2 | Down Moves the camera backward.
A | Numpad4 | Left Moves the camera left.
D | Numpad6 | Right Moves the camera right.
E | Numpad9 | Page Up Moves the camera up.
Q | Numpad7 | Page Dn Moves the camera down.
Z | Numpad1 Zooms the camera out (raises FOV).
C | Numpad3 Zooms the camera in (lowers FOV).

When zooming the camera, holding the RMB will hold the FOV, preventing it from snapping back to its default settings. The FOV will remain until the RMB is released.

When navigating with WASD while holding down the RMB, you can rotate the mouse wheel up to speed up your movement, or rotate the mouse wheel down to slow down your movement.

While using the Magic Mouse or Magic Track you will not be able to change the speed of the camera by using the RMB + Mouse Scroll Wheel, you will need to adjust it using the Viewport camera speed option.

 

Pan, Orbit, and Zoom

Unreal Editor supports Maya-style pan, orbit, and zoom viewport controls, making it much easier for Maya artists to jump into the tool. If you are unfamiliar, here is a breakdown of the keys:

 
Command Description
Alt + LMB + Drag Tumbles the viewport around a single pivot or point of interest.
Alt + RMB + Drag Dollies (zooms) the camera toward and away from a single pivot or point of interest.
Alt + MMB + Drag Tracks the camera left, right, up, and down in the direction of mouse movement.

The use of the F key is not limited to Maya-style controls. You can always press F to focus on a selected object or group of objects!

 

Selection Controls

You can select Actors in the viewport individually simply by clicking on them or in groups using a box selection in the 2D viewports:

 
Control Action

Simple Selection

LMB Selects the Actor under the cursor, replacing the current selection.
Ctrl + LMB Adds the Actor under the cursor to the current selection.

Box Selection (2D Viewports Only)

LMB + Drag Replaces the current selection with the Actors contained in the box.
Shift + LMB + Drag Adds the Actors contained in the box to the current selection.
Ctrl + RMB + Drag Removes any select Actors in the box from the current selection.

Transform Controls

These controls relate to moving, rotating, and scaling Actors in the viewports using the transform tools:

You can see which tool is active in the viewport toolbar:

LE_Trans_WidgetIcons.png

 
Control Action
LMB + Drag (on Transform Tool) Moves, rotates, or scales the currently selected Actors, depending on the active transform gizmo.
W Selects the Move Tool.
E Selects the Rotate Tool.
R Selects the Scale Tool.
V Toggles vertex snapping which allows you to snap to the vertices of other geometry in the world.
MMB + Drag (on Pivot) Moves the pivot of the selection temporarily to offset transformations.

Move Tool Controls (Perspective Viewports Only)

Ctrl + LMB + Drag Moves the currently selected Actor(s) along the X axis.
Ctrl + RMB + Drag Moves the currently selected Actor(s) along the Y axis.
Ctrl + LMB + RMB + Drag Moves the currently selected Actor(s) along the Z axis.

Move Tool Controls (Orthographic Viewports Only)

Ctrl + LMB + Drag Moves the currently selected Actor(s) along the plane defined by the two visible axes.

Rotate Tool Controls (Perspective Viewports Only)

Ctrl + LMB + Drag Rotates the currently selected Actor(s) along the X axis.
Ctrl + RMB + Drag Rotates the currently selected Actor(s) along the Y axis.
Ctrl + LMB + RMB + Drag Rotates the currently selected Actor(s) along the Z axis.

Scale Tool Controls

Ctrl + LMB + Drag Scales the currently selected Actor(s) uniformly along all axes.

Move/Scale Tool Controls (Orthographic Viewports Only)

Ctrl + RMB + Drag Rotates the currently selected Actor(s) along the visible axis.

Display Controls

These controls affect how the level is displayed in the viewport.

 
Control Action
G Toggles Game Mode, which causes the viewport to render only what would be seen in-game.
Ctrl + R Toggles real-time playback in the active viewport.
F11 Toggles immersive mode, which puts the viewport into full-screen.

 

模型视图



 

材质视图



 

2019-05-10 21:25:45 qq_33465047 阅读数 144
  • 从这里开始虚幻4-Editor介绍 v4.18

    本课程系列取名英译系列,是录制人员参考国外英文原版经典教程,结合中国人的习惯录制而成。希望能够给大家以帮助。从这里开始虚幻4系列教程,是Unreal的官方发布的入门教学,非常经典,是学习Unreal的佳入口。

    2392 人正在学习 去看看 杨石兴

首先,找一个文件夹,然后右击,会弹出下面所示的,点击Material建立一个材质,然后给命名,

在这儿将新建材质,命名为Wall,然后双击,进入材质编辑器。如下图:

材质编辑器,主要由5部分组成,1

1 :菜单栏+工具栏,2视口面板:预览材质实时的效果,3细节面板-----列出材质,所选材质的表现, 4 :代码编辑区:显示创建材质的指令 5:控制面板:列出所有材质着色器指令的材质表现和函数。

下面介绍一下材质中特别重要的基础部分:如左图所示。

其中常用的是:

 

 基础颜色,金属,高光,粗糙度,自发光颜色,法线.

基础颜色(Base Color):材质的基本颜色

金属(Metallic):定义材质有金属特性,设置范围在0-1之间。

高光(Specullar):调整的是非金属材质的高光反射程度。默认是0.5

粗糙度(Roughness):数值低的材质镜面反射的程度就越高,也就是越光滑。

自反光颜色(Emissive):定义材质自主发出光线的参数

法线(Normal):用于连接贴图,

了解这些就可以做出很多材质了,

 

 

 

在材质编辑器一些常见的快捷键(注意,按键的同时,左击鼠标,才会有反映)

键盘撒上的数字1,2,3,:是用来创建常量和向量的节点,

U:贴图坐标

T:贴图取样器

M和D:创建加法、乘法和除法的节点。

删除节点:就是delete

 

然后实际操作一下:

首先,按下键盘的数字3同时单机左键,会出现一个向量,用来设置基础颜色,双击这个向量,选择一个颜色。然后再按下数字1的同时单机左键,会出现一个标量,将它与金属属性相连,然后单机编辑器的左上方,Apply按钮,会出现一下效果。

 

2018-06-11 15:38:10 zsyddl2 阅读数 452
  • 从这里开始虚幻4-Editor介绍 v4.18

    本课程系列取名英译系列,是录制人员参考国外英文原版经典教程,结合中国人的习惯录制而成。希望能够给大家以帮助。从这里开始虚幻4系列教程,是Unreal的官方发布的入门教学,非常经典,是学习Unreal的佳入口。

    2392 人正在学习 去看看 杨石兴

   目前未找到直接手动创建完整材质的办法,感觉不太方便。 目前的办法是:在编辑器中创建需要的材质比如 顶点颜色材质、颜色材质、图片材质等。并将输入的数据添加到参数,这样可以在程序运行中修改顶点颜色,材质颜色,或者材质图片。

  顶点颜色材质:

    

   颜色材质创建:

  

 动态修改颜色:

  FString strMaterial = TEXT("/Game/StarterContent/Materials/M_Color.M_Color");

    ((AUeCustomActor*)m_pUeActor)->LoadSpecialMaterial(strMaterial, pColorMaterial, false);

    FLinearColor linearColor(color.m_fR, color.m_fG, color.m_fB, color.m_fA);
    
 
    UMaterialInstanceDynamic* pDynamicMaterial = UMaterialInstanceDynamic::Create(pColorMaterial, nullptr);// new UMaterialInstanceDynamic();
 
    pDynamicMaterial->SetVectorParameterValue(FName("BaseColor"), linearColor);

    pProcMesh->SetMaterial(nSection, pDynamicMaterial);

 图片材质 未测试。这种应该是可以冬天替换,比如用于播放视频。


  补充 LoadSpecialMaterial:

  
void AUeCustomActor::LoadSpecialMaterial(const FString& MaterialName, UMaterial*& Material, bool bCheckUsage)
{
    // only bother with materials that aren't already loaded
    if (Material == NULL)
    {
        // find or load the object
        Material = LoadObject<UMaterial>(NULL, *MaterialName, NULL, LOAD_None, NULL);

        if (!Material)
        {
#if !WITH_EDITORONLY_DATA
            UE_LOG(LogEngine, Log, TEXT("ERROR: Failed to load special material '%s'. This will probably have bad consequences (depending on its use)"), *MaterialName);
#else
            UE_LOG(LogEngine, Fatal, TEXT("Failed to load special material '%s'"), *MaterialName);
#endif
        }
        // if the material wasn't marked as being a special engine material, then not all of the shaders
        // will have been compiled on it by this point, so we need to compile them and alert the use
        // to set the bit
        else if (!Material->bUsedAsSpecialEngineMaterial && bCheckUsage)
        {
#if !WITH_EDITOR
            // consoles must have the flag set properly in the editor
            UE_LOG(LogEngine, Fatal, TEXT("The special material (%s) was not marked with bUsedAsSpecialEngineMaterial. Make sure this flag is set in the editor, save the package, and compile shaders for this platform"), *MaterialName);
#else
            Material->bUsedAsSpecialEngineMaterial = true;
            Material->MarkPackageDirty();

            // make sure all necessary shaders for the default are compiled, now that the flag is set
            Material->PostEditChange();

            FMessageDialog::Open(EAppMsgType::Ok, FText::Format(NSLOCTEXT("Engine", "SpecialMaterialConfiguredIncorrectly", "The special material ({0}) has not been marked with bUsedAsSpecialEngineMaterial.\nThis will prevent shader precompiling properly, so the flag has been set automatically.\nMake sure to save the package and distribute to everyone using this material."), FText::FromString(MaterialName)));
#endif
        }
    }
}

2016-06-17 09:50:12 fyyzwsws 阅读数 12366
  • 从这里开始虚幻4-Editor介绍 v4.18

    本课程系列取名英译系列,是录制人员参考国外英文原版经典教程,结合中国人的习惯录制而成。希望能够给大家以帮助。从这里开始虚幻4系列教程,是Unreal的官方发布的入门教学,非常经典,是学习Unreal的佳入口。

    2392 人正在学习 去看看 杨石兴

Unreal Engine4(虚幻4)学习心得-材质

材质

制作材质的过程其实就相当于在写shader,只是UE4制作材质使用的是可视化方式在写shader。下面将介绍一些材质属性:

  • Blend Mode混合模式
    用于决定材质颜色如何和背景颜色混合。
    1. Opaque不透明
    2. Masked蒙版,蒙版材质可以利用蒙版贴图,将一些区域设置为可见或者不可见,比如铁丝网就可以使用蒙版
    3. Translucent半透明,可以以某种形式允许光线透过,比如玻璃
    4. Additive叠加,有透明度,用于增加颜色信息,比如各种粒子效果
    5. Modulate调制,将材质颜色乘以背景颜色,适合做贴花效果
  • Lighting Mode光照模式
    当半透明/透明的时候使用。
    1. Volumetric NonDirectional,是最节省的光照模式,只使用漫反射颜色,不用考虑材质法线。严格的说,只对动态光照的物体有效。
    2. Volumetric Directional,考虑材质法线。
    3. Volumetric PreVertex NonDirectional,同Volumetric NonDirectional,但是光照只在顶点计算,这样会减轻PS的消耗。
    4. Volumetric PreVertex Directional,同Volumetric Directional,但是光照只在顶点计算,这样会减轻PS的消耗。
  • Base Color常规色
    通常会通过PS制作一些贴图,作为基本色。所有的贴图都可以通过UV设置其平铺状态
  • Emissive自发光
    能让材质自己发光,可以用于制作材质外边缘的光晕效果。
  • Specular高光
    用于控制高光的颜色。光源照射到物体然后反射到人的眼睛里时,物体上最亮的那个点就是高光。高光控制着光线的反射,以展现一种光泽的效果。
  • Opacity不透明
    用于控制物体的透明度。
  • OpacityMask不透明蒙版
    用于和混合模式中的Masked蒙版模式组合使用,包含了可见还是不可见信息蒙版贴图就在这里连接。
  • Normal法线
    法线贴图是材质具有凹凸效果的原因。除非制作的是玻璃或者金属球之类的非常光滑的物体,否则一定要用法线。可以再加上一张细节贴图,与法线贴图相加,一起当做法线贴图。但是法线贴图中的凹凸信息其实是存在于RG通道中,B通道好比基准线,也就是被RG弄皱的底平面,因此如果想再加上一张细节贴图的话,蓝色通道千万不能动。法线贴图通过RGB的信息,以像素为单位来指定表面角度。
  • WorldPositionOffset世界位置偏移量
    只有要跟踪某个材质的世界位置,并且要沿某个方向移动它,这个属性才会被用到。

材质的其他属性(UDK)

  • Diffuse漫反射
    提供不透明颜色,好比常规颜色。通常会通过PS制作一些贴图(包含alpha通道,法线贴图),作为漫反射的基本色。
  • DiffusePower漫反射次幂
    描述颜色随光照信息的流失,从饱和向阴暗渐变的速度。
  • SpecularPower高光次幂
    用来模拟光滑度。
  • Distortion扭曲
    它能使一个对象表面的材质发生扭曲。使用方式比如:把混合模式设置为Additive叠加,然后设置无光照,然后把法线贴图连接到扭曲上(扭曲接收的就是法线信息,它要利用RGB通道来决定把像素点移到多远),就能看到热浪的效果,类似折射。
  • TransmissionColor透射色
    设置一个颜色,这样穿过物体表面的光线,好像会穿透物体扩散开来,呈现出次表面散射(3S)的样子(透射蒙版要设置为1才能看到)。比如设计角色的耳朵的时候,将耳朵部分的透射蒙版设置为1,然后将投射色设置为深红,那么当光线射到耳朵背面的时候,耳朵看上去就有次表面散射的效果。(这里只是模拟S3,而非真正的S3,但是很逼真,移动光源就可以看到半透明的效果)
  • TransmissionMask透射蒙版
    0和1组成的蒙版贴图用于决定哪里需要透射。透射色和透射蒙版主要用于蜡和人皮肤之类的地方
  • BumpOffset凹凸偏移
    凹凸偏移需要借用高度贴图。高度贴图可以使用法线贴图的alpha作为其高度值,然后将高度贴图作为基本色和法线的UV即可。
2019-05-11 19:28:25 qq_33465047 阅读数 723
  • 从这里开始虚幻4-Editor介绍 v4.18

    本课程系列取名英译系列,是录制人员参考国外英文原版经典教程,结合中国人的习惯录制而成。希望能够给大家以帮助。从这里开始虚幻4系列教程,是Unreal的官方发布的入门教学,非常经典,是学习Unreal的佳入口。

    2392 人正在学习 去看看 杨石兴

首先建立一个简单的玻璃材质

创建金属材质

 

 效果如左图,上面连接图中的texture sample 

的实现有好几种方法。这里介绍最简单的方法:

 

如下图所示:找到官方提供的贴图。直接托到擦材质编辑器中。

 

 

 

 

 

 

 

 

 

 

 

创建材质实例(创建材质实例是为了省去创建相似材质而设立的,它运用了编程语言中的继承思想,即父子和儿子,之间既有相似也有不同的)

 

第一步:建立的材质,右击,选择创建材质实例。并命名

双击如下图所示:细节面板中并没有可调的参数,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 第二步:打开最开始创建的材质编辑器,操作如下图:并命名为Color。保存后,再打开创建的材质实例,会看见命名的color,就可以设置参数了,

 

同理,将原材质中的节点,设置后,最终的结果如图:

 

unreal4 源码引言

阅读数 256

linux设置快捷键

阅读数 421

没有更多推荐了,返回首页