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

@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>
 
I might need this to see if i can't get my Caroleans looking more like Caroleans.
 
T-34 Tanks created using CivNexus6. Rigging and animation seems to work but materials/textures are obviously bodged up!

disco_t34s.jpg
 
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
 
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
 
Boom!

bang.jpg
 
Awesome. We got custom models.
Some slightly more stylized texturing to that model, and we got something perfect going on.
 
Last edited:
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.
 
Couldn't have picked a better example to use.....I need T-34s!

Excellent work
 
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
 
Ok. Now try to do that with buildings and wonders, complete with wonder construction animation...
 
Ok. Now try to do that with buildings and wonders, complete with wonder construction animation...

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.
 
Here's a link to the entire Modbuddy project:
https://forums.civfanatics.com/resources/example-modbuddy-project-for-3d-model-import-t-34.26004/

I'm out of time for today but will try and write up more information on how I made all the files tomorrow.
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.
 

Attachments

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.

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:
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!
You Sir are a genius. Also you should not underestimate your abilities, the multi-mesh unit does work. Thank you very much.
leopard2-png.466765


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.
 

Attachments

  • Leopard2.png
    Leopard2.png
    715.5 KB · Views: 1,324
Great stuff Wolfdog! Let the fun commence!

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.

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.
 
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
 
Back
Top Bottom