diff --git a/README.md b/README.md index 450bcc59..f0d46ee8 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,29 @@ -# Blender For Unreal Engine 4 - -Working on object packs for Unreal Engine 4 can be complicated with Blender. That's why I created the Addons "Blender for UnrealEngine". It simplifies the procedure of the export, allows to export all the Assets of a scene at the same time, distributed them in a proper tree structure in correlation with the UnrealEngine Pipeline. - -- No need to place the object in the center of the scene in different layers to see something. Objects will export using their own origin - point as origin instead of the scene. -- It is possible to choose for each object how it should be exported. -- About SkeletalMesh it is possible to choose precisely the different animations that need to be exported. -- The addon also allows you to add Collisions Shapes and Socket to your StaticMesh directly in Blender -- Also includes a potential error checker to avoid problems with exporting. -- This Addon was created for Unreal Engine 4, but it also works for any other game engine that handles fbx files. The nomenclature being - - modifiable you can use any naming convention for organizing your assets. -- You can also choose which type of assets should be exported. - -Video: https://youtu.be/KZMj7usxqQ8 (v0.1.3)
-Addons page: http://xavierloux.com/creation/view/?creation=blender-for-unrealengine-addons +# Blender For Unreal Engine +This addons allows you to export content created with Blender to Unreal Engine 4 +Addons page: http://xavierloux.com/creation/view/?creation=blender-for-unrealengine-addons +GitHub page: https://github.com/xavier150/Blender-For-UnrealEngine-Addons + +# How it works +Working on object packs for Unreal Engine 4 can be complicated with Blender. That's why I created the Addons "Blender for UnrealEngine". It simplifies the procedure of the export, allows to export all the Assets of a scene at the same time, distributed them in a proper tree structure in correlation with the UnrealEngine Pipeline. + +- No need to place the object in the center of the scene in different layers to see something. Objects will export using their own origin - point as origin instead of the scene. +- It is possible to choose for each object how it should be exported. +- About SkeletalMesh it is possible to choose precisely the different animations that need to be exported. +- The addon also allows you to add Collisions Shapes and Socket to your StaticMesh directly in Blender +- Also includes a potential error checker to avoid problems with exporting. +- This Addon was created for Unreal Engine 4, but it also works for any other game engine that handles fbx files. The nomenclature being - - modifiable you can use any naming convention for organizing your assets. +- You can also choose which type of assets should be exported. + +You can see tuto and doc here: +How export assets from blender: https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/How%20export%20assets%20from%20Blender.md +How import assets from Blender to Unreal: https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/How%20import%20assets%20from%20Blender%20to%20Unreal.md + + +I recommend reading before the document How export assets from Blender.md if you have not read it: +# Installation +1. Download the latest release https://github.com/xavier150/Blender-For-UnrealEngine-Addons/releases +2. Open User Preferences (Ctrl+Alt+U) and under Add-ons, click Install from File. Then navigate to the file you downloaded and select it. + +3. It should now appear in the window and you can tick the checkbox in the upper right to enable it. + +If you would like to have the add-on enabled every time you start Blender, click Save User Settings at the bottom. \ No newline at end of file diff --git a/Tuto/BlenderNation.jpg b/Tuto/BlenderNation.jpg new file mode 100644 index 00000000..27e96fb6 Binary files /dev/null and b/Tuto/BlenderNation.jpg differ diff --git a/Tuto/ExportAssetDocAnimation.jpg b/Tuto/ExportAssetDocAnimation.jpg new file mode 100644 index 00000000..7b2504bc Binary files /dev/null and b/Tuto/ExportAssetDocAnimation.jpg differ diff --git a/Tuto/ExportAssetDocCollision.jpg b/Tuto/ExportAssetDocCollision.jpg new file mode 100644 index 00000000..53c8c0b6 Binary files /dev/null and b/Tuto/ExportAssetDocCollision.jpg differ diff --git a/Tuto/ExportAssetDocConsoleLog.jpg b/Tuto/ExportAssetDocConsoleLog.jpg new file mode 100644 index 00000000..3f537d2d Binary files /dev/null and b/Tuto/ExportAssetDocConsoleLog.jpg differ diff --git a/Tuto/ExportAssetDocNomenclatureColored.jpg b/Tuto/ExportAssetDocNomenclatureColored.jpg new file mode 100644 index 00000000..8fb2d8f9 Binary files /dev/null and b/Tuto/ExportAssetDocNomenclatureColored.jpg differ diff --git a/Tuto/ExportAssetDocPotentialErrors.jpg b/Tuto/ExportAssetDocPotentialErrors.jpg new file mode 100644 index 00000000..a37bdf83 Binary files /dev/null and b/Tuto/ExportAssetDocPotentialErrors.jpg differ diff --git a/Tuto/ExportAssetDocScreen1.jpg b/Tuto/ExportAssetDocScreen1.jpg new file mode 100644 index 00000000..f73711c9 Binary files /dev/null and b/Tuto/ExportAssetDocScreen1.jpg differ diff --git a/Tuto/ExportAssetDocScreen2.jpg b/Tuto/ExportAssetDocScreen2.jpg new file mode 100644 index 00000000..25cca890 Binary files /dev/null and b/Tuto/ExportAssetDocScreen2.jpg differ diff --git a/Tuto/How export assets from Blender.md b/Tuto/How export assets from Blender.md new file mode 100644 index 00000000..ea5976de --- /dev/null +++ b/Tuto/How export assets from Blender.md @@ -0,0 +1,65 @@ +#Set asset(s) to export +We will see how to define the assets to export + +1. Open Tool panel in 3D View (T), clic to Unreal engine 4 category and go in Object Properties panel + +2. Select the asset you want to export and set the Export type property on "Export recursive". Now repeat the task for all the objects you want to export. + - Each objects that has this property will export with all its children in a Fbx file. if you don't want export the child set "Not exported" Export type property to the child. else keep "Auto". + - The center the scene of the Fbx file will be equal to the origin point location of the object in blender. The position of the object in the Blender scene does not matter. + - For the Skeletal mesh you need set the Armature as Export recursive. + + + +#Import properties +It is possible to define parameters for importing your assets into the Object Import Properties panel, but this only works with importing via UnrealEnginePython +About UnrealEnginePython: https://github.com/20tab/UnrealEnginePython +How Import asset in Unreal Engine https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/How import assets from Blender to Unreal.md + + +#Collisions and Sockets +It possible to create collisions and socket for your StaticMesh assets in blender. + +1. Create a new mesh, it will be your collider shape. And place it to your asset. (For a socket create a Empty object) + - An asset can contain multiple collider shapes but each collider must use a different object +2. Select your collider shape(s) or Empty object and at the last select your target asset. +3. In Collisions and Sockets panel clic on the appropriate button for the convert the selection to collider or socket (Converted collider are green are now the child of the asset) + - About StaticMeshes collision: https://docs.unrealengine.com/en-us/Engine/Content/FBX/StaticMeshes#collision + - If you want to create a capsule use 2 sphere in a same object. + - is a Not exported child contains collider, the collider will not exploring as the child. + - If you change the name of the objet that contains the collider you will need clic on Check potential errors button for update hirarchy name of the all colliders. + + + +#Animations +It is of course possible to export animations with your skeletal mesh but you need use Action Editor in Dope Sheet windows + +1. select your SkeletalMesh and open Dope Sheet windows +2. Set Action Editor mode and create your animations on actions ( /!\ Don't forget to use fake user to not lose your animation ! ) + - You can use driver for the Morph Targer + +3. Open Tool panel in 3D View (T) and clic to Unreal engine 4 category. +4. Select your SkeletalMesh and in Animation panel Properties you can set the animations property of your skeletal mesh like Animation time, Quality, and select the animations to export. + + +#Nomenclature +1. go in Nomenclature panel. + - The nomenclature is by default defined in correlation with the UnrealEngine Pipeline but you can change it is you use another pipeline. For change nomenclature property + - By default the all assets are exported to the location of the blender file but you can also change this. + - Depending on the assets you can also set a sub folder in Object Properties panel, Sub folder name property + + + +#Export process +Now we can export all asset. + +1. go in Export panel. + - You can choose the type of object to export +2. clic on Check potential errors button + - This will update all hirarchy name, correct the bad properties and show the potential errors. + +3. Now clic on the big sexy Export for UnrealEngine 4 button + - Animations, Poses and cameras can take a long time to export. + - Look in blender system console for more info. + - At each new export the old files will be overwritten + + diff --git a/Tuto/How import assets from Blender to Unreal.md b/Tuto/How import assets from Blender to Unreal.md new file mode 100644 index 00000000..d3a78a07 --- /dev/null +++ b/Tuto/How import assets from Blender to Unreal.md @@ -0,0 +1,43 @@ +I recommend reading before the document How export assets from Blender.md if you have not read it: https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/How%20export%20assets%20from%20Blender.md + +#Import assets in Unreal engine +Depending on the object type, the import parameters are not the same. +- For Static mesh assets you need tick CombineMeshs +- For Skeletal mesh assets you need tick Import Morph Targets if you use Shape Keys +- The animation assets need be imported after the skeletal mesh +- For animations assets untick Import Mesh and select you Skeleton in Skeleton + + + +#Import assets in Unreal engine with UnrealEnginePython +1. Instal UnrealEnginePython: https://github.com/20tab/UnrealEnginePython +2. In Unreal Engine open Python Console. Window > Developer Tools > Python Console +3. Found "ImportAssetScript.py" file. It is placed by default at the location of the blender file in folder ExportedFbx\Other\ +4. In Python Console run the command: `unreal_engine.py_exec(r'')` with ImportAssetScript file location. For me the command is: +`unreal_engine.py_exec(r'G:\Projet perso\Small Project\BlenderScriptWork\BlenderforUnrealEngineAddon\0.2.0\ExportedFbx\Other\ImportAssetScript.py')` + - The all assets will be imported by default in folder ImportedFbx in Unreal Content Browser. You can change folder location in Blender with the property Unreal import location in Import Script panel. + +Example video: https://youtu.be/FOFBfiE5EEQ + + +#Import Blender camera to Unreal Sequencer with UnrealEnginePython +It is possible to import complete sequence from blender to unreal with camera cut management and animations on special tracks like Fov (FocalLength), Aperture (F-stop), and Focus Distance +The Camera cuts are generated with Markers https://docs.blender.org/manual/en/dev/animation/markers.html#bind-camera-to-marker + +1. Instal UnrealEnginePython: https://github.com/20tab/UnrealEnginePython +2. In unreal engine open your level and create a new Level Sequencer +3. Right clic on your new Level Sequencer and Copy Reference +4. In Blender open Tool panel in 3D View (T), clic to Unreal engine 4 category, go in Import Script panel and paste sequence Reference in Unreal LevelSequence Reference property +5. Select you scene camera and set the Export type property on "Export recursive". Now repeat the task for all the camera. +6. Check potential errors and process the export +7. Found "ImportSequencerScript.py" file. It is placed by default at the location of the blender file in folder ExportedFbx\Other\ +8. In Unreal Engine open Python Console. Window > Developer Tools > Python Console +9. In Python Console run the command: `unreal_engine.py_exec(r'')` with ImportSequencerScript file location. For me the command is: +`unreal_engine.py_exec(r'G:\Projet perso\Small Project\Animation\LostMoon\ExportedFbx\Other\ImportSequencerScript.py')` + - Open your Level Sequencer, the all cameras and camera cuts are now imported in ! + - If you want reimport sequence you will need remove camera cut and all cameras from your Level Sequencer before running the script again. + - Animations, Poses and cameras can take a long time to export. Look in blender system console for more info. + + +Example video: https://youtu.be/0PQlN-y2h2Q +LostMoon animation: https://youtu.be/ApY2LpKkJNQ \ No newline at end of file diff --git a/Tuto/ImportAssetDocImportScript.jpg b/Tuto/ImportAssetDocImportScript.jpg new file mode 100644 index 00000000..99b3659b Binary files /dev/null and b/Tuto/ImportAssetDocImportScript.jpg differ diff --git a/Tuto/ImportAssetDocParametersByType.jpg b/Tuto/ImportAssetDocParametersByType.jpg new file mode 100644 index 00000000..c35cf54f Binary files /dev/null and b/Tuto/ImportAssetDocParametersByType.jpg differ diff --git a/Tuto/ImportAssetDocSequencerScript.jpg b/Tuto/ImportAssetDocSequencerScript.jpg new file mode 100644 index 00000000..d554da8a Binary files /dev/null and b/Tuto/ImportAssetDocSequencerScript.jpg differ diff --git a/Tuto/InstallationScreen1.jpg b/Tuto/InstallationScreen1.jpg new file mode 100644 index 00000000..78cde905 Binary files /dev/null and b/Tuto/InstallationScreen1.jpg differ diff --git a/Tuto/InstallationScreen2.jpg b/Tuto/InstallationScreen2.jpg new file mode 100644 index 00000000..5fa785e6 Binary files /dev/null and b/Tuto/InstallationScreen2.jpg differ