Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Ajout des document pour la 0.2.0
  • Loading branch information
xavier150 authored Sep 15, 2018
1 parent 952b9a8 commit 9db7243
Show file tree
Hide file tree
Showing 16 changed files with 137 additions and 14 deletions.
43 changes: 29 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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) </br>
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.
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/InstallationScreen1.jpg" width="600">
3. It should now appear in the window and you can tick the checkbox in the upper right to enable it.
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/Tuto/InstallationScreen2.jpg" width="600">
If you would like to have the add-on enabled every time you start Blender, click Save User Settings at the bottom.
Binary file added Tuto/BlenderNation.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ExportAssetDocAnimation.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ExportAssetDocCollision.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ExportAssetDocConsoleLog.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ExportAssetDocNomenclatureColored.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ExportAssetDocPotentialErrors.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ExportAssetDocScreen1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ExportAssetDocScreen2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions Tuto/How export assets from Blender.md
Original file line number Diff line number Diff line change
@@ -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
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ExportAssetDocScreen1.jpg">
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.
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ExportAssetDocScreen2.jpg">


#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.
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ExportAssetDocCollision.jpg">


#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
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ExportAssetDocAnimation.jpg">
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
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ExportAssetDocNomenclatureColored.jpg">


#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.
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ExportAssetDocPotentialErrors.jpg">
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
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ExportAssetDocConsoleLog.jpg">

43 changes: 43 additions & 0 deletions Tuto/How import assets from Blender to Unreal.md
Original file line number Diff line number Diff line change
@@ -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
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ImportAssetDocParametersByType.jpg">


#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.
<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ImportAssetDocImportScript.jpg">
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.

<img src="https://github.com/xavier150/Blender-For-UnrealEngine-Addons/blob/master/Tuto/ImportAssetDocSequencerScript.jpg">
Example video: https://youtu.be/0PQlN-y2h2Q
LostMoon animation: https://youtu.be/ApY2LpKkJNQ
Binary file added Tuto/ImportAssetDocImportScript.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ImportAssetDocParametersByType.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/ImportAssetDocSequencerScript.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/InstallationScreen1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tuto/InstallationScreen2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9db7243

Please sign in to comment.