Art Assets in Civilization 6: A Modding Guide

Discussion in 'Civ6 - Modding Tutorials & Reference' started by Deliverator, Mar 14, 2017.

  1. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    This is a problem with the new .cn6 script really. The currently released version doesn't only support 3 UV layers, it *requires* 3 UV layers which isn't very helpful. I've updated the script to create default values for UV layer 2 and 3 and attached it to this post. Will add to the scripts download in due course.

    Leaders and anything animated only need 1 UV layer. 2 or 3 UV layers are only used for inanimate objects like Buildings and Wonders.

    If you want to use multiple Materials/Textures in the same UV space you can simply assign different parts of your mesh to different Materials and the .cn6 export and import to CivNexus6 will create the separate Triangle Groups (as they are called within the Granny engine). If you import one of the Civ 6 leaders into Blender via the .cn6 format you can see how multiple Materials per mesh are used.

    phillip_trigroups.jpg
     

    Attached Files:

  2. FurionHuang

    FurionHuang Warlord

    Joined:
    Apr 27, 2017
    Messages:
    171
    Gender:
    Male
    @Deliverator talking about UV channels, I found for buildings base color UV channel must be different from emissive channel. When I baked my textures base color, metalness, glossiness and normals worked just fine. But AO gave me either all white or all black, while emissive will light my entire geometry up. Looking into asset pantry, I also found the _E.dds files are smaller than _B.dds files and the contents don't match at all. Is there any explanation on that?
     
  3. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    Yes, Buildings and Improvements generally have three UV channels - I believe that the 3rd one is used for the Emissive map which is why I added support for this with the .cn6 export/import process. Sukritact has successfully used this to add night lights to a few of his recent models including his recent Wat Arun wonder (see below) so you could ask him how he achieved that. Also there is a Separate_AO_UV true/false value in the Material .mtl files which presumably does what it says!

    upload_2017-5-30_17-40-42.png
     
    Nomad or What likes this.
  4. sukritact

    sukritact Artist and Modder

    Joined:
    Sep 21, 2010
    Messages:
    2,903
    Location:
    Bangkok
    It's simply a matter of making sure UV 2 matches whatever your AO looks like, and your UV 3 matches your emissive. Then export, import into civ6nexus with the right settings and bring it into the game. There really isn't anything too different about the process.
     
    Deliverator likes this.
  5. Fred_Bear

    Fred_Bear Mutant Koala

    Joined:
    May 18, 2016
    Messages:
    42
    Gender:
    Male
    Location:
    Australia
    OK thanks very much :) Deliverator
     
  6. FurionHuang

    FurionHuang Warlord

    Joined:
    Apr 27, 2017
    Messages:
    171
    Gender:
    Male
    upload_2017-5-31_0-25-5.png
    Nailed it! Thanks sukritact, and Deliverator your new Nexus is just amazing!
     
    Deliverator likes this.
  7. FurionHuang

    FurionHuang Warlord

    Joined:
    Apr 27, 2017
    Messages:
    171
    Gender:
    Male
    By the way, for new city center building, the only spot I found good is right to Palace as shown above.
    And the location of buildings in a Tile is fixed in our geometry. So I think the best way to locate the buildings is when modeling it, import the base obstruction geometries into your modeling space as reference. Then you will always know where your building in a tile is. (My own discovery but I believe you guys all figured it out already. FYI just in case.)
     
  8. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    I believe you're the first to discover this so thanks for sharing!
     
    Nomad or What likes this.
  9. FurionHuang

    FurionHuang Warlord

    Joined:
    Apr 27, 2017
    Messages:
    171
    Gender:
    Male
    The Wat looks awesome! I'm wondering how the Wonder completion animation work? Assign some more building stats or actually have to create animation?
     
  10. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    The Wat Arun doesn't have a constuction animation - it is just a static under-construction model and then the constructed model.

    It is possible to extract the vanilla Wonder Movie animations in 1 second chunks but it seems pretty pointless because I think they just work by gradually showing/hiding the hundreds of submeshes that make up each Wonders. The animation export only extracts movement data - the construction animations include zero movement and I have no idea how the visibility stuff is done within the animations. So I don't know that we'll ever be able to do constuction animation for custom Wonders.
     
  11. sukritact

    sukritact Artist and Modder

    Joined:
    Sep 21, 2010
    Messages:
    2,903
    Location:
    Bangkok
    Could we theoretically use scaling in lieu of visibility?
     
  12. FurionHuang

    FurionHuang Warlord

    Joined:
    Apr 27, 2017
    Messages:
    171
    Gender:
    Male
    Nexus crashed when I tried export WON_Stonehenge_Wonder_Movie with WON_Stonehenge_Movie.fgx open. Is there any trick? BTW is there any import .na2 script for Blender 2.7 or it's actually covered by something else?
     
  13. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    The steps are:
    1. Open WON_Stonehenge_Movie.fgx.
    2. Enter '0' in the NA2 Start Time and '1' in the NA2 End Time.
    3. Click "Export Animation to NA2" and open WON_Stonehenge_Wonder_Movie.fgx.
    4. Repeat with NA2 Start Time 1 and NA2 End Time 2 etc.
    5. You might be able to increase the time size from 1 second to 2 - just see what works. The basic principle is to export the animation in chunks of smaller time.
    6. You can finally use the function to stitch together all your separate time chunks into one big file.

    HOWEVER, as I said, there is no really any point because none of the bones move from what I've seen. The showing/hiding of mesh elements must be achieved by something else that isn't exported by the Sample Bone function.

    Not at the moment, it probably wouldn't be too much work to update the script to work with Blender 2.7 however the issue is that the only reliable way I've found for getting custom animation data back out and into the game is to use Blender 2.49 and Nexus Buddy 2. Civ 6 animations and Civ 5 animations seem to be identical apart from the file extension so this method works fine. The Blender 2.7 FBX export with Civ 6 import (implemented in CivNexus6) seem to not work properly whereas I have animations made using Blender 2.49 and Nexus Buddy 2 working in Civ 6 just fine.
     
  14. Reliquary

    Reliquary Chieftain

    Joined:
    Jun 2, 2017
    Messages:
    29
    Hi, Deliverator,
    First of all, thank you so much for all you do. Without these guides I would have no concept of where to even start and it has been super helpful!

    I had a quick question about the Asset Editor, if you don't mind. I'm trying to make an improvement to go into the game. I've got the files necessary to start bringing them in. The .geos, the .anns, the .gfxs. They all go nicely into the CivNexus6 and preview just fine on the viewer. I make a new asset, set the Class Name to "TileBase" the same as the other improvements I've seen in the pantry, and import the geometry.

    This is where it gets tricky. Other assets I've looked at have attachment lists on the right hand side where you can chose to add/replace objects. They seem to correspond to the ones in the attachments tab on the left, but when I create them there they're not added on the right. I only managed to make it happen once, and I'm not even sure how that happened. And even then, when I tried to attach the imported geometry to the attachment point, I couldn't find it in the library.

    I've been following along with everything you've been posting. A lot of it makes sense. Some of it is hard to follow, since I haven't been super immersed in modding before. Do you have, or know of any quick guides on how to set up assets in the AE? It's been the bane of my existence over the past several days and I'm making no progress.

    Thanks a lot!
     
  15. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    Yes, the Asset Editor isn't that easy to understand and work with. I basically feel that it's a nice idea but it isn't especially user friendly. I do almost all my editing directly on the XML because I find it quicker and that's how I started out. I only use the Asset Editor for importing .dds Textures files.

    The best way I think is to follow examples from the vanilla game files or other modders who have done what you want to do successfully. If you want to follow an example of a custom Improvement then Sukritact's Ezana has one, the Hawelti.
     
    Last edited: Jun 7, 2017
  16. FurionHuang

    FurionHuang Warlord

    Joined:
    Apr 27, 2017
    Messages:
    171
    Gender:
    Male
    Since Reliquary is asking about attachments, I'm also curious about how to create FX/how to move FX to the location that I want?
     
  17. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    When I get the chance I'm going to share the Modbuddy project for Even Moar Units! Macedon and Persia which will provide an example of this.
     
  18. Reliquary

    Reliquary Chieftain

    Joined:
    Jun 2, 2017
    Messages:
    29
    Aah figures. I'll see if I can do it manually, then. If it works ok, I'll drop by again with some info on some export deets, since I know some people want to use Maya instead of Blender and I may have gotten it to work. We'll see ^^
     
  19. FurionHuang

    FurionHuang Warlord

    Joined:
    Apr 27, 2017
    Messages:
    171
    Gender:
    Male
    I actually attached smoke effect to my chimney. New continent found!
    FX_Preview.jpg
    Though, I can use all the Fxs defined in the pantry already, how about creating some new?
     
  20. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,720
    Location:
    London, UK
    The actual base particle effects are made using Fork Particle Studio which is a paid-for commercial product unfortunately. We can't make new .psb files without that.

    However even without making new .psb files there is still quite a lot that can be done - significantly more than with Civ 5:

    1) FX can be reskinned to make them different colours etc.
    2) Some things like Scale can be altered in the Cook Params in the FX_*.ast files.
    3) I'm pretty sure we can swap in different meshes for the effects that include .fgx Geometries. So I think it is possible to replaces the Arrow in the Archer's Arrow effect with a Spear for a spear throwing animation.

    I played around for a while with some of the .psb files from Beyond Earth trying to get them to work in the Civ 6 engine but no joy so far.
     

Share This Page