Difference between revisions of "Category:3D Combat Engine"

From BotF2-Wiki
Jump to: navigation, search
Line 16: Line 16:
 
*Convert Unreal Engine 4 blueprints to C++ [https://forums.unrealengine.com/showthread.php?109069-Blueprint-Nativization-(C-converter)''' Blueprint Nativization''']   
 
*Convert Unreal Engine 4 blueprints to C++ [https://forums.unrealengine.com/showthread.php?109069-Blueprint-Nativization-(C-converter)''' Blueprint Nativization''']   
 
   
 
   
**What does the feature do?
 
•Generates c++ code from Blueprints
 
•Compiles the project with the generated code (only non-editor builds)
 
•Cooks the project with BlueprintGeneratedClasses replaced by newly generated native classes
 
  
 
The main goal of the feature is to reduce the VM overhead in runtime.
 
The aim of the feature (so far) is not to generate readable/friendly/reusable code.
 
This is an experimental beta feature. All UE4 sample games and some medium size demos were successfully nativized, but we’re still working on using the feature with the biggest projects (Paragon).
 
 
How to use the feature?
 
•In editor enable checkbox: '''Edit > Project Settings > Packaging > Nativize Blueprint Assets'''
 
•If you use UAT scripts, add “-nativizeAssets” switch in BuildCookRun command line.
 
 
 
What assets are converted:
 
•Blueprints (classes, function libraries, interfaces),
 
•Anim Blueprints,
 
•Widget Blueprints,
 
•User Defined Structures,
 
•User Defined Enums
 
 
 
What assets are not converted:
 
•Level Blueprints
 
•Any manually excluded Blueprints
 
 
 
C++ cooperation
 
If your project contains C++ code, make sure that all headers are properly included in your source code.
 
There are some rules/restrictions that help make cooperation between manually written code and the nativized code more reliable and efficient.
 
Do not use:
 
•private/protected properties with BP-Visible or Editable tags
 
•private/protected functions callable from BP
 
•noexport structures/classes
 
•bit-fields properties with BP-Visible or Editable tags
 
•private bit-fields properties
 
•properties of types: UBlueprintGeneratedClass, UUserDefinedStruct, UUserDefinedEnum (or any type based on them)
 
 
 
How to exclude blueprints from nativization?
 
In DefaultEditor.ini in [BlueprintNativizationSettings] sections there are:
 
•ExcludedBlueprintTypes (sample usage: “+ExcludedBlueprintTypes=/Script/UMGEditor.WidgetBlueprint”)
 
•ExcludedAssets (sample usage: “+ExcludedAssets=/Engine/Tutorial/SubEditors/TutorialAssets/Character/TutorialCharacter”)
 
 
 
Technical details/Misc:
 
•The feature should work both with VS2013 and VS2015. VS2015 is strongly recommended, especially for bigger projects. A big problem is the size of generated library. VS 2015 handles it much better. If there is a strange compiler/linker error like LNK1000, LNK1248, then try to reduce the amount of nativized Blueprints.
 
•The nativized code is stored in <project>\Intermediate\<platform>\NativizedAssets\Source\NativizedAssets\ (the path was changed since 4.11)
 
•The BlueprintCompilerCppBackend module converts Blueprint syntax tree into C++. Engine\Source\Developer\BlueprintCompilerCppBackend\
 
•The BlueprintNativeCodeGen module does a lot of magic while cooking and packaging. Engine\Source\Developer\BlueprintNativeCodeGen\
 
•Assets are nativized if (and only if) they are cooked. When the cooker has no assets/maps specified (to be cooked) it cooks everything from content directory. So if you see some unused blueprints nativized, try to fill “Project Settings > Packaging > List of maps to include in a packaged build” (or MapsToCook in DefaultGame.ini).
 
 
 
How to debug the converted code?
 
If you nativize a BP-only project, then (after nativization) run GenerateProjectFiles.bat. It will add a new project to UE4 VS solution. Do not use this project to compile anything in VS. Also do not use this project to run Editor.
 
1.To build a debug .exe file run the following lines. They can be found in log output, when nativized build is packaged (but instead of Debug there is Development switch). It’s better to copy them, so all switches are proper for your environment.
 
 
 
Code:
 
"<UE4>\Engine\Binaries\DotNET\UnrealBuildTool.exe" <project name> Win64 Debug -Project=<project path>\<project name>.uproject <project path>\<project name>.uproject -PLUGIN "<project path>\Intermediate\<platform>\NativizedAssets\NativizedAssets.uplugin" -remoteini="<project path>" -noxge -generatemanifest -NoHotReloadFromIDE -ignorejunk
 
 
 
Code:
 
"<UE4>\Engine\Binaries\DotNET\UnrealBuildTool.exe" <project name> Win64 Debug -Project=<project path>\<project name>.uproject <project path>\<project name>.uproject -PLUGIN "<project path>\Intermediate\<platform>\NativizedAssets\NativizedAssets.uplugin" -remoteini="<project path>" -noxge -NoHotReloadFromIDE -ignorejunk
 
 
2.Set Working Directory in VS project (debug configuration) to <Packaged Folder>\<platform>\<project name>\Binaries\Win64\
 
3.Run debug in VS (do not recompile the project from VS).
 
  
  

Revision as of 17:30, 15 May 2017

All about 3D combat engine

Unreal

>> main page >> Unreal

We are working with Unreal Engine to develop 3D combat: (It is free for non commercial use)

.... You can begin learning Unreal Engine for space combat here:

......https://www.youtube.com/channel/UCgRPPSQK_r4ynfwQ6rdHFoA

......https://www.youtube.com/watch?v=ZtdeLyrSOdo



Blender

>> main page >> Blender

  • Blender is a free 3D modeling program. See also Autodesk Maya, 3d Max, Lighwave 3D, ...

...... Export models in the .FBX file format: https://wiki.unrealengine.com/Static_Mesh_from_Blender#Overview

...... The basic unit in Unreal is 1 cm. Set blender to this by selecting an object, then go to properties, scene, units and set length: metric and unit scale: 0.01 (down from meter to cm), save your startup file in the file pull-down menu. No faces in UV unwrap can be overlapping (sorry, that is an .fbx file thing with UE4), Set the objects Pivot Point to (0,0,0) center of the world rather than center of mesh object. Build your model facing to the + x axis (global). {Blender defaults to -y} Use the static mesh editor to delete collision and add it back as generated capsule collision.

The static mesh, texture and material appear to go in the BluePrint folder in UE the way we are building the engine.

.........See also creating and editing and applying materials at these links

Pages in category "3D Combat Engine"

The following 3 pages are in this category, out of 3 total.