Vehicles From Blender to Unreal Engine
39.6 هزار بار بازدید -
4 سال پیش
-
Check out the FREE DEMO
Check out the FREE DEMO of Ultimate Speed Run:
https://store.steampowered.com/app/24...
Car model by Xali. Blendswap.com
Download link:
https://www.blendswap.com/blend/24561
TEXT GUIDE (copy and paste for your convenience)
BLENDER SETUP:
set units to Metric.
unit scale set to 0.0100000
Check 'Separate Units'
make sure all parts of car facing positive X axis (local and global)
name car body and wheels properly (eg. Body, RR, RL, FR, FL, or similar)
create an armature, scale it so you can see it (actual scaled size isn't important).
still in Object Mode, rotate the armature -90 degrees on the X axis so its facing along the -Y axis (R X -90).
in Edit Mode, extrude the bone from the tip (E to extrude).
select new bone and press Alt+P and select Disconnect.
duplicate 3 times so you have 4 bones for the wheels.
now snap each bone to each wheel (use 'snap to' menu (Shift+S))
name bones RR, RL, FR, FL or similar.
select all car parts and then the armature, click CTRL+P and select With Empty Groups
Assign body parts to Vertex Groups:
Select a wheel, and go into Edit Mode, make sure all vertices are selected and in the Vertex Groups, select the right wheel (eg RL) and assign. Do this for all car parts. All body parts should be assigned to the Root Bone.
Check parts are weighted properly.
Select armature, go into Pose Mode (CTRL+Tab) and move each bone to make sure the right mesh parts are moving with it. Do for all bones.
now select all (including armature) and apply Rotation and Scale (CTRL+A).
Ready for Export:
File - Export - FBX
Settings:
Include Section
Check 'Selected Objects'
Select Armature and Shift click Mesh
Transform Section
'Forward' - X forward
'Up' - Z up
Geometry Section
'Smoothing' - Faces
Check 'Apply Modifiers' (if you're using any)
Check 'Tangent Space' ONLY if your model uses Tris/Quads only. Leave unchecked if not.
Animation
Un-check 'Add Leaf Bones'
Un-check 'Bake Animations'
name your file and export.
NOTE: Go to top now and click the + icon next to 'Operator Presets' and enter a name like 'UE4 Vehicle' and click 'OK'. This will save these settings as a preset to use again.
------------------------------------
UNREAL ENGINE 4 SETUP:
Make appropriate folders and drag in your FBX,
Import Dialogue:
leave everything at default, making sure skeleton is checked.
Import Scale should be 1.0
Once imported:
Open vehicle Physics Asset and change the default Capsule on the body to Convex Hull in bottom right corner.
Save all files imported.
Create a new Blueprint of Class - in search box type Vehicle and select Wheeled Vehicle from list, Name it.
open it up and assign your vehicles Skeletal Mesh on the Mesh Component.
Add a Spring Arm and Camera. Adjust Spring Arm length. Close Blueprint.
now create Blueprint of Class, type Vehicle Wheel in search bar and select it. Name it.
In your Vehicle Blueprint, select the Vehicle Movement Component on left, then on right:
Find Wheel Setups and expand.
Expand all four wheels (0, 1, 2, 3).
Name each wheel with the top two being the front wheels (FR,FL).
The bottom two being the rear wheels (RR,RL) and check the Disable Steering flags on these two.
In the drop downs on all wheels, select the Vehicle Wheels Blueprint you created earlier.
---
you can use Simulate to check all is good.
---
create an animation blueprint, selecting Vehicle Anim Instance at top and Your vehicle Skeleton at bottom. name it.
open it up and drag off the Final Animation Pose node and type Wheel Handler (may have to un-check Content Sensitive), select it. This will place two nodes.
Now drag off Wheel Handler node and type Mesh Space Ref Pose and select it. Save it, You're done.
now go back into your vehicle blueprint and select the mesh and assign the anim blueprint from the drop-down on the right.
Also select 'Auto Possess Player' on the right in the details panel and 'Auto Receive Input' at the bottom somewhere.
Setup Inputs in Project Setting.
Add Controls to your car and camera in event graph of the vehicle BP.(see video for this as too much to type for this rough guide)
Trouble shooting: if your wheels are off the ground or sinking into the ground then check your wheel height in blender. Then in your 'Vehicle Wheels' blueprint, change the Wheel/shape Radius to half of that value. (eg. if wheel height in Blender is 44cm, Radius in UE4 should be 22)
DONE! Should work, hopefully. If not then there's probably something wrong with the scaling in Blender. So adjust that and re-import mesh.
if it still doesn't work then just give up on life, believe me, it's easier than trying to figure this out!
--------------------------------------------------------------------------------END
Download Unreal Engine FREE:
https://www.unrealengine.com/en-US/
Download Blender FREE:
https://www.blender.org
Subscribe to this channel :) it's also FREE!
@manim8
https://store.steampowered.com/app/24...
Car model by Xali. Blendswap.com
Download link:
https://www.blendswap.com/blend/24561
TEXT GUIDE (copy and paste for your convenience)
BLENDER SETUP:
set units to Metric.
unit scale set to 0.0100000
Check 'Separate Units'
make sure all parts of car facing positive X axis (local and global)
name car body and wheels properly (eg. Body, RR, RL, FR, FL, or similar)
create an armature, scale it so you can see it (actual scaled size isn't important).
still in Object Mode, rotate the armature -90 degrees on the X axis so its facing along the -Y axis (R X -90).
in Edit Mode, extrude the bone from the tip (E to extrude).
select new bone and press Alt+P and select Disconnect.
duplicate 3 times so you have 4 bones for the wheels.
now snap each bone to each wheel (use 'snap to' menu (Shift+S))
name bones RR, RL, FR, FL or similar.
select all car parts and then the armature, click CTRL+P and select With Empty Groups
Assign body parts to Vertex Groups:
Select a wheel, and go into Edit Mode, make sure all vertices are selected and in the Vertex Groups, select the right wheel (eg RL) and assign. Do this for all car parts. All body parts should be assigned to the Root Bone.
Check parts are weighted properly.
Select armature, go into Pose Mode (CTRL+Tab) and move each bone to make sure the right mesh parts are moving with it. Do for all bones.
now select all (including armature) and apply Rotation and Scale (CTRL+A).
Ready for Export:
File - Export - FBX
Settings:
Include Section
Check 'Selected Objects'
Select Armature and Shift click Mesh
Transform Section
'Forward' - X forward
'Up' - Z up
Geometry Section
'Smoothing' - Faces
Check 'Apply Modifiers' (if you're using any)
Check 'Tangent Space' ONLY if your model uses Tris/Quads only. Leave unchecked if not.
Animation
Un-check 'Add Leaf Bones'
Un-check 'Bake Animations'
name your file and export.
NOTE: Go to top now and click the + icon next to 'Operator Presets' and enter a name like 'UE4 Vehicle' and click 'OK'. This will save these settings as a preset to use again.
------------------------------------
UNREAL ENGINE 4 SETUP:
Make appropriate folders and drag in your FBX,
Import Dialogue:
leave everything at default, making sure skeleton is checked.
Import Scale should be 1.0
Once imported:
Open vehicle Physics Asset and change the default Capsule on the body to Convex Hull in bottom right corner.
Save all files imported.
Create a new Blueprint of Class - in search box type Vehicle and select Wheeled Vehicle from list, Name it.
open it up and assign your vehicles Skeletal Mesh on the Mesh Component.
Add a Spring Arm and Camera. Adjust Spring Arm length. Close Blueprint.
now create Blueprint of Class, type Vehicle Wheel in search bar and select it. Name it.
In your Vehicle Blueprint, select the Vehicle Movement Component on left, then on right:
Find Wheel Setups and expand.
Expand all four wheels (0, 1, 2, 3).
Name each wheel with the top two being the front wheels (FR,FL).
The bottom two being the rear wheels (RR,RL) and check the Disable Steering flags on these two.
In the drop downs on all wheels, select the Vehicle Wheels Blueprint you created earlier.
---
you can use Simulate to check all is good.
---
create an animation blueprint, selecting Vehicle Anim Instance at top and Your vehicle Skeleton at bottom. name it.
open it up and drag off the Final Animation Pose node and type Wheel Handler (may have to un-check Content Sensitive), select it. This will place two nodes.
Now drag off Wheel Handler node and type Mesh Space Ref Pose and select it. Save it, You're done.
now go back into your vehicle blueprint and select the mesh and assign the anim blueprint from the drop-down on the right.
Also select 'Auto Possess Player' on the right in the details panel and 'Auto Receive Input' at the bottom somewhere.
Setup Inputs in Project Setting.
Add Controls to your car and camera in event graph of the vehicle BP.(see video for this as too much to type for this rough guide)
Trouble shooting: if your wheels are off the ground or sinking into the ground then check your wheel height in blender. Then in your 'Vehicle Wheels' blueprint, change the Wheel/shape Radius to half of that value. (eg. if wheel height in Blender is 44cm, Radius in UE4 should be 22)
DONE! Should work, hopefully. If not then there's probably something wrong with the scaling in Blender. So adjust that and re-import mesh.
if it still doesn't work then just give up on life, believe me, it's easier than trying to figure this out!
--------------------------------------------------------------------------------END
Download Unreal Engine FREE:
https://www.unrealengine.com/en-US/
Download Blender FREE:
https://www.blender.org
Subscribe to this channel :) it's also FREE!
@manim8
4 سال پیش
در تاریخ 1399/06/29 منتشر شده
است.
39,602
بـار بازدید شده