Giter Site home page Giter Site logo

bcryexporter's People

Contributors

andy51 avatar dwhite5914 avatar feedbackex avatar nagell avatar ochounos avatar roidanton avatar ssojz4frbm9 avatar travnick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bcryexporter's Issues

Add Primitive Mesh Tool

Add Primitive Mesh Tool adds a primitive triangle mesh with weighted to selected skeleton to export .chr. That process makes ready skeleton to exporting stage.

add_primitive_mesh

Animation with Skin Node

If your skeleton animation project have skin or chr nodes, then rc.py file tries recompile (second compile) for skin and chr nodes, even if you want to export animations, finally rc.exe generates errors for unfounded skin and chr files.

That is unwanted situation. if user use Export Animation tool rc.py skip recompile (second compile) stage, even if there are skin or chr nodes.


To do that we can add is_animation configuration variable both for Export and ExportAnimations class.

Input Prediction for Add Export Node Tool

Add Export Node tool must be improved.

  • Selected object name must be automatically typed to name text box.
  • Also Add Export Node tool must predict node type. (cgf, cga, chr, skin)

add_node_panel
add_export_node_panel_cga

add_export_node_panel_skin

  • If object is a mesh and have a animation clip set default type to CGA.
  • If object is a mesh and weighted to a skeleton and mesh have vertex high of 4 then assign default type to SKIN.
  • If object is a mesh and weighted to a skeleton and mesh have vertex below of 5 then assign default type to CHR.
  • Elsewhere assign default type to CGF.

UDP Fix

A few UDP fix.

  • udp_buffer must be declared as string.
  • udp_buffer must be storage more than one setting.
  • properties node fixing.

Hull UDP

  • Add hull UDP property to Render Mesh Menu for vehicle.
  • Transfer wheel UDP property to Render Mesh Menu from Physic Proxy Menu.

Hull
vehicle_hull_udp

Wheel
vehicle_wheel_udp

CGA - support for ProxyMesh

I tried to export one animated mesh as CGA with mesh for collider, but without any success.
Is it supported proxy for CGA for now?

Also I found what only one mesh can be exported per file.
It means for example: to make animated sci-fi doors with three parts, you have to create three *.cga file with three *.anm file (

I guess this is not limitation of CGA file because in Maya they may have complex meshes with using separate colliders for parts (see last pics) https://www.cryengine.com/community/viewtopic.php?f=315&t=133020

User Defined Properties

Regulations of UDP:

  • Create a udp.py file and remove add.py file.
  • Transfer material functions to utils.py from add.py. And fix code conventions.
  • Temporarily remove joint function and will review in the future.

Player SDK Fix

Uploaded Player_SDK.blend file is old which has problems.
We must reupload PlayerSDK.blend

Custom Icons

Base for Custom Icons.

  • Create a base for custom icons.
  • Change Export to Game name and icon to Export to CryEngine.

Vertex Colors

  • Fix vertex colors exporting.
  • Export Vertex Colors with BMesh.

Library Controller Improvement

Library controller improvement for skin and chr nodes.

  • Use export mesh nodes to iterate for library controllers
  • Export selected support for skin and chr
  • Geometry name fix for skin

Bone Axis Orientations

Cryblend could not export to bone axis orientations for skeletons. Instead, it export all bones as global world locations without any rotation. So rotation informations were (0, 0, 0).

We must export bone orientations with their orientated locations.

Blender pose bone matrices:
Blender pose bone matrices store bone rotations and global locations. We must export to DAE (to RC.exe) the locations as orientated locations. Therefore, firstly, we must create a transformation matrix to convert world locations to orientated locations. Then we can combine rotation and new orientated location in a new matrix. Finally we can export that new matrix.

CryEngine Player SDK has X-Axis bone orientation as primary:
To use CryEngine SDK animations we must work with X-Axis bone orientation. Unfortunately, Blender only works with Y-Axis bone orientations. To solve that problem, we can again create a transformation matrix to change bone orientations to X-Axis from Y-Axis at export time. When we do that type axis changing, as well we have to change a axis to a negative own its. I am going to use Z-Axis for that. So, in Blender Z-Axis changes to -Z-Axis for DAE.

Combine two matrices:
We can break down that two problem in one stage with one transformation matrix.

Animations:
That rules valid for CHR and SKIN files, so what about animations? Axis changing (Y to X) requires a bit more working for animations.

Dummy Exporting

BCRY Export empty object as dummy object at bcry export nodes.

  • Bounding box informations are gotten empty draw size.
  • Bounding box positions are stored as local values in dummy object visual nodes.
  • Dummy objects mustn't have scale informations.
  • Dummy objects is able to added to bcry nodes.

PS: Fixes #111

Zero Division Error

If mesh has zero area face, smooth normals area calculation #46 generate a ZeroDivisionError at get_normal_array function.

zero_division_error

Triangulated Geometry

  • BCry Exporter write geometry with polygon form, we must change that triangle form.
  • Write poly list must be converted to write triangle list.

Note: Tessfaces have no connection with bmesh, so tessfaces can not be used with bmeshes for now.
Therefore we must use triangulated geometry for normals and uvs, which in that situation normal and uv array extended. We should track of bmesh tessface support in the future version of Blender.

PS: BMesh have tessfaces and now it's usable.

Generate Material Improvement

  • Reorganize material storage and exporting sequences.
  • If different object have different materials named according to BCRY convention, than material sequences may be incorrect, we should fix this.
  • Flip key and values for material dictionary. That will decrease code length.
  • New sort_materials_by_names functions should be added.
  • Material exporting process should be written to log screen.

generatematerials_outputdata

generatematerials_output

Material Physics Arrangement

  • Material physic tool names must be changed to Set from Add.
  • Double underscores must be discarded from tool names.
  • Description must be added to material physic tool.

set_material_physic

Armature Writing Enhancements

Armature writing needs a few improvements to enhance exporting capability for have SKIN and CHR nodes project.

  • Library Controller must be written only for SKIN and CHR nodes.
  • utils.get_armature_node function must be removed and group must be gotten directly parent functions.
  • _write_bone_list is only called for SKIN and __CHR nodes.
  • Must be checked node_type for create_instance function and must be allowed only SKIN and CHR nodes.

Find Weightless Improvement

Find weightless tool must be improved.

Improvement

  • We must consider weight ratio for just armatured skeleton bones.

New Features

  • We must add a interactive properties window.
    • That window must be show weightless vertex count.
    • Must be add a Focus button to focus weightless vertices.
    • If there is no any weightless vertex then show this with a message, and stay at Object Mode.

Weightless Vertices:
find_weightless_focus


There is no any Weightless Vertex:
find_weightless_no


Dummy/Empty UDP Support

  • UDP panels should be workable with dummy/empty object types.
  • Dummy/empty udp properties should be exportable.

Face Areas for Vertex Normals

Now, Vertex normals calculated weighted of shared faces. Face areas do not considered. We must consider face areas to calculate vertex normals.

  • Each face must contributes according own area to vertex normal.

Player SDK v0.7

Player SDK v0.7 include exact character positions and orientations.

  • Legs and foots exact positions and orientations.
  • Spine exact positions and orientations
  • Neck and head exact positions and orientations.
  • Arms and hands exact positions and orientations.
  • Fingers exact positions and orientations.
  • Twist bone improvements.

Default Physic to None

Currently default physical proxy type is default. That sometimes generate high polygon physic problem for meshes those high polygon count when use auto materials. To solve that default material type can be changed to none.

New Smoothing System

New smoothing system

  • Improve library geometry codes.
  • New geometry name and subnodes name convention with more compatible DAE file.
  • Discard Average Planer Face Normals checkbox and property which not needed anymore.

What you see in Cryblend what you get in CryEngine for shading
With that issue, one do not need anymore apply Edge Split modifier before exporting objects.
What your object shading is in Blender, you get object shading is in CryEngine in all circumstances.

  • Support edge split modifiers without apply it.
  • Support both of face and edge (with sharp edges) smooth or flat shading.
  • Support auto smooth with angle from object data panel.
  • Support Display modifier in viewport for edge split modifier.

BCRY 5 Exporter Release

bcry_5_logo_1

5.0

Compatibility

  • Only compatible with CryEngine 3.5 and up.
  • Only compatible with Blender 2.7 and up.
  • Supports primary assets: CGF, CGA, CHR, SKIN, ANM, I_CAF.
  • Compatible with LumberYard.

UI Changes:

  • Timeline Editor choose for Add Animation Node window.
  • New Generate LODs menuitem.
  • Removed Add Bone Geometry, Remove Bone Geometry, Rename Phys Bones menuitems.
  • New Physicalize Skeleton menuitem.
  • New Clear Skeleton Physics menuitem.
  • New Add Locator Locomotion menuitem.
  • New Add Primitive Mesh menuitem.
  • Edit Inverse Kinematics menuitem name changed to Set Bone Physic and IKs.
  • Removed Remove Old Fakebones menuitem.
  • New Generate Materials menuitem.
  • Export to Game changed to Export to CryEngine.
  • Export to Game icon is changed.

New Features:

  • New Smoothing System.
  • VCloth 2 exporting.
  • Custom Normals.
  • Bone Axis Orientations.
  • X-Axis Skeleton exporting.
  • X-Axis Animated Skeleton exporting.
  • Player SDK.
  • New Physicalize Skeleton tool.
  • New Clear Skeleton Physics tool.
  • New Generate LODs tool.
  • New Generate Materials tool.
  • Color exporting for materials.
  • New Add Locator Locomotion tool.
  • New Add Primitive Mesh tool.

Improvements/Fixes:

  • Geometry writing is completely adapted to BMeshes.
  • Input prediction for Add Export Node tool.
  • Vertex Colors exporting is fixed.
  • Calculate normals using with BMesh tessfaces.
  • Now smooth normals are calculated according to face areas.
  • Bone axis, length and Tool Shelf panel supporting for Add Root Bone tool.
  • Tool Shelf panel supporting for Apply Transformaitons tool.
  • SelectGameDirectory wrong folder name fixed.
  • Default Physic is changed to None.
  • Armature writing enhancements.
  • Now animation nodes can be stored with skin and chr nodes.
  • Geometry name is rearrenged for Library Controllers.
  • Apply Modifiers are fixed.
  • Apply Modifiers, Export Selected Nodes supporting.
  • Custom Icons interface.
  • Multiple Cycles Texture support.
  • Descriptions for Set Material Physics tool.
  • Logs have been improved.

Add Primitive Mesh with Material

Add Primitive Mesh tool add material to created mesh with name convention.

  • If material is already exist just must assign to mesh.
  • If there is no material with name convention must is created and assigned to it.

Generate LODs Tool

Create a new tool named as Generate LODs to create LODs just with one click.

generate_lods_small


Tool settings:

generate_lods_panel

View Offset: Distance between LODs object. Just related showing in scene. Don't influences exporting.


Also LOD exporting behavior must be rearranged.

LOD Name Convention:

  • object_name -> LOD0 original mesh
  • object_name_LOD1 -> LOD1
  • object_name_LOD2 -> LOD2

Player SDK v0.4

Player SDK version 0.4

  • Deform properties must be disabled for attachment bones.
  • Neck bone orientation must be fixed.
  • Foot bone orientations must be fixed.
  • Arm bone orientations must be fixed.
  • Hand bone orientations must be fixed.

Material Utils

Create a material_utils.py file and collect all material function into that file. That is also a base of Generate Material tool.

Generate Materials

New Generate Materials feature use directly xml writing to generate mtl files.

  • New Generate Materials tool under Material Utilities.
  • Change name of Do Materials to Generate Materials in Export Panel
  • Change name of Do Textures to Convert Textures in Export Panel
  • New export_materials.py file which hold export material functions.
  • Now, export.py file fully related for geometries, controllers and visual nodes.
  • Diffuse color, specular color, specular hardness, alpha value, emmit color now can be exported, which rc.exe are not written.

Generate Materials Tool
generatematerials

Generate Materials Panel
generatematerials_panel

Generate Materials into Export to CryEngine Panel
generatematerials_exportpanel

Default Texture

If blender material has no a diffuse texture (intended to use directly colors), Generate Material tool has to assign default white texture for diffuse.

Default White Texture path: textures/defaults/white.dds

Note: If material is physProxyNoDraw then diffuse texture have to be empty.

Bone Proxy Geometries

Bone Geometry Orientations:
Now, bones have rotations so we can add as well rotations to bone physical proxies. That also has advantage to edit bone geometries in Blender.

Axis Transformations:
Bone axis are changed at exporting time (Y-Axis to X-Axis), we have to consider that transformations also for bone geometries.

Inverse Kinematic Properties:
We have to change IK properties (min, max, damping, spring, spring tensions) according to bone axis conversion.

  • X-Axis IKs -> Y-Axis IKs
  • Y-Axis IKs -> X-Axis IKs
  • Z-Axis IKs -> Inverse of Z-Axis IKs

Bone Geometries to Primitives:
To make bone geometries to primitive like capsule and sphere, we have to scale a bit (1.07 each axis) bottom face of mesh. Even after did that, needs to edit for some geometries.

Improvements

  • Physic bone support have to be added to utils.get_geometry_name function.
  • Physical skeleton directly has to find out from skeleton name.
  • _export_library_geometries function has to overlook objects that are not mesh.
  • Discard odd code from _export_library_visual_scenes functions which adds a cube and deletes it again.

Physicalize Skeleton Tool

Create skeleton physics with just one click.


Tools

  • Physicalize Skeleton
  • Clear Skeleton Physics

physicalize_skeleton


physicalize_skeleton_panel


Physic Skeleton: Use to generate physic skeleton with ends with __Phys.
Physic Proxies: Use to generate physic bone geometries.
Physic Proxy Settings: Writes physic information to bone. (capsule, cylinder, box ...)
IK Settings: Writes default inverse kinematics information to bone.

Physic Proxy Sizes: Use to set radius of proxy bones.

Create Physic Materials: Adds materials to proxy geometries.
Use Single Material: Use to create single material for all proxy geometries.

VCloth V2 Exporting

Add VCloth V2 exporting support to BCry Exporter.

  • Create a new checkbox named VCloth Pre-Process at General Export Panel.

vcloth pre-process

VCloth V2
VCloth V2 Exporting

Note: VCloth skin must be exported alone. One can use Export Only Selected Nodes Tool at General Export Panel.

BMesh Tessfaces

We should use Tessfaces to write mesh triangles.

  • Use bmesh tessfaces to write triangles to DAE.
  • Remove old duplicate and triangulate object behavior.

Parent/Child Relation

  • Object parent/child relations can be used by CGAs which have multiple mesh in one node; for CGA animations per node have to be consist one root mesh.
  • Object parent/child relations also are needed for vehicle structures.

BCRY should exports child object with relations, if child object is in same node with parent.
If child object is not in a node then it's should be overlooked.

Select Game Directory Fix

Sometimes users can be forget a text at Blender ExportHelper, in that case Select Game Directory tool raises NoGameDirectory error. To solve that we must remove forgotten text, if it is not a directory.

Also when the directory is invalid we must raise a meaningful exception instead of NoGameDirectory.

selectgamedirectoryfix

Bone Axis Orientation for Animations

Animation Matrices:
Different from character files (CHR), animation matrices are stored as locals for CryEngine in DAE. To do that we can use parent bone inverted matrix.

Final_Bone_Matrix = Bone_Parent_Matrix * Bone_Matrix


Y-Axis to X-Axis:
Also we must consider changing axis orientations for CryEngine Player SDK.

Final_Bone_Matrix = Bone_Converted_Parent_Matrix * Bone_Converted_Matrix

Multiple Cycles Texture

To export textures for Cycles Nodes, BCRY Exporter uses node names.

  • Diffuse
  • Specular
  • Normal

  • Now, a Texture Node can be have multiple names to use same texture both for Diffuse and Specular.
    Example:
    Diffuse - Specular.

node_editor_multiple_texture_tick

Vehicle Support

BCRY Exporter Vehicle Exporting Support

  • Parent/Child relation exporting support for vehicle; child objects have to be same node as parent. #105
  • New _write_child_objects function. #106
  • Dummy object exporting. #107
  • Dummy object UDP adding. #114
  • New hull UDP property. #112
  • New document for vehicle setup at official site.

Add Root Bone Tool Shelf

Improved Add Root Bone Tool.

  • Undo support has been added.
  • Tool shelf panel has been added.
  • Add root bone to 15. bone layer and activate it. (Before that root bone had been added to all active bone layers).

Properties

Forward Direction: The root bone faced direction.
Bone Length: The root bone length to represented in 3D view.
Name: The root bone name.
Hips Bone: Hips/pelvis bone name that must be top parent bone.

Tool properties can be set via Blender Tool Shelf.
add_root_bone

Add Locator Locomotion Tool

That tool add a locator locomotion bone to selected armature according to CryEngine requirements.


Properties

Forward Direction: The Locator Locomotion bone faced direction.
Bone Length: The Locator Locomotion bone length to represented in 3D view.
Skeleton Root Bone: The Locator Locomotion bone is going to be linked/parented to that bone. Default value is top parent bone.
Movement Reference Bone: The Locator Locomotion use that bone to copy movements from selected axis. Default value is child of top parent bone.

Tool properties can be set via Blender Tool Shelf.
add_locator_locomotion_panel

Improve Smooth Shading

We should improve smooth shading behavior.

  • Fix smoothing function problems.
  • Fix get_normal_array function problems.
  • Use radians for angles.
  • Create a new normal calculation behavior for sharp edges.

BCryExporter Derivation

Derivation of BCryExporter from Cryblend.

  • Author Regulations
  • Name Conversions
  • Directory Transfers
  • Wiki Conversions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.