1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

3D Art Assets in Civilization 6: A Modding Guide

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

  1. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    Wolfdog and lasttry like this.
  2. lasttry

    lasttry Chieftain

    Joined:
    Apr 26, 2014
    Messages:
    203
    Gender:
    Male
    Location:
    Berlin
    Congratulations ! would like to See a Tutorial :) for me very interesting Is how you get a City Building working :)
     
  3. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,927
    Location:
    London, UK
    @RFormica The Material .mtl file is linked from within the Asset .ast file - the Geometry Set section specifically - the point marked ***** below.

    Code:
    <m_GeometrySet>
       <m_ModelInstances>
            <Element>
                <m_Name text="Root"/> <!-- the Model name in .fgx-->
                <m_GeoName text="T34_Tank"/> <!-- the name of the corresponding Geometry metadata (.geo file) -->
                <m_GroupStates>
                    <Element>
                        <m_Values>
                            <m_Values>
                                <Element class="AssetObjects::ObjectValue">
                                    <m_ObjectName text="T34_Material"/>       <!-- ***** the name of the Material metadata (.mtl file) to use to skin this model. 
                                    <m_eObjectType>MATERIAL</m_eObjectType>
                                    <m_ParamName text="Material"/>
                                </Element>
                            </m_Values>
                        </m_Values>
                        <m_GroupName text="T34_Material"/> <!-- The name of the Material that the Mesh is bound to inside the .fgx - can use FGX Viewer/CivNexus6 to view this. -->
                        <m_MeshName text="T34"/> <!-- The name of the Mesh inside the .fgx -->
                        <m_StateName text="Default"/>
                    </Element>
                </m_GroupStates>
            </Element>
        </m_ModelInstances>
    </m_GeometrySet>
    
     
  4. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    I made my building on the outskirts of the city like the watermill so people could see it better. To do that you just setup your artdef so that it is in the city center district. And the extra thing about buildings in the city center district is you need an obstruction profile (OB). The OB is "supposed" to keep the smaller random buildings from spawning in or around your building. And the OB is just a plane mesh, with a bone, on z axis 0 and positioned under your building. Then in CivNexus6 you select class LandmarkObstructionProfile before saving it as a .fgx and making the .geo and GeomertySet for it. Then in the building's .ast file you just set the OB geometry for its OB under cooker.
     
    lasttry likes this.
  5. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    Wolfdog and lasttry like this.
  6. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    I keep getting this error that crashes the game when loading in the User Interface:

    Warning: explicitly setting size removes parent sizingWarning: explicitly setting size removes parent sizingSTART LuaContext::Initialize() id: 'AdvancedSetup' parent: 'MainMenu' Context: 'FrontEnd'
    DEPRECATED: 'full' size should be parent-sized to a root contextDEPRECATED: 'AutoSize' is no longer supported due to ambiguity, use 'Size="auto,auto"END LuaContext::Initialize() id: 'AdvancedSetup'
    Warning: stripping parent size flags in explicit SetSize call: ...
    DEPRECATED: 'full' size should be parent-sized to a root contextDEPRECATED: 'full' size should be parent-sized to a root contextWarning: stripping parent size flags in explicit SetSize call:
    /LoadScreen/Background/BackgroundImage//Warning: stripping parent size flags in explicit SetSize call:
    /LoadScreen/Background/BackgroundImage//END LuaContext::Initialize() id: 'LoadScreen'

    So if I am reading this right I need multiple sizes for the LEADER_NEW_LEADER_BACKGROUND image, but when I look at base game textures and other people's mod they only have one image for this.
    Anyone know what I am missing here?
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,436
    Location:
    France
    Are you using an UI mod ?
    Override some of the base game's files in your own mod ?
    using ContextPtr & LookUpControl in your mod ?
     
  8. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    No, I am not using any other mods. No, I am not changing any of the base game stuff. No, I am not using those functions. I just started this mod using the ModBuddy Leader/Civilization template. All I have as far as art is the leader BACKGROUND, the leader NEUTRAL, the leader FALLBACK, the leader ICON (which shows up), and the civilization ICON (which shows up). And that's because the template had those spaces to fill in. I am sure I am probably missing something simple. My other mod had icons in it so I know how that part works, but the BACKGROUND (1920 X 960), NEUTRAL (1024 X 540), and FALLBACK (1024 X 428) are new to me. Maybe I got the sizes of them wrong?
     
  9. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    I figured it out, when you use the JASPER_KITTY template, you have to go in to In-Game Actions and remove the Criteria (LeaderCriteria) from each of the actions. I guess it wasn't an art related issue, even though that is what Fire Tuner and the logs was telling me.
     
  10. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    When I try to export my leader from Blender to CivNexus6 format, Blender crashes every time. I can export my leader to FBX format fine, and other meshes with lower vertex counts I can export to CivNexus6 format fine. Is there a max vertex count for the CivNexus6 format, and if so what is it? And problem is, since it is a leader it already had a high vertex count when I imported it, and I don't think I really added that much more. Or could it be something other than the high vertex count? Anyone know how I can get this working?
     
  11. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,927
    Location:
    London, UK
    There isn't a specified max limit on vertices but it maybe that there is a practical limit due to the way the script works. It may be that the export runs out of memory or something. You could try deleting the VERTEX_KEYS Vertex Group that stores the original Binormal vectors to see if that helps. Does it crash to quickly to see any error? It might be a question of updating the Python to log errors to a file rather than the console to debug.
     
  12. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    Deleting the vertex keys and all the hair strand vertex groups worked. Now I got a new problem though. When I look at the preview in CivNexus6, faces are stretched all over the place. It is triangulated, the heat map looks good, vertex groups are assigned correctly, and the armature is a base game one. I tried adding rigid body constraint to see if that would work, it didn't. I tried adding a scaling constraint to a part to see if that would work, it didn't. I tried adding IK to a bone of one of the parts that is stretching to see if that would work, it didn't. This is strange because I would expect something like this once it is animated, but it is just the still model. Any idea what could be causing this? (Screen Shot In Spoiler)

    Spoiler ScreenShot :

    upload_2017-10-12_17-26-14.png
     
  13. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,927
    Location:
    London, UK
    Why does you model come from? Did it originate from one Civ 6 leaders imported into Blender? With the vanilla models there can be issues if you combine meshes that were separated into single meshes. Because of the way the export script tries to identify unique vertices it can causes the kind of issues in your screenshot where there are multiple vertices in a mesh with the same XYZ and UV coordinates.
     
  14. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    Yes, I imported a Civ 6 base game leader, and Yes I combined meshes. I will go back and unjoin the meshes like it originally was. Thank you.
     
  15. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    I'm getting a new error. In Mod Buddy when I try to view it in Asset Editor, it shows an error in the output panel which says I am missing the WIG file (.wig) for my geometry. I don't know what this is. I opened a base game WIG file to look at it, but it looks like how the BLP files do if you open those, so I guess it is something you can't just copy over and edit the code. I tried copying and renaming a base game WIG file of the base game leader I used, but that didn't work. How do we make WIG files? or is there a work around?
     
  16. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,927
    Location:
    London, UK
    I believe @sukritact just copies and renames one of the existing .wig files and then references it. I don't know exactly what he does because I've not done it myself.
     
  17. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    I tried asking sukritact didn't get an answer yet, but figured it out. So if anyone else asks:
    1) You copy a base game .wig file, paste it in your geometries folder of your project, and rename it the same name as your .geo file
    2) Copy the lines of code between the START and STOP notes in the below code
    3) Open your .geo file with NotePad++, or just note pad, scroll down near the end of the file, paste right above the </m_DataFiles> tag as shown in below code
    3) Change GEOMETRY.wig to the name of your .wig file, save.

    Near end of .geo file:
    Code:
    <!--- ...etc... -->
    <m_DataFiles>
    <Element>
    <m_ID text="GR2"/>
    <m_RelativePath text="GEOMETRY.fgx"/>
    </Element>
    <!-- START -->
    <Element>
    <m_ID text="WIG"/>
    <m_RelativePath text="GEOMETRY.wig"/>
    </Element>
    <!-- STOP -->
    </m_DataFiles>
    <!--- ...etc... -->
    
     
  18. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,927
    Location:
    London, UK
    Yes, Sukritact did ask if I could add that code to the CivNexus6 .geo file generation code, but I haven't got around to it yet.
     
  19. esosorcdc

    esosorcdc Chieftain

    Joined:
    Aug 3, 2017
    Messages:
    90
    Gender:
    Male
    So I got my leader to show up in Asset Previewer, it is hard to see since the viewer camera is pointed at the leader's feet or something, so you can only fully see it if you zoom out far. I tested a base game leader to make sure it wasn't just something wrong with mine, but same camera view even with base game leaders. I guess I got to get it to show up in game before I can really look at it. So I loaded my game up, but all I get is Cleopatra's leader fallback image. So I guess not only is my 3D leader art not showing up, but my leader fallback image isn't ether.

    I am looking at Sukritact's Ramkhamhaeng mod as an example; so it "looks like" my xlps, mod.art, and Leaders.artdef are good.
    One thing I noticed is that he made his own light rig (he's got an xlp for it), and I am just using a base game leader's light rig. Would that cause issues?
    Another thing is he is using MasterCamera, and I am just using a base game leader's camera. Would that cause issues?
    Is there anything else you can think of that is different from setting up a unit's 3D art, that I didn't mention above, that I may be missing?
     
  20. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,927
    Location:
    London, UK
    Your best bet is to copy @sukritact since he's the only person to actually have done it!
     

Share This Page