3D ART ASSET OUTLINE FOR BUILDINGS
Special Thanks: FurionHuang, Deliverator, sukritact, lasttry
1) Blender (Using Cyles Render)
- Create 3D Model (must be triangulated)
- Mark Seams (Ctrl + E => "Mark Seam")
- Add a Bone (Add => Armature => Single Bone)
- Add Vertex Group (In Edit mode for your 3D Model, select entire 3D Model, in the properties menu, under Object Data, then under Vertex Groups, add new vertex group and click Assign)
> Or is there is already a vertex group called Bone under Vertex Groups, just make sure your whole mesh is selected in edit mode and click Assign.
- Assign Bone to your 3D Model (In Object mode select 3D Model, then hold shift and select bone, then press Ctrl + P and select "With Automatic Weights")
- Create a Material for each type of materials you will have on your 3D Model
- Assign each Material to the corresponding faces of your 3D Model
- Get or Create PBR textures (PBR stands for Physically-Based Rendering)
> You will need an Albedo and a Normal, bare minimum, but the more you use, the better it will look
> Get PBR textures from the internet (Just google search free PBR textures. Examples: <
www.textures.com> & <
www.poliigon.com>)
> Create PBR textures
- Assign PBR textures to Materials using Nodes
- Fix any scaling/position issues with textures (Note that I use Generated Texture Coordinate and Mapping Nodes for this)
- Create UV Map (In edit mode press U = > Unwrap)
- Pack Islands (In UV Map Editor press Ctrl + P)
- Create a "New Blank Image" in UV Map Editor
- Create an unattached Texture Image Node in the Node Editor of each material with the "New Blank Image" as the texture file, and with this node as only selected node
- Bake your textures to your UV map
> Albedo = Diffuse (Color)
> Ambient Occlusion = Ambient Occlusion
> Glossiness = Gloss
> Normal Map = Emit (*Requires Special Node Setup through the Emission shader)
> Metalness = Emit (*Requires Special Node Setup through the Emission shader)
- Delete all Materials, Create one Material, Assign your Baked UV Map Textures to the Material using Nodes
- Export Blender project to .cn6 format
2) Gimp (or Paint.NET)
- Export all of your Baked UV Map Textures to .dds format
> Gimp: Format RGBA8, Uncompressed, With Mipmaps
> Paint.NET: Format B8G8R8A8, Uncompressed, With Fant Mipmaps
3) CivNexus6
- Import the .cn6 file you exported from Blender
- Set Class under Additional Actions tab to: LandmarkModel
- Click Save (it will save it as a .fgx)
- Under Additional Actions tab, click [Create GeometrySet .xml for .ast file] (Creates GeomertySet.xml file)
- Under Additional Actions tab, click [Create Geomerty/Animation (.geo/.anm) File] (Creates .geo if the open .fgx file is a 3D Model, or a .anm if the open .fgx file is an Animation.)
4) Windows File Explorer
- Copy and paste all the files you just made in CivNexus6 in to the Geometries folder in your ModBuddy Project (normally all to the same folder )
> You should have a .geo, .fxg, and a .xml file
- Go to (Sid Meier's Civilization VI SDK Assets/pantry/Assets) folder
- Copy and paste a building asset in to the Asset folder in your ModBuddy Project and rename it the same name as your .fgx file.
> So for example you can use DIS_CTY_AW_Monument.ast
- Copy and paste a building "_Base" asset in to the Asset folder in your ModBuddy Project and rename it the same name as your .fgx file followed by "_Base".
> So for example you can use DIS_CTY_Monument_Base.ast
5) AssetEditor in ModBuddy
- Create Texture files, click New, then Texture (creates .tex file and a copy of the .dds in your project folder)
> Albedo (Class Name: Generic_BaseColor) => (Path: ".dds file name") => (Save)
> Normal (Class Name: Generic_Normal) => (Path: ".dds file name") => (Save)
> Ambient Occlusion (Class Name: Generic_AO) => (Path: ".dds file name") => (Save)
> Metalness (Class Name: Generic_Metalness) => (Path: ".dds file name") => (Save)
> Glossiness (Class Name: Generic_Gloss) => (Path: ".dds file name") => (Save)
- Create Material file, click New, then Material (creates .mtl file in your project folder) (you will make one for every Material you had in Blender)
> Name: "whatever you named your material in blender"
> Class Name: Landmark
> Under Cook Parameters, then under Value, for each entry click Add Existing, and Add correct .tex files you created to corresponding Value
> Save
- Create ArtDefs: Buildings.artdef and Landmarks.artdef
> Click New, then ArtDef, then for Art Definition Template choose "Buildings" (this will become the Buildings.artdef)
~ On Building, right click, select Add Element (Name: "Your buildings name from ModBuddy")
~ On StrategicView, right click, Add Element, Add 3 Elements (State: "UnderConstruction", "Pillaged", and "Completed", one type for each element) (XrefName: "a predefined base game element that corresponds to the State")
~ Save
> Click New, then ArtDef, then for Art Definition Template choose "Landmarks" (this will become the Landmarks.artdef)
~ On HeroBuildingTags, right click, select Add Element (Name: "Your buildings name from ModBuddy")
~ On Districts, right click, select Add Element (Name: "Exact name of the district your building will be in")
~ On BaseVariants, right click, select Add Element (Set_HeroBuildings: "Your building name in ModBuddy") (Asset: "choose random base game asset for now, but remember what you chose")
~ On BuildingVariants, right click, select Add Element (Tag_HeroBuildings: "Your building name in ModBuddy") (Asset: "choose random base game asset for now, but remember what you chose")
~ On BuildingSets, right click, select Add Element (Name: "Your building name in ModBuddy") (Element: "Select Your building name from the drop down menu")
~ Save
7) ModBuddy
- From project's Solution Explorer panel, right click, Add => Existing Item, add all of the files that are in the Geometries, Assets, Materials, Textures, and ArtDefs folders
> You are adding all the files you have created up until now
- Open your model's .ast file, do a Find and Replace for all of the following (enter file names without file extentions)
> Change m_Name field to what you renamed the .ast file
> Change m_GeoName field to the name of your .geo file
> Change m_ObjectName field under AssetObjects::ObjectValue element to the name of your .mtl file
> Change m_GroupName field to whatever you named your material in Blender/CivNexus6
> Change m_MeshName to whatever you named your mesh in Blender/CivNexus6
> The Find and Replace above should have gotten these, but check and make sure they were changed:
~ Change Element under m_Geometries to the name of your .geo file
~ Change Element under m_Materials to the name of your .mtl file
~ Change Element under m_Name to the name of the .ast file
> Under the m_CookParams section, make following changes:
~ Clear m_ObjectName text field from the element with a m_ParamName of Obstruction Profile
~ Clear m_ObjectName text field from the element with a m_ParamName of AO
~ Set m_bValue to true from the element with a m_ParamName of Obstruction Profile AutoGenerate
> Delete all other geometry
- Open your "_Base" .ast file, do a Find and Replace for all of the following (enter file names without file extentions)
> Change m_Name field to what you renamed the "_Base" .ast file
> Under the m_CookParams section, make following changes:
~ Clear m_ObjectName text field from the element with a m_ParamName of Obstruction Profile
~ Clear m_ObjectName text field from the element with a m_ParamName of AO
~ Set m_bValue to true from the element with a m_ParamName of Obstruction Profile AutoGenerate
* If you used DIS_CTY_Monument_Base.ast this is all you have to do since this has no geomerty in it, if the one you used has geometry the go through and delete it
- Open your Landmarks.artdef file
> Search for the random base game asset you put under BaseVariants for the Asset entry when you created the ArtDef, replace with your _Base.ast file name.
> Search for the random base game asset you put under BuildingVariants for the Asset entry when you created the ArtDef, replace with your .ast file name.
- Create .xlp files with "correct coding"
> A hero_buildings.xlp and a tilebases.xlp
> hero_buildings.xlp with your 3D Model's .ast file name, and tilebases.xlp with your _Base.ast file name
- Create and/or Edit Mod.Art.xml with correct relativeArtDefPaths and libraryDependencies
> You will need to add elements under consumerName Landmark and StrategicView_Sprite, and libraryName TileBase
- Project Properties => In-Game Actions
=> ImportFiles (All your .dds, .tex, .geo, .fgx, .mtl, .ast, and any other art files you created.)
=> UpdateArt ((Mod Art Dependency File), Buildings.artdef, and Landmarks.artdef)
- Click File => Save All => Click Build => Build Project
*You do not need to add .xlp files, or the GeometrySet.xml to the Project Properties In-Game Actions
*Your .blp files are auto generated from your .xlp files, and your .dep file is also auto generated from your Mod.Art.xml at build time.
8) Troubleshoot (Asset Editor/Blender/ModBuddy)
- Open your model's .ast file, make sure your model is displaying properly in the Asset PreViewer panel
- If you can't see your model in Asset PreViewer, then there could be something wrong with your .ast file or any other file associated with it
- If you see it, but it is not the correct size or in the correct position, then its back to Blender to scale/rotate/repostion
> Then export to .cn6, do the same steps in CivNexus6, and copy/paste/replace the .fgx, .geo, and .xml to your Geometries folder in your ModBuddy Project
- Then open back up in Asset Editor to see if it is now correct
- If it is the start game up and see if it displays properly in game, if not, then there could be something wrong with your .xlp files, or Mod.Art.xml file, or .artdef files, or Project Properties
- Troubleshoot