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

CivNexus6 1.2.6

3D Graphics Tool for Civilization 6

  1. vectorplexus

    vectorplexus Chieftain

    Joined:
    May 11, 2017
    Messages:
    13
    Gender:
    Male
    @Deliverator oh lol, I have no expertise at all, all I know is that its done by using curves instead of polys, there is no actual surface to render. Thats also why the materials are different, because its a shader that draws a "fake" surface.



    But its no biggie, I was just curious, for my purposes, I'll just use the baked fibermesh, I dont see any performance stress, at least not in my computer

    I honestly would love to be able to do what you do, to create tools that allows us to mod things, but I'm totally clueless about that. If not for community developed tools, made by people like you, I wouldn't be able to do half of what I do! Thanks! =)
     
  2. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    So have you actually got a baked fibermesh displaying in the Civ 6 game engine Asset Preview?

    No problem! I'm strange enough to enjoy cracking these sort of problems anyway.

    The next version of CivNexus6 will be uploaded in the next few days with a number of improvements so watch this space!
     
  3. vectorplexus

    vectorplexus Chieftain

    Joined:
    May 11, 2017
    Messages:
    13
    Gender:
    Male
    @Deliverator yes, but "baked" fibermesh is just a normal mesh really, I'll send you a PM with a video link, probably not what you're expecting though LOL
     
  4. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    CivNexus6 1.2.0

    An extensive update to CivNexus6 to better support Civ 6 FGX format graphics modding.

    New Features in CivNexus6 1.2


    * New Import/Export format .cn6 can be used instead of the old .nb2/.br2 formats. Old formats can still be used via a radio button.

    The .cn6 is a development of the .br2 format with the following improvements to Blender Import/Export scripts and CivNexus6 Import/Export:
    1) Support for up to 3 UV layers per mesh - used for Emissive layer (night lights) on Buildings etc.
    2) Support for up to 8 Bone Indexes and Weights per vertex (up from 4 in Civ 5).
    3) Support for Materials Import/Export (names only).
    4) Support for multiple Triangle Groups per mesh each with their own Material assignments for each mesh common for various entities in Civ 6.
    5) It turns at that until now that Blender has always been recalculating it's own Normals for each vertex rather than using the custom ones from the .nb2 file. This explains why some meshes didn't look as smooth when imported to Blender as the original .fgx does in FGX viewer. Since Blender now supports custom normal import I can now import vertex normals properly. Also the original normals, binormals and tangents are preserved for export as far as possible using a dummy vertex group called VERTEX_KEYS. If you want to force Blender to recalculate vertex normals, binormals and tangents then you can just delete the VERTEX_KEYS Vertex Group for the mesh. I can add this enhancement to the old .nb2/.br2 Addon scripts for Blender 2.7x when I have time.

    * Materials are now assigned at the level of a Meshes Triangle Groups rather than at Mesh level which is a proper representation of the internal .fgx Granny structure. Use the Edit Mesh Material Bindings tabs to switch assignments and to rename Meshs. Use the Edit Materials tab to Add or Remove Materials and rename Materials.

    * Import/Overwrite Meshes can now use 3 Mesh Vertex Formats:
    1) Bone Bindings, 1 UV (layer): used for Units, Leaders & anything animated.
    2) No Bone Bindings, 2 UV (layers): used for Static objects such as Unit weapons and shields.
    3) No Bone Bindings, 3 UV (layers) : used for Improvements, etc that have an Emissive map.

    * Fixed Export for models that use Indices rather than Indices16 (e.g. LEAD_AZTE_Montezuma.fgx)

    I'm sure there is more to mention! I will try and post some graphical demonstrations of what can now be done soon.
     
    Wolfdog and Alucard648 like this.
  5. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    Deliverator updated CivNexus6 with a new update entry:

    1.2.1 Update

    Read the rest of this update entry...
     
  6. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    Deliverator updated CivNexus6 with a new update entry:

    1.2.1 Update

    Read the rest of this update entry...
     
  7. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    Deliverator updated CivNexus6 with a new update entry:

    1.2.3 Update

    Read the rest of this update entry...
     
  8. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    A bit more on how Civ6ToCiv5AnimMap.txt works. Here is an extract:

    ATTACK_A:_attacka
    BACKWARD_A:_shuffle;_idlea_trans_idleb
    BREATHING_A:_idlea
    BREATHING_COMBAT_A:_combat_ready_idle
    DODGE_A:_bombard_defense
    FORWARD_A:_shuffle;_idlea_trans_idleb
    HERO_A:_attack_city,_attackb
    HERO_1:_attack_city,_attackb
    ...

    The first part is the Civ 6 animation code followed by a colon then the suffix part of the Civ 5 animation file(s) that you want to mapped to that Civ 6 animation code.

    For the automatic creation of the Asset file to work you need to have your converted .gr2 > .fgx model loaded into CivNexus6, for example: sea_colossus.fgx.

    As CivNexus6 builds up the Civ 6 animations it will look for animation files that have the prefix based on the currently loaded filename and the suffix from Civ6ToCiv5AnimMap.txt. This means you need to have the model .fgx loaded into CivNexus6 before you execute the "Convert all .gr2 animation files in directory to .fgx/.anm" function.

    So if I have sea_colossus.fgx loaded the application will look for an animation file called sea_colossus_attacka and if found will map it to the ATTACK_A code.

    Where there are multiple Civ 5 animation suffixes separated by semi-colons, the order of precedence is left-to-right. So for FORWARD_A the application will first look for a file called sea_colossus_shuffle then sea_colossus_idlea_trans_idleb.

    This will probably only make sense to those that have attempted a Civ 5 conversion! :)
     
    Last edited: Aug 12, 2017
  9. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    152
    Gender:
    Male
    Help I can't get the animate import right.

    With Blender 2.76 I had model exported as br2. Because I edited the bones too much I can't data transfer from any official mesh. Then when I parent the armature, I picked automatic weight. Object movements in Blender looks fine but I can't export cn6 format. The warning says "vertex group can't add to 255" or something like that. But br2 works.

    With Blender 2.49b I key-framed some poses, exported as FBX using your modified script. Got it imported in CivNexus6 ok, but somehow all bone axis rotated 90 degrees along X axis. Playing the animation twisted my mesh so much it looks really funny. But frustrating. I tried pick Y-up, Z-up, etc, but just can't get the axis right. Do you have any idea why?
     
  10. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    @FurionHuang I would use Nexus Buddy 2 to convert your .fbx animations to .gr2 animations then use CivNexus6 to resave them as .fgx.
     
    Last edited: Jul 21, 2017
  11. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    152
    Gender:
    Male
    Ok, let try that workflow.
    So just to make sure everything works correctly. Should I keep Y-up in blender? How about exporting fbx settings, all default?
     
  12. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    Use Blender 2.49. Keep Y up. Can't remember if you need to use the -90 Animation Fix option or not.
     
  13. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    152
    Gender:
    Male
    Ok I can try both to see which works. But man that's a long workflow with a lot of versions of tools.:crazyeye:
     
  14. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    152
    Gender:
    Male
    From Nexus Buddy 2 did you mean .gr2 file actually?
     
  15. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    Yes sorry I mean fbx to gr2.
     
  16. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    152
    Gender:
    Male
    Tried, still got the bone axis rotated along x 90 degrees. I will keep looking maybe it's somewhere I didn't do right.

    Also, could you explain what does it mean "vertex weight totals 255", why do you need it in cn6 export script and why I didn't weight them correctly (using automatic weight when adding to armature)?
    Thanks!
     
  17. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    If you upload your .blend file I can try and take a look at some point. I haven't really done much with importing custom animations. I know they work because things like the Flying Dragon I test use custom animations. The process can probably be improved if I get to spend some time on it.

    Regarding "vertex weight totals 255": all vertex points need to be weighted - that is assigned to bones with a non-zero weight. I'm not sure what automatic weight does, but I would normally use the Transfer Weights process to copy weights from one mesh to another one.
     
  18. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,969
    Location:
    London, UK
    Also this might be useful. These are the settings Sukritact used for exporting animations from Blender 2.7:

    FBXExportSettings_Sukritact.png
     
    FurionHuang likes this.
  19. sukritact

    sukritact Artist and Modder

    Joined:
    Sep 21, 2010
    Messages:
    2,799
    Location:
    Bangkok
    Automatic weights assigns weight to a mesh based off the proximity of various bones to the mesh. I used it with Zara Yaqob as well and actually got the same issue. Fixed it by altering your script a bit @Deliverator, though I didn't do it particularly elegantly:

    Code:
                            # Ensure that total of vertex bone weights is 255
                            runningTotal = 0
                            for i, weight in enumerate(boneWeightsList):
                                runningTotal = runningTotal + weight               
    
                            if runningTotal != 255:
                                boneWeightsList[0] = boneWeightsList[0] + (255 - runningTotal)
    
                            runningTotal = 0
                            for i, weight in enumerate(boneWeightsList):
                                runningTotal = runningTotal + weight
    
                            print("Current Running Total")
                            print(runningTotal)
    
                            if runningTotal != 255:
                                raise "Error: Vertex bone weights do not total 255!"
    
     
  20. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    152
    Gender:
    Male
    Love you guys soooooo much!
     

Share This Page