Post-processing-effectors (PPE)

From Mod Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:00, 6 July 2008 (edit)
Atrocious (Talk | contribs)
(PPE analysis based on the russian article by Green Hawk (kudos!) and own experiments (WIP))
← Previous diff
Revision as of 16:55, 6 July 2008 (edit) (undo)
Don Reba (Talk | contribs)
m (changed the russian source article link to an interlink)
Next diff →
Line 17: Line 17:
Based on the analysis of the <tt>ltx</tt> files, we can assume that every rule cannot be bigger than 16 bytes. Based on the analysis of the <tt>ltx</tt> files, we can assume that every rule cannot be bigger than 16 bytes.
- +[[ru:Формат файлов постпроцессинга (ppe)]]
-[http://sdk.stalker-game.com/ru/index.php/%D0%A4%D0%BE%D1%80%D0%BC%D0%B0%D1%82_%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2_%D0%BF%D0%BE%D1%81%D1%82%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D1%81%D1%81%D0%B8%D0%BD%D0%B3%D0%B0_(ppe) Russian article]+

Revision as of 16:55, 6 July 2008

Custom PPE for gray vision
Custom PPE for gray vision

Post-process effectors (.ppe) in STALKER are used to create visual effects like radiation-exposure, drunkenness, psy-effects, night-vision and other. They are binary files that have a certain internal structure. Once you understand the structure and manage to keep the overview in the file, you can edit them or even create new effectors. Note that PPEs always effect the whole screen, so it is not possible to limit effects to certain areas. A necessary tool to edit PPEs is a decent hex editor like HxD.

This article is based on the Russian version by Green Hawk (link at the bottom). Many thanks to him for doing the research and sharing with the community!

Contents

Analysis

It may help you to understand the structure of PPEs if you look into \gamedata\script\postprocess.script and into some ltx like \gamedata\config\scripts\proba.ltx. It seems like postprocess.script was used to create PPEs - or at least read PPE configurations from .ltx'.

Every PPE file contains multiple sets of rules. The structure of these rule-sets can be guessed by looking at the files above. But to make things easier, here is an overview over the structure:

File header

Every file starts with 01 00 00 00. This is most likely a signature to identify the file content (the camera animations share the same structure and have the signature 00 11 00 00). Then four bytes with unclear meaning follow. Usually they are 7C 00 00 00 but there are slight variations. So our file until here looks like 01 00 00 00 7C 00 00 00. Now the rule-sets follow.

Rule-sets

Every set begins with 01 01 XX 00 where XX is the number of rules that the set contains. For example 01 01 00 00 means that no rule follows, so the set is not active at all. Many mistakes happen if the number given at the start of the set does not fit the number of rules. Make sure to check it, every time you change something.

Based on the analysis of the ltx files, we can assume that every rule cannot be bigger than 16 bytes.

Personal tools
In other languages