SDK Tips and Tricks (Killing Floor 2): Difference between revisions

From Killing Floor 2 Wiki
Jump to navigation Jump to search
(Initial Commit.)
 
No edit summary
Line 1: Line 1:
=Introduction=
==Introduction==


This is just a compilation of miscellaneous tips and tricks from mappers when using the SDK. These range from the novice to the advanced to the very obscure. It is worth giving it a read through as you may encounter one of these situations during your development.
This is just a compilation of miscellaneous tips and tricks from mappers when using the SDK. These range from the novice to the advanced to the very obscure. It is worth giving it a read through as you may encounter one of these situations during your development.
== Hotkeys ==
{| class="wikitable" style="width:70%;"
|-
! scope="col" | Hotkey
! scope="col" | Function
|-
|~
|Toggle between World and Local space
|-
|Spacebar
|Toggle between Movement/Rotation/Scaling
|-
|G
|Toggle Game view mode in Viewport
|-
|H
|Hide selected actors
|-
|Shift + H
|Hide all but selected actors
|-
|Ctrl + H
|Unhide all actors
|-
|N
|Toggle Path Nodes
|-
|P
|Toggle Paths
|-
|T
|Toggle Landscape/Terrain
|-
|O
|Toggle Volumes
|-
|B
|Toggle Builder Brush
|-
|Ctrl + Left Click
|Multiple Select
|-
|Right Click + Scroll Wheel
|Change movement speed around the viewport
|-
|Ctrl + number
|Set a bookmark
|-
|number
|Snap to bookmark
|-
|F4
|Open Actor Properties
|-
|[
|Increase Grid Snap Size
|-
|]
|Decrease Grid Snap Size
|}
There are a lot more hotkeys for the editor, these are the main ones people usually have issue with when first starting out. You can check for others here: https://sites.google.com/site/lessonsdarrenmckinsey/udk-hotkeys
== General Usage ==
* Its good to know the console commands for debugging issues and testing things.
**https://wiki.killingfloor2.com/index.php?title=Useful_Console_Commands_(Killing_Floor_2)
==General Mapping ==
* '''NEVER''' use groups - the map will always crash when you attempt to play it in the Base game.
**In the same regard, try not to use Prefabs. They do work and will not crash the Base game, however they have caused SDK crashes and even whole Map corruptions.<br /><br />
*Where possible try and do the majority of your movement, rotation and scaling in ''World'' space.
**Rotations in ''Local'' space are not accurate, they are very prone to rounding errors. Rotating a mesh even by 90° will not truly be rotated by 90°, it will always be off by a couple of decimal points
*** You can observe this, rotate a mesh back and forth a couple of times and watch the Rotation properties, they will always have bizarre decimal places.
*** Although small, are large enough to offset the entire mesh if you plan to repeat their placement (eg: like with the Modular Set).
** It should be stressed that if working with the Modular Kit Set - '''ALWAYS''' use rotations and transforms in ''World'' space.
*** This makes sure everything is tightly organised and no tiny gaps appear from the above issues using ''Local'' space.<br /><br />
*Try not to mirror non-symmetrical meshes.
**Mirroring an object on an axis will not mirror its RigidBody collision. You will still be able to walk over it normally, but buggy behaviour will still exists with gore, bodies and any other RigidBodies that will seem like they clip into the mirrored mesh. <br /><br />
*Be careful not to accidentally place or convert meshes to ''InteractiveFoliageActors'' 
**The option is very easy to do as it is positioned right underneath StaticMeshActors in the context menus
**Foliage actors have additional collisions and bounds that can have unwanted interactions with weapons and projectiles
**If you suspect you have some, check your Scene window to see if any exist.
==Lighting==
*ALWAYS turn off Dynamic Shadows for PointLights
**Located under PointLight Properties > Light Component > Light Component.
**Further discussion why here: https://wiki.killingfloor2.com/index.php?title=Map_Optimization_Guide_(Killing_Floor_2)#The_PointLight_Pitfall.<br /><br />
* The SDK does have separate Lighting Draw Distances than the Game.
**If your lights start disappearing at long distances this could be the cause.
==Miscellaneous Issues==
*The further you drift from the origin of the map, the more rounding errors occur for things like collision and lighting.
**Collisions end up not being smooth. eg: clipping on smooth/flat surfaces, character sliding when standing still.
**Lighting can cause shadows to flicker
**Staying  <80,00uu from the origin is recommended to avoid the above. <br /><br />
*If you see Zeds/Players disappear behind glass this is due to Visibility Collisions
**You can turn this off by going to the ''Mesh Properties > Static Mesh Component > Collision > RBCollide With Channels'' and disabling ''VisibilityCollision'' <br /><br />
*You can set the ''Translucency Sort Priority'' under the Render settings in an actor's properties. Useful if you have multiple layered translucent materials.
**Sorted High to Low, Higher will take priority.
**Flickering splat maps can be fixed by increasing priority on translucent materials.
**You can set priorities to negative (eg: -1). <br /><br />

Revision as of 06:53, 24 October 2018

Introduction

This is just a compilation of miscellaneous tips and tricks from mappers when using the SDK. These range from the novice to the advanced to the very obscure. It is worth giving it a read through as you may encounter one of these situations during your development.

Hotkeys

Hotkey Function
~ Toggle between World and Local space
Spacebar Toggle between Movement/Rotation/Scaling
G Toggle Game view mode in Viewport
H Hide selected actors
Shift + H Hide all but selected actors
Ctrl + H Unhide all actors
N Toggle Path Nodes
P Toggle Paths
T Toggle Landscape/Terrain
O Toggle Volumes
B Toggle Builder Brush
Ctrl + Left Click Multiple Select
Right Click + Scroll Wheel Change movement speed around the viewport
Ctrl + number Set a bookmark
number Snap to bookmark
F4 Open Actor Properties
[ Increase Grid Snap Size
] Decrease Grid Snap Size

There are a lot more hotkeys for the editor, these are the main ones people usually have issue with when first starting out. You can check for others here: https://sites.google.com/site/lessonsdarrenmckinsey/udk-hotkeys

General Usage

General Mapping

  • NEVER use groups - the map will always crash when you attempt to play it in the Base game.
    • In the same regard, try not to use Prefabs. They do work and will not crash the Base game, however they have caused SDK crashes and even whole Map corruptions.

  • Where possible try and do the majority of your movement, rotation and scaling in World space.
    • Rotations in Local space are not accurate, they are very prone to rounding errors. Rotating a mesh even by 90° will not truly be rotated by 90°, it will always be off by a couple of decimal points
      • You can observe this, rotate a mesh back and forth a couple of times and watch the Rotation properties, they will always have bizarre decimal places.
      • Although small, are large enough to offset the entire mesh if you plan to repeat their placement (eg: like with the Modular Set).
    • It should be stressed that if working with the Modular Kit Set - ALWAYS use rotations and transforms in World space.
      • This makes sure everything is tightly organised and no tiny gaps appear from the above issues using Local space.

  • Try not to mirror non-symmetrical meshes.
    • Mirroring an object on an axis will not mirror its RigidBody collision. You will still be able to walk over it normally, but buggy behaviour will still exists with gore, bodies and any other RigidBodies that will seem like they clip into the mirrored mesh.

  • Be careful not to accidentally place or convert meshes to InteractiveFoliageActors
    • The option is very easy to do as it is positioned right underneath StaticMeshActors in the context menus
    • Foliage actors have additional collisions and bounds that can have unwanted interactions with weapons and projectiles
    • If you suspect you have some, check your Scene window to see if any exist.

Lighting

  • The SDK does have separate Lighting Draw Distances than the Game.
    • If your lights start disappearing at long distances this could be the cause.

Miscellaneous Issues

  • The further you drift from the origin of the map, the more rounding errors occur for things like collision and lighting.
    • Collisions end up not being smooth. eg: clipping on smooth/flat surfaces, character sliding when standing still.
    • Lighting can cause shadows to flicker
    • Staying <80,00uu from the origin is recommended to avoid the above.

  • If you see Zeds/Players disappear behind glass this is due to Visibility Collisions
    • You can turn this off by going to the Mesh Properties > Static Mesh Component > Collision > RBCollide With Channels and disabling VisibilityCollision

  • You can set the Translucency Sort Priority under the Render settings in an actor's properties. Useful if you have multiple layered translucent materials.
    • Sorted High to Low, Higher will take priority.
    • Flickering splat maps can be fixed by increasing priority on translucent materials.
    • You can set priorities to negative (eg: -1).