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

Tutorial: Using the Asset Previewer

Discussion in 'Civ6 - Modding Tutorials & Reference' started by Deliverator, Jun 7, 2017.

  1. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,928
    Location:
    London, UK
    The Asset Previewer is a really useful tool for seeing how 3D art assets look without starting up the game and is definitely a big time saver for 3D modding.

    Here is a guide to what can be done.

    The Asset Previewer is part of the Asset Editor which can be started from the TOOLS menu in Modbuddy.

    Note: The Asset Previewer can be quite unstable and tends to crash a lot. Hopefully Firaxis will improve this with time.

    The first thing to do is open an existing asset using the Open Entity button or File menu > Open Entity. For this tour of the Asset Previewer we'll use Redcoat_ArmorA. The Open Entity dialog has helpful search facilities and you can use the checkboxes to look at only new Assets you have within your Modbuddy project.

    apre1.jpg

    You should see the Asset Previewer window with the 3D viewport.

    Here are the 3D Viewport Controls

    Mouse Wheel - Zoom
    Alt + RMB Drag - Zoom
    Alt + LMB Drag - Rotate the camera
    Ctrl + LMB Drag - Rotate the camera (opposite direction!)
    Shift + Alt + MMB Drag (Middle Mouse Button) - Reposition camera
    Shift + LMB Drag - Change sun position

    (If anyone else discovers more I'd be happy to know about them!)

    apre2.jpg

    The reason why the Redcoat armor appears to be white is because the red is added via a Tint which is the colour that shows through the transparent areas. The transparent areas of the texture are determined by the TintMask texture.

    We can add a Tint in the Asset Previewer. Scroll the bottom far right scroll bar down and you should see a row of tabs: Motion, Display, Transform, Animation, etc.

    Select Transform and scroll that tab to the bottom using the inner scroll bar. You'll see a Tint Color setting. Let's go for RGB values of 0,50,100 for a fetching shade of blue:

    apre3.jpg

    Now let's add some attachments to our Armor base. Scroll the outer bottom right scroll bar up until you can see list of Attachment points for this model. Double click the box to the right of "Root" and then click the small square [...]. Filter the list to locate first "Male_Caucasian_Head_F" and "Male_Caucasian_MediumBody_HandsA" and add them to the box on the right using ">". As you do this you'll notice that our Blue Coat now has a head and hands:

    apre4.jpg

    Now go to the "Hat" Attachment Point and select "RoughRider_Hat_A" or another one if you prefer and attach "Redcoat_GunA" to the "WeaponPrimary" Attachment Point.

    Now we can test the animations for our Asset. Scroll back down to the list of tabs: Motion, Display, Transform,etc and select Animation. Pick ANY in the From State box and ATTACK in the To State box then hit Play. You should see the animation play and effects triggering too! (It's a shame that you can't test sound too but nevermind - this is still very useful)

    apre5.jpg

    In the top Base tab you can set Terrain=None, Hide Skybox=on and change the Background Color to get a greenscreen screenshot of your unit so that you can make the Unit Portrait icon.

    apre6.jpg

    You can change the Environment lighting to see how things will appear at Night, Sunrise, Sunset, etc.

    apre7.jpg

    You can display Bones and their names which can be useful in seeing what is going on.

    apre8.jpg
     

    Attached Files:

    Last edited: Nov 17, 2017
    lasttry and Gedemon like this.
  2. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,928
    Location:
    London, UK
    All of this works for Leader assets too!



    You can view the various different texture types to understand how they are working:



    apre11.jpg

    You can also you the Asset previewer to preview visual effects.

    Open the FX_Rocket_Trail_Large asset. Navigate to the Motion tab in the bottom right. Under Motion Type select Figure 8 and you should see the Rocket fx trail move in a nice figure of 8.

    apre12.jpg

    For Landmarks (Improvements, Buildings, Wonders,etc) you can test night light maps and snow as shown below. Under Lighting set LightMapWeight to 5, DayThreshold to 0 and NightThreshold to 0. The two thresholds seem to be for the different levels of LightMapWeight. Then change the DefaultGameEnvironment to be Cubemap_World_Night.

    apre13.jpg

    You can also watch the Wonder Movie assets by playing the REVEAL animation:

    apre14.jpg

    That's all for now! :)
     
    Last edited: Nov 17, 2017
  3. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,928
    Location:
    London, UK
    Using PreviewUnit.py Script to preview Unit Member Art Defs

    Once you have assembled a Unit Member entry in Units.artdef you can have the Asset Previewer assemble it for you to preview.

    prev1.jpg

    Select "Run Script" from the File menu and then open "PreviewUnit.py".

    You can then select to preview Unit Members from your Mod or base Civ 6.

    prev2.jpg

    Select the Unit Member (or Memeber!) that you want to preview.

    prev3.jpg

    Finally select which Unit Culture you want to use. This can affect skin tone plus anything else that you have configured to vary with Unit Culture.

    prev4.jpg

    Then your unit is fully assembled in the 3D viewer. :)

    prev5.jpg

    And you can update the Unit Tint and test animations as described previously.

    prev6.jpg

    Viewing Multiple Assets Simultaneously (Rider and Horse Example)

    This is possible using the Add Asset button than is cheekily hidden in plain sight to the right of the Asset Previewer.

    aa-1.jpg

    Below I have selected Knight_HorseArmor_A as my second Asset. If you go to the Transform tab you can see that the position is offset by 10 in the X axis. Change this to zero if you want Rider and Horse to line up correctly.

    aa-3.jpg

    Now we can attach a Horse to the Horse Armor. I've used Horse_Medium_BodyA.

    aa-5.jpg

    Finally we can set animations for both Horse and Rider. These need to be done separately in the Animation tabs for both Assets.

    aa-6_.jpg
     
    Last edited: Nov 17, 2017
  4. sukritact

    sukritact Artist and Modder

    Joined:
    Sep 21, 2010
    Messages:
    2,789
    Location:
    Bangkok
    What exactly do you set to test emissive maps for landmarks?
     
  5. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,928
    Location:
    London, UK
    Under Lighting set LightMapWeight to 5, DayThreshold to 0 and NightThreshold to 0. The two thresholds seem to be for the different levels of LightMapWeight. Then change the DefaultGameEnvironment to be Cubemap_World_Night.
     
  6. Nomad or What

    Nomad or What Wayfarer Supporter

    Joined:
    Nov 25, 2012
    Messages:
    686
    Location:
    Wherever the winds take me
  7. Reliquary

    Reliquary Chieftain

    Joined:
    Jun 2, 2017
    Messages:
    29
    Earlier I broke my Asset Editor somehow and every time I tried opening it it would crash with an unknown error, and even reinstalling it wouldn't fix it. If this happens to anyone else, here's the solution:

    -Either press Win+R, or go to the start menu and type in "run"
    -Type in %appdata%
    -In the Appdata/Roaming directory is the AssetEditor folder. Delete it.
    -Run the asset editor again.

    Note: This effectively resets it to all the defaults, so if you have like custom hotkeys or anything, be sure to backup those specific files first so you can copy them back in once it's not broken anymore.
     
  8. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,928
    Location:
    London, UK
    Myself I've only had these kind of problems when there is an error somewhere in my Assets files. That said the Asset Editor is generally very unstable and crashes a lot. Hopefully they will improve the stability with the next patch.
     
  9. Reliquary

    Reliquary Chieftain

    Joined:
    Jun 2, 2017
    Messages:
    29
    I freaking love the asset editor XD
    tangent.JPG
     
    Deliverator likes this.
  10. RFormica

    RFormica Grand Oligarch of the Hills

    Joined:
    May 27, 2017
    Messages:
    468
    Gender:
    Male
    Location:
    Pennsylvania, USA
  11. Hiram

    Hiram XML Plebian

    Joined:
    Dec 14, 2006
    Messages:
    1,081
    Location:
    Where The Streets Have No Name
    I can get an armor up in the previewer but when I try to do attachments my assets list in the attachment assigner is empty. How do I make sure this is populated by the pantry?
     
  12. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,928
    Location:
    London, UK
    The attachment assigner lookup seems quite buggy to be honest but if you enter a legitimate asset name (the name of a *.ast file from the pantry without extension) it should work. In other words don't use the attachment assigner just enter the name of the attachment you want to assign into text box.
     
  13. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    577
    Location:
    Australia
    Has anyone figured out how to get sound fx to play in Asset Previewer? It is somewhat frustrating having to go into the game to test if a sound matches a visual fx. Thanks.
     
  14. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,928
    Location:
    London, UK
    Wolfdog likes this.
  15. D021

    D021 Chieftain

    Joined:
    Feb 7, 2018
    Messages:
    1
    Gender:
    Male
    Thx for your share~~
     

Share This Page