1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Let's all try and help each other with these Art 'Assets'

Discussion in 'Civ6 - Creation & Customization' started by TheRealHellBlazer, Feb 26, 2017.

  1. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    @sukritact Has got unit reskins working:

    unknown (1).png

    unknown.png

    It's all set up in the .ast files

    Code:
                               <m_Values>
                                    <Element class="AssetObjects::ObjectValue">
                                        <m_ObjectName text="Suk_ChangSuekElephantA"/> <!-- Changed -->
                                        <m_eObjectType>MATERIAL</m_eObjectType>
                                        <m_ParamName text="Material"/>
                                    </Element>
                                </m_Values>
    
    You can make a duplicate .ast AND a duplicate .mtl

    Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <AssetObjects::MaterialInstance>
       <m_CookParams>
            <m_Values>
                <Element class="AssetObjects::ObjectValue">
                    <m_ObjectName text="Suk_ChangSuekElephant_a"/> <!-- Changed -->
                    <m_eObjectType>TEXTURE</m_eObjectType>
                    <m_ParamName text="BaseColor"/>
                </Element>
                <Element class="AssetObjects::ObjectValue">
                    <m_ObjectName text="VaruElephant_n"/>
                    <m_eObjectType>TEXTURE</m_eObjectType>
                    <m_ParamName text="Normal"/>
                </Element>        
                <Element class="AssetObjects::BoolValue">
                    <m_bValue>false</m_bValue>
                    <m_ParamName text="Seperate_AO_UV"/>
                </Element>
                <Element class="AssetObjects::ObjectValue">
                    <m_ObjectName text="VaruElephant_m"/>
                    <m_eObjectType>TEXTURE</m_eObjectType>
                    <m_ParamName text="Metalness"/>
                </Element>
                <Element class="AssetObjects::ObjectValue">
                    <m_ObjectName text=""/>
                    <m_eObjectType>TEXTURE</m_eObjectType>
                    <m_ParamName text="TintMask"/>
                </Element>
                <Element class="AssetObjects::ObjectValue">
                    <m_ObjectName text="VaruElephant_g"/>
                    <m_eObjectType>TEXTURE</m_eObjectType>
                    <m_ParamName text="Gloss"/>
                </Element>
            </m_Values>
        </m_CookParams>
        <m_Version>
            <major>3</major>
            <minor>0</minor>
            <build>160</build>
            <revision>778</revision>
        </m_Version>
        <m_ClassName text="Unit"/>
        <m_DataFiles/>
        <m_Name text="Suk_ChangSuekElephantA"/><!-- Changed -->
        <m_Description text=""/>
        <m_Tags>
            <Element text="Unit"/>
        </m_Tags>
        <m_Groups/>
    </AssetObjects::MaterialInstance>
    
     
    zwei833 and Androrc the Orc like this.
  2. Firebug

    Firebug Not-so Great Engineer

    Joined:
    Sep 25, 2014
    Messages:
    1,271
    Location:
    Clevedon, England
    I might need this to see if i can't get my Caroleans looking more like Caroleans.
     
  3. TheRealHellBlazer

    TheRealHellBlazer Chieftain

    Joined:
    Feb 26, 2017
    Messages:
    59
    Gender:
    Male
    My god, you guys have done really well with the 3D modeling stuff, well done, great work.
     
  4. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    T-34 Tanks created using CivNexus6. Rigging and animation seems to work but materials/textures are obviously bodged up!

    disco_t34s.jpg
     
  5. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    The good news is that it's not to do with the .fgx it's something with the texture files I'm using. If I switch to the vanilla Tanks material it looks OK - even though it's obviously the wrong texture for the model.

    t34_wrongtexture.jpg
     
  6. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    OK. Pretty much there - you can just about see my base layer beneath the other layers from the vanilla tank. Looks like we need to create flat/neutral textures for the other layers if people only want to use the base layer.

    t34_blender.jpg

    t34_baselayer.jpg
     
  7. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    Boom!

    bang.jpg
     
    S3rgeus, zwei833, Nutty and 2 others like this.
  8. Firebug

    Firebug Not-so Great Engineer

    Joined:
    Sep 25, 2014
    Messages:
    1,271
    Location:
    Clevedon, England
    Awesome. We got custom models.
    Some slightly more stylized texturing to that model, and we got something perfect going on.
     
    Last edited: Mar 11, 2017
  9. snafusmith

    snafusmith Unit Maker

    Joined:
    Nov 1, 2005
    Messages:
    1,549
    Location:
    I've been everywhere, man
    Awesome work, the community owes you!! Any chance we could get a civ6 unit making tutorial?
     
  10. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    649
    Location:
    Australia
    Yes, great job.:)
    Any chance you could post your artdefs? I still can't figure out how to get a unit to display in game. The closest I got was cheating by using the asset preview in fire tuner.
     
  11. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    Couldn't have picked a better example to use.....I need T-34s!

    Excellent work
     
  12. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    T-34s looking much better with tailored AO and Normal textures. Only thing that I'd want to make it look better would be a touch up of the original base layer texture. Will upload my entire ModBuddy project later so people can follow.

    t34_all_layers.jpg
     
    S3rgeus, zwei833, Horem and 1 other person like this.
  13. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    Gedemon and zwei833 like this.
  14. Alucard648

    Alucard648 Chieftain

    Joined:
    Oct 4, 2016
    Messages:
    59
    Gender:
    Male
    Ok. Now try to do that with buildings and wonders, complete with wonder construction animation...
     
  15. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    Yeah... wonder construction animation is not really feasible given that the wonders have 1000+ bones and meshes involved. Static wonders, buildings and improvements should be doable though.
     
  16. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    649
    Location:
    Australia
    Thanks for that. Much appreciated. Although I am now more frustrated than ever as I cannot see any difference in how you have done it and what I have done except my unit is invisible.:cry:

    I know its asking a lot as you are probably very busy but if you get a spare few minutes can you please take a quick look. Fresh set of eyes and that. Thanks.
     

    Attached Files:

  17. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    OK. There are few issues here:

    1) Firstly you've not made it easy for yourself by attempting to do a multi-mesh model as I haven't even confirmed that is working correctly yet! I would remove all the infantry meshes and just keep the single Leopard2_Shape mesh. I think I probably need to do some more work on CivNexus6 to support multi-mesh models and their respective materials.

    2) Then the names of the Material you are binding to in the .fgx and the .geo is still "Hoplite_Material" but in the .ast file you have the GroupName set to "Leopard2_Material".
    Code:
                        <Element>
                            <m_Values>
                                <m_Values>
                                    <Element class="AssetObjects::ObjectValue">
                                        <m_ObjectName text="Leopard2_Material"/>
                                        <m_eObjectType>MATERIAL</m_eObjectType>
                                        <m_ParamName text="Material"/>
                                    </Element>
                                </m_Values>
                            </m_Values>
                            <m_GroupName text="Leopard2_Material"/>  <-- this doesn't exist in your .fgx/.geo!
                            <m_MeshName text="Leopard2_Shape"/>
                            <m_StateName text="Default"/>
                        </Element>
    
    You probably want to edit the Material name in CivNexus6 to "Leopard2_Material" from "Hoplite_Material" and then resave both .fgx and .geo files.

    3) Your Mod.Art.xml needs to reference Unit_Bins.artdef as well as Units.artdef. (This is probably why you thought there was an issue with Unit_Bins.artdef not being built out.)
    Code:
    ...
        <artConsumers>
            <Element>
                <consumerName text="Units"/>
                <relativeArtDefPaths>
                    <Element text="Units.artdef" />
                    <Element text="Unit_Bins.artdef" />
                </relativeArtDefPaths>
                <libraryDependencies>
                    <Element text="Unit"/>
                    <Element text="VFX"/>
                    <Element text="Light"/>
                </libraryDependencies>
                <loadsLibraries>true</loadsLibraries>
            </Element>
    
    Edit: Also you are referencing Clutter.artdef but that doesn't exist in your project. This is in the default Empty mod file for some reason!

    4) I don't know if this makes a difference or not but I've been using add existing items to add ArtDefs, Assets, Geomtries, Materials, Textures and XLPs into Modbuddy so I can see everything. I noticed you hadn't actually added these to your Modbuddy project. It may not matter.

    Hope this helps!
     
    Last edited: Mar 13, 2017
  18. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    649
    Location:
    Australia
    You Sir are a genius. Also you should not underestimate your abilities, the multi-mesh unit does work. Thank you very much.


    EDIT: For some silly reason I was under the impression that the material did not matter there only what was in the material file. Oh well.
     

    Attached Files:

    Gedemon likes this.
  19. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    Great stuff Wolfdog! Let the fun commence!

    I *think* and *hope* that only the Material name that a mesh is bound to matters in the .fgx and that the cook process completely overwrites everything else based on the .ast and .mtl files. That would be really nice if so.
     
  20. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,540
    Location:
    London, UK
    So here's something genuinely cool about the new art system. Because all the Armors have the same bone naming you can cook any animation with any Armor. (The Armor is effectively the base that all other attachments fix to and drives the animation of everything else.) So I can "rig" the Crossbowman to Archer animations just by editing XML - making a new .ast file and then cooking it together.

    Here I have just copied Archer_ArmorA.ast and then taken the Geometry entry from Crossbowman_ArmorB.ast - replacing the existing entry - to make a new asset: Longbowman_ArmorA.ast.

    Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <AssetObjects::AssetInstance>
        <m_BehaviorData>
            <m_behaviorDataSets>
                <m_animationBindings>
                    <m_Bindings/>
                </m_animationBindings>
                <m_timelineBindings>
                    <m_Bindings/>
                </m_timelineBindings>
                <m_timelines>
                    <m_Timelines/>
                </m_timelines>
                <m_attachmentPoints>
                    <m_Points>
                        <Element>
                            <m_CookParams>
                                <m_Values/>
                            </m_CookParams>
                            <m_position>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_position>
                            <m_orientation>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_orientation>
                            <m_Name text="WeaponPrimary"/>
                            <m_BoneName text="Inven_L_Hand"/>
                            <m_ModelInstanceName text="Root"/>
                            <m_scale>1.000000</m_scale>
                        </Element>
                        <Element>
                            <m_CookParams>
                                <m_Values/>
                            </m_CookParams>
                            <m_position>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_position>
                            <m_orientation>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_orientation>
                            <m_Name text="WeaponSecondary"/>
                            <m_BoneName text="Inven_R_Hand"/>
                            <m_ModelInstanceName text="Root"/>
                            <m_scale>1.000000</m_scale>
                        </Element>
                        <Element>
                            <m_CookParams>
                                <m_Values/>
                            </m_CookParams>
                            <m_position>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_position>
                            <m_orientation>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_orientation>
                            <m_Name text="Hat"/>
                            <m_BoneName text="Head"/>
                            <m_ModelInstanceName text="Root"/>
                            <m_scale>1.000000</m_scale>
                        </Element>
                        <Element>
                            <m_CookParams>
                                <m_Values/>
                            </m_CookParams>
                            <m_position>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_position>
                            <m_orientation>
                                <x>0.000000</x>
                                <y>0.000000</y>
                                <z>0.000000</z>
                            </m_orientation>
                            <m_Name text="Projectile_Attach"/>
                            <m_BoneName text="Inven_R_Hand"/>
                            <m_ModelInstanceName text="Root"/>
                            <m_scale>1.000000</m_scale>
                        </Element>
                    </m_Points>
                </m_attachmentPoints>
            </m_behaviorDataSets>
            <m_behaviorInstances>
                <Element text="SingleBiped_Deaths"/>
                <Element text="Archer"/>
            </m_behaviorInstances>
            <m_dsgName text="potential_any_graph"/>
            <m_referenceGeometryNames/>
        </m_BehaviorData>
        <m_GeometrySet>
            <m_ModelInstances>
                <Element>
                    <m_Name text="Root"/>
                    <m_GeoName text="Crossbowman_ArmorB"/>
                    <m_GroupStates>
                        <Element>
                            <m_Values>
                                <m_Values>
                                    <Element class="AssetObjects::ObjectValue">
                                        <m_ObjectName text="Crossbowman"/>
                                        <m_eObjectType>MATERIAL</m_eObjectType>
                                        <m_ParamName text="Material"/>
                                    </Element>
                                </m_Values>
                            </m_Values>
                            <m_GroupName text="Crossbowman"/>
                            <m_MeshName text="Crossbowman_ArmorBShape"/>
                            <m_StateName text="Default"/>
                        </Element>
                    </m_GroupStates>
                </Element>
            </m_ModelInstances>
        </m_GeometrySet>
        <m_CookParams>
            <m_Values/>
        </m_CookParams>
        <m_Version>
            <major>3</major>
            <minor>0</minor>
            <build>201</build>
            <revision>159</revision>
        </m_Version>
        <m_ParticleEffects/>
        <m_Geometries/>
        <m_Animations/>
        <m_Materials/>
        <m_ClassName text="Unit"/>
        <m_DataFiles/>
        <m_Name text="Longbowman_ArmorA"/>    <-- New Name!
        <m_Description text=""/>
        <m_Tags>
            <Element text="Unit"/>
        </m_Tags>
        <m_Groups/>
    </AssetObjects::AssetInstance>
    
    Then all I have to do is add it to my .xlp package spec create the Unit_Bins.artdef which is simple and I have Crossbowmen using Archer animations. :)

    longbowmen.jpg
     

Share This Page