纳金网

标题: Creating a simple Substance (创建一个简单的Substance) [打印本页]

作者: 驰骋的风    时间: 2012-9-24 09:43
标题: Creating a simple Substance (创建一个简单的Substance)

The best way to learn about Substances is to create one.
学习Substance最好的办法就是去创建一个。
We saw earlier that one of the advantages of Substances is that you can use other Substances to produce some very complex results. Substance Designer includes a Bitmap to Material Substance we will use this to turn a simple bitmap into a complete material, with normal, ambient occlusion, specular, height and diffuse maps.
我们知道Substance早期的优势之一是,你可以使用其他的Substance来制作一个非常复杂的东西。Substance Designer包括 Material Substance的一个位图,我们将通过使用这个简单的位图来制作一个完整的Material,这个Material包括normal(法线贴图)、ambient occlusion(环境光遮蔽(阻光贴图))、specular(高光贴图)、height(高度灰度图)和diffuse maps(漫反射贴图)。(这段的意思是说这个插件只用一个位图就可以做出一个有凹凸带反射等贴图的完整的材质球Material)

Downloading the sample resources 下载样本资源
You can download the resources used in this User Guide from our website. (See “About the User Guide”.)
您可以从我们的网站里下载到用户指南中所使用的资源(见"关于用户指南")
The resources are provided in compressed ZIP format. When unpacked, you will find a single Substance_Editor_Sample_Resources folder. Open this folder, then open the sub-folder named, Creating_a_Substance, where you will find the resources used in this chapter.
这些资源是以ZIP格式压缩的,当你解压缩后会得到一个名为"Substance_Editor_Resoutces"的文件夹。打开此文件夹后,再打开子文件,一个名为Creating_a_Substance的文件夹里存放着本章中所使用的资源。

Open Substance Designer and go to the Untitled_Package entry in the Packages panel. Open it to reveal the Untitled Graph. This is where we shall build our new Substance.
打开Substance 设计器,然后进入资源面板转到未命名资源,打开它来创建显示未命名图形,这是我们将要创建新Substance的地方。
The first step is to import our bitmap.
第一步导入我们的位图
Drag the CAMBODGE.JPG file onto the Untitled_Package Substance’s name in the Packages panel. This adds the bitmap to the Substance as a resource:
把文件CAMBODGE.JPG拖入到Parckages面板中的Untitled_Package中。把这个位图添加到Substance中,并作为一种资源来使用。






Tip: You can also add resources directly to the Untitled_Graph directly. There is no functional difference between the two choices. The two options are available to aid organization of complex Packages and Substances. You can also create folders inside a Package to create a complete hierarchy if you require it.
提示:您还可以直接添加资源到Untitled_Graph中。这2种方法没有功能上的区别。这2种方法可以帮助我们更好的去处理复杂的Package(资源包、封包)和Substance。如果您需要的话,还可以创建一个包含Package的文件夹,使得它具有一个完整的结构。

Drag and drop the new image resource from the Packages panel into your empty graph. Substance Designer will create a Bitmap node for you.
拖拽新图片到Package界面下你的空的graph中。Substance Designer会为你创建位图节点。(我试验的是从Package里选取文件夹,从Gallery中选取图片后拖拽到Untiled_Graph中)



The picture we are using has a simple, almost monochrome, image. Such images lend themselves well to the automated process we will be applying.
我们使用的图片是一个简单的单色调图像。我们将运用的这种图片很适合软件自动处理。
The next step is to add an instance of the Bitmap_To_Material Substance to our graph. In the Packages panel, open the Advanced_Filters Package and navigate to the Bitmap_To_Material graph:
下一步是在我们的的graph中添加Bitmap_To_Materia的一个实例。在Package面板中,打开Advanced_Filters Package(资源包)并浏览再graph中Bitmap_To_Material.



Drag Bitmap_To_Material into an empty area of your graph:
把Bitmap_To_Material拖动到你graph中的空白区域。



Next we need to connect the output connector from our Bitmap node to the input connector on the left edge of the Bitmap_To_Material instance node. You can do this by dragging a line between the two connectors:
下一步,我们需要从我们的位图节点中输出点做一个连接,来连接Bitmap_To_Material左边的输入点。您可以通过拖动来实现,及在2个连接点之间建立一条线



The right edge of the Bitmap_To_Material instance has an array of output connectors. If you hover the mouse pointer over the node, you should see the connector names appear:



BITMAP_TO_MATERIAL例子的右边有一个出书接口的序列。如果你吧鼠标放到节点上,你就能看到连接接口的名称



If you don’t see the connector names when you hover over them, you can enable this feature from the Graph View’s panel menu. Click on the small down-pointing triangle in the upper right of the Graph View panel. In the menu, make sure the Display connector name option is set:
如果您没有看到连接口的名称,您可以从Graph视窗的面板菜单中启用此功能。在Graph面板菜单的右上角,有一个向下的小三角形,点击它,在菜单中,确认显示连接口的名称选项的设置如下:



We need to link these connectors to individual Output nodes, so right-click on an empty part of the graph to bring up the Graph View’s context menu and choose New Output node:
当我们需要把一个连接口单独连接到一个输出节点(即output)的时候,我们又见单击Graph空白的地方在菜单中选择创建新的输出节点(即output)。



A new Output node will appear. Select it and use the Duplicate function (Ctrl+D) to add another four Ouput nodes to the graph. Arrange the Output nodes vertically to the right of the Bitmap_To_Material instance node. The graph should now look similar to this:
我们创建的新输出节点(即output)就显示出来了。选择它,并使用复制功能(Ctrl+D),我们就在Graph中创建了另外的四个输出节点(即output)。把这些输出节点(即output)垂直排列在Bitmap_To_Material实例节点的右边。现在Graph界面看起来是这样的:



All five of the Output nodes are set to “diffuse” by default.
因为这五个输出节点(即output)的所有设置都是默认的,所以都是"diffuse"。
If you hover the mouse pointer over the Bitmap_To_Material instance, you will see the names of its output connectors. We need to set each Output node to match the output connectors.
当您把鼠标放到Bitmap_To_Material实例的输出接口的时候,你会看到每个接口的名字。所以我们要为每个输出节点(即output)匹配一个输出接口。
The top connector in the Bitmap_To_Material instance is the Ambient Occlusion output, so we set the top Output node to this Usage type.
Bitmap_To_Material实例的顶部接口是按照Ambient Occlusion输出,因此要按照这种用法类型来设置顶部输出节点(即output)。
Click on the top Output node to bring up its parameters in the Inspectors panel. Adjust the right-most Usage parameter—which defaults to “diffuse”—to “ambientOcclusion”, as shown below:
点击顶部的输出节点(即output)在Inspector面板上设置他的参数。调整最后边的参数用法,把默认的"diffuse"改为"ambientOcclusion",如下图:




Note: For this example, you can leave the Usage format to the default setting of RGBA.
注:在这个例子中,你可以保留RGBA的默认设置(这里说的是使用格式)。

Repeat the process for each of the Outputs, so that their Usage parameters match a corresponding output connector on the Bitmap_To_Material instance.
重复这个对输出节点(即output)的操作过程(把所有的输出节点(即output)设置都改变一下),因此,他们使用的参数要匹配相应的Bitmap_To_Material例子的输出接口
You can also give each of the Output nodes a name (called an Identifier in Substance Designer) and Description. It’s good practice to do so as the Description text appears in a tooltip when you hover over the node. Changing the Identifier is useful as only this is shown in the 2D View tab when you double-click the node.
你也可以给每个输出节点(即output)定义一个名称(及Substance Designer的标识符)和描述。这是一个好习惯,这样做了以后,每当你你把鼠标放在输出节点(即output)的时候,都会出现一个说明文档的提示工具。更改标识符是很有用的,当你双击输出节点(即output)他会显示在2D视图窗口。
Finally, link each connector on the instance to its corresponding Output node:
最后,实例上的接口和其相应的输出节点(及output)的连接图:



We can now preview our new material in the 3D View. Right-click in an empty area of the graph and choose View outputs from the context menu:
现在我们可以在3D视窗中预览我们的新Material了。邮件点击Graph的空白区,并从菜单中选择查看输出:





This command tells Substance Designer to calculate the Output nodes and send them to the 3D View for rendering.
这个命令是告诉Substance Designer,计算输出节点(output),并将它们发送到3D视图中进行渲染。
Finally, we should save our new Substance. First, we should give the Substance, and its enclosing Package, a name:
Substance, and its enclosing Package, a name: 最后我们要保存我们的新Substance。首先我们应该给这个Substance和他的enclosing Package(程序包)一个名称:
Select the Untitled Package entry in the Packages panel, then either click again, or press F2, to rename it. Change the name as shown:
在Packages面板选择Untitled Package,然后双击他或者按下F2,重命名它。更白名称如下图:



Press Enter to confirm the new name. Note that the name appears in italics and has an asterisk after it:
按Enter键确认新的名称。注意,改名后名称应出现斜体和星号后:



This is Substance Designer’s way of letting you know that you have made changes to its contents and have yet to save it. As with any complex editing tool, it is best to save your work often!
这是Substance Designer特有的方式,通过这种方式告诉你,你所更改的内容那些是还没有保存的。不管多么复杂的编辑器,最好你都要经常去保存你的工程
We have now renamed the Package, which contains our new Substance.
我们已经给这个存有我们新制作的Substance的Package重新命名了
The Substance itself—the default name is Untitled_Graph—now needs to be named. As this Substance will be the only one in the Package, we shall give it the same name as the Package itself.
Substanc的默认名称是Untitled_Graph,但是现在需要我们重新命名。因为我们在这个Package只存有一个Substance,所以我们应当用Package的名字来命名这个Substance。
Repeat the renaming procedure to rename the Untitled_Graph Substance to BuddhaMaterial.
使用我们上边提到的重命名方法,重命名重命名Untitled_Graph为BuddhaMaterial。
When you press enter to set the new name, a dialog box will appear warning that you are about to change the Substance’s name and, thus, the internal path to any resources it contains:
当你重新设置了名称的时候,会出现一个对话框告诉你,你改变了Substance的名称,对话框还告诉你这个Substance所包含的资源的路径





Renaming a Substance will affect other Substances that use instances of it. Substances can be instanced from other Packages and the Substance Engine will need to know where to find each one. If you rename a Substance, the link can be broken and you will then need to open each affected Substance in turn and reset it.
重命名一个Substance会影响到其他使用这个Substance的实例。Substance可以被其他的Package所引用,并且通过SubStance软件可以知道是引用的那一个Substance。如果重命名了一种Substance,那么这种链接就被破坏了,然后你需要重新打开实例,重新建立各种链接。
Our Substance will not be referenced by any other Substances, so we can safely rename it.
我们的Substance将不会被其他的Substance所引用,所以我们可以放心的重命名它。



更多教程尽在Web3D纳金网www.narkii.com

作者: 川流不息    时间: 2014-3-3 13:15
感谢楼主的无私分享
作者: yuyu8823    时间: 2014-3-21 14:29
不错错不错不错错不错不错错不错




欢迎光临 纳金网 (http://rs.narkii.com/club/) Powered by Discuz! X2.5