FBX
Whether you're building a commercial project or a modification for Half-Life® 2, you'll want to sign up as a Valve developer today. It's free to join and is open to anyone working with the Source engine and its software development kit.
GoldSrc and the Half-Life SDK
If you want to create a Mod for Half-Life or looking for more GoldSrc documentation, click above.
Source and the Source SDK
If you want to create a Source SDK Base mod, or content-based mod for Half-Life 2, Team Fortress 2 or looking for more Source documentation, click above.
Source 2 Documentation
If you want to port Source content to Source 2, create a content-based mod for Source 2 games or looking for more Source 2 documentation, click above. Otherwise, you can check out the following Source 2 games with Workshop Tools:
- Source Engine Features
- Why choose the Source engine for your mod?
- Read Making a Mod - building a team through the shipping process.
- Already using the SDK? Check the Source SDK FAQ for some helpful answers.
- New to Source coding? Get started with basic programming articles.
- Read (or add) a tutorial on Source development, or any part of the content creation process.
For help with using the wiki, see Help:Contents. For help with navigating the wiki, see Category:Entry pages or Category:Valve Developer Community. For more information on the community itself, see Community Portal.
|
© 2005–2025 Valve Corporation. All rights reserved. All trademarks are property of their respective owners in the US and other countries. See the Terms of Use for details
About Valve Developer Community · Privacy Policy · Third Party Legal Notices
记录FBX文件在Dota 2 Workshop Tools中的功用。
材质指派(Material Assignment)
一般支持FBX文件不需考虑特别事项,但着绘在几何体上的材质则需要注意一些事项。
注意,所有的资源参照(resource references),包括材质,资源皆为mod对应之文件名(relative filename)。与Half-Life 2 Source SDK不同,没有隐含的目录(implied directories),如材质会在"materials/..." 的树状目录结构中。
FBX材质指派到(assignment to)source材质(source material)的算法是根据下列步骤。
- 若FbxProperty有FbxSurfaceMaterial下的字符串为"FBX_vmatPath",则该值做为材质指派。
- 若上述不为真,FbxSurfaceMaterial自身的名字试图匹配到CONTENT与GAME存在之材质。
- 若上述不为真且FbxSurfaceMaterial已被指派,若为存在之材质找到匹配则纹理文件名被转至材质文件名。
- 若上述不为真,则纹理文件名结尾为"_color.*"或"_normal.*","_color" 与"_normal"被去除,存在之材质找到匹配则纹理文件名被转至材质文件名。
这有一个FBX ASCII文件范例"FBX_vmatPath"字符串属性指定要使用哪个材质:
Material: 668812176, "Material::tile_stone_000_75", "" {
Version: 102
ShadingModel: "phong"
MultiLayer: 0
Properties70: {
P: "EmissiveColor", "Color", "", "A",1,1,1
P: "EmissiveFactor", "Number", "", "A",0
P: "DiffuseColor", "Color", "", "A",1,1,1
P: "DiffuseFactor", "Number", "", "A",0.8
P: "SpecularColor", "Color", "", "A",1,1,1
P: "SpecularFactor", "Number", "", "A",0.2
P: "ShininessExponent", "Number", "", "A",256
P: "ReflectionColor", "Color", "", "A",1,1,1
P: "ReflectionFactor", "Number", "", "A",0
P: "FBX_vmatPath", "KString", "", "U", "materials/stone/tile_stone_000_75.vmat"
P: "Emissive", "Vector3D", "Vector", "",0,0,0
P: "Ambient", "Vector3D", "Vector", "",0.2,0.2,0.2
P: "Diffuse", "Vector3D", "Vector", "",0.8,0.8,0.8
P: "Specular", "Vector3D", "Vector", "",0.2,0.2,0.2
P: "Shininess", "double", "Number", "",256
P: "Opacity", "double", "Number", "",1
P: "Reflectivity", "double", "Number", "",0
}
}
Houdini
Houdini有个特定的材质指派方法。
依赖性追踪(Dependency Tracking)
在FBXHeaderExtension中,若FbxProperty有"Original|FileName"字符串则该文件名将会被增加至资源依赖列表(asset dependency list)。
范例中正确的把"Original|FileName"指向.lxo (Modo)文件,则.FBX文件自该文件生成。
FBXHeaderExtension: {
FBXHeaderVersion: 1003
FBXVersion: 7300
CreationTimeStamp: {
Version: 1000
Year: 2014
Month: 3
Day: 25
Hour: 15
Minute: 22
Second: 56
Millisecond: 976
}
Creator: "FBX SDK/FBX Plugins version 2013.3"
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData: {
Version: 100
Title: "test_cube_001"
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties70: {
P: "DocumentUrl", "KString", "Url", "", "D:\Dev\main\content\dota\models\test\fbx\test_cube_001.fbx"
P: "SrcDocumentUrl", "KString", "Url", "", "D:\Dev\main\content\dota\models\test\fbx\test_cube_001.fbx"
P: "Original", "Compound", "", ""
P: "Original|ApplicationVendor", "KString", "", "", "The Foundry"
P: "Original|ApplicationName", "KString", "", "", "MODO"
P: "Original|ApplicationVersion", "KString", "", "", ""
P: "Original|DateTime_GMT", "DateTime", "", "", "25/03/2014 22:22:56.976"
P: "Original|FileName", "KString", "", "", "D:\Dev\main\content\dota\models\test\modo\test_cube_001.lxo"
P: "LastSaved", "Compound", "", ""
P: "LastSaved|ApplicationVendor", "KString", "", "", "The Foundry"
P: "LastSaved|ApplicationName", "KString", "", "", "MODO"
P: "LastSaved|ApplicationVersion", "KString", "", "", ""
P: "LastSaved|DateTime_GMT", "DateTime", "", "", "25/03/2014 22:22:56.976"
}
}
}