P2ST map compiler tools Created 1 year ago2023-04-27 13:07:22 UTC by crystallize crystallize

Created 1 year ago2023-04-27 13:07:22 UTC by crystallize crystallize

Posted 1 year ago2023-04-27 13:07:22 UTC Post #347483
P2ST is a set of level compilers written by Uncle Mike (creator of Xash3D) in 2017-2019.

P2ST was written on top of the classic map compiler from Half-Life SDK to avoid generational layering of bugs in ZHLT supplemented with low performance and unreadable macros of VHLT and half-baked solutions of both.

Priorities behind P2ST compiler tools:
1. To be faster than VHLT
2. Effective BSP tree (recursion depth, overall speed)
3. Clean lightmaps without artifacts (noise, seams, etc.)
4. Unlimited plane count and overall compatibility

Notable features:
  • virtual entities func_detail_wall, func_detail_fence, func_detail_illusionary from TyrUtils as presets with predefined zhlt_detaillevel, zhlt_noclip etc.
  • zhlt_precisionclip 1 to create collision using Quake algo. Exhaust limits 4 times faster. Can be applied globally or per entity.
  • Bezier Curves from Quake 3(Uncle Mike uses Quark which got a Bezier tool). At compile time Beziers turn into illusionary polygons.
  • zhlt_nocsg 0/1 (global, for func_group, other entity) disables CSG like in Quake 3. Brushes don't cut each other and void-facing polygons stay.
  • misc_model: recursive inclusion of prefabs. Certain ".map" can be referenced on another map as misc_model prefab and at compile time the prefab itself, its child prefabs, their child prefabs etc. will compile and will be put into your map. You can edit one external prefab and then it will update on all your maps after recompiling them. Prefab maps can contain func_detail, misc_model, env_static, Beziers. World brushes and other entities will be ignored.
  • Or you can use misc_model as a regular model entity: specify ASE or MDL model. Specifying .MDL turns misc_model into env_static.
A reminder of Xash3D-specific features:
  • Increased max plane size for lesser polycount (zhlt_maxextents up to 128)
  • Highres lightmaps (zhlt_texturestep down to 2 (2 texels in a luxel) )
  • World space lightmap (zhlt_worldluxels 1) to solve seams and other lighting artifacts
More compiler features per tool:
CSG
  • can load WADs from PAKs
  • _dirt to toggle dirtmapping (AO) on a face or a group of faces. Also works for world brushes inside func_group.
  • world faces covered in SKIP become NULL. Use zhlt_noclip 1 for true nonsolid brush.
  • custom hull description is searched in mod folder as hulls.txt.
  • CSG alerts about missing sky texture: it needs it to calculate sunlight
BSP
  • merge 0/1/2 - how to merge faces in the same plane, no-default-advanced
  • classic progressbar during creation of the BSP tree instead of numbers
  • even unsealed map will generate .prt so you can run it (but remember a bunch of faces that remain outside).
  • "zhlt_invisible" 0\1 - to make an entity invisible, "zhlt_noclip" - 0\1 - to make it nonsolid.
  • "zhlt_detaillevel" - func_detail priority level and its belonging to the group of details. At 0 func_detail becomes func_group.
RAD
  • retains original coloring of QBSP lighting. To mimic the coloring of VHLT, use -balance in command line
    • bounced lighting can cast shadows
    • flickering and toggled lightsources generate bounced light
  • can cast shadows from non-solids (like patches)
  • Drop To Floor for env_static is on RAD now so real position of the model would match its shadow.
  • no vismatrix. Cuts some time in certain cases and 10 to 400mb of RAM every time.
  • VIS for light_environment to speed up sunlight calculation
  • Allocation of 3GB of RAM tested on real cases. If allocation fails attempts continue for the next minute. Considerin the absense of vismatrix, the case of insufficient RAM becomes even less likely
  • without any light entities RAD wouldn't try to calculate anything including skylight
  • -gamma (0.3 - 1.0)
  • zhlt_vertexlight for all entities
  • Ambient Occlusion (p2rad.exe -dirty)
  • sped up shadows being cast by studiomodels. STALKER's Chernobyl plant compiles in 10-15 min, that's over 10 million luxels.
  • external textures for alpha-solid faces on studiomodels in case of models with broken alpha-bit. TGA and DDS supported.
P2ST works best from the Half-Life directory so it can see all the file structure below (wads, models). It is also a requirement for texture reflectivity.
>>>Full feature list include support for Quake lighting etc.<<<

Download
PATCH for VIS
c1a0dc1a0d
Tree model casting shadowTree model casting shadow
Pony model with per-vertex lighting and self-shadowsPony model with per-vertex lighting and self-shadows
Posted 1 year ago2023-04-27 16:38:51 UTC Post #347484
I wasn't sold until the pony.
Posted 1 year ago2023-04-29 19:57:42 UTC Post #347487
Interesting. Which RAD should you use, hlrad, p1rad, or p2rad? And do you need to do anything to make them work with GoldSrc Half-Life?
Oskar Potatis Oskar Potatis🦔
Posted 1 year ago2023-05-01 20:50:35 UTC Post #347493
Use p2rad or hlrad. It says, hlrad is p2rad without bumpmapping, and p1rad is for Paranoia 1.

P2ST generates GoldSrc-compatible maps unless you specify some extended parameters.
Posted 1 year ago2023-05-06 21:35:51 UTC Post #347498
Updated RAD description.
Posted 1 year ago2023-05-07 13:24:39 UTC Post #347500
Posted 1 year ago2023-05-07 20:43:59 UTC Post #347501
Try ones from PrimeXT, it supports Linux and its compilers should be the same:
https://github.com/SNMetamorph/PrimeXT
You must be logged in to post a response.

Shoutbox

Log in to add shouts of your own