Pragma Engine

Introduction

What is Pragma?

patreon_logo32.png youtube_social_square_red32.png Twitter_Social_Icon_Square_Color32.png Artboard-1_32.png Discord-Logo-Color.png

Pragma is a free, open source custom game engine written in C++. Here is an overview over some of its core features:

Pragma is currently in an early beta, some features may not be fully functional at the moment or are unfinished/experimental.

 

Pragma also ships with the Pragma Filmmaker, an open source alternative to the Source Filmmaker.

You can use the Book Navigation on the left to navigate to the next page, which has details on how to download and install Pragma.

Click the firefox_2020-08-12_15-57-16.png button at the top right for other topics (such as the API documentation for developers).

 

Media

Download

System requirements

A Linux build will be available in the future.

 

Download

Standalone

Latest Version: PFM v0.4.2 (2021-06-22)

download.png

Mirror: https://github.com/Silverlan/pragma/releases

 

Source Code

Pragma and PFM are both completely open-source on GitHub, which means you can also build them yourself.

Changelog

Version 1.0.3 [2021-12-20]

Filmmaker v0.4.4

 

Engine
Lua

 

Version 1.0.2 [2021-09-13]

Filmmaker v0.4.3

LuxCoreRender

 

Engine

 

Lua

 

Version 1.0.1 [2021-06-22]

Filmmaker v0.4.2

 

Engine

 

Lua

 

Version 0.9.15 [2021-05-30]

Filmmaker v0.4.1

 

Engine

 

Lua

 

Version 0.9.14 [21-04-16]

Filmmaker
Engine
Lua

 

Version 0.9.13 [2021-03-14]

Filmmaker
Engine
Lua

 

Version 0.9.12 [2021-02-08]

Filmmaker
Engine
Lua

 

Version 0.9.11 [2020-11-11]

Filmmaker
Engine
Lua

 

Version 0.9.10

Filmmaker
Engine
Lua

Troubleshooting

Pragma crashes on startup

If Pragma crashes on startup, please ensure that your system fulfills the system requirements and that your graphics drivers are up to date.

If you have multiple GPUs, please make sure to enable your high-default GPU as the default for Pragma. You can follow the instructions on this page to do so.

 

There is no text in the main menu

Try adding -graphics_api vulkan to the launch options in Pragma to switch to the Vulkan renderer:

firefox_2020-08-21_09-35-29.png

 

I have an AMD GPU and Pragma/PFM crashes on startup

This should be fixed in newer versions of PFM, until they are released publicly, you can try this temporary fix:

  1. Go to the Pragma root folder
  2. Remove the `cache` directory
  3. Go to `Pragma/shaders/world/eye/`
  4. Rename `fs_eye.gls` to `fs_eye_bak.gls`
  5. Launch PFM

Character eyes won't be rendered properly in the real-time render viewport, but it shouldn't be freezing anymore.

Mapping

Asset Import / Export

Export

Pragma comes with the following export capabilities:

Exporting Assets

If you want to export a model or material, the easiest way to do so is via the Filmmaker interface. Simply open the model/material catalog, right click on the model icon, then click "Export asset":

export_model_asset.png

If you want to export a different asset type, or need more control, you can use the export command utility instead. To use it, start a game in Pragma first. You can either load a map (which map doesn't matter), or run "map empty" in the console. Once the map has been loaded, you can use the "util_export_asset" console command with the following parameters:

Models only:

If you want to use Pragma to export Source Engine assets, you generally don't have to copy any of the assets to Pragma, the Engine should be able to locate the assets automatically as long as they're part of one of your installed Source Engine games on Steam.

 

Usage Examples

Exporting a material (including textures):

util_export_asset -material "brick/brick_1a" -verbose -image_format png

Exporting a texture:

util_export_asset -texture "concrete/concrete_5_floor_3_psd_918fcd2d" -verbose -image_format png

Exporting a map:

util_export_asset -map "gm_construct" -verbose -export_images 1 -image_format png -generate_ao 0 -export_animations 0

Exporting a model:

util_export_asset -model "props_2fort/tank001" -verbose -image_format png -generate_ao 0

(Make sure to remove the ".mdl" extension!)

Exporting a Source 2 model:

util_export_asset -model "characters/gman/gman" -verbose -image_format png -generate_ao 0

Batch-exporting all models in a directory and all sub-directories:

util_export_asset -model "props_2fort" -verbose -image_format png -generate_ao 0 -recursive 1

 

Exporting retargeted models

This section refers to PFM v0.4.3 and newer and may not be representative of older versions.

It is also possible to export a model with retargeted animations (i.e. export a model with the animations of another model.):